You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
POST /v1/responses → Cursor adapter runTurn / AgentService/Run
Provider and model
OpenCodex route: cursor/auto-intelligence (Cursor Router wire model default)
Native control on the same proxy: gpt-5.6-sol
Direct Cursor control (OpenCodex not in path): cursor-agent --model auto
Summary
A two-turn Reply only OK / Reply only OK2 pair on the same machine and Cursor account shows:
Direct cursor-agent: turn 2 input collapses to 253 tokens with cacheReadTokens=25856.
Native gpt-5.6-sol through OpenCodex: turn 2 reports cached_input_tokens=21504.
cursor/auto-intelligence through OpenCodex: turn 2 is 74477 input with zero cache. Provider debug is continuationMode=full-replay, checkpointPresent=false, checkpointInvalidationReason=missing_ref on both turns. checkpoint-commit-refused fires with emittedClientTool=true.
This is not the old large-catalog resource_exhausted failure (#190) and not the kimi-k3 short-output collapse (#1527, closed on 2.41.0). HTTP is 200. The remaining #1527 cache note (direct cacheReadTokens vs cached_tokens=0 through the proxy) still reproduces here, and the debug fields requested in #1527 are now available.
#3433 tracks intermittent zero cache on the Hermes → Chat Completions → Codex Responses path. This report is the Cursor runTurn checkpoint/replay path, so it is filed separately.
Current behaviour
Isolated Codex CLI (--ignore-user-config, openai_base_url pointed at loopback OpenCodex, no user plugins):
Client
Model
Turn
input
cache
OpenCodex usage
Codex CLI
cursor/auto-intelligence
1 (ephemeral)
22122
0
estimated, no cachedTokens
Codex CLI
gpt-5.6-sol
1 (ephemeral)
21159
0
reported
Codex CLI
gpt-5.6-sol
2 (resume)
49654
21504
reported
Codex CLI
cursor/auto-intelligence
1 (persisted)
45213
0
estimated
Codex CLI
cursor/auto-intelligence
2 (resume)
74477
0
estimated
cursor-agent --print --mode ask
auto
1
18029
7936
n/a (direct)
cursor-agent resume
auto
2
253
25856
n/a (direct)
ocx debug provider on the isolated Cursor conversation (ids redacted to 12 chars):
Adapter docs say a successful no-tool turn should reuse ConversationStateStructure on the next linear continuation. These turns were no-tool user messages (Reply only OK / Reply only OK2) and still full-replayed.
Expected behaviour
On a validated linear continuation of the same Cursor account/model/thread:
OpenCodex should not grow rootBytes from ~54 KiB to ~82 KiB for a one-line follow-up.
Either Cursor cache_read / cached_tokens should be non-zero on turn 2 (as direct cursor-agent and routed Sol already are on this install), or usage should stop advertising a cache-hit counter it cannot see — but the request itself should not full-replay.
Reproduction
Proxy already running on 127.0.0.1:10100. Cursor OAuth logged in (ocx login cursor). Then:
ocx debug provider on
CODEX_BIN="$(command -v codex.opencodex-real ||command -v codex)"
WORKDIR="$(mktemp -d)"# A. isolated Cursor, two turns"$CODEX_BIN"exec \
--ignore-user-config --skip-git-repo-check --json --color never \
-m cursor/auto-intelligence \
-c openai_base_url='"http://127.0.0.1:10100/v1"' \
-c model_catalog_json="\"${CODEX_HOME:-$HOME/.codex}/opencodex-catalog.json\"" \
-c model_reasoning_effort='"none"' \
-c approval_policy='"never"' \
-s read-only -C "$WORKDIR" \
"Reply only OK""$CODEX_BIN"exec resume --ignore-user-config --skip-git-repo-check --json \
--dangerously-bypass-approvals-and-sandbox \
-m cursor/auto-intelligence \
-c openai_base_url='"http://127.0.0.1:10100/v1"' \
-c model_catalog_json="\"${CODEX_HOME:-$HOME/.codex}/opencodex-catalog.json\"" \
--last \
"Reply only OK2"# B. same pair with -m gpt-5.6-sol (control)# C. direct Cursor, OpenCodex not in path
cursor-agent --print --mode ask --output-format json --trust \
--sandbox disabled --model auto --workspace "$WORKDIR" \
"Reply only OK"# then --resume <session_id> "Reply only OK2"
First-turn isolated Cursor vs Sol is close (22.1k vs 21.2k). The defect is the second turn.
Actual response or error
No transport error. Both Cursor turns completed 200 / OK / OK2. Codex JSON usage for the Cursor resume:
No public Cursor Connect spec. The expected continuation contract is OpenCodex’s own adapter document plus the direct cursor-agent control on the same account.
Suggested mapping or implementation notes
Highest-confidence local hypothesis: resolveCursorCheckpoint() never accepts the previous turn (missing_ref), and checkpoint-commit-refused with emittedClientTool=true prevents storing a checkpoint even when the user turn had no tool call from Codex’s point of view (only the advertised exec / client-tool catalog).
#1527 asked for exactly these run-request fields. They now show full-replay on a 2-line isolated thread, not only on huge Desktop catalogs.
Please do not treat “disable Desktop App Tools” as the fix. That only slows Codex Desktop context_window_exceeded (190k window on cursor/auto-intelligence, ~35–42k/turn, cache 0). The isolated CLI pair above already has almost no plugins and still full-replays.
Codex CLI used for the pair: 0.147.0 (OpenCodex-selected). Codex Desktop 0.153.4 shows the same estimated / cache-0 pattern on cursor/auto-intelligence in daily use, but the CLI pair is the clean reproduction.
Checks
I searched existing issues and documentation.
I removed secrets, tokens, account details, request credentials, and personal data.
The request and response were redacted.
The expected behaviour is based on OpenCodex adapter docs and a same-account direct Cursor control.
Client or integration
Codex CLI and Codex App (same OpenCodex proxy)
Area
Provider adapter / Cursor continuation + cache
Provider or upstream service
cursor (
adapter: "cursor", OAuth,https://api2.cursor.sh)OpenCodex version
2.48.0 (
ocx --version; running proxy matched)Operating system
macOS (darwin 25.5.0)
Endpoint or capability
POST /v1/responses→ Cursor adapterrunTurn/AgentService/RunProvider and model
cursor/auto-intelligence(Cursor Router wire modeldefault)gpt-5.6-solcursor-agent --model autoSummary
A two-turn
Reply only OK/Reply only OK2pair on the same machine and Cursor account shows:cursor-agent: turn 2 input collapses to 253 tokens withcacheReadTokens=25856.gpt-5.6-solthrough OpenCodex: turn 2 reportscached_input_tokens=21504.cursor/auto-intelligencethrough OpenCodex: turn 2 is 74477 input with zero cache. Provider debug iscontinuationMode=full-replay,checkpointPresent=false,checkpointInvalidationReason=missing_refon both turns.checkpoint-commit-refusedfires withemittedClientTool=true.This is not the old large-catalog
resource_exhaustedfailure (#190) and not the kimi-k3 short-output collapse (#1527, closed on 2.41.0). HTTP is 200. The remaining #1527 cache note (direct cacheReadTokensvscached_tokens=0through the proxy) still reproduces here, and the debug fields requested in #1527 are now available.#3433 tracks intermittent zero cache on the Hermes → Chat Completions → Codex Responses path. This report is the Cursor
runTurncheckpoint/replay path, so it is filed separately.Current behaviour
Isolated Codex CLI (
--ignore-user-config,openai_base_urlpointed at loopback OpenCodex, no user plugins):cursor/auto-intelligenceestimated, nocachedTokensgpt-5.6-solreportedgpt-5.6-solreportedcursor/auto-intelligenceestimatedcursor/auto-intelligenceestimatedcursor-agent --print --mode askautocursor-agentresumeautoocx debug provideron the isolated Cursor conversation (ids redacted to 12 chars):Adapter docs say a successful no-tool turn should reuse
ConversationStateStructureon the next linear continuation. These turns were no-tool user messages (Reply only OK/Reply only OK2) and still full-replayed.Expected behaviour
On a validated linear continuation of the same Cursor account/model/thread:
continuationModeshould becomecheckpoint(or equivalent suffix-only replay) after the first successful turn, matchinghttps://opencodex.me/reference/adapters/and the fix(cursor): reuse conversation checkpoints for incremental continuation (#2054 rebased) #2277 / [Bug]: Cursor adapter large-context turns collapse or rate-limit while direct Cursor remains healthy #1527 follow-up.rootBytesfrom ~54 KiB to ~82 KiB for a one-line follow-up.cache_read/cached_tokensshould be non-zero on turn 2 (as directcursor-agentand routed Sol already are on this install), or usage should stop advertising a cache-hit counter it cannot see — but the request itself should not full-replay.Reproduction
Proxy already running on
127.0.0.1:10100. Cursor OAuth logged in (ocx login cursor). Then:First-turn isolated Cursor vs Sol is close (22.1k vs 21.2k). The defect is the second turn.
Actual response or error
No transport error. Both Cursor turns completed
200/OK/OK2. Codex JSON usage for the Cursor resume:Direct
cursor-agentresume JSON (redacted ids):WebSocket to
ws://127.0.0.1:10100/v1/responsesreturns426and Codex falls back to HTTP/SSE. That fallback succeeds and is not the failure.Upstream documentation
cache_read_tokens): https://opencodex.me/reference/adapters/No public Cursor Connect spec. The expected continuation contract is OpenCodex’s own adapter document plus the direct
cursor-agentcontrol on the same account.Suggested mapping or implementation notes
Highest-confidence local hypothesis:
resolveCursorCheckpoint()never accepts the previous turn (missing_ref), andcheckpoint-commit-refusedwithemittedClientTool=trueprevents storing a checkpoint even when the user turn had no tool call from Codex’s point of view (only the advertisedexec/ client-tool catalog).#1527 asked for exactly these
run-requestfields. They now showfull-replayon a 2-line isolated thread, not only on huge Desktop catalogs.Please do not treat “disable Desktop App Tools” as the fix. That only slows Codex Desktop
context_window_exceeded(190k window oncursor/auto-intelligence, ~35–42k/turn, cache 0). The isolated CLI pair above already has almost no plugins and still full-replays.Additional context
Related:
cacheReadTokensdirect vscached_tokens=0via OpenCodex. That leftover is this issue.session_idsynthesis. Different inbound path.resource_exhaustedfrom an oversizedMcpToolscatalog. Not reproduced here (requests are 200).Codex CLI used for the pair: 0.147.0 (OpenCodex-selected). Codex Desktop 0.153.4 shows the same
estimated/ cache-0 pattern oncursor/auto-intelligencein daily use, but the CLI pair is the clean reproduction.Checks