Client or integration
Codex App
Area
Proxy and routing
Summary
Resuming a Codex App thread after it has been idle for more than one hour can silently drop all prior conversation context when using the built-in openai Codex-login forward provider.
The resumed request still succeeds with HTTP 200, but only the newest user message reaches the model. The model therefore behaves as if the existing thread were a brand-new conversation. I expected either the complete thread context to be restored or an explicit continuation-expired error; OpenCodex should not silently continue with a truncated delta.
This occurred without restarting the OpenCodex proxy. The same OpenCodex conversation ID and the same openai / gpt-5.6-sol route were used before and after the idle period.
Reproduction
- Start OpenCodex 2.7.42 with the built-in
openai provider using Codex-login forward authentication.
- Open Codex App, create a thread, and complete enough turns that the next request depends on earlier context.
- Leave the thread idle for more than one hour. The proxy may remain running throughout.
- Resume the same thread in Codex App and send a short instruction such as
continue or a question referring to prior work.
- Observe that the request returns HTTP 200, but the assistant asks for the missing task/configuration or explicitly says it cannot see earlier context.
In the observed thread, the last healthy request at 16:39 contained 85,073 input tokens. The first resumed request at 18:58, approximately 2 hours 19 minutes later, contained only 22 input tokens and zero cached input tokens. Subsequent messages contained only 41, 9, 11, and 15 input tokens. All requests used the same OpenCodex conversation ID, provider=openai, and resolvedModel=gpt-5.6-sol.
The apparent cause is the fixed one-hour continuation-state TTL:
Together, these behaviors turn an expired local replay entry into a successful request containing only the current-turn delta.
Suggested fixes:
- Make the continuation-state TTL configurable and/or increase the default substantially while retaining the existing count, memory, and snapshot-size caps.
- In Codex-login forward mode, fail closed with an explicit continuation-state-expired error when
previous_response_id cannot be expanded. Do not silently forward a delta known to be missing prior turns.
- Add a regression test that advances time beyond one hour and verifies that a resumed forward-mode request either replays the full history or returns an explicit error.
Version
2.7.42
Operating system
macOS 26.5.2 (25F84)
Codex App 26.721.81911; bundled Codex runtime 0.146.0-alpha.3.1.
Provider and model
openai (Codex-login forward provider) / gpt-5.6-sol
Logs or error output
[responses] previous_response_id <redacted> not found in local replay state (model gpt-5.6-sol); forwarding without it — earlier turns may be missing from this request
Sanitized request-log comparison:
16:39 provider=openai resolvedModel=gpt-5.6-sol inputTokens=85073 status=200
18:58 provider=openai resolvedModel=gpt-5.6-sol inputTokens=22 status=200
19:00 provider=openai resolvedModel=gpt-5.6-sol inputTokens=41 status=200
Redacted configuration
{
"defaultProvider": "openai",
"providers": {
"openai": {
"adapter": "openai-responses",
"authMode": "forward"
}
}
}
Checks
Client or integration
Codex App
Area
Proxy and routing
Summary
Resuming a Codex App thread after it has been idle for more than one hour can silently drop all prior conversation context when using the built-in
openaiCodex-login forward provider.The resumed request still succeeds with HTTP 200, but only the newest user message reaches the model. The model therefore behaves as if the existing thread were a brand-new conversation. I expected either the complete thread context to be restored or an explicit continuation-expired error; OpenCodex should not silently continue with a truncated delta.
This occurred without restarting the OpenCodex proxy. The same OpenCodex conversation ID and the same
openai / gpt-5.6-solroute were used before and after the idle period.Reproduction
openaiprovider using Codex-login forward authentication.continueor a question referring to prior work.In the observed thread, the last healthy request at 16:39 contained 85,073 input tokens. The first resumed request at 18:58, approximately 2 hours 19 minutes later, contained only 22 input tokens and zero cached input tokens. Subsequent messages contained only 41, 9, 11, and 15 input tokens. All requests used the same OpenCodex conversation ID,
provider=openai, andresolvedModel=gpt-5.6-sol.The apparent cause is the fixed one-hour continuation-state TTL:
RESPONSE_TTL_MS = 60 * 60 * 1_000src/server/responses/core.tsprevious_response_idbecause the ChatGPT Codex backend rejects it:src/adapters/openai-responses.tsTogether, these behaviors turn an expired local replay entry into a successful request containing only the current-turn delta.
Suggested fixes:
previous_response_idcannot be expanded. Do not silently forward a delta known to be missing prior turns.Version
2.7.42
Operating system
macOS 26.5.2 (25F84)
Codex App 26.721.81911; bundled Codex runtime 0.146.0-alpha.3.1.
Provider and model
openai(Codex-login forward provider) /gpt-5.6-solLogs or error output
Sanitized request-log comparison:
Redacted configuration
{ "defaultProvider": "openai", "providers": { "openai": { "adapter": "openai-responses", "authMode": "forward" } } }Checks