Provider manual live tests

Copy each prompt into T3 Code, wait for the outcome, then check the expectations. Prefer a fresh thread per section. Left nav is provider · commit theme. This published copy is static: select a prompt to copy it. The interactive version in the repository adds copy buttons and a light/dark toggle.

Grok · Background primitives

grok · grok-4.5

Grok ACP background primitives (PR #3578 C1 settlement / tools / continuation / images): monitors, spawn_subagent, post-settle wake, steer-during-hold, and image attach. Prefer a fresh thread per full pass.

01

Monitor baseline, in-turn

grok-subagent-monitor

Second turn is the multiturn settlement check.

First turn
send a sample response, and use a monitor that waits 10 seconds and does `ls` (show me the dirs the monitor found)
Second turn (same thread)
send another sample response which uses a monitor that waits 10 seconds and does `ls`  (show me the dirs the monitor found)

Expect

  • Monitor projects as a tool/command item, not a subagent row.
  • Each turn settles once the model replies; a late monitor complete must not corrupt the next turn.
  • No Waiting row or sidebar pill is expected for a persistent Grok monitor.
  • If Grok reports the listing in-turn, no extra Background task completed. wake afterward.
  • If Grok settles first and the CLI injects a monitor-event report, the listing still appears as a final assistant message.
02

Foreground spawn_subagent

grok-subagent-monitor
First turn
Send a short sample response, then use spawn_subagent (general-purpose) with a prompt that:
- sleeps about 5 seconds via shell
- prints exactly the token SUBAGENT_DONE

Do not poll. After starting the subagent, you may reply briefly. When it finishes, fetch output with get_command_or_subagent_output (timeout at least 20000ms) if needed so SUBAGENT_DONE is visible in the thread. End with a short confirmation that includes SUBAGENT_DONE.
Second turn (same thread)
Send another short sample response, and spawn_subagent (general-purpose) again with a prompt that sleeps about 5 seconds and prints exactly SUBAGENT_DONE_2. Fetch with get_command_or_subagent_output if needed, then confirm with SUBAGENT_DONE_2.

Expect

  • Subagent row completes with SUBAGENT_DONE / SUBAGENT_DONE_2; click-through opens the child thread.
  • Child prompt_complete must not terminalize the root turn; root settles after its own reply.
03

Post-settle monitor wake

grok-post-settle-continuation

Watch the thread go idle, then come back (~30s).

Prompt
Start a monitor with this exact command (do not rewrite the sleeps):

for i in 1 2 3 4 5 6 7 8 9 10; do echo STREAM_$i; sleep 3; done; echo STREAM_DONE

Do NOT wait for the monitor to finish. After it starts, reply with a short
message containing the token STARTED and stop. Do not start extra monitors
and do not poll the monitor output in this turn. The point is that your turn
ends while the monitor is still running.

Expect

  • First run settles with STARTED; monitor streams STREAM_N; thread shows idle.
  • No Waiting row or sidebar pill is expected because persistent Grok monitors are intentionally excluded.
  • After STREAM_DONE (~30s), exactly one Background task completed. wake with one concise reply.
  • Monitor card completed with STREAM_N output and exit 0 (not stuck spinning).
  • No burst of wake rows or progress chatter (Still running / monitor event received).
04

Post-settle subagent

grok-post-settle-subagent
Prompt
Live-test post-settle subagent completion.

1) Use spawn_subagent (general-purpose) exactly once, with this subagent prompt:
   Run the shell command: sleep 25 && echo SUB_SETTLE_DONE
   Then return exactly the token SUB_SETTLE_DONE as your final answer.

2) Do NOT wait for the subagent. Immediately after the spawn ACK, reply with a
   short root assistant message that contains the token STARTED and stop.

Do not poll get_command_or_subagent_output in this turn. Do not start monitors
or extra subagents. The point is that the root turn ends while the subagent is
still running.

Expect

  • Root settles with STARTED while subagent row spins; ~25-40s later row completes with SUB_SETTLE_DONE.
  • After root settlement, the timeline shows Waiting on the subagent and the sidebar shows Waiting until it completes.
  • At most one continuation run (no spam).
  • Thread-rendered subagent turn item also flips to completed (not a forever spinner).
05

Steer while run is held open

grok-steer-during-subagent-hold

Start prompt 4, then while still Working send the steer below.

Steer (while run active)
say test 2 now, without waiting on the subagent. When its result arrives later, report the subagent's final token too.

Expect

  • Steer row stays visible from send until committed.
  • Model replies with test 2 promptly (no blocking on the subagent) and the thread returns to idle.
  • After the steer run settles, Waiting remains visible until the carried-over subagent completes.
  • Subagent from prompt 4 still completes (row + turn item leave Running).
  • This-and-also-that: when the subagent finishes (~25-40s), at most one continuation reply reports SUB_SETTLE_DONE, so the thread ends showing both test 2 and the subagent result.
  • No duplicate Background task completed. spam after choosing Steer in a queue dialog.
06

Screenshot attach

manual only

Attach any screenshot to the Grok thread with the prompt below.

Prompt (with image attached)
describe this screenshot briefly

