Repository navigation
Disable Codex goals so no work outlives the Turn - #876
Merged
Merged
Conversation
An active Codex goal makes app-server start a continuation turn on its own whenever the thread goes idle. On mx a hosted Session whose Turn created a goal ran a second native turn right after the Turn completed: two exec_command calls wrote notes.txt in the workspace and update_goal closed the goal, while the API listed one completed Turn. The adapter now passes --disable goals, an unattended-cloud override for work that outlives its Turn.
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.
Codex
0.153.4turns on itsgoalsfeature by default. When a thread with an active goal goes idle, app-server starts another turn toward the goal on its own (ext/goalon_thread_idle→continue_if_idle).Measured on mx (microsandbox, MiniMax-M2.7): a hosted Codex Session whose only Turn asked the model to call
create_goaland then stop. The rollout showstask_completeat 09:29:09 and a newtask_startedin the same second, with the internal message "Continue working toward the active thread goal". That turn ran twoexec_commandcalls, wrotenotes.txtin the workspace and calledupdate_goal. The API listed one completed Turn, so the tool calls, model tokens and workspace change happened outside any Turn.The adapter now disables
goals. This uses the existing override reason "no work that outlives its Turn": the reason sits beside the flag, the Codex Runtime guide lists the override, and the OpenAI compatibility ledger (EN + ZH) records the native difference.Checks:
go vetandgo testforapps/daemon/internal/agent/codex, website build and tests (28/28), BundledDocsTests.Need help on this PR? Tag
@codesmith-botwith what you need.