Skip to content

fix(web): keep background shells visible until they exit - #10295

Closed
ishaanko wants to merge 2 commits into
pingdotgg:mainfrom
ishaanko:fix/background-shell-timeline-row
Closed

ishaanko wants to merge 2 commits into
pingdotgg:mainfrom
ishaanko:fix/background-shell-timeline-row

Conversation

@ishaanko

@ishaanko ishaanko commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

A Claude shell started with run_in_background: true vanished from the UI while it ran. The Bash tool call returns in about 20 ms, so its row settled at once, the shell's task rows were filtered out of the work log, and nothing on screen showed a process that could live for an hour. Reproduced on nightly 0.0.39-nightly.20260906.1292 with Claude Code 2.1.263; the drop lives in the web client, so it is the same on every OS.

Now the shell's task rows fold into the tool row that launched it. The row stays in progress until the terminal task row arrives, keeps that state after its turn settles, stays out of the "Worked for" fold, and then shows the task's final status. Foreground shells are untouched: they emit the same task rows but settle before the tool result. A command Claude moves to the background at its timeout gets the same treatment through the isBackgrounded patch.

The server strips tool input before rows reach clients, so the payload projection now keeps Claude's run_in_background flag as data.runInBackground. Web only. The mobile work log drops the same rows and can take the same fold in a follow-up.

Closes #9107

before after
before after

A background sleep after its turn settled. The row expands to the rest of the group as before.

Written by Claude Fable 5.1 in Claude Code, driven from T3 Code.

Note

Keep background shells visible in chat timeline until they exit

  • ActivityPayloadProjection.ts projection now retains the runInBackground marker across repeated passes without exposing the raw input.
  • session-logic.ts keeps the launching tool row in progress for background shells and folds terminal task statuses into that row.
  • MessagesTimeline.logic.ts renders running background shells as live rows outside settled turn folds, while only current-turn tools drive the thinking indicator.
  • Behavioral Change: task.completed rows for background shells are skipped as standalone work-log entries, and only current-turn in-progress tools mark the timeline row as active.

Macroscope summarized fd82875.

A Bash call with run_in_background returns at once, so its tool row
settled while the shell kept running and nothing on screen showed it.
Fold the shell's task rows into the tool row: hold it in progress until
the terminal task row arrives, keep it out of the turn fold, and project
Claude's run_in_background flag so the client can tell these launches
apart from foreground commands.

Closes pingdotgg#9107
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 6, 2026
Comment thread apps/web/src/session-logic.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This change introduces cross-layer lifecycle reconciliation for background shells, including new server payload projection, task-status mapping, row folding, and persistent live timeline rendering. Although the intent is clear and well tested, the production behavior spans multiple components and adds substantial state-handling logic beyond a small self-contained UI fix.

You can add or adjust custom eligibility rules. Learn more.

A killed background shell ends with a terminal task.updated and no
task.completed, so read terminal statuses from both rows. A running
shell from an older turn no longer stands in for the active turn's
thinking indicator.
@cursor

cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@juliusmarminge

Copy link
Copy Markdown
Member

Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.

Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Shells launched with run_in_background:true are invisible — no timeline row, excluded from task panel (agentKind filter)

2 participants