Expect

  • Run completes and the reply describes the image.
  • Pre-fix signature: run fails within ~500ms and no session/prompt is sent.

Grok · Interrupt / Stop

grok · grok-4.5

Grok interrupt / Stop UI pass (PR #3578 C1b process cleanup + settlement interrupt paths). Prefer a new thread per scenario. Headless packs grok-interrupt-fast / grok-interrupt-soak own process identity and ACP lineage; this section is UI-owned (spinner, Stop, queue vs steer, cards, held subagent). Markdown: grok-appimage-interrupt-prompts.md.

Grok can get confused after several interrupt tests in one thread. If you see repeated no-op `true` tool calls instead of an answer, duplicate copies of the same exact reply, a re-surfaced question card after Stop, or a recovery that never settles, Stop the turn and start a new thread with the remaining scenarios. Score the affected attempt model leakage / model-blocked, not a T3 bug (details in grok-appimage-interrupt-prompts.md).

01

Direct Stop during a long command

grok-interrupt-restart

As soon as the assistant says the command started, capture pre-Stop evidence (spinner + visible output), then Stop. Do not wait for a running command card.

Open prompt
Live-test direct Stop. Short preamble only. Then run this exact shell command and wait for it (do not background it): sleep 30 && echo SHOULD_NOT_FINISH_CMD. Keep the turn open until interrupted. Do not print INTERRUPTED_OK.
After Stop (idle)
Live-test after direct Stop. Reply with exactly INTERRUPTED_OK. No tools. Do not mention SHOULD_NOT_FINISH_CMD.

Expect

  • Stop ends the turn cleanly; thread accepts the follow-up.
  • Assistant final text is exactly (or clearly ends with) INTERRUPTED_OK.
  • You never see SHOULD_NOT_FINISH_CMD as command output after Stop.
  • No stuck Working spinner on the interrupted turn.
02

restart_active / steer while a command runs

grok-interrupt-restart

While Working, send the steer with plain Enter / send (steer), not Ctrl/⌘+Enter (queue).

Open prompt
Live-test steer via restart_active. Short preamble only. Remember the codeword BLUE_LANTERN for later; do not print it yet. Then run this exact shell command and wait for it (do not background it): sleep 30 && echo SHOULD_NOT_FINISH_RESTART. Keep the turn open. Do not print RESTART_ACTIVE_OK.
Steer (while Working)
Steer update: stop waiting on that command. Reply with one short line that contains exactly RESTART_ACTIVE_OK and also the codeword I gave you earlier. No tools. Do not mention SHOULD_NOT_FINISH_RESTART.

Expect

  • This-and-also-that: the settled reply contains both RESTART_ACTIVE_OK and BLUE_LANTERN in one message (steer landed and the original turn's context survived the same-session re-prompt).
  • Detach-and-continue: the cancelled command re-runs as a detached task and the model decides its fate. Killing it, ignoring it (output stays in the CLI task file), or polling and reporting it are all fine; SHOULD_NOT_FINISH_RESTART may legitimately appear in a completed command card or task report before the combined reply. Only a missing combined reply or a turn stuck waiting forever is a regression.
  • No permanent dual-Working stuck state.
03

Queue contrast while a command runs (no Stop)

manual only

Queue before the sleep finishes (Ctrl+Enter / ⌘+Enter only). If the command completes with no queued row, re-run.

Open prompt
Live-test queue contrast (no steer). Short preamble only. Then run this exact shell command and wait for it (do not background it): sleep 30 && echo SHOULD_NOT_FINISH_QUEUE_CONTRAST. Keep the turn open. Do not print QUEUE_CONTRAST_OK.
Queued follow-up (Ctrl/⌘+Enter only)
Live-test queued follow-up (queue contrast). Reply with exactly QUEUE_CONTRAST_OK. No tools. Do not mention SHOULD_NOT_FINISH_QUEUE_CONTRAST.

Expect

  • Queued message does not steal the turn mid-command.
  • Prior turn keeps running until it finishes or you explicitly Stop.
  • Not scenario 5 (queue then Stop); desktop hides Stop while queued.
  • Repeated QUEUE_CONTRAST_OK within the follow-up turn is the known no-op tool loop quirk, not a duplicate-run bug, as long as the projection has a single follow-up run.
04

Rapid duplicate Stop

grok-interrupt-duplicate-stop
Open prompt
Live-test direct Stop (stop spam edition). Short preamble only. Then run this exact shell command and wait for it (do not background it): sleep 30 && echo SHOULD_NOT_FINISH_CMD. Keep the turn open until interrupted. Do not print INTERRUPTED_OK.
After double-Stop (idle)
Reply with exactly DUPLICATE_STOP_OK. No tools.

Expect

  • One interrupted turn; no duplicate error card or phantom turn.
  • One settled DUPLICATE_STOP_OK response.
  • If the recovery spins on no-op tool calls and never answers, Stop it and record model-blocked (known quirk), not a T3 failure.
05

Queue a follow-up, then Stop (mobile)

grok-interrupt-queued-followup

Run on mobile. Desktop hides red Stop while anything is queued.

Open prompt
Live-test queue then Stop (mobile). Short preamble only. Then run this exact shell command and wait for it (do not background it): sleep 30 && echo SHOULD_NOT_FINISH_QUEUED_STOP. Keep the turn open until interrupted. Do not print QUEUED_STOP_OK.
Queued follow-up (do not steer)
Live-test after queue then Stop. Reply with exactly QUEUED_STOP_OK. No tools. Do not mention SHOULD_NOT_FINISH_QUEUED_STOP.

Expect

  • Original turn stops; queued message runs once as its own recovery turn.
  • Settles with QUEUED_STOP_OK; no SHOULD_NOT_FINISH_QUEUED_STOP command output after Stop.
  • If the queued recovery spins on no-op tool calls instead of answering, Stop it and record model-blocked (known quirk), not a T3 failure.
06

Stop while approval or question UI is visible (mobile)

manual only

Run on mobile. Desktop hides Stop while an approval/question card is open. Trailing mobile work-log tool rows after Stop are presentation-only if APPROVAL_STOP_OK settles.

Open prompt
Live-test Stop while approval or question is open (mobile). Enter Plan mode if needed, then ask me one trivial thing that surfaces either an approval card or a question card. Keep the turn open on that card. Do not print APPROVAL_STOP_OK yet.
After Stop (idle)
Live-test after approval/question Stop. Reply with exactly APPROVAL_STOP_OK. No tools or further questions.

Expect

  • Card dismisses or is no longer actionable; turn is not stuck Working.
  • Follow-up completes with APPROVAL_STOP_OK.
  • A plain 'No tools.' follow-up can make grok re-surface a fresh question card instead of answering (known quirk sibling); the extended 'or further questions' wording heads that off. If a recovery re-asks anyway, Stop and resend with the extended wording.
07

Stop while a subagent is running

grok-interrupt-subagent-hold
Open prompt
Live-test interrupt while a subagent holds the root prompt open.

1) Use spawn_subagent (general-purpose) exactly once, with this subagent prompt:
   Run the shell command: sleep 30 && echo HOLD_SHOULD_NOT_MATTER
   Then return exactly the token HOLD_SUB_DONE as your final answer.

2) Wait for that subagent and do not return a root answer before it finishes.

