Skip to content

[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

@newbieFirewood

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|❯' || true
CMD='omp' ./repro.sh                  # works
CMD='omp --thinking high' ./repro.sh  # tui-idle after ~2s, prompt lost

Output

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 high gets the same launch-agent readiness handling as bare omp.
  • 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

Activity

  1. added a commit that references this issue on Oct 25, 2026
    1e221ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    os:macosIssues affecting macOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions