Usage-limit auto-resume does not reactivate a usageLimited /goal #45646
What happened#
When a /goal thread hits a provider usage limit and later auto-resumes via autoResumeLimitedThreads, the turn continues, but the goal stays stuck in usage_limited (usageLimited). Goal progress (tokensUsed, timeUsedSeconds) stops updating, multi-turn goal continuation stops if that single turn finishes, and command notices are no longer steered into the active turn.
Diagnosis#
UsageLimitRecoveryWorker.ts(limitRecoveryCommand) dispatches a plainmessage.dispatchwithtext: "Continue where you left off."andusageLimitContinuationOfRunId.- In
CodexAdapterV2.ts,startTurnonly callsactivateGoal(thread/goal/setwithstatus: "active") when the message parses as a/goalcommand or whengoalsPausedForWake.has(nativeThreadId)and the goal status is"paused". - A usage-limit failure transitions Codex's goal to
usageLimited("usage_limited"in T3 Code's projection), not"paused", and never adds it togoalsPausedForWake. - As a result,
CodexAdapterV2falls through to a regular singleturn/startwithout reactivating the goal.Orchestrator.tsalso skips steeringcommandnotices into the active turn becauseproviderThread.goal?.status !== "active". (Note: Claude'snextClaudeGoalinClaudeAdapterV2.tsalso does not restore goal state on"Continue where you left off.".)
Steps to reproduce#
- Enable "Resume at reset" (
autoResumeLimitedThreads). - Start a
/goalon a Codex thread and let it run until a usage limit is reached (thread/goal/updatedemitsstatus: "usageLimited"). - Wait for the reset time so
UsageLimitRecoveryWorkerauto-resumes the thread. - Observe the provider event log and projection DB:
thread/resumeemitsstatus: "usageLimited",turn/startis sent withoutthread/goal/set({ status: "active" }), andproviderThread.goal.statusremains"usage_limited".
Version#
0.1.13 (source-verified on upstream/main at d17aa43c82)
Environment#
Linux 7.3.5-200.fc44.x86_64 x86_64, Node v24.22.2, codex-cli 0.172.0
Evidence#
# Run 5 hits usage limit -> goal becomes usageLimited
[2026-11-29T11:51:43.541Z] incoming thread/goal/updated: status="usageLimited", tokensUsed=229967, timeUsedSeconds=1956
[2026-11-29T11:51:43.620Z] outgoing turn/start: input=[{"type":"text","text":"Continue where you left off."}]
# No outgoing thread/goal/set({ status: "active" }); zero thread/goal/updated events for the rest of the run.
# Same pattern on Run 9 -> Run 10 auto-resume at 16:52:03Z; projection remains status="usage_limited".
Related issues#
#31909 (closed as duplicate of #25951) covered manual user messages not resuming a usageLimited goal and the Resume button being hidden while busy, not automatic UsageLimitRecoveryWorker continuations.
Fix applied or workaround#
None applied. Workaround is manually sending /goal resume after the thread stops.
Filed by#
Antigravity (Gemini 4 Hydrogen) via triage playbook
vibhor1102(GitHub profile, opens in a new tab) added labelsvia-triage
tanstack-source added labelsbug
Sign in to join this conversation.