Do not start another tool or subagent.
After Stop (idle)
Reply with exactly HOLD_FOLLOW_OK. No tools.

Expect

  • Follow-up yields HOLD_FOLLOW_OK (literal <|eos|> suffix is model leakage, not a fail).
  • No endless dual spinner with no way to send.
  • Subagent row interrupted; no HOLD_SUB_DONE or HOLD_SHOULD_NOT_MATTER.
08

Steer a settled held turn, then Stop (orphan containment)

manual only

Covers Stop after a soft steer already cleared the active turn while a subagent carried over (fix/grok-v2 review-round fixes): the runtime must die, the carried-over subagent must terminalize with its streamed text, and the thread must recover on a fresh session. Press Stop only after STEER_OK settles and the subagent row alone is still spinning.

Open prompt
Live-test Stop after steering a settled turn that still holds a subagent.

1) Use spawn_subagent (general-purpose) exactly once, with this subagent prompt:
   First print exactly the token SUB_PROGRESS_1 on its own line. Then run the shell command: sleep 60 && echo HOLD_SHOULD_NOT_MATTER
   Then return exactly the token HOLD_SUB_DONE as your final answer.

2) Reply immediately with exactly the token ROOT_SETTLED and do not wait for the subagent.

Do not start another tool or subagent.
Steer while held (plain Enter)
Reply with exactly STEER_OK. No tools.
After Stop (idle)
Reply with exactly ORPHAN_FOLLOW_OK. No tools.

Expect

  • Subagent row keeps spinning through the steer and STEER_OK lands (soft steer preserves the runtime).
  • On Stop, the subagent row becomes interrupted promptly; never a permanent spinner.
  • Interrupted subagent card still shows SUB_PROGRESS_1; never HOLD_SUB_DONE or HOLD_SHOULD_NOT_MATTER.
  • Composer stays unlocked; follow-up yields ORPHAN_FOLLOW_OK on a fresh session.

Claude · Background / resume

claudeAgent · claude-sonnet-5

Claude Agent SDK background Bash, Task/Agent subagents, Monitor, post-settle wake, and SendMessage resume. Claude/Codex C1 work is merged into t3code/codex-turn-mapping; these prompts still validate the stack in the UI.

01

Background Bash, settles in-turn

claude-background-bash-inturn
Prompt
Live-test background Bash that settles in-turn.

1) Run this command using the Bash tool with run_in_background set to true:
   sleep 8 && echo BG_INTURN_DONE
2) Poll the background task with TaskOutput (block: true, generous timeout)
   until it completes, then quote its output in your reply.
3) End your final assistant message with ALL_DONE.

Do not spawn subagents or monitors. Keep prose short.

Expect

  • One completed run; quotes BG_INTURN_DONE; ends ALL_DONE.
  • Bash is a normal command/tool item, not a subagent row.
  • No Waiting row or sidebar pill appears because the task completes before root settlement.
  • No Background task completed. message (finished in-turn).
