Repository navigation
feat: show background task commands and live output - #1
Merged
Merged
Conversation
Claude background Bash tasks were opaque: the composer banner showed only a description, and nothing showed what a task printed or whether it was, for example, a dev server holding a port. The Claude adapter now joins each background task to the Bash tool call that started it, recording the command, tool_use_id, start time, and the output file named in the Bash ack. A new read-only RPC tails that file (last 200 lines / 64 KiB) and only reads the output file registered on the thread's roster. A second RPC stops one task through the SDK's stop_task control request. The thread details panel lists running background tasks next to Lineage, and the composer banner shows each command; both open a right-panel view with the command, elapsed time, a per-task Stop, and a polled, auto-scrolling tail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checking on a background task meant leaving the conversation for the right panel. The banner summary is now a popover trigger: it rises from the banner with one row per task (command, elapsed time, per-task Stop), tails the selected task inline, and offers "Open in panel" for the full view. It shows the only task by default, and polling stops when it closes. The banner title shortens at narrow widths so the commands stay visible beside an open right panel. The tail, Stop button, and row list are shared with the right-panel view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The popover measured its unconstrained output width before adopting the banner's, then collision shifting pushed it to the window's left edge. A new PopoverPopup width="anchor" sizes the positioner itself to the anchor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background Bash tasks were opaque: the composer banner said "Waiting on background task: " but showed no command or output, so a user could not tell whether a task was, say, a dev server holding a port.
How it works
tool_use_id, start time, and the output file named in the Bash ack, so all of it is known while the task runs.background_tasks_changedsnapshots keep these fields.orchestration.getBackgroundTaskOutputreturns the last 200 lines / 64 KiB of a task's output. The client names a task, never a path; the server reads only the file on that thread's roster, and only an absolute<taskId>.output.stopTask), and a polled, auto-scrolling tail. Clicking the banner opens a popover over the composer that lists the tasks, tails the selected one inline, and links to the panel view.feat/side-chat(e0e47af), the banner's Stop did nothing after a turn settled:ClaudeAdapterV2.interruptTurnrejected it with "is not the active turn", so a dev server kept its port.mainalready fixes this in 069058c (fix(server): Stop ends a Claude thread's background work after the turn settles pingdotgg/t3code#13792) by closing the Claude process, so this PR relies on that fix instead of adding its own. The popover's per-task Stop usesstopTaskand leaves the session running.Tests
Adapter tests cover the command/tool-use/output-file capture and per-task stop, and main's settled-Stop tests still pass with the richer task data. A replay-fixture check confirms the enriched roster; the tail has bounds and path-restriction tests; web tests cover selection logic and the list. Typecheck (TS 6.0.3) and lint show nothing new. In the adapter, orchestration, ws, contracts and web chat suites, the only failures (Antigravity file system ×2,
ProviderTurnStartService.memory×4, oneruntimeLayerrollback test) also fail on unmodifiedmain.Screenshots (from the
feat/side-chat-based test build; the Stop pair shows this branch's earlierstopTaskfix): after-01-banner-shows-command.png, after-02-right-panel-live-tail.png, after-05-details-background-section.png, after-popover-open-two-tasks.png, after-popover-compact-title-right-panel.png, before-thread-stop.png, after-thread-stop.png, after-07-subagent-lineage-unchanged.png.Claude Opus 5.5 in Claude Code.