Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.917.71314
What subscription do you have?
ChatGPT Business
What platform is your computer?
Linux 7.0.0-34-generic x86_64
What issue are you seeing?
When working in a long Codex conversation, the active Goal can sometimes be lost after automatic context compaction.
For example, I may work in the same conversation for about an hour and solve problems X and Y. I then encounter a more complex problem Z, so I start a new Goal specifically for Z and explain what needs to be done.
Codex initially behaves correctly: it starts the Goal, scans the relevant files, and begins working on problem Z. However, after the message indicating that the context was automatically compacted appears, Codex can lose track of the active Goal and return to an older problem from earlier in the conversation, such as problem Y, even though that problem has already been completed.
As a result, Codex may start working on previously completed tasks instead of continuing with the currently active Goal.
I have encountered this behavior multiple times recently.
What steps can reproduce the bug?
1 - Work in the same Codex conversation for an extended period of time.
2 - Complete several tasks/problems in that conversation (for example, problems X and Y).
3 - Start a new Goal for a different and more complex problem (problem Z).
4 - Let Codex work on the Goal until automatic context compaction occurs.
5 - After the context is compacted, Codex may lose track of problem Z and resume working on one of the previously completed problems.
What is the expected behavior?
The currently active Goal should remain the primary objective even after automatic context compaction.
Context compaction should preserve the active Goal and its current progress. Previously completed tasks from earlier in the conversation should not become active again unless they are explicitly relevant to the current Goal.
Additional information
This seems specifically related to automatic context compaction rather than the initial Goal creation. The Goal starts correctly and Codex initially understands the task, but the loss of focus happens after the context is compacted.
Activity
github-actions commentedon Sep 28, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
xcreyentex-byte commentedon Oct 8, 2026
Hey, I read your report about Codex losing the current goal after context compaction and returning to tasks you'd already completed.
I have a possible workaround that might help with this. If you're interested, I'd be happy to share it. And if it doesn't fit your situation, I'd like to understand more about what's happening so we can see whether there's a way to address it.
120L021326 commentedon Oct 10, 2026
Additional occurrence on Windows Codex Desktop 26.1007.2314.0, observed on 2026-10-10. This substantially affects my experience with Goal mode: two automatic research turns did real work, but both final responses answered an unrelated question that had already been resolved.
Environment
OpenAI.Codex 26.1007.2314.0(read from installed package metadata, not the About dialog).cli_version:0.162.0-alpha.17.2; originator:Codex Desktop.gpt-6.1-sol.10.0.26300; PowerShell.Observed scenario
This is a history-verified occurrence in an existing conversation, not a separately reproduced deterministic minimal test.
Two recorded transitions
All timestamps below are UTC on 2026-10-10.
Read-only inspection of the local session records confirmed:
resume_metadata.turn_attribution.turn_trigger: "goal".replacement_historylists contained 37 items, with the older storage question as the latest ordinary user message. Neither retained a standalone readable Goal continuation message.Expected behavior and impact
After compaction, the active Goal should remain the execution target. The final response should report the work and findings from that Goal turn, including unfinished work. An already answered question should remain historical context unless I bring it back.
Instead, approximately 24- and 29-minute automatic turns ended with irrelevant repeated answers. This concealed useful progress from the final responses and made it difficult to trust whether Goal mode was still following the objective. I had to pause the Goal and request an audit of the recent turns.
Diagnostic limits
The encrypted compaction payload prevents concluding that the Goal was completely absent from restored model context. This report establishes a repeated behavioral failure immediately after compaction, not the root cause in a particular component. It may relate to #32922, but this occurrence alone does not verify the same implementation cause.
The public report is intentionally sanitized: no raw transcript, private project paths, credentials, server endpoints, private identifiers, or research data are attached.
I3eka commentedon Oct 12, 2026
Additional evidence from my October 7, 2026 occurrence: after compaction,
get_goalsuccessfully returned the correct active objective, but the final response still prioritized an already answered question. This is the same incident documented in my full sanitized report, linked here because that detail may help distinguish task-priority drift from deletion of persisted goal state.What version of the Codex App are you using (From “About Codex” dialog)?
The exact App/About build and interface used to set the goal were not captured. The session records runtime
0.160.1,source: vscode, andoriginator: codex-tui. The installed CLI and running app-server also reported0.160.1when checked on October 7. These values do not establish a Desktop App build or a controlled CLI-only reproduction.What subscription do you have?
ChatGPT-authenticated account; plan identifier
prolite, recorded in the affected turn and independently confirmed throughaccount/readon October 7. The commercial plan label was not established.What platform is your computer?
Reporting-time execution host: Ubuntu 22.04.5 LTS.
uname -mprs:The OS of any separate frontend was not captured.
What issue are you seeing?
A completed ordinary question A regained priority after automatic compaction during a distinct goal B. All times below are UTC on October 7, 2026:
get_goalsuccessfully returned B withstatus: active.update_goalmarked B complete.No new ordinary user message arrived between starting B and that final answer. Work on B did continue, so the observed failure is partial task drift and a mixed final response. Persisted goal state remained available.
What steps can reproduce the bug?
Observed workflow; an independent deterministic minimal reproducer has not been established:
get_goalreturning B.The first goal request recorded 189,435 input tokens against a 258,400-token context window, approximately 73%. This is a request count, not a measured compaction threshold or UI percentage. No goal token budget was recorded.
What is the expected behavior?
The active goal should remain the current task after compaction. Retrieving the correct active objective should restore its priority for subsequent work and the final answer; the previously answered question should remain historical unless raised again.
Additional information
gpt-6-astra; reasoning effort:xhigh; provider:openai; collaboration mode:default. Model and effort were unchanged across this compaction.Correlation identifiers:
The linked full report includes the detailed trace and redacted October 7 doctor output. The Community report documents this same occurrence, not another independent reproduction. No raw private transcript is attached.