02

Background Bash, post-settle wake

claude-background-bash-wake

Watch the root turn settle into Waiting, then wake (~20-45s).

Prompt
Live-test post-settle background Bash wake.

1) Run this command using the Bash tool with run_in_background set to true:
   sleep 20 && echo BG_WAKE_DONE
2) Immediately after starting it, reply with a short message containing the
   token STARTED and stop.

Do NOT poll TaskOutput. Do NOT wait for the task. Do not spawn subagents or
monitors. The point is that your turn ends while the command is still running.

Expect

  • First run settles with STARTED; the timeline shows Waiting on the Bash task and the sidebar shows Waiting.
  • One agent-authored wake user message for the completed background command.
  • Waiting clears when the task completes; the wake assistant reports BG_WAKE_DONE and the Bash turn item flips to completed.
  • No spam wakes, ghost history, or forever-spinning command item.
03

Foreground subagent

claude-subagent
Prompt
Live-test foreground subagent projection.

1) Spawn exactly one general-purpose subagent using the Task tool (also called
   Agent), in the foreground (do NOT set run_in_background), with this subagent
   prompt:
   Run the shell command: sleep 3 && echo SUBAGENT_DONE
   Then return exactly the token SUBAGENT_DONE as your final answer.
2) Wait for the subagent to finish.
3) End your final root assistant message with ALL_DONE.

Do not start background Bash tasks or monitors. Keep prose short.

Expect

  • Subagent row completes with SUBAGENT_DONE; click-through opens child thread.
  • No raw Agent tool-call item in the parent turn.
  • No Waiting row or sidebar pill appears because the root remains active until the foreground subagent completes.
04

Monitor tool

claude-monitor
Prompt
Live-test the Monitor tool projection.

1) Use the Monitor tool (persistent: false, timeout_ms at least 60000) with
   this command:
   for i in 1 2 3; do sleep 3; echo "MON_LINE_$i"; done; echo MON_DONE
2) Wait for the monitor to finish (use TaskOutput with block: true if needed)
   and quote the final line of its output in your reply.
3) End your final assistant message with ALL_DONE.

If the Monitor tool is not available to you, instead say exactly
MONITOR_TOOL_UNAVAILABLE and stop. Do not spawn subagents. Keep prose short.

Expect

  • Monitor projects as a completed dynamic tool (often after ToolSearch), not a subagent.
  • Assistant quotes MON_DONE and ends ALL_DONE.
  • No Waiting row or sidebar pill appears because the monitor completes before root settlement.
05

Background subagent, post-settle

claude-post-settle-subagent
Prompt
Live-test post-settle background subagent.

1) Spawn exactly one general-purpose subagent using the Task tool (also called
   Agent) with run_in_background set to true, with this subagent prompt:
   Run the shell command in the foreground and wait for it to finish:
   sleep 25 && echo SUB_SETTLE_DONE
   Do not use run_in_background for the shell command. Only after the command
   has printed SUB_SETTLE_DONE, return exactly the token SUB_SETTLE_DONE as
   your final answer, with no other text.
2) Do NOT wait for the subagent. Immediately after spawning it, reply with a
   short root assistant message containing the token STARTED and stop.

Do not poll TaskOutput in this turn. Do not start background Bash tasks or
monitors. The point is that the root turn ends while the subagent is still
running.

Expect

  • Root settles with STARTED; subagent row keeps spinning.
  • The timeline and sidebar show Waiting until the background subagent completes.
  • One continuation; trigger carries SUB_SETTLE_DONE (not only generic Background task completed.).
  • Waiting clears; the subagent row + turn item complete with the final answer (not ACK JSON).
06

Resume completed subagent (SendMessage)

claude-resume-subagent
Prompt
Live-test resuming a completed background subagent.

1) Spawn exactly one general-purpose subagent using the Task tool (also called
   Agent) with run_in_background set to true, with this subagent prompt:
   Reply with exactly the token FIRST_DONE and nothing else. If you later
   receive a follow-up message telling you to continue, run this shell command
   in the foreground and wait for it (do not background it):
   sleep 20 && echo RESUME_DONE
   and only after it prints RESUME_DONE, return exactly the token RESUME_DONE
   as your final answer, with no other text.
2) Wait for the subagent to complete its first answer (use TaskOutput with
   block: true if needed).
3) Send the subagent a follow-up using the SendMessage tool with the message:
   Continue: run the sleep command now and return the token.
   If the SendMessage tool is unavailable, reply with exactly
   SENDMESSAGE_UNAVAILABLE and stop.
4) Immediately after sending the follow-up, reply with a short root assistant
   message containing the token NUDGED and stop. Do NOT wait for the resumed
   subagent; the point is that your turn ends while it is running again.

Do not start background Bash tasks or monitors. Keep prose short.

Expect

  • Row completes FIRST_DONE, re-opens running on nudge; root settles with NUDGED.
  • After NUDGED settles, the timeline and sidebar show Waiting until the resumed subagent completes.
  • Later continuation carries RESUME_DONE; row + turn item complete.
  • Waiting clears after the resumed subagent reaches its terminal state.
  • An intermediate CLI autonomous turn with generic Background task completed. is OK if the final result is RESUME_DONE.
