Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Start a Codex thread in T3 and let its turn finish, so the provider session stays loaded.
- Within T3's idle window, queue a message for that thread from outside T3:
codex queue --thread <codex thread id> --message "Reply with the word QUEUED." - Wait about 10 seconds. Codex's queue watcher polls every 10 s and on thread-idle.
- Look at the thread in T3.
We found this through a plugin rather than a manual codex queue. The plugin does work asynchronously after the agent edits files. Under Codex, which has no asyncRewake, it reports results that arrive after the turn has ended by running codex queue --thread <id> --message <results>. The manual steps above use the same path.
Expected behavior
T3 shows the queue-triggered turn in the thread: the queued message, the agent's reply, and any tool calls. It's like how T3 shows Claude turns started by a background wake. Approvals requested during that turn reach the user.
Actual behavior
Codex runs the turn in T3's app-server process, but T3 never records it.
- The thread in T3 still shows one run, ending with "READY". The queued message and the "QUEUED" reply never appear, and the thread's
updatedAtstays at the end of the first run. - The model did receive and act on the queued message. With the plugin, the same thing happened: the model got the plugin's results and the user saw nothing.
What we think is happening:
- Codex's queue watcher starts the turn (
turn_trigger: "queue") in whichever app-server has the thread loaded. That's T3's process: openai/codexcodex-rs/ext/queue/src/service.rs. CodexAdapterV2.tshas no handler forthread/queue/changed.- In the
turn/startedhandler, a turn that is neither inactiveTurnsnor inpendingRootTurnsfalls through to the sub-agent bookkeeping (rememberSubagentTurnStarted, which parks it inpendingSubagentTurns). The turn is never projected as a run. References are to upstreammainat 5127302.
Impact
Minor bug or occasional failure
Version or commit
main @ 5127302
Environment
Linux (Ubuntu-based dev container), Codex provider, gpt-5.6-luna.
Logs or stack traces
03:24:46.250 turn/completed agentMessage "READY" (the T3 run)
03:25:03 codex queue ... exits 0: "Queued message ... for thread ..."
03:25:11.704 thread/queue/changed
03:25:11.725 turn/started (native turn id unknown to T3)
03:25:11.746 item/completed userMessage "Reply with the word QUEUED."
03:25:12.765 item/completed agentMessage "QUEUED"
03:25:12.805 hook/started / hook/completed (Stop)
03:25:12.973 turn/completedScreenshots, recordings, or supporting files
No response
Workaround
None in T3. Plugin authors can avoid codex queue by returning results synchronously from a blocking Stop hook ({"decision":"block","reason":...}), which continues the same turn. That doesn't help other external callers of codex queue.
Activity
Pseudogiant-xr commentedon Nov 23, 2026
Independent reproduction with timings, in case it helps choose between #24439 and #34930.
Setup. T3 Code Nightly 0.1.12-nightly.20261123.5138 on Windows 11, Codex CLI 0.171.0. A Codex thread started by T3 (scratch workspace) ran one turn and went idle. About a minute later an MCP server running inside that thread's Codex session ran
codex queue --thread <id> --message <notice>(no--resume) to wake it.What happened (local time, from T3's provider event log for the thread, Codex's log database and the thread's rollout):
turn/start(the only one it ever sent for this thread)turn/completedfor that turn; T3 shows itthread/queue/addfromcodex queuethread/queue/changed, then submits the queued input as a new turn; the rollout recordsturn_trigger: "queue"turn/startedfor the new turn iditem/*notifications arriving (86 lines carry the new turn id)turn/completedthread/unsubscribeObserved in T3. The thread view still shows one run, last item 03:16:04, status completed. Nothing from the second turn appears, although its tool calls really ran and every notification for it reached T3 on the same connection that served the first turn. No warning or "unknown turn" line was logged.
Two details that may be new here.
thread/queue/add; the T3-spawned stdio app-server picked the item up from the shared queue store about two seconds later. So T3 is the one client that could show the turn, and it has all the events in hand.thread/unsubscribewent out at 03:18:04.635, exactly 120 s after the first turn'sturn/completed(03:16:04.624) and 21 s after the queued turn finished; a queued turn still running at that point would be unsubscribed mid-turn. A fix that adopts externally started turns probably wants to reset the idle timer when one starts and when it completes.codex queuewas gone, so no wake was attempted and the thread stayed idle. I did not test an externalcodex queueafter the unsubscribe. This is by design on T3's side as far as I can tell, but it means acodex queuebased wake only works inside that two-minute window unless something pins the session, which is worth knowing when deciding how adopted turns interact with the idle release.Happy to share the redacted provider log lines for the second turn if useful.