Repository navigation
Description
What issue are you seeing?
A long-running Codex session lost its active task immediately after automatic compaction. The assistant stopped and asked the user to resend the task, despite the original conversation and a task checkpoint still existing locally. When the user pasted the recent transcript and asked to locate the chat, the assistant located the very same session but presented it as a separate chat to resume.
This is an observed continuity failure; the precise client/server root cause is not established.
Environment
- Session metadata: Codex 0.164.0; source
vscode, originatorcodex-tui. - macOS 15.7.7, arm64.
- Model recorded at the affected boundary:
gpt-6-astra, medium reasoning. - Occurred 2026-10-27 at 22:16:27 UTC during ongoing work.
Evidence from the saved rollout
At the affected compacted record:
messagewas an empty string.replacement_historycontained seven entries: one additional-tools entry, five developer-message entries, and one user-message entry.- The sole user message was environment context, not the user's task.
- No assistant summary or substantive user task message was present in that replacement history.
retained_contextseparately recorded eight user messages and eight assistant messages, with both corresponding incomplete flags true. This establishes that retained metadata existed; it does not establish that its contents reached the continuation model.- The original earlier transcript remained readable in the same local session file. This was not deletion of the on-disk transcript.
At 22:16:49 UTC, the assistant responded:
I have the workspace context, but the active request isn’t available. Please resend the task you’d like me to continue.
Later, reading the original session file and an existing filesystem checkpoint recovered the authorized task and progress.
What steps can reproduce the bug?
Observed sequence (not yet a deterministic minimal reproduction):
- Run a long, multi-stage coding/validation task in one session across several automatic compactions.
- Let another automatic compaction occur while the task is unfinished.
- Inspect whether the continuation retains the active task, prior decisions, and pending work.
- In this occurrence, it instead stopped and requested the task again; inspecting the compacted rollout showed the replacement-history shape above.
Earlier compactions also had empty message strings, so an empty string alone is not claimed to be sufficient to reproduce this failure.
What is the expected behavior?
Compaction should preserve enough usable task state for continued work, or explicitly surface a failed handoff and recover the prior state before continuing. It should not silently resume with only environment context and then abandon an active authorized task. The continuation should also recognize its own current session when locating the transcript.
Additional information
Related: #54584 and #55508 concern invalid or stale local-compaction summaries with other providers. This report does not establish that the same code path is responsible: this occurrence used the model listed above and includes separate retained-context metadata.
Please investigate validation of the replacement context and delivery of retained task state at this boundary. A regression test should verify that a continuing long-running task can recover its objective and pending operation after compaction.
Project names, repository details, credentials, source code, private task content, and full session logs are intentionally omitted.
Activity
r266-tech commentedon Oct 28, 2026
A source check against the published
rust-v0.164.0tag (6aaac694) narrows the handoff to inspect:message: String::new(), so that field alone does not distinguish success from this failure.compactionoutput item, then appends it to the retained messages before installing the replacement history.Is the seven-entry list exhaustive, including non-message items? A sanitized list of only each entry's
typeand, for messages,rolewould help distinguish an absent checkpoint from a present opaque checkpoint that failed to preserve the task. No message text orencrypted_contentis needed.I inspected the release source only; I have not reproduced the incident or established which compaction path the affected client used. AI-assisted analysis.
wyshmily commentedon Oct 28, 2026
Adding an independent Windows occurrence from October 28, 2026, with evidence inspected in the local rollout. Immediately after automatic compaction, Codex abandoned the active implementation task and ended the turn with an acknowledgement of AGENTS.md rules.
Environment: Codex desktop on Windows; the turn context at the affected boundary records
gpt-6-astra,mediumreasoning. The exact desktop/runtime build responsible for this boundary has not been independently established.The sequence below is from one continuous session. Times are UTC:
compactedrecord was written.task_completeevent ended the turn.The final response, translated from Chinese with the workspace path redacted:
There was no new user message between the compaction and turn completion. The response did not deliver the pending work or report its actual remaining status. It behaved as though acknowledging the injected AGENTS.md instructions was the task.
For comparison with the type/role question in the preceding comment, the following is the complete
replacement_historytype/role list from this occurrence, including non-message entries:[ {"type":"additional_tools","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"user"} ]The sole user-role message contained AGENTS.md instructions plus environment context. It did not contain the substantive active task. There was no assistant summary or
compaction-typed item in this serialized array.Other fields at that boundary:
The original task messages and pre-compaction progress remained readable in the same local rollout. This was not deletion of the on-disk conversation.
Evidence limits: an earlier compaction in this session had the same seven-entry type/role shape, so that shape alone is not a failure detector. An empty
messagealone is also insufficient. The separate retained-context fields establish that additional state was recorded, but do not establish what was delivered to, or effectively used by, the continuation model. This does not prove the internal checkpoint was absent or identify a client/server root cause.Please include “AGENTS.md acknowledgement followed by immediate turn completion while substantive work remains pending” as a continuation-failure case when investigating this issue. The expected behavior is to recover the active objective and remaining work, treating AGENTS.md as execution constraints rather than the deliverable.
Privacy: project names, local paths, business details, account/session/message identifiers, source code, screenshots, credentials, opaque payloads, and raw logs are omitted. This is an AI-assisted, user-authorized report based on inspected local records.
nurazem commentedon Oct 28, 2026
Follow-up from the original reporter: this is still occurring, including in a session whose metadata records 0.165.0. I inspected the 10 most recently active main sessions (excluding this investigation and background agents), cloned the public repository, and ran a synthetic local probe before posting.
New finding: the failures include unsuccessful recovery operations after a fresh-window transition. The seven-entry replacement array is not, by itself, evidence that remote V2 compaction lost its opaque checkpoint.
Anonymized observed failures
20 compaction boundaries were inspected across 10 sessions. Six clear lost-task continuations occurred in three sessions. All six had substantive work pending, no intervening user message, and a final lost-task response followed by
task_complete. Session labels below are arbitrary and contain no original identifiers. Times are UTC.The second B occurrence is the original issue's incident, not an additional incident. The recorded model at all six boundaries is
gpt-6-astra, medium reasoning. Version labels above are session metadata, not a claim that every resumed turn used that exact executable build.The repeated recovery error was:
Two other boundaries also had these errors but continued substantive work, so backend errors alone are not a sufficient failure detector either. The other 14 inspected boundaries did not show this immediate lost-task final response; that is not a claim that their entire sessions were error-free.
Common fields at all six failure boundaries:
{ "message": "", "compaction_response_id": null, "replacement_history_type_role_list": [ {"type":"additional_tools","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"developer"}, {"type":"message","role":"user"} ] }This list is exhaustive, including non-message entries. The sole user entry is environment context. Retained-context counts
(user, assistant)are A:(2,8),(5,8),(8,8); B:(4,8),(8,8); C:(8,8). These counts establish separately recorded state, not successful delivery or recovery.Local source investigation and runnable boundary reproduction
Source checkout:
rust-v0.165.0, commit360319d8dee62d87e2d59fc0c21805d79519cfed. Executed binary: locally installedcodex-cli 0.165.0. I inspected the pinned source but did not build it or run its Rust test suite.Relevant source:
start_new_context_windowinstalls initial context and selected retained client items, with empty message and no compaction response ID.token_budget_mid_turn_auto_compaction_resets_before_active_follow_upexplicitly expects prior user messages and active tool output to be dropped.I ran the Python probe below against the installed binary. It uses a loopback SSE server, synthetic content, no API credentials, an ephemeral session, and a temporary workspace. A synthetic tool call and reported token usage force a mid-turn threshold crossing. The mock final response is fixed; it does not simulate or establish an actual model's reasoning or recovery behavior.
Observed results:
The fresh-window continuation also included a previous-window reference. The omitted-checkpoint V2 case exited with an error; it did not silently continue.
Reproduction boundary: this deterministically reproduces the task-free fresh-window request, not the production backend failure or the model's subsequent abandonment. That fresh-window behavior is intentional in the source. Combined with the observed recovery errors, it points investigation toward recovery availability and fail-safe continuation at that boundary. It does not prove which client/server component failed in the real sessions.
A useful regression would force this window transition during an unfinished task, make recovery unavailable, and verify that the session preserves/reacquires a minimal active-task checkpoint or explicitly reports a recoverable handoff failure rather than successfully completing a turn by asking for a new task.
Runnable Python probe (Python 3, codex-cli 0.165.0 on PATH)
Save as
mock_compaction.pyand runpython3 mock_compaction.py. No dependencies beyond Python's standard library and the installed Codex binary are required. Localhost socket access is required. Three passing assertions confirm the boundary behavior described above, not an end-to-end reproduction of the production incident.Privacy: no original session/message/window identifiers, private workspace paths, project names, task text, private source code, credentials, opaque production payloads, or raw logs are included. This is an AI-assisted, user-authorized report based on inspected local records and a synthetic client-boundary probe.
1939869736luosi commentedon Oct 28, 2026
Independent confirmation from macOS desktop on October 28, 2026: five lost-task continuations across four main chats (anonymous sessions A: two incidents; B, C, D: one each). The affected boundaries record
gpt-6-astra, and experimental context management is enabled locally.For each incident, inspected local records show:
Unable to perform operation: The backend request failed.All five boundaries had an empty
message, nullcompaction_response_id, and seven replacement entries: one additional-tools/developer item, five developer messages, and one user message containing workspace/environment instructions. There was no assistant summary or compaction-typed item. Separate retained-context metadata recorded eight user and eight assistant messages.The structure alone is not a failure detector; the failure is unsuccessful recovery followed by an unrelated final answer while work remains pending. One occurrence spans a desktop relaunch and another is an app-update resume; the first three occurred before that relaunch.
The underlying HTTP status and server-side cause are unverified. No isolated reproduction or workaround validation was performed.
Please test recovery-unavailable transitions explicitly: preserve/reacquire the active task or report a recoverable handoff failure, rather than treating rule acknowledgement as task completion.
This user-authorized, AI-assisted summary excludes original chat content/titles, project details, paths, account/session identifiers, credentials, screenshots, and raw logs.
John-Rood commentedon Oct 28, 2026
You traced the fresh-window selection and left one question open in the follow-up: whether the seven-entry list is evidence that remote V2 lost its checkpoint. It is not, and the reason sits in the retention filter. Nothing on that path can put a user message into the replacement history.
Where the shape comes from
run_auto_compactbranches on a feature before it looks atremote_compactionat all:That path never asks a model to summarise.
compact_token_budget.rs#L42-L58goes straight tostart_new_context_window, and the same feature disables summarization for the turn atturn.rs#L187(auto_summarization_enabled = auto_compaction_enabled && !features.enabled(Feature::TokenBudget)). Somessage: ""andcompaction_response_id: nullare what this installer writes, not signs that a summary was produced and dropped.start_new_context_window(codex-rs/core/src/session/mod.rs#L4968) builds the new history from the initial context items, thenretained_client_items, then installs them throughreplace_compacted_history. The filter is the whole story:and
is_client_authored_developer_message(compact_remote_v2.rs#L507-L512) matchesrole == "developer"behind aclient_authoredflag. A user turn has no branch into that list. So one additional_tools entry, five developer entries and one user entry, with the user entry carrying environment context, is the deterministic output of this path when nothing is retained. You and three independent reporters produced the same list because it is fixed, not because you hit the same server failure.retained_contextis not a second channel. It is written as a field on theCompactedItemrollout record atmod.rs#L4485, sitting next tomcp_resource_originsandresume_metadata. The model receivesreplacement_history. Counts of 8 and 8 with incomplete flags describe what the history tracked for resume bookkeeping, and they cannot describe what the continuation saw, because that channel does not reach a request. That was the one thing the thread could not close from the outside, and it closes from the source.The lever
token_budgetisStage::UnderDevelopmentwithdefault_enabled: false(codex-rs/features/src/lib.rs#L2002-L2005). Turn it off and the V2 branch runs instead, which your probe already shows carries the checkpoint into the continuation. In config:or
-c features.token_budget=false. It is worth asking each reporter whether experimental context management was on, since every boundary in this thread has the shape that only this path produces.1939869736luosialready said it was enabled locally.Measured contrast
Ten compaction boundaries in my own rollouts that carry a compaction-typed item retained between one and fourteen substantive user messages each. The reported shape retains zero. Same rollout format, different installer.
Detecting it and getting the task back
compact-audit.mjswalks a rollout, classifies everycompactedrecord as checkpointed, task-free, or a local summary, and prints the pending user task from before any boundary that came out task-free. Point it at~/.codex/sessions.compact-audit.mjs (node, no dependencies, read-only, no network)
I built a fixture that reproduces your exact seven-entry list and the script flagged it as task-free and printed the task from before the boundary. Run across my local sessions it classified ten checkpointed boundaries and reported zero task-free, so it is not firing on the normal shape.
The fix
A retention budget already exists for developer messages:
RETAINED_MESSAGE_TOKEN_BUDGET = 64_000(compact_remote_v2.rs#L87). The narrow change is to apply the same idea to user-authored messages under its own smaller budget, so a fresh window always carries the objective it is supposed to continue. The regression you asked for can then assert it directly: at a token-budget boundary with a turn in flight,replacement_historymust contain at least one user-role item that is not environment context.If the requirement is memory that survives the boundary regardless of which installer runs, that is what I built MemoryRouter for: the agent's memory on the account rather than inside the window. https://docs.memoryrouter.ai/codex?utm_source=github&utm_medium=issue&utm_campaign=openai-codex
tk-neuron commentedon Oct 29, 2026
I’m seeing a similar issue in Codex Desktop on macOS: after “Optimized the conversation,” Codex sometimes loses the active task and asks me to explain what I want to work on again.
In one session on October 29, I found the following sequence in the local logs (times in JST):
notes/v2/write_filereturned HTTP 404, followed byUnable to perform operation: The backend request failed.new_contextran. Duringrun_auto_compact,notes/v2/thread_hintreturned HTTP 404.notes/v2/list_files_by_prefixreturned HTTP 404, again followed byThe backend request failed.The same endpoint returned another 404 at 09:33:44.The failures around the context transition may be related to the recovery failures reported above, although I can’t establish from these logs whether they caused the task to be lost. The 404s came from notes-related endpoints, not the compaction endpoint.
The retained logs also show
thread_hintreturning HTTP 200 on October 27 and HTTP 404 on October 28–29. I don’t know when or why that changed.Environment:
Codex Desktop 26.1007.71326, build 20398, production channel
macOS 26.6 on Apple Silicon
Japanese UI
Experimental context management is currently enabled:
I haven’t confirmed whether this setting was enabled at every affected boundary or tested whether disabling it changes the behavior.
John-Rood commentedon Oct 29, 2026
Your config answers the question the thread left open for the reporters, and it answers it harder than you probably intended.
[features.context_management] experimental_mode = truedoes not sit next totoken_budget. It turnstoken_budgeton. On rust-v0.165.0,apply_experimental_contextgates on ContextManagement and then switches the flag itself:and it runs at session start (
core/src/session/mod.rs#L824-L834), before the turn. Sotoken_budget = falsewill not hold while context management is on: the gate re-inserts TokenBudget on the next session. That is my correction to the lever I gave earlier in this thread. To leave the fresh-window path you have to turn off context_management, not token_budget.The same function sets
use_history_notes_extension = trueunconditionally (token_budget.rs#L56). That is why a desktop session on experimental context management is calling notes routes at all. It is not a separate feature you opted into.Which makes your 404s the interesting part of this comment, not a side note.
thread_hintis a context contributor, not a convenience call:On any error, 404 included, it emits an analytics status and returns an empty fragment list. No prompt fragment, no error surfaced, nothing in the transcript saying the hint did not arrive. And that fragment is contributed to
PromptSlot::ContextWindow, meaning it is the channel that carries what the thread was working on into the next window. On the fresh-window installer,replacement_historyhas no user-authored task by construction, so the hint is the one thing that can put the objective back. A 404 there removes it silently.Your other two endpoints are the same extension's tools:
write_fileandlist_files_by_prefixatext/history-notes/src/tools.rs#L80-L98. The wrap-up prompt that asks for a note is fired when the window is spent (core/src/session/turn.rs#L682-L687intotoken_budget.rs#L201-L212). Read against that, your 09:33 sequence is the whole extension failing in order: the note write fails,new_contextruns with nothing task-bearing to retain, the hint read fails, the notes read fails. Every step of the recovery path 404s and every step is silent. That does not prove the model abandoned the task, but it does mean there was nothing left in the request that could have kept it, which is a better explanation than the model freely choosing to re-acknowledge rules.thread_hintreturning 200 on October 27 and 404 on October 28-29 also rules something out. The client build did not change and the call site did not change, so a backend route retired or moved under a live client. Any client on experimental context management between those dates is calling a route that no longer answers, and failing soft.Worth checking before anyone hand-correlates logs:
ThreadHintStatusEventalready records thread id, status and timestamp. The Failed events are in telemetry now. Joining those to the task-free boundaries gives the correlation directly instead of rebuilding it from local logs.The fix you asked for is right, and the code makes the cheap half of it obvious. A contributor that cannot deliver its fragment should contribute a line saying so rather than an empty vector, and nothing should complete a turn as successful while the window that replaced the task carried no task.
Shimada666 commentedon Oct 30, 2026
Independent Linux occurrence on October 30, 2026, with a read-only HTTP recheck and local mitigation.
Environment:
codex-cli 0.165.0at investigation time. This is not proof that every earlier turn used that executable.gpt-6-astra, medium reasoning.[features] context_management = true.Observed sequence in the same ongoing session (UTC):
compactedrecord installed replacement history.The serialized replacement history had exactly seven entries: one
additional_toolsdeveloper entry, five developer messages, and one user message containing AGENTS.md/environment context. It contained neither the active user task nor an assistant summary orcompactionitem.messagewas empty. The preceding task and progress were still readable in the local rollout; the on-disk transcript was not deleted.Client HTTP logs independently show four related backend requests returning HTTP 404 around the handoff, at 02:25:18, 02:25:22, 02:25:26 and 02:25:30 UTC. A read-only retry at 02:36:10 UTC also returned HTTP 404;
x-oai-request-id:5d622df4-6f65-45c9-88b4-85afa653ba05.Evidence limits:
Mitigation applied after investigation: removed the local
context_managementopt-in. A freshcodex features listreports bothcontext_managementandtoken_budgetas false. This validates configuration only; we have not yet verified a subsequent long-task compaction or claimed that the already-running session changed behavior.Please include the case where unfinished work is followed by a rules-only final response, and ensure a failed task-state handoff cannot silently be treated as successful task completion.
User-authorized, AI-assisted report. Private task details, workspace paths, account/session/window identifiers, credentials, and full logs are omitted.
charles39 commentedon Oct 30, 2026
Another observed task-continuity failure on 2026-10-30, reported at the user's explicit request.
Environment: macOS 27.0.1 (26A434), desktop app 26.1023.51421 (build 22530), bundled codex-cli 0.165.0-alpha.1.2. These are locally verified versions; the independently installed CLI is different and is not used as the app version.
Observed sequence in one long-running chat:
Expected: a compaction boundary should preserve the current user request, unfinished operation, scope, and authorization. A continuation containing only repository/environment instructions must not be treated as a completed task. If usable task state is missing, recovery should happen before emitting a final acknowledgement.
This is an additional observed failure, not a deterministic reproduction or a confirmed model/client/server root cause. No private project content, wallet information, credentials, local paths, or full session transcript is attached.
LitghtCoder commentedon Oct 30, 2026
Adding two independent Windows occurrences on October 30, 2026, at the user's explicit request. Both happened in the same long-running session and match the reported symptom: immediately after a context transition, Codex ended the turn by acknowledging project rules instead of continuing authorized work.
Environment:
cli_version: 0.160.0,source: vscode,originator: codex-tui. These are recorded session values, not a claim that the currently installed desktop or extension executable has that exact version; multiple Codex installations exist on this machine.gpt-6-astra, high reasoning.No explicit base URL is present in that provider section. This provider configuration is a possible confounder; a built-in-provider control has not been performed.
Observed sequence from the saved local session (all times UTC, 2026-10-30):
In each case:
Unable to perform operation: The backend request failed.This establishes a repeatable observed task-continuity failure within this session (two occurrences), not a deterministic minimal reproduction or proof of a particular release regression. We have not captured an underlying HTTP status for these failures, and are not assuming they were 404s. We have not tested disabling the experimental setting, changing provider, or rolling back versions.
Expected: an unfinished authorized task should continue across the transition. If continuation cannot be recovered, the client should surface a clear recoverable failure rather than silently ending with a rules-only acknowledgement.
Please include these Windows occurrences in the existing investigation. A regression test for "unfinished task -> context transition -> backend failure -> rules-only final answer/task_complete" would cover the observed failure.
AI-assisted report based on inspected local records. Project content, source code, local paths, account/session identifiers, credentials, and raw transcripts are omitted.
John-Rood commentedon Oct 30, 2026
Five reports now, three of them inside two hours, and the shape is identical at every boundary: empty compaction
message, a replacement history that is all tool and developer entries plus one environment user message, and a final answer that only acknowledges rules.Shimada666's data settles the part this thread left open. A read-only retry at 02:36 returned 404 with a request id, ten minutes after four 404s around the handoff, so this is not a transient. tk-neuron's route returned 200 on 10-27 and 404 on 10-28 and 10-29, and today's reports are 404s again. The notes route has been retired under live clients and the client does not know it.
That carries more weight than it looks, because
thread_hintis the only channel that can put the objective back into a fresh window. It is a context contributor that builds its fragment list from one backend call, and every error path including a 404 records a failed status and returns an empty list. No exception, and nothing reaches the user. The fresh window is built from developer instructions and environment context, which is exactly the seven-entry shape in all three of today's reports. The task is readable on disk and unreachable by prompt, and nothing in the client says so.The lever is the feature flag, not the endpoint.
apply_experimental_contextgates oncontext_managementand, once past that gate, callsfeatures.enable(Feature::TokenBudget)and setsuse_history_notes_extension. An explicittoken_budget = falsegets re-inserted at the next session, so leavingcontext_managementon and trying to disable the token budget from underneath it does nothing. Shimada666's mitigation is the right one andcodex features listreporting both flags false is the state to hold until the route is back.On LitghtCoder's confounder:
model_provider = "custom"withname = "OpenAI"is not insulating you. The provider test in that gate isself.name == "OpenAI", the display name, not the provider id, so your custom section clears every condition on its own terms, name OpenAI, no base URL supplied,requires_openai_auth = true,env_keyandauthunset. The notes path ran because your provider was read as first party. The 300000 window and 270000 trigger just make you cross boundaries far more often than the defaults, which is why you took two hits in ninety minutes. Renaming that section would hide the symptom without changing the behavior.On the detector ask, the seven-entry shape alone is not enough, correct. Detect on the exit. A turn that ends with a response calling no tools whose content is only a restatement of project or environment rules, immediately after a context transition and with no intervening user message, is the failure. That is the shape of all five reports in this thread, and it is checkable against the rollout locally with no server-side signal.
MarMarLabs commentedon Oct 31, 2026
Another occurrence on macOS. Versions and flags I read on this Mac on October 30:
codex-cli 0.166.0-alpha.5.1codex-cli 0.166.0codex features liston both binaries showscontext_managementtrue andtoken_budgetfalseThese are the installed versions, not necessarily the ones running during the cases below. I have not turned
context_managementoff yet.Case 1. I asked for a read-only briefing. The agent read the full job, the inventory and the work orders and gave a detailed update. Then the conversation compacted. Its next response only acknowledged my AGENTS.md instructions and ended the turn without the briefing. When I challenged it, it said it had not accessed the full job and asked for screenshots of data it had already read. Feedback ID
019f98e4-2f4d-7841-b238-c47806897aaf.Case 2. On October 30 I sent three long local code-review tasks to one desktop thread. Each task set read limits, including directories the agent must not search and its own memory files. In each run, after what the agent itself called a continuation, it searched its memory registry before rereading those limits. In two runs it also listed workspace folders recursively. It then reread the brief, finished the task correctly and disclosed the searches in its report. Nothing was written and none of the results were used.
I did not record the model in either case. For case 2 I also did not capture a compaction record or HTTP logs and did not inspect the local rollout, so I can't tell whether it involved a compaction or is the same bug. I have not verified the empty compaction
message, the seven-entry replacement history or the notes-route 404s from this thread for either case.r266-tech commentedon Oct 31, 2026
The latest thread evidence closes the remaining causal gap in my earlier comment: the issue is the experimental context-management path, not the replacement-history shape alone.
John-Rood's source explanation shows that
context_managementenablestoken_budgetat session start and that the fresh-window installer intentionally excludes user task messages. The same thread now has repeated HTTP 404s from the history-notes recovery path, while a read-only retry returned 404 with a request ID. That matches the observed rules-only continuation: the task remains on disk, but the only task-bearing context contributor fails soft and contributes no prompt fragment.I am updating my conclusion accordingly: the useful diagnostic is the combination of (1) an unfinished turn followed by a rules-only completion, (2) no intervening user message, and (3) failed notes/context requests at the same boundary. The seven-entry replacement list alone is not sufficient. The immediate user mitigation is to disable
context_managementuntil the notes route and failed-handoff behavior are corrected;token_budget=falsealone is not sufficient because the experimental gate re-enables it.This is AI-assisted source analysis and issue follow-up; it does not identify the private server-side reason for the 404s.
John-Rood commentedon Oct 31, 2026
Case 2 is the part worth keeping. Your read limits were in the task message, which is a user turn. The replacement history this path installs keeps the boundary messages, developer instructions plus the AGENTS.md and environment user turn. Task-bearing user turns do not come back. At the boundary the session rules still apply and the per-task prohibitions are gone, so nothing left in the window told it to stay out of its memory registry or out of the workspace walk, and it did both before rereading the brief. Case 1 is the same mechanism caught one step earlier.
A prohibition you need to survive a continuation has to live in AGENTS.md or another developer-level surface for that thread. Stated in the turn you would naturally type it into, it lasts until the next boundary.
On the flags you listed: on 0.166.0 both context_management and token_budget are UnderDevelopment with default_enabled false, so context_management reading true means your config turned it on. token_budget reading false is not insulation. apply_experimental_context in core/src/session/token_budget.rs enables TokenBudget at session start whenever context_management is on, provided the model, provider and account plan all qualify, and then forces the history-notes extension on. What the list shows outside a session is not the state the session runs with. Disabling context_management is the lever that holds across sessions, and the sub-flag is not.
Case 1's shape matches the rest of the reports here: unfinished turn, a completion that only restates project or environment rules, no user message in between. The feedback ID makes it traceable.
nurazem commentedon Oct 31, 2026
The issue was the experimental compaction flag. Closing this issue
Beautiful12138 commentedon Nov 3, 2026
This happened again on Windows Codex Desktop on November 3, 2026. After a context transition, three recovery operations failed. Codex then ended the unfinished task with a reply acknowledging AGENTS.md rules.
The session metadata records
cli_version: 0.165.0-alpha.1.2. At the affected turn, the model wasgpt-6-astrawithhighreasoning. The configuration checked during this investigation containedfeatures.context_management = { experimental_mode = true }.All times below are UTC:
compactedrecord was saved.Unable to perform operation: The backend request failed.task_completeevent was recorded. The final reply only acknowledged repository rules, authorization boundaries, and Chinese output requirements. The investigation was still unfinished.After the user pointed out the lost context, Codex reread the original conversation and recovered the task, findings, and next steps. The conversation was still on disk.
The saved records show this difference between the three earlier compactions and the affected one:
compactionitem inreplacement_historycompaction_response_idreplacement_historyThe affected record had an empty
messageand sevenreplacement_historyentries: one additional-tools entry, five developer messages, and one user message. The active task was absent from that array.The separate
retained_contextstill contained eight user messages and eight assistant messages. Both message-category incomplete flags weretrue; the overallincompleteflag wasfalse.alexg2009 commentedon Nov 16, 2026
I'm Alex, co-founder of Synesis OS. We're building a personal AI Chief of Staff focused on persistent memory, contextual intelligence, and keeping track of goals, decisions, and commitments.
We've already built a working prototype, and we've recently opened our Private Beta waitlist.
We're trying to better understand how people experience these challenges in their daily workflows, and your perspective caught my attention.