07

App-owned delegated child wakes the parent

claude-delegated-task-wake

App-owned delegation, not a provider-native subagent. This is the one path where the parent has no adapter-buffered wake output, so the wake text itself must reach the model.

Prompt
Live-test delegated child wake.

1) Use the t3-code delegate_task tool exactly once, with mode async and
   target providerInstanceId grok, delegating this exact task to the child:
   Reply with exactly CHILD_DONE and nothing else. Do not use any tools.
2) Immediately after delegate_task returns, reply with exactly STARTED and
   end your turn.
3) Do NOT call task_status in that first turn. Do NOT poll, wait, sleep, or
   spawn any watcher, Monitor, or background Bash task.
4) If you are later woken and told the delegated task completed, call
   task_status once for that taskId, then reply with exactly
   WOKE: followed by the child's result text, and end that turn.

Expect

  • Root settles with STARTED while the delegated child row is still running.
  • Timeline and sidebar show Waiting after the root settles, not Ready.
  • The thread wakes on its own: a later run appears with no user input.
  • That wake run must contain real model output, not just the injected message. A wake run that lasts well under a second and shows only the Delegated task ... completed line means the wake text never reached the provider.
  • The woken turn ends with WOKE: CHILD_DONE, proving the model read the child result.
  • Waiting clears and exactly one wake run appears, with no second wake.

Claude · Interrupt / Stop

claudeAgent · claude-sonnet-5

Claude direct Stop and post-Stop recovery coverage from PR #4229. The first scenario mirrors claude-interrupt-fast. The second recreates the pending task-notification race that previously made the first recovery request disappear from T3 Code. Use a fresh thread per scenario. Markdown: claude-appimage-interrupt-prompts.md.

01

Direct Stop with two sequential recoveries

claude-interrupt-direct-stop

Stop only after the foreground command is visibly running. Send recovery 1 after the thread returns to idle, then send recovery 2 only after recovery 1 settles.

Open prompt
Live-test Claude direct Stop dual recovery. Short preamble only. Then call Bash exactly once with run_in_background false and wait for this exact command: bash -c 'sleep 30 & child=$!; wait "$child"; echo SHOULD_NOT_FINISH_CLAUDE_STOP'. Do not retry or background it. Keep the turn open until interrupted. Do not print either recovery token.
Recovery 1 (after Stop and idle)
Reply with exactly CLAUDE_RECOVERY_ONE_OK. No tools.
Recovery 2 (after recovery 1 settles)
Reply with exactly CLAUDE_RECOVERY_TWO_OK. No tools.

Expect

  • The original turn becomes interrupted and its command card stops spinning.
  • Recovery 1 remains visible and receives its own CLAUDE_RECOVERY_ONE_OK assistant response; it must not disappear or complete blank.
  • Recovery 2 remains visible and receives a later, separate CLAUDE_RECOVERY_TWO_OK response.
  • SHOULD_NOT_FINISH_CLAUDE_STOP never appears as command output after Stop.
  • The thread ends idle with no ghost assistant row or stuck Working state.
02

Pending task notification crosses Stop

manual only

Regression-specific manual race. Stop while the background subagent and foreground command are both still running, then send recovery 1 immediately.

Open prompt
Live-test Claude task notification crossing Stop.

1) Spawn exactly one general-purpose subagent using the Task tool (also called Agent) with run_in_background set to true. Give it this prompt:
   Run the foreground shell command: sleep 12 && echo PRESTOP_TASK_DONE
   Then return exactly PRESTOP_TASK_DONE.
2) Do not wait for or poll the subagent. Immediately call Bash exactly once with run_in_background false and wait for this exact command:
   bash -c 'sleep 30 & child=$!; wait "$child"; echo SHOULD_NOT_FINISH_CLAUDE_RACE'
   Do not retry or background it.
3) Keep the root turn open until interrupted. Do not print either recovery token.
Recovery 1 (immediately after Stop)
Reply with exactly CLAUDE_RACE_RECOVERY_ONE_OK. No tools.
Recovery 2 (after recovery 1 settles)
Reply with exactly CLAUDE_RACE_RECOVERY_TWO_OK. No tools.

Expect

  • Recovery 1 stays visible and settles with CLAUDE_RACE_RECOVERY_ONE_OK even if PRESTOP_TASK_DONE arrives before or during it.
  • A task notification may update the interrupted subagent row or produce a provider continuation, but it must not terminalize recovery 1 blank.
  • Recovery 2 settles separately with CLAUDE_RACE_RECOVERY_TWO_OK.
  • SHOULD_NOT_FINISH_CLAUDE_RACE never appears as command output after Stop.
  • No permanently spinning subagent, command card, or Working state remains.
03

Stop while a foreground subagent is running

manual only

Stop only after the foreground Task row is visibly running. This isolates subagent terminalization from the background task-notification race in scenario 2.

Open prompt
Live-test Claude Stop while a foreground subagent holds the root turn.

