GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(server): Grok background shell commands stay in the run that started them by juliusmarminge · Pull Request #13789 · pingdotgg/t3code Conversation
|
| {"type":"emit_inbound","label":"notification:session/update:agent_thought_chunk:t3-xai-prompt-1","frame":{"kind":"notification","method":"session/update","params":{"sessionId":"00000000-0000-4000-8000-000000000001","update":{"sessionUpdate":"agent_thought_chunk","content":{"type":"text","text":" was"}},"_meta":{"totalTokens":23745,"eventId":"00000000-0000-4000-8000-000000000001-85","agentTimestampMs":1790405183378,"promptId":"t3-xai-prompt-1","streamStartMs":1790405182783,"turnStartMs":1790405167500,"updateType":"AgentThoughtChunk","chunkId":22}}}} | ||
| {"type":"emit_inbound","label":"notification:session/update:agent_thought_chunk:t3-xai-prompt-1","frame":{"kind":"notification","method":"session/update","params":{"sessionId":"00000000-0000-4000-8000-000000000001","update":{"sessionUpdate":"agent_thought_chunk","content":{"type":"text","text":" very"}},"_meta":{"totalTokens":23745,"eventId":"00000000-0000-4000-8000-000000000001-86","agentTimestampMs":1790405183378,"promptId":"t3-xai-prompt-1","streamStartMs":1790405182783,"turnStartMs":1790405167500,"updateType":"AgentThoughtChunk","chunkId":23}}}} | ||
| {"type":"emit_inbound","label":"notification:session/update:agent_thought_chunk:t3-xai-prompt-1","frame":{"kind":"notification","method":"session/update","params":{"sessionId":"00000000-0000-4000-8000-000000000001","update":{"sessionUpdate":"agent_thought_chunk","content":{"type":"text","text":" explicit"}},"_meta":{"totalTokens":23745,"eventId":"00000000-0000-4000-8000-000000000001-87","agentTimestampMs":1790405183378,"promptId":"t3-xai-prompt-1","streamStartMs":1790405182783,"turnStartMs":1790405167500,"updateType":"AgentThoughtChunk","chunkId":24}}}} | ||
| {"type":"emit_inbound","label":"notification:session/update:agent_thought_chunk:t3-xai-prompt-1","frame":{"kind":"notification","method":"session/update","params":{"sessionId":"00000000-0000-4000-8000-000000000001","update":{"sessionUpdate":"agent_thought_chunk","content":{"type":"text","text":":"}},"_meta":{"totalTokens":23745,"eventId":"00000000-0000-4000-8000-000000000001-88","agentTimestampMs":1790405183378,"promptId":"t3-xai-prompt-1","streamStartMs":1790405182783,"turnStartMs":1790405167500,"updateType":"AgentThoughtChunk","chunkId":25}}}} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium grok_background_bash/grok_transcript.ndjson:120
The replay loader rejects grok_background_bash at line 120 because the text field is malformed, so the fixture cannot execute. Replace the malformed value with a valid JSON string containing the intended colon.
In file @apps/server/src/orchestration-v2/testkit/fixtures/grok_background_bash/grok_transcript.ndjson around line 120:
The replay loader rejects `grok_background_bash` at line 120 because the `text` field is malformed, so the fixture cannot execute. Replace the malformed value with a valid JSON string containing the intended colon.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This is a narrow Grok ACP bug fix that keeps background shell commands running and attached to their originating run until the provider reports completion, with focused replay coverage and no product-default or static-analysis changes. An unresolved Medium finding reports that the new replay fixture is malformed at line 120, which would prevent that regression test from executing. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
75afe68
into
t3code/codex-turn-mapping
There was an error while loading. Please reload this page.
…d them (#535) > [!NOTE] > A background command's ending now shows on the Bash row that started it, instead of as a separate row in whatever turn it ends in. This also stops a stale notice from folding away the divider after `/compact`. ## Problem When a background task ends (a Bash command run in the background, a command moved to the background at its timeout, or a monitor), its end event gets the ID of whichever turn is running at that moment, and clients show it as its own row in that turn. The Bash row that started the command reads as finished as soon as the command moves to the background, so scrolling back up gives no sign of whether it finished, failed, or was abandoned. When the provider process ends with a background command still running, Claude reports the task as stopped when the session next resumes ("Background shell command didn't finish before the previous session ended"). That row lands in the next turn. After a manual `/compact`, it counted as work, so the turn folded behind "Worked for …" and hid the compaction divider. ## Change Web and mobile match a background task's end event to the tool row whose call ID is the task's `toolUseId`, which Claude includes on every task event. - **Where it shows:** the tool row keeps its turn and position and shows how the task ended. - Web shows a check, cross or dash in the status spot setup actions already use, with the provider's summary as the tooltip. - Mobile adds the summary to the row's expanded detail. - A failed ending also marks the call failed. - **Long foreground commands:** when a task ends while its call is still running, the call's own result already covers it, so no mark is added and the duplicate task row next to the Bash row goes away. - **Fallback:** an end event whose launching row isn't loaded still shows as its own row. - **Mobile tool rows:** mobile used to hide a tool row whenever any task named it as its launcher. It now hides only calls that launched agents, so background commands keep their Bash row, as on web. The shared outcome reader lives in `packages/client-runtime/src/work-log/presentation.ts`. The server is unchanged. The fork feature ledger records this as `background-task-endings`. Upstream's V2 orchestrator keeps background work in the run that started it (see pingdotgg#13789). On upstream `main`, pingdotgg#10295 proposed a fuller version of this and was closed while V2 is in progress. ## Before and after Before: after `/compact`, the stale "Task stopped" row is in the turn, which folds and hides the divider until expanded.  After: the `/compact` turn contains only the compaction, so the divider shows directly.  After: the Bash row from the earlier turn shows a stopped mark, with Claude's summary on hover.  ## Validation - **Real web client:** a dev server on a copy of real data. The fixture thread holds the stretch of a real Claude thread from a Bash call started with `run_in_background` to a `/compact` the next day, with the stopped notice the CLI sent on resume. - `/compact` is followed directly by "Compacted context 286K → 8.48K tokens". - The earlier turn's group lists the `vp run dev` Bash row with a dash mark, and hovering shows the summary. - A task whose launching call is older than the fixture still shows as its own row. - No page or console errors. - **Same rows through the web timeline derivation:** the `/compact` turn yields one `context-compaction` row and no fold. - **New web tests** (`session-logic.test.ts`): - An ending in a later turn lands on the launching row and stays visible in its group. - A long foreground command keeps its own result. - An ending without its launching row stays as its own row. - A failed ending marks the call failed. - **New mobile test** (`threadActivity.test.ts`): the ending lands on the launching row in its original turn. - **Existing suites:** web `session-logic`, `MessagesTimeline.logic` and `MessagesTimeline`, mobile `threadActivity`, and client-runtime `work-log` all pass. Typecheck passes for web, mobile and client-runtime. **Not verified:** mobile on a device or emulator (covered by the feed unit test only), and completed or failed endings on screen (covered by the unit tests). --- Written by an agent (Claude Code, claude-opus-5-5).
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.