Repository navigation
Description
Summary
The direct guided-start packet can emit a Todo selection command that cannot be executed. When more than one runnable Todo exists, the first quota guard correctly asks the caller to choose one, but the suggested follow-up carries --todo-id without a stable --turn-instance-id. The CLI then rejects that follow-up, so a product-native guided start cannot bind the selected Todo through the formal path.
Impact
- A fresh guided agent can enter
selection_requiredand then fail before useful work begins. - Hosts must invent an out-of-band turn id or bypass the generated command, weakening reproducibility.
- The explicit Todo-selection behavior introduced for quota admission is not reachable from the direct guided-start packet when several Todos are runnable.
Minimal synthetic reproduction
- Register a goal with at least two runnable Todos for one agent.
- Generate the direct guided-start or onboarding packet.
- Run its emitted quota guard.
- Observe a
selection_requiredresult whose suggested selection command includes--todo-idbut no stable--turn-instance-id. - Execute the suggested command.
Actual result:
loopx quota should-run --todo-id requires --turn-instance-id
Expected behavior
The direct guided-start packet should establish and propagate one stable turn identity across its initial quota guard and any emitted explicit-selection follow-up. The fix must preserve fail-closed Todo selection and must not weaken quota, lineage, or settlement gates.
Reproduction revision
Reproduced from a clean install of main at d2c959f7a1a1fe753242bc2e281fce6d69372ef9.
Suspected surface
This appears to be a command-construction and host-packet binding gap: heartbeat-owned quota guards receive a turn id, while the direct guided-start/bootstrap path renders the guard without one. The exact fix location should be chosen after tracing the generated packet and selection action end to end.
Acceptance criteria
- A focused synthetic regression creates multiple runnable Todos and executes the generated selection action successfully.
- The same stable turn identity is used for initial admission, explicit Todo binding, subsequent writeback, and settlement.
- Single-Todo guided start remains unchanged.
- Missing or stale turn identity still fails closed.
- Public-boundary validation contains no private state or provider-specific context.
Activity
huangruiteng commentedon Aug 24, 2026
Independent post-merge validation found that #3572 closes the
codex-apppath but not thecodex-app-sshguided-start path.On current
mainat044e840b602b6cd93f14aa692b29cb3258b429a5, a connected synthetic goal with two runnable Todos generates:Executing that guard returns
selection_required=true, but its follow-up template is:Neither command establishes or propagates a Turn identity, so executing the returned selection still fails the existing
--todo-id requires --turn-instance-idgate.The remaining acceptance gap is narrow: direct guided start for
codex-app-sshshould opt into the same one-Turn admission semantics, while ordinary non-guided quota calls remain unchanged and generic/non-receipt profiles continue to fail closed.