Skip to content

[Bug]: Desktop/web thread shows no sign of delegated CLI-agent work: silent while it runs, idle-looking when backgrounded, spontaneous wake after #5043

Description

@kakismash

Before submitting

Area

apps/web

Steps to reproduce

Written so an agent can re-run this end-to-end. Prereqs: Claude provider connected, codex CLI installed and authenticated (any second CLI agent works — the point is a long-running child process).

Variant A — foreground delegation (silent while running):

  1. Add any small project and start a thread with the Claude provider, Full access mode.
  2. Send:

    Delegate a code review to the Codex CLI: run this exact shell command and wait for it to finish (it can take a minute or two): codex exec --skip-git-repo-check "Read math.js and write a thorough code review with at least 10 distinct observations. Be verbose." — Then summarize what Codex found in 2 sentences.

  3. While the command runs (confirm out-of-band with ps aux | grep 'codex exec' that the child is alive), observe the thread transcript and sidebar row.

Variant B — background delegation (idle-looking while child works, then spontaneous wake):

  1. In the same or a new Claude thread, send:

    Start this shell command as a BACKGROUND task (run_in_background, do not wait for it, do not poll it): codex exec --skip-git-repo-check "Read math.js and write an extremely thorough code review with at least 15 observations." — After starting it, immediately end your reply with one sentence confirming it is running in the background.

  2. The turn ends within seconds. Verify with ps that codex is still running.
  3. Watch the thread and sidebar until the child exits (1–3 minutes).

Expected behavior

  • While a provider turn is executing a tool call, the transcript shows the in-flight tool call (at minimum its name/command), not just a bare elapsed-time row.
  • While any delegated/background child work belonging to the thread is running, the thread remains visibly Working (sidebar and transcript), and settle logic does not treat the thread as finished.
  • When background work completes, the resulting activity is an expected continuation, not a surprise state flip on a thread that looked finished.

Actual behavior

Verified on a dev build from current main:

  • Variant A: for the full ~2 minutes the child ran, the transcript showed only Working for Ns — no tool row, no command name, no output. The Command run log row appeared only after the call completed. In-flight tool calls render nothing for the Claude provider.
  • Variant B: the parent turn ended in ~8s ("running as background task "), the sidebar Working badge cleared, and for ~2.5 minutes the thread looked completely idle/finished while codex verifiably kept running. No indicator anywhere that background work existed. When the child exited, the thread spontaneously flipped back to Working ("The background Codex task finished — let me read its output") — on a thread the user had every reason to believe was done. Combined with auto-settle, this produces the settled-while-working and settle/un-settle churn described below.

On the released desktop app (0.0.31) the same workflow also intermittently shows the thread getting settled while the delegated agent is still working, then waking after.

Impact

Major degradation or frequent failure — with agent-to-agent delegation you cannot tell working threads from finished ones, and thread state flips by itself.

Version or commit

Desktop 0.0.31 (Alpha); reproduced on a dev build of main (2026-07-30) via the dev-runner web app

Environment

macOS 26.5.1, arm64. Claude provider (Claude Code 2.1.220) delegating to codex CLI 0.146.0.

Logs or stack traces

# During Variant A, while the transcript showed only "Working for 34s" with no tool row:
ps aux | grep 'codex exec' | grep -v grep
# -> codex exec --skip-git-repo-check "Read math.js and write a thorough code review..."  (running, spawned under the thread's Claude session)

Screenshots, recordings, or supporting files

Timeline observed on main (Variant B): turn ends 0:08 → sidebar idle while child runs 0:08–2:40 → child exits → thread flips back to Working by itself.

Workaround

None in-app; you have to check ps to know whether a thread is actually done.

Related

#4962 reports the same gap on mobile. The in-flight orchestration-v2 subagent observability series (#4779 #4629 #4662 #4663 #4664) and #4793 look like the intended fix vehicle; filing this so the desktop/web symptom — including in-flight tool-call invisibility and the settle/wake churn — is tracked against it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions