Repository navigation
Give every helper its own chat, with no time limit in your chats - #885
sambitcreate wants to merge 28 commits into
Conversation
The privacy filter no longer swallows the line break after an indented block, treats bare all-caps labels such as JSON: and TASK: as labels, and re-runs until the text settles before hiding everything. The panel's single-line task preview joins those labels with a dash so it survives the stricter snapshot check.
Chat helpers get a 24-hour safety net and a Bot reply's helpers share 60 minutes from the first launch, after which further launches are refused. Stopped, failed and timed-out helpers hand the parent their settled messages and changed files, marked incomplete and unverified. The Result no longer repeats the warning, and a stuck helper's Stop button sits inside its No recent update notice.
Keep secret-named colon blocks hidden in both filters, hand over partial work safely, prefer a child's result only when it finished before a stop, give CLI durable Bots one helper clock per turn, pass a stopped CLI helper's filtered streamed text, and widen the settlement seal past the drain grace.
Record each helper's task, messages and tool steps while it runs, using the main chat's step builder and its credential filter (keys hidden, file paths kept). Each helper's conversation is saved atomically beside the chat's helper records, capped at 2 MB with the oldest steps dropped first, and removed when the chat is deleted, including after a restart mid-delete. The existing history read returns the saved copy once the run is proven to belong to the chat, and a new live stream sends changed entries to the owning window, with a merge helper for a reader that joins mid-run. Bot helpers on the desktop and under aiden serve save the same way. Phones receive nothing yet, and there is no UI in this change.
Hide private key blocks (whole or cut off), same-line secret-named values such as OTP, PIN, PASSCODE, CVV and SEED, and keys in every step field of a saved helper conversation. Hold back an unfinished word or an open key block while a message streams. Save each revision before streaming it, keep one save in flight, retry a failed save with backoff and bounded final attempts, and apply size trims to the recorder so dropped content stays dropped. Hand the helper's result back without waiting for the final save, settle recorders from the supervisor's seal, and map timed-out helpers to cancelled. Record tool events as the main chat does, including pending tool calls and activity anchors, and carry edit line counts from the helper's file tools on the desktop and under aiden serve. Guard the CLI's recorder calls, remove stale temporary files left by a crashed save, and update the plan, README and project notes.
Hide wrapped secret tails and recovery phrases in helper transcripts, keep ordinary prose and settings readable, and hide same-line secret values in the panel too. Report a run of failed transcript saves once and pause retries after five, unref the final save's retry wait, and cap how long a finished chat reply waits for its helpers' final saves. Show refused helper tools as blocked and tools ending during a stop as cancelled, as in the main chat. Test the transcript path through the real supervisor, and correct the ownership wording in the plan and notes.
The Subagents panel now opens a helper chat when a transcript exists: the task as a bubble, the helper's messages and steps, approvals inside the chat, a soft problem box with Ask main chat to retry, Technical details, Jump to latest and a Stop / Expand / Back bar. Expand replaces the main messages until Esc or Back. Status words are unified as Queued, Running, Waiting on you, Done, Failed and Stopped, and the tray button reads Open helper chat.
Render tests cover a running helper (task, steps, Stop), a stopped one (problem box, no Stop), the summary fallback when nothing is saved, retry staging the request without sending it, Expand with Esc and Back returning focus to the opener, a late-joining window's merge, and the status announcement. Store and state tests cover the merge rules, chat-switch reset, approval routing and plain-language problem text.
The chat pane's body replacement sat inside the hidden, inert transcript wrapper, so Expand showed an empty pane. It now renders beside that wrapper. A ScrollArea test covers the replacement staying reachable, and a Playwright test opens a helper from its chat card row, expands it, returns with Esc and sees it finish.
…he helper chat Every subagent surface now uses the same six status words: Queued, Running, Waiting on you, Done, Failed and Stopped. The chat card summary, the composer pill, the side panel's groups and summaries, the activity marks and the onboarding art all read from them, and the panel files an unknown helper under Stopped. While a helper's write request is waiting for an answer, its helper chat says "Waiting on you", uses the waiting tone and shows the question inside the chat, so it can be answered there. Also map the new helper chat E2E spec in the CI spec-to-source map, update the quick view test for the renamed Done group, and bring the README, plan status, busy-controls, activity-marks and UI inspiration docs and the project memory up to date.
- Expanded helper chat: a bar says when the main chat waits on something else (a question or another approval); its Back returns to the main chat and focuses what waits. The side panel shows "Showing in the main chat" while a helper is expanded. - Late join: a running helper with no saved transcript is fetched once; gaps refetch from the saved copy, and refetch keys clear on failure, on an empty answer and on a chat change. - The helper chat uses the shared chat column, shows the model's display name (effort left out when off), groups runs of tool-only steps, and uses plain copy. Retrying twice puts the request in the message box once. - Only the shared announcer speaks status; the helper chat's own live region is gone. Sticky headers use the popover surface in the side panel. - Technical details is a toggle that scrolls into view and takes focus. Selectors and memoised transcripts keep other helpers' tokens from redrawing the view; the side panel reads only the selected helper. - On a chat switch the old chat's live updates and approvals are never taken as the new chat's, whichever sync runs first. - Stop / Stop all, Close in the side panel and Back when expanded, a working row, refresh error with Try again, keyed views per run. - Docs: README, plan, plan index and project memory updated.
- Plain failure sentences, one Back in the expanded footer, and a waiting bar (soft note, one polite announcement) whose button reads Go to approval or Answer question and focuses that card or questionnaire. - The main approval card is canonical: the side panel shows a compact "Waiting on your approval in the main chat" row; the full card only when expanded. Focus skips the helper's own approvals. - A non-owner window re-reads the saved copy when the run's status or revision changes, including terminal; a failed late-join read shows the refresh row with Try again. - Closing the expanded chat focuses the side panel's new Expand button. - A helper row's model card is not rendered while a helper chat is expanded, so a stuck hidden card can no longer swallow Esc. - Hover card shows the model name, hides Effort when off; Stop all only with active children; "Writing its report"; onboarding art updated. - Docs, plan and project memory updated; tests extended.
- Only a rejected transcript read shows Couldn't load; reads are coalesced per helper (one in flight, at most one a second). - Go to approval focuses the main approval card itself; the compact row says how many other requests come first. - Hover cards and tooltips render nothing while their surface is covered (the expanded helper chat, or the narrow side panel floating over the transcript), replacing the chips' special case. - Wording: turn-limit reasons, Ask the main chat to retry, Waiting on you for the main working line, Back to main chat (Esc). - One label rule for the waiting overlay, judged against every helper. - Closing the expanded chat falls back to the same helper's Expand button. - Docs and project memory updated.
- Dialog and AlertDialog reset the covered-surface context inside the Radix Content again, so the portal keeps the ref Presence needs and the exit animation plays; a focus-return test checks that a closing dialog stays mounted until animationend. - The Go to approval tint eases with the decelerate token and, under Reduce Motion, holds still for the same 1.2 s instead of being skipped. - ChatApprovalCard is keyed by approvalId. - The environment panel sets its failure flag from each failures updater. - Onboarding Helpers tile: in narrow tiles the raised chat sits under the selected row and runs off the right edge, and the narrowest tiles hide the status word; the one-column layout is unchanged. - README, plan and project memory updated.
- Helpers onboarding tile: below a 260 px tile the raised chat opens under the selected row and runs off the right edge (top 60, left 16); its header More icon is hidden there, and status words are hidden wherever they would be cut (below 160 px and 260-305 px). - ChatApprovalCard keeps one stable status line and LiveGuard outside a body keyed by approvalId, so each approval is announced on the same live region and starts with fresh choices; callers no longer key the card and ComputerUseAccessApproval drops its duplicate wrappers. - Covered-surface reset test now covers Dialog and AlertDialog. - Bot chat and bot-access-requests E2E query the requester-prefixed card name.
…appers The first-approval-card test from main looked for a region named "Review before …"; approval regions now lead with "Request from <Bot>:". The component sink now lists SurfaceCovered and DismissHoverSurfaces as context wrappers that render no element.
There was a problem hiding this comment.
Important
Two lifecycle gaps can leave saved helper chats permanently incomplete in other windows and restart a Bot reply's advertised 60-minute helper limit.
Reviewed changes across the complete initial diff, including helper scheduling, persistence, IPC, renderer state, approvals, storage cleanup, desktop/CLI Bot parity, and user-facing helper-chat behavior.
- Helper execution limits — replaces the shared short deadline with attended-chat safety behavior and a per-Bot-reply 60-minute clock while preserving partial work on non-success outcomes.
- Saved helper conversations — records, redacts, bounds, persists, streams, reloads, merges, and deletes helper transcripts with their owning chats.
- Helper chat interface — adds side-panel and expanded transcript views, normalized statuses, Stop/retry controls, model details, focus restoration, and approval/question navigation.
- Cross-surface integration — extends desktop and CLI Bot runtimes, IPC/preload contracts, shutdown flushing, storage accounting, onboarding, docs, and focused/E2E coverage.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
… reply's helper clock Another window reading a finished helper could settle on an empty or unfinished saved copy written before the final save landed, and then never read again. A finished helper's read now re-reads with growing gaps until the final copy arrives (bounded), and the detail read no longer counts a pre-final copy as read. The per-claim helper clock map dropped its oldest entry past 256 claims, which could hand a still-running reply a fresh 60 minutes. The cap is gone; every claim already ends in a release signal or its Bot's removal.
There was a problem hiding this comment.
Important
The terminal transcript retry still accepts one stale persisted shape as final, so another window can permanently miss a fast helper's conversation.
Reviewed changes since the prior Pullfrog review at a262f9e8, covering the two follow-up commits and their lifecycle tests.
- Preserved active Bot clocks — Removed capacity eviction so a running claim retains its original 60-minute helper budget through rebuilt tools.
- Retried terminal transcript reads — Added terminal refetch reasons, final-copy classification, bounded polling, and detail-read coordination for non-owner windows.
- Updated affected tests — Adjusted approval-card and component-sink expectations after the Phase 3 UI restructuring.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes since the prior Pullfrog review at d749a2d7, covering the terminal-transcript fix and its formatting-only follow-up.
- Rejected task-only terminal copies — Required a saved helper conversation to contain at least one message before it can satisfy terminal finality, preserving bounded polling through the initial-save race.
- Updated lifecycle coverage — Changed the focused state test to assert that the recorder's initial task-only save is inconclusive while closed messages remain final.
- Restored source formatting — Returned the touched state module to its original formatting without changing behavior.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes since the prior Pullfrog review at 5b10579e, covering the merge from main and its overlapping helper-chat integrations.
- Merged current
main— Retained the helper-chat documentation and test registration while incorporating the release and proactive-chat changes now on the base branch. - Preserved transcript finality — Kept the task-only transcript guard and bounded terminal-read behavior intact through the merge and formatting reconciliation.
- Combined chat-pane behavior — Preserved helper status overlays and hover-surface dismissal while also passing upstream lead-chat labels to the resolved
MessageList.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏

