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
Per harness (claude, codex, gemini, opencode, pi): when a headless per-turn run is streaming and another send arrives, what does the platform NATIVELY do? Does the harness adapter (packages/harness) expose any mid-run input channel in headless mode, or is each turn one process? Evidence from adapter source + packages/harness/docs/cli-behaviors.md — no guessing. Output: filled truth table (per harness: native behavior → UI mapping: steer gesture vs native injection). Decides the composer's send-while-running surface.
Resolved (research, 2026-08-03; key citations spot-verified by orchestrator).
Harness
Process model per headless turn
Native mid-run input?
Interrupt/stop
UI mapping
claude
One claude -p --output-format stream-json ... --resume <id> process per turn; stdin written once then closed (ai-sandbox runner.js:19-20)
Platform YES via Agent SDK streaming-input query() + interrupt() control requests (sdk.d.ts:2242-2270) — used only for command probing (harness/src/claude/sdk.ts), NOT the chat path
abort → SIGKILL process tree, driven by DB 'stopping' (run.ts:144-146)
stop-then-send
codex
One codex exec --experimental-json ... resume <id> process per turn; same write-once stdin
UNKNOWN (no streaming-input flag used)
same kill path
stop-then-send
gemini-cli
Fresh gemini --acp process per turn; one session/prompt JSON-RPC, process killed after
ACP models only session/cancel mid-turn (acp.d.ts:442-452); concurrent second prompt UNKNOWN
ACP session/cancel
stop-then-send
opencode
Per-turn opencode HTTP server + one session.prompt() call, disposed after
Platform PLAUSIBLE (session.prompt/session.abort are independent HTTP calls on a persistent server) — our adapter never uses it; live queue/reject behavior UNKNOWN
session.abort() HTTP
stop-then-send
pi
Headless chat not implemented — stub yields RUN_ERROR (_shared/stub.ts:11-18)
N/A
N/A
N/A
Design consequence: TODAY, every headless turn is one process with stdin closed — no harness adapter has a mid-run input channel. So the composer's send-while-running surface for widget-driven runs = STEER (stop current run, send new message), uniform across harnesses, honestly surfaced. No queue, nothing buffered.
Upgrade path (fog, not this rewrite): claude Agent SDK streaming-input mode and opencode's persistent server both offer real native mid-run channels; adopting either is a per-adapter upgrade that would turn steer into native injection there. UNKNOWNs (codex mid-run flags, gemini concurrent session/prompt, opencode live queue behavior, claude -p --input-format stream-json long-lived stdin) need live CLI experiments — none block the rewrite since the uniform steer mapping doesn't depend on them.
Version addendum (user challenge, verified against npm): installed = ai 0.41.0 / adapters 0.2.2 / sandbox 0.2.3 / client 0.22.0; latest = ai 0.42.0 / adapters 0.2.3 / sandbox 0.2.4 / client 0.22.1. The ENTIRE delta is one minor change: tool-call fan-out caps (maxToolCalls, maxToolCallsPerTurn, TanStack/ai#965); every adapter/sandbox/client bump is a dependency-only patch. No new send, mid-run input, or adapter behavior anywhere. Truth table holds for latest. (Upgrading to 0.42 during the rewrite is cheap and worth doing anyway.)
Activity
omridevk commentedon Aug 2, 2026
Resolved (research, 2026-08-03; key citations spot-verified by orchestrator).
claude -p --output-format stream-json ... --resume <id>process per turn; stdin written once then closed (ai-sandboxrunner.js:19-20)query()+interrupt()control requests (sdk.d.ts:2242-2270) — used only for command probing (harness/src/claude/sdk.ts), NOT the chat path'stopping'(run.ts:144-146)codex exec --experimental-json ... resume <id>process per turn; same write-once stdingemini --acpprocess per turn; onesession/promptJSON-RPC, process killed aftersession/cancelmid-turn (acp.d.ts:442-452); concurrent second prompt UNKNOWNsession/cancelsession.prompt()call, disposed aftersession.prompt/session.abortare independent HTTP calls on a persistent server) — our adapter never uses it; live queue/reject behavior UNKNOWNsession.abort()HTTP_shared/stub.ts:11-18)Design consequence: TODAY, every headless turn is one process with stdin closed — no harness adapter has a mid-run input channel. So the composer's send-while-running surface for widget-driven runs = STEER (stop current run, send new message), uniform across harnesses, honestly surfaced. No queue, nothing buffered.
Upgrade path (fog, not this rewrite): claude Agent SDK streaming-input mode and opencode's persistent server both offer real native mid-run channels; adopting either is a per-adapter upgrade that would turn steer into native injection there. UNKNOWNs (codex mid-run flags, gemini concurrent
session/prompt, opencode live queue behavior,claude -p --input-format stream-jsonlong-lived stdin) need live CLI experiments — none block the rewrite since the uniform steer mapping doesn't depend on them.omridevk commentedon Aug 2, 2026
Version addendum (user challenge, verified against npm): installed = ai 0.41.0 / adapters 0.2.2 / sandbox 0.2.3 / client 0.22.0; latest = ai 0.42.0 / adapters 0.2.3 / sandbox 0.2.4 / client 0.22.1. The ENTIRE delta is one minor change: tool-call fan-out caps (
maxToolCalls,maxToolCallsPerTurn, TanStack/ai#965); every adapter/sandbox/client bump is a dependency-only patch. No new send, mid-run input, or adapter behavior anywhere. Truth table holds for latest. (Upgrading to 0.42 during the rewrite is cheap and worth doing anyway.)