fix(sessions): find a codex rollout marker under the session's CODEX_HOME - #830
Open
defangdevs wants to merge 1 commit into
Open
defangdevs wants to merge 1 commit into
defangdevs wants to merge 1 commit into
Conversation
…HOME codex_rollout_uuid only searched ~/.codex/sessions, so a codex session whose profile sets CODEX_HOME never found its own "[agent-box session <id>]" marker on respawn and started a fresh thread. Pass the session's resolve_codex_home answer to it, the same as the registered-thread fallback from #826 already gets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQayjSBQom6xiA256JuX3e
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 30 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
codex_rollout_uuidlooked for a session's[agent-box session <id>]marker only in~/.codex/sessions. When a profile setsCODEX_HOME, that session's codex writes rollouts somewhere else, so the marker was never found and every respawn started a fresh thread instead of resuming.start_sessionnow resolves the session's Codex home once (resolve_codex_home "$sprofile", the same helper the standalone mirror and the AGENTS.md seed already use) and passes it to bothcodex_rollout_uuidandcodex_registered_thread. With no profile override, the lookup falls back to~/.codexexactly as before.Test plan
tests/test-codex-registered-thread.sh(native, part of thewhatsapp-clicheck) has new cases: a marker found under a profile'sCODEX_HOME; the same marker not matched when the default~/.codexis searched; the default still resolving to~/.codexwhen no home is passed; andstart_sessionpassing$cxhometo both lookups. Run against master'ssupervisor.sh, it fails withFAIL: marker under the session's CODEX_HOME not found.nix run .#assemble,nix run .#update-goldenandpython3 tests/test_agentbox.py --updateregenerated the module and the golden supervisor payload. The native expected tree did not change.nix build --keep-going .#ci-native(the whole native set) exits 0 locally on x86_64-linux.sessionstest has no case that resumes a codex session.🤖 Generated with Claude Code
https://claude.ai/code/session_01RQayjSBQom6xiA256JuX3e