1) Spawn exactly one general-purpose subagent using the Task tool (also called Agent), in the foreground, with this prompt:
   Call Bash exactly once with run_in_background false and wait for this exact command: bash -c 'sleep 30 & child=$!; wait "$child"; echo SHOULD_NOT_FINISH_CLAUDE_SUBAGENT_STOP'. Do not retry or background it.
   Then return exactly CLAUDE_SUBAGENT_HOLD_DONE.
2) Wait for that subagent. Do not start other tools or return a root answer before it finishes.
Recovery (after Stop and idle)
Reply with exactly CLAUDE_SUBAGENT_STOP_RECOVERY_OK. No tools or further questions.

Expect

  • The root turn becomes interrupted and the foreground subagent row becomes terminal, never permanently running.
  • Neither CLAUDE_SUBAGENT_HOLD_DONE nor SHOULD_NOT_FINISH_CLAUDE_SUBAGENT_STOP appears after Stop.
  • Recovery settles on a distinct run with CLAUDE_SUBAGENT_STOP_RECOVERY_OK and does not complete blank.
  • The thread ends idle with no ghost assistant row or stuck Working state.
04

Steer a long turn twice (known failure)

manual only

Known failure case, not a passing scenario. Two steers are required: the reported bug needed a second steer sent after the first appeared to go unanswered. Send steer 1 while the thread still shows Working, then send steer 2 once the first looks ignored. Watch the sidebar status and the run count, not just the final text.

Open prompt
Live-test mid-turn steer output retention.

Do exactly this, in order, all in this one turn:

1) Run this foreground shell command and wait for it:
   sleep 10 && echo STEER_A
   Then reply with a short line containing exactly STEER_A.
2) Run this foreground shell command and wait for it:
   sleep 10 && echo STEER_B
   Then reply with a short line containing exactly STEER_B.
3) Run this foreground shell command and wait for it:
   sleep 10 && echo STEER_C
   Then reply with a short line containing exactly STEER_C.
4) Finally reply with exactly STEER_BASE_DONE.

Do not use run_in_background, Monitor, or subagents.
If you receive extra instructions while working, honor them at the end.
Steer 1 (send right after STEER_A appears)
Also, at the very end after STEER_BASE_DONE, reply with exactly STEER_EXTRA_1.
Steer 2 (send once steer 1 looks unanswered)
And after STEER_EXTRA_1, reply with exactly STEER_EXTRA_2 as your final line.

Expect

  • Desired: one run carries the whole turn, both steers are accepted, and STEER_A through STEER_EXTRA_2 all appear.
  • Known failure: the first steer completes the run early, while STEER_B and STEER_C have not run yet. A second run then opens to carry the rest.
  • Known failure: in the gap between those runs the thread reports no steerable turn, so the second steer is refused even though the agent is visibly still working.
  • Worst case seen in the wild: no second run opens at all, and every assistant message after the steer is missing from the thread while the work still happens. The thread simply goes Ready and the steer looks ignored.
  • Known failure: the sidebar row goes blank, showing neither Working nor Waiting, while the agent is still working. That is the status resolver faithfully reporting no active run and no pending work, so the blank is a symptom of the early settle rather than a separate presentation bug.
  • Diagnostic: compare the assistant text in the thread against what the agent actually did (commits pushed, files written). Output present in the world but absent from the thread is the failure.
  • Tracked in tasks/fix-orphaned-output-after-early-settle.

Codex · Background / resume

codex · gpt-5.6-terra medium

Codex app-server settlement, collab subagents, background exec wake, and resume. Codex C1 is merged into t3code/codex-turn-mapping. If the model daemonizes with nohup/& despite instructions, retry (model miss).

01

Baseline settlement + second turn

codex-settlement
First turn
Live-test baseline settlement.

1) Run this shell command and quote its output in your reply:
   echo CODEX_SETTLE_MARK
2) End your final assistant message with SETTLE_DONE.

Do not spawn sub-agents or collaborator agents. Do not start background or
long-running commands. Keep prose short.
Follow-up
Reply with exactly SECOND_DONE and nothing else.

Expect

  • Quotes CODEX_SETTLE_MARK, ends SETTLE_DONE, then SECOND_DONE.
  • Shell is a normal command item, not a subagent row.
02

Foreground collab subagent

codex-subagent
Prompt
Live-test foreground sub-agent projection.

1) Spawn exactly one collaborator sub-agent (your agent-spawning tool), with
   this task:
   Run the shell command: sleep 3 && echo CODEX_SUB_DONE
   Then return exactly the token CODEX_SUB_DONE as your final answer.
2) Wait for the sub-agent to finish and quote its result in your reply.
3) End your final root assistant message with ALL_DONE.

If you have no tool for spawning sub-agents or collaborator agents, reply with
exactly SUBAGENT_TOOL_UNAVAILABLE and stop. Do not start background or
long-running commands yourself. Keep prose short.

Expect

  • Subagent row completes with CODEX_SUB_DONE; child thread opens on click.
  • Root ends ALL_DONE; no raw collab tool item in parent turn.
03

Fire-and-forget subagent, post-settle

