Task design, go/no-go, and approval flow for multiple AI coding agents
A shared preflight so Cursor, Codex, and Orca do not scatter execution and approval rules, with human approval before implementation.
Key points
- Turned context size and cost judgment into a process before an agent runs
- Chooses how to run by task scale in three steps: Go / Split / Defer
- Estimates load from what will actually be referenced, not the whole repository
Background
agent-budget-router evaluates task size, referenced issues, and budget as a shared core; agent-specific differences stay in thin adapters. Linear is the task source of truth, and implementation proceeds only after human approval — verified on real machines.
Challenge
- It was hard to judge how much context an agent would consume before a run
- Repository size alone does not show how much the agent will actually read
- Sending a large task to a high-capacity model can spend a large quota before results are reviewed
- Split and model choices leaned on individual experience
- Seeing AI cost only after a run made prior control difficult
What I did
- Redesigned agent-budget-router as an explicit Skill
- Separated Core, Resolver, Skill Orchestrator, and Host shim responsibilities
- Resolved Linear issues through a shared Resolver
- Verified the same Core output on Cursor, Codex, and Orca
- Shared SKIP / DIRECT / CONFIRM_FIRST / SPLIT / DEFER decisions
- Required human approval before a run
- Re-checked issue, prompt, and scope at approval time
- Invalidated a prior approval when content changed and required a new one
- Prevented double runs from resending the same approval
- Kept Cursor / Codex session differences in adapters
- Moved from a transparent Hook approach to a portable Skill
What changed
- Expected load can be checked before a task is given to an agent
- Oversized tasks can be detected and split before a run
- Criteria for model choice and task splitting are written down
- AI cost moved from something checked after a run to something judged before it
- AI use is treated as operations and cost control, not only as a single tool
Design notes
Separate the AI recommendation from human approval
Even when Core recommends SPLIT, that is not treated as permission to run. The AI execution plan and the human approval workflow are separate layers.
Keep agent-specific differences out of Core
Cursor, Codex, and Orca differ in how they are invoked and how sessions are kept, but the shared decision logic does not change. Differences are absorbed in shims and adapters.
What improved
Rather than depending on agent performance alone, the system designs what is sent, in what unit, and to which model. Judging load and cost before a run turns AI use from ad-hoc trial into reusable operating rules.
Notes
- Built a flow that estimates context use before a run
- Made it possible to judge a suitable task size for AI agents
- Standardized criteria for model choice, splitting, and cost control
- Implemented it as a Cursor Skill that can be reused
- Published on GitHub so other environments can reuse the same shape