diff --git a/quest/m0/README.md b/quest/m0/README.md index d6093cbc..177804b1 100644 --- a/quest/m0/README.md +++ b/quest/m0/README.md @@ -42,7 +42,8 @@ ownership-manifest design: - [CI flakes](/quest/m0/ci-flakes.md) - native Windows tests and Release's macOS checks fail only on real breakage - [Review policy](/quest/m0/review-policy.md) - CONTRIBUTING.md says whose review counts - [Gate bench](/quest/m0/gate-bench.md) - measure headroom admission on an idle host -- [Agent lifecycle integration](/quest/m0/worktree-agents.md) - reclaim completed and suspended checkouts through their harness +- [Agent lifecycle integration](/quest/m0/worktree-agents.md) - reclaim completed and suspended Claude checkouts through its hooks +- [Codex checkouts](/quest/m0/codex-checkouts.md) - Codex agents started by `quest agent` release their checkouts on exit - [Agent workflow helpers](/quest/m0/helpers/README.md) - CLI commands for CI waits, PR status, claims, quest moves, and serialized merges - [Kix decision UI](/quest/m0/kix/README.md) - planning and implementation through prompts and summaries, run on the maintainer's own runners diff --git a/quest/m0/codex-checkouts.md b/quest/m0/codex-checkouts.md new file mode 100644 index 00000000..2a741589 --- /dev/null +++ b/quest/m0/codex-checkouts.md @@ -0,0 +1,25 @@ +# [S] Codex agents release their checkouts + +## Goal + +A Codex agent that `quest agent` starts runs inside `quest worktree run`, so +its checkout is released when the agent exits and restored when it resumes, +without waiting for the parent chat to end or the PR to merge. Codex app +threads stay on Codex's native archive. + +## Plan + +Split 2026-10-26 from [Agent lifecycle integration](/quest/m0/worktree-agents.md), +since it does not depend on the Claude hooks; the decision is recorded there. + +- Decided 2026-10-26 (user): Codex documents no worktree hooks, only a + recoverable archive and a 15-worktree retention, so `quest agent` runs the + harness inside `quest worktree run`, which releases on exit and restores on + resume. Codex app threads stay on Codex's native archive. +- Exercise a finished agent, a suspended decision, a crash, and a resumed + session, and confirm each checkout is released or restored. + +## Related + +- [Agent lifecycle integration](/quest/m0/worktree-agents.md) - the Claude side of checkout release +- [Headless agents](/quest/m0/helpers/headless-agents.md) - `quest agent` start, resume, and stop diff --git a/quest/m0/helpers/headless-agents.md b/quest/m0/helpers/headless-agents.md index e6d3d12b..757d5ab6 100644 --- a/quest/m0/helpers/headless-agents.md +++ b/quest/m0/helpers/headless-agents.md @@ -45,4 +45,5 @@ every user would have to add it. ## Related -- [Agent lifecycle integration](/quest/m0/worktree-agents.md) - reclaims the checkouts of finished and suspended agents, including headless ones +- [Agent lifecycle integration](/quest/m0/worktree-agents.md) - reclaims the checkouts of finished and suspended Claude agents +- [Codex checkouts](/quest/m0/codex-checkouts.md) - `quest agent` runs Codex inside `quest worktree run`, releasing its checkout on exit diff --git a/quest/m0/worktree-agents.md b/quest/m0/worktree-agents.md index 023c18d2..41179be7 100644 --- a/quest/m0/worktree-agents.md +++ b/quest/m0/worktree-agents.md @@ -2,10 +2,10 @@ ## Goal -Quest workflows use `quest worktree` checkout ownership through supported -Codex and Claude lifecycle integrations. A completed or suspended worker -releases its checkout without waiting for the parent chat to end or the PR to -merge. +Quest workflows use `quest worktree` checkout ownership through Claude Code's +lifecycle hooks. A completed or suspended worker releases its checkout without +waiting for the parent chat to end or the PR to merge. Codex is +[its own quest](/quest/m0/codex-checkouts.md). ## Plan @@ -21,8 +21,7 @@ Remaining work: merging into an existing file, and `quest uninstall` removes exactly those entries. - Derived defaults for a checkout the hook creates, which gets only a `name`. -- Codex through `quest agent` running the harness inside `quest worktree run`. -- Exercise both harnesses with a finished worker under a still-live parent, +- Exercise Claude with a finished worker under a still-live parent, a suspended decision, a crash, and a restored session. Confirm live that `SubagentStop`'s `cwd` is the subagent's worktree, and that a hook-created worktree passes Claude's isolation identity check. Reconcile existing @@ -55,7 +54,9 @@ Decisions: - Decided 2026-10-26 (user): Codex, which documents no worktree hooks, is covered by `quest agent` running it inside `quest worktree run`, which releases on exit and restores on resume. Codex app threads stay on Codex's - native archive. + native archive. Split the same day into + [Codex checkouts](/quest/m0/codex-checkouts.md), since it does not depend + on the Claude hooks. - Decided 2026-10-26 (user): agents are capped only at the harness's concurrent sub-agent limit, stated once in the guide; the core-count cap is gone, since `quest gate` holds expensive commands. The 2026-10-15 decision