codex-post-settle-subagent
Prompt
Live-test post-settle sub-agent completion.

1) Spawn exactly one collaborator sub-agent (your agent-spawning tool), with
   this task:
   Run the shell command in the foreground and wait for it to finish:
   sleep 25 && echo CODEX_SUB_SETTLE_DONE
   Only after it prints CODEX_SUB_SETTLE_DONE, return exactly the token
   CODEX_SUB_SETTLE_DONE as your final answer, with no other text.
2) Do NOT wait for the sub-agent. Do not call any wait tool. Immediately after
   spawning it, reply with a short root assistant message containing the token
   STARTED and stop.

If you have no tool for spawning sub-agents or collaborator agents, reply with
exactly SUBAGENT_TOOL_UNAVAILABLE and stop. The point is that your root turn
ends while the sub-agent is still running. Keep prose short.

Expect

  • Root settles with STARTED; subagent keeps spinning.
  • The timeline and sidebar show Waiting until the subagent completes.
  • ~25-40s later row + turn item complete with CODEX_SUB_SETTLE_DONE (no wake required for subagents).
04

Background command, post-settle wake

codex-background-exec-wake

Main Codex wake path. Watch the root settle into Waiting, then wake.

Prompt
Live-test background command wake.

1) Start this command as a background / long-running process that you do NOT
   wait for, using your own built-in background execution facility (run the
   command itself and let it keep running past your turn):
   sleep 20 && echo CODEX_BG_WAKE_DONE
2) Immediately after starting it, reply with a short message containing the
   token STARTED and stop.
3) Later, if you are woken with the result of the background command, reply
   with a short message that quotes the command output verbatim (it contains
   a token) and stop.

Do NOT wait for the command to finish. Do not poll its output. Do not spawn
sub-agents. Do not daemonize it yourself with nohup, setsid, disown, "&", or
output redirection to a file; the command must stay tracked by you as a
running command. The point is that your turn ends while the command is still
running. If you have no way to keep a command running in the background after
your turn ends, reply with exactly BG_UNSUPPORTED and stop. Keep prose short.

Expect

  • First run settles with STARTED; the command item keeps spinning and the timeline and sidebar show Waiting.
  • Waiting clears when one wake run quotes CODEX_BG_WAKE_DONE and the command item flips to completed.
  • Exactly one wake; no forever spinner after wake.
05

Two background commands, two wakes

manual only

Manual only.

Prompt
Live-test two background command wakes.

1) Start these two commands as background / long-running processes that you
   do NOT wait for, using your own built-in background execution facility
   (run the commands themselves and let them keep running past your turn):
   sleep 20 && echo CODEX_BG_TWO_FIRST_DONE
   sleep 40 && echo CODEX_BG_TWO_SECOND_DONE
2) Immediately after starting both, reply with a short message containing the
   token STARTED and stop.
3) Later, each time you are woken with the result of a background command,
   reply with a short message that quotes that command's output verbatim (it
   contains a token) and stop.

Do NOT wait for the commands to finish. Do not poll their output. Do not
spawn sub-agents. Do not daemonize them with nohup, setsid, disown, "&", or
output redirection to a file; both commands must stay tracked by you as
running commands. The point is that your turn ends while both commands are
still running. If you have no way to keep a command running in the background
after your turn ends, reply with exactly BG_UNSUPPORTED and stop. Keep prose
short.

Expect

  • After root settlement, Waiting reports two background tasks.
  • Two wakes in order: FIRST then SECOND tokens.
  • After the first completion, Waiting remains for the second task, then clears after the second completion.
  • Both command items end completed; second does not stick running after first wake.
06

Background command + fire-and-forget subagent

manual only

Manual only.

Prompt
Live-test a background command plus a fire-and-forget sub-agent in one turn.

1) Start this command as a background / long-running process that you do NOT
   wait for, using your own built-in background execution facility:
   sleep 20 && echo CODEX_BG_MIX_CMD_DONE
2) Spawn exactly one collaborator sub-agent (your agent-spawning tool), with
   this task:
   Run the shell command in the foreground and wait for it to finish:
   sleep 35 && echo CODEX_BG_MIX_SUB_DONE
   Only after it prints CODEX_BG_MIX_SUB_DONE, return exactly the token
   CODEX_BG_MIX_SUB_DONE as your final answer, with no other text.
3) Do NOT wait for either of them. Do not call any wait tool. Immediately
   after starting both, reply with a short root assistant message containing
   the token STARTED and stop.
4) Later, if you are woken with the result of the background command, reply
   with a short message that quotes the command output verbatim and stop.

Do not daemonize the command with nohup, setsid, disown, "&", or output
redirection to a file. If you have no way to keep a command running in the
background after your turn ends, reply with exactly BG_UNSUPPORTED and stop.
If you have no tool for spawning sub-agents, reply with exactly
SUBAGENT_TOOL_UNAVAILABLE and stop. The point is that your turn ends while
both are still outstanding. Keep prose short.

Expect

  • After root settlement, Waiting reports two background tasks.
  • Exactly one wake (for the command) quoting CODEX_BG_MIX_CMD_DONE.
  • Waiting remains for the subagent after the command completes, then clears when the subagent completes in place with CODEX_BG_MIX_SUB_DONE (no second wake).