Problem
Helpers (subagents) were hard to follow and got cut off too soon.
Change
This PR implements
docs/plans/subagent-helper-chat-plan.mdin three phases. Each phase was reviewed separately.Phase 1: time limits and bug fixes
JSON:block in it.Phase 2: saved helper conversations
userData/subagent-runs-v2/transcripts/;chat:subagent-transcript. Saved transcripts are merged with gap detection and capped at 2 MB, 600 entries and 200k characters per entry.Phase 3: the helper chat
ChatApprovalCardkeeps one stable screen-reader status line across consecutive approvals, so each new approval is announced. Its choices reset for each approval..memory/are updated.Scope
This implements the approved plan in
docs/plans/subagent-helper-chat-plan.md(option (a) for the 24-hour question).Phones: no protocol change. iOS and Android already know Stopped and Failed, and "Timed out" stays for old helpers and Bots.
Screenshots
Before and after, light and dark, at 2x with Reduce Motion on. These are hosted on
claude/subagent-helper-chat-screenshots.These states are new, so there is no before image:
Verification
All run locally on the merged head (a262f9e), on macOS:
npx tsc --noEmit -p .andnpm run type-check:e2e: clean. eslint clean on touched files.npm run test:ci-policy: 123 passed.npm run test:subagents: all groups passed, 0 failures.npm run test:onboarding: 78 passed.npm run test:tool-approval-card: 55 passed.npm run test:e2e:space):subagent-helper-chat.spec.tsandbot-access-requests.spec.tspassed. Screenshot captures ran there too.Review: after each phase, two independent reviewers (logic/tests and design/accessibility) checked the work, and fixes looped until both were clean. Phase 3 took seven rounds; round 7 was clean on both.
Known gaps and follow-ups
agent-steps.tsand in the iOS and Android strings is unchanged. Aligning it with "Waiting on you" is a copy change across all clients, so it is left for later.button, input, textarea { font: inherit; }rule overridestext-*on buttons across the app. This PR works around it by settingtext-smallon the containers.main). If one approval is replaced in a single render by another with identical status text, the stable status line's text doesn't change and the second approval isn't announced.renderer/server-visualstest "installed browser draws a chart" timed out after 15 s waiting for headless Chrome to render, in Desktop tests (renderer-other) on c0ce6e0: https://github.com/sambitcreate/aiden-agent/actions/runs/45141669928/job/137581496965. The next push re-ran the job; no code here touches server visuals.AidenSandboxedHTMLTests.testAPreviewPageMakesNoNetworkConnectionstimed out after 30 s waiting for the sandboxed page to finish loading on the iOS 27.2 simulator, on d749a2d: https://github.com/sambitcreate/aiden-agent/actions/runs/45145391635/job/137595998863. This PR changes no iOS code; the required iOS job runs the same suite on release Xcode.AidenChatTests.testPreparationSurvivesTheChatComposerGivingWayToAQuestionCardfailed after 58.5 s, thenxcodebuildcrashed (exit 134) and the result bundle was unreadable, on 5b10579: https://github.com/sambitcreate/aiden-agent/actions/runs/45150225985/job/137610078188. This PR changes no iOS code. The job was rerun once (https://github.com/sambitcreate/aiden-agent/actions/runs/45150225985/job/137669263184), but the rerun was cancelled from outside about three minutes into the tests (12:08 UTC, well inside its 50-minute limit), so it produced no result.AidenChatTests.testAssistantMarkdownKeepsTheFirstGlyphInsideItsRenderedBoundsfailed after 16 s ("The reply never rendered") on the iOS 27.2 simulator, on 5b10579: https://github.com/sambitcreate/aiden-agent/actions/runs/45150225985/job/137610078022. It failed again on its single rerun: https://github.com/sambitcreate/aiden-agent/actions/runs/45150225985/job/137669263290.ios/orandroid/). Attempt 2 was cancelled from outside the job about 3 minutes into the tests, so it gave no result: https://github.com/sambitcreate/aiden-agent/actions/runs/45150225985/job/137669263184. Attempt 3 failed on a different test,AidenSandboxedHTMLTests.testAPreviewPageMakesNoNetworkConnections(109 s, the same sandboxed-page load that timed out on Xcode 27): https://github.com/sambitcreate/aiden-agent/actions/runs/45150225985/job/137691833283. The same XCTest step also failed onmainat ed53724 (run 45086015387).PASSWORD:block. This is a separate fix.Done., is kept.AI disclosure
This PR was written by a coding agent (Claude Code), with separate agent reviewers after each phase.
Checklist