Resolve a Codex loop's real thread before reading its goal or resuming it (#346) - #352
Merged
Merged
Conversation
…g it (#346) Codex's notify hook banks the thread-id of the event it receives. For a goal loop that opens on /goal, that id named a thread Codex never persisted: no rollout, no row in its threads table, no goal. The daemon read the goal verdict from it and found nothing, and a resume would have failed over to a fresh launch. For Codex only, the banked id is checked against Codex's own state database; when Codex does not know it, the loop's real thread is found by the node id its launch line carries. The goal verdict and the local resume both use it. Other backends are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
scgopi
added a commit
that referenced
this pull request
Sep 13, 2026
PR #352 landed with one [LineLength] violation, so `make check` exited 2 on main. Formatter output only, no semantic change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016n4hSXVu6wLR4RCfnt6PPG
This was referenced Sep 13, 2026
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.
Follow-up to #350 and #351 (#346), Codex only.
What the live run on 0.1.70-beta3 found
Codex's
notifyhook banks thethread-idof the event it receives. For a Codex goal loop that opens on/goal, that id named a thread Codex never persisted: no rollout, no row in Codex's ownthreadstable, no goal. The loop's real thread held the goal and completed it, but:graphcode node doneWhat changes
For Codex loops only, the thread id is resolved against Codex's own state database before it is used. The banked id is kept when Codex knows it as a thread. Otherwise the loop's real thread is found by its node id, which appears in the launch line Codex records as the thread's first message.
Both uses go through it: reading the Codex goal verdict, and resuming a local Codex session. Claude Code, Copilot CLI, OpenCode and pi are untouched.