07

Resume a completed subagent

codex-resume-subagent
Prompt
Live-test resuming a completed sub-agent.

1) Spawn exactly one collaborator sub-agent (your agent-spawning tool), with
   this task:
   Reply with exactly the token CODEX_FIRST_DONE and nothing else. If you
   later receive a follow-up message telling you to continue, run this shell
   command in the foreground and wait for it to finish:
   sleep 20 && echo CODEX_RESUME_DONE
   and only after it prints CODEX_RESUME_DONE, return exactly the token
   CODEX_RESUME_DONE as your final answer, with no other text.
2) Wait for the sub-agent to return its first answer.
3) Send the sub-agent this follow-up message:
   Continue: run the sleep command now and return the token.
4) Do NOT wait for the resumed sub-agent. Immediately after sending the
   follow-up, reply with a short root assistant message containing the token
   NUDGED and stop.

If you have no tool for spawning sub-agents, reply with exactly
SUBAGENT_TOOL_UNAVAILABLE and stop. If you cannot send a follow-up message to
a finished sub-agent, reply with exactly RESUME_UNSUPPORTED and stop. The
point is that your root turn ends while the sub-agent is working again. Keep
prose short.

Expect

  • Row completes CODEX_FIRST_DONE, root NUDGED, row re-opens then completes CODEX_RESUME_DONE.
  • After NUDGED settles, Waiting appears for the resumed subagent and clears when CODEX_RESUME_DONE arrives.
  • No wake required for subagent completion (row updates in place).
08

Background command completes in-turn (no wake)

manual only

Negative control: manual only.

Prompt
Live-test a background command that finishes before your turn ends.

1) Start this command as a background / long-running process using your own
   built-in background execution facility (no nohup, no "&"):
   sleep 5 && echo CODEX_BG_INTURN_DONE
2) After starting it, wait for it to finish and quote its output in your
   reply.
3) End your final assistant message with ALL_DONE.

Do not spawn sub-agents. Keep prose short.

Expect

  • One completed run; quotes CODEX_BG_INTURN_DONE; ends ALL_DONE.
  • No Waiting row or sidebar pill appears because the command completes before root settlement.
  • After idle, no spontaneous second run for ~30s.

Codex · Interrupt / Stop

codex · gpt-5.6-terra low

Codex direct Stop and two-message recovery coverage from PR #4229. This mirrors codex-interrupt-fast and provides a provider comparison for the Claude missing-first-recovery regression. Use a fresh thread. This manual scenario validates recovery and visible projection only; use the headless pack for process-containment proof. Markdown: codex-appimage-interrupt-prompts.md.

01

Direct Stop with two sequential recoveries

codex-interrupt-direct-stop

Stop only after the foreground command is visibly running. Send recovery 1 after the thread returns to idle, then send recovery 2 only after recovery 1 settles. This UI check does not prove the provider shell process exited.

Open prompt
Live-test Codex direct Stop dual recovery. Short preamble only. Then run this exact foreground shell command and wait for it: sleep 30 && echo SHOULD_NOT_FINISH_CODEX_STOP. Keep the turn open until interrupted. Do not print either recovery token.
Recovery 1 (after Stop and idle)
Reply with exactly CODEX_RECOVERY_ONE_OK. No tools.
Recovery 2 (after recovery 1 settles)
Reply with exactly CODEX_RECOVERY_TWO_OK. No tools.

Expect

  • The original turn becomes interrupted and its command card stops spinning.
  • Recovery 1 remains visible and receives its own CODEX_RECOVERY_ONE_OK assistant response.
  • Recovery 2 remains visible and receives a later, separate CODEX_RECOVERY_TWO_OK response.
  • SHOULD_NOT_FINISH_CODEX_STOP never appears as command output after Stop.
  • The thread ends idle with no ghost assistant row or stuck Working state.
02

Stop while a collaborator subagent is running

manual only

Stop only after the collaborator row is visibly running. This validates subagent and parent-turn terminalization. The manual UI does not prove provider process containment.

Open prompt
Live-test Codex Stop while a collaborator subagent holds the root turn.

1) Spawn exactly one collaborator subagent with this task:
   Run the foreground shell command: sleep 30 && echo SHOULD_NOT_FINISH_CODEX_SUBAGENT_STOP
   Then return exactly CODEX_SUBAGENT_HOLD_DONE.
2) Wait for that collaborator. Do not start other tools or return a root answer before it finishes.
Recovery (after Stop and idle)
Reply with exactly CODEX_SUBAGENT_STOP_RECOVERY_OK. No tools or further questions.

Expect

  • The root turn becomes interrupted and the collaborator row becomes terminal, never permanently running.
  • Neither CODEX_SUBAGENT_HOLD_DONE nor SHOULD_NOT_FINISH_CODEX_SUBAGENT_STOP appears in the thread after Stop.
  • Recovery settles on a distinct run with CODEX_SUBAGENT_STOP_RECOVERY_OK.
  • No command or collaborator card returns to running after the thread reaches idle.