Repository navigation
[Bug]: tui-idle reports a flagged terminal create --command "omp …" launch idle after ~2s (agentIdentity null, blank screen); the next prompt is lost #25264
Description
Operating system
macOS
Orca version
1.4.220
Details
Summary
When an agent is launched with flags through orca terminal create --command "omp <flags>", orca terminal wait --for tui-idle returns satisfied: true about 2 seconds after creation. At that point OMP hasn't drawn anything yet: the screen is blank and agentIdentity is null. A prompt sent right after that is lost. The composer comes up empty, no turn starts, and nothing reports an error.
The same command without flags (--command omp) works correctly. Orca resolves agentIdentity: "omp", the wait lasts until the OMP composer is actually up (13–21 s on this machine), and the prompt is delivered.
This is the flow the bundled orca-cli skill recommends when you need a custom model or effort (terminal create --command '<agent> <flags>' → terminal wait --for tui-idle → terminal send). worktree create --agent has no model/effort flags, so passing flags through --command is the only way to pick a model for an OMP worker today (see also #23388).
Environment
- Orca 1.4.220, macOS 26.6.2, arm64
- OMP 18.6.0 (
omp --version); Codex 0.160.0 used for comparison - Local worktree, no SSH or remote runtime
Reproduction
Save the script below and run it from a shell inside any Orca-managed worktree (needs jq). It closes its own terminal on exit.
#!/usr/bin/env bash
set -euo pipefail
CMD=${CMD:-omp}
h=$(orca terminal create --worktree active --command "$CMD" --json | jq -r .result.terminal.handle)
trap 'orca terminal close --terminal "$h" --json >/dev/null' EXIT
start=$(date +%s)
orca terminal wait --terminal "$h" --for tui-idle --timeout-ms 60000 --json | jq -c .result.wait
echo "tui-idle returned after $(( $(date +%s) - start ))s"
orca terminal show --terminal "$h" --json | jq -c '.result.terminal | {title, agentIdentity}'
echo "rendered screen lines: $(orca terminal read --terminal "$h" --screen --json | jq '.result.terminal.tail | length')"
orca terminal send --terminal "$h" --text 'Reply with the single word pong.' --enter --json \
| jq -c '.result.send | {accepted, stages: .prompt.stages, provider: .prompt.provider}'
sleep 20
echo "--- screen 20s later"
orca terminal read --terminal "$h" --screen --json | jq -r '.result.terminal.tail[]' | grep -E 'pong|❯' || trueCMD='omp' ./repro.sh # works
CMD='omp --thinking high' ./repro.sh # tui-idle after ~2s, prompt lostOutput
CMD='omp --thinking high' (2 of 2 runs identical):
{"handle":"term_cf25…","condition":"tui-idle","satisfied":true,"status":"running","exitCode":null}
tui-idle returned after 2s
{"title":"Terminal 1","agentIdentity":null}
rendered screen lines: 0
{"accepted":true,"stages":["input_accepted"],"provider":"unsupported"}
--- screen 20s later
❯
The composer is empty 20 s later, and neither the prompt nor any reply appears in the transcript.
CMD='omp' (3 of 3 runs):
{"handle":"term_e08b…","condition":"tui-idle","satisfied":true,"status":"running","exitCode":null}
tui-idle returned after 13s
{"title":"OMP > team-claude-config","agentIdentity":"omp"}
rendered screen lines: 15
{"accepted":true,"stages":["input_accepted"],"provider":"unsupported"}
--- screen 20s later
Reply with the single word pong.
pong
❯
Results across runs
--command |
tui-idle returned after |
agentIdentity when it returned |
Screen lines | Prompt delivered |
|---|---|---|---|---|
omp |
13 s, 13 s, 21 s | "omp" |
14–15 | yes, 3/3 |
omp --thinking high |
2 s, 2 s | null |
0 | no, 0/2 |
omp --approval-mode yolo, omp --model anthropic/claude-opus-5-5 --thinking high |
2.2–2.4 s (6/6 timed runs) | (not recorded; title was still the tab title) | 0 | no in the 2 runs that sent right after the wait (the other runs gated on the title first) |
codex -c model_reasoning_effort="high" |
3 s | null |
0 | yes (Codex kept the early input) |
The Codex row shows the early tui-idle result isn't OMP-specific: Codex launched with flags gets it too. OMP is where it causes damage, because input typed before its TUI is up is dropped.
Nothing on the send side catches the loss either. For OMP, terminal send reports provider: "unsupported" and stops at input_accepted (with or without --wait-submit), so the caller has no signal that the prompt went nowhere.
Expected
tui-idle should not report a freshly launched agent as idle before the agent has rendered anything. Two options that look natural from the outside:
- Resolve the agent identity from the executable (argv[0]) regardless of trailing flags, so
omp --thinking highgets the same launch-agent readiness handling as bareomp. - Or skip the quiet-non-shell-process fallback at least until the PTY has produced its first output.
Workaround
Before sending, poll orca terminal show --json until .result.terminal.title matches ^(OMP|π) > (1 s interval, 60 s cap). With that gate the first prompt was delivered in every session I tried (6/6, flagged launches, OMP ready 5–7 s after create).
Related
- [Bug]: slow Claude startup lets tui-idle false-positive and loses injected dispatch (v1.4.149) #9976 and its open PR fix(runtime): skip tui-idle quiescence for launchAgent cold starts #10020: same false-idle class for Claude cold starts. That PR skips the quiescence fallback only for
launchAgentPTYs and explicitly leaves ad-hocterminal create --commandlaunches on the old fallback. This report is that remaining case. - [Bug]: OMP 18.5 startup still times out in 1.4.219 before managed idle title is published #25052 / fix(omp): publish genuine idle title at session startup #25145: OMP startup idle title never published, so
tui-idletimed out. That's the opposite symptom. On 1.4.220 with OMP 18.6.0, bareompnow passes readiness correctly. - [Bug]: worker-start --agent omp fails at agent_readiness: OMP 18.4 idle title "π > dir" is not recognised as idle #24068 (closed): OMP 18.4 idle title not recognised.
- orchestration worker-start: accept --model (and --effort as --thinking) for the omp agent #23388:
worker-starthas no--model/--thinkingfor OMP, which is why flags end up in--command. - terminal read/wait: observing an agent TUI needs screen-snapshot semantics (read --screen; tui-idle false-positive) #14561: general
tui-idlefalse-positive report.
Activity
fix(runtime): flagged `--command` agent launches wait for the agent's…