Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): a resumed subagent's notification row shows it running, not failed #18099

MergedTinBane(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/18099/headmerged by juliusmarminge View on GitHub

Problem

When a Claude background subagent fails (for example on the usage limit), the parent thread gets a Subagent "…" failed notification row. If the parent later resumes that subagent with SendMessage, the row keeps a red Failed badge while the line under it shows the resumed run's live progress. Fixes #17486.

Change

The notification row now shows the subagent's live status once it has started another run since the notification. A run counts as later when:

  • the subagent is active again (pending, running or waiting), or
  • it has settled and its start time is after the notification.

Claude already resets a subagent's start time when it reopens it. The active-status check also covers a notification that waited in the queue and was delivered after the resume. Its row time is its delivery time, so the start-time comparison alone would miss it. Rows for subagents that weren't resumed are unchanged and still show the reported outcome with its timestamp. "Updated" notifications are untouched.

Known limit: if a notification is delivered from the queue after the turn that resumed its subagent, and that resumed run has since settled, the row goes back to the original outcome with its timestamp. The row has no link to the queued message's original creation time, so it can't tell this case apart without threading message lookups into the timeline.

Surfaces: web and desktop. Mobile only uses the notification outcome for a failure icon in thread activity and doesn't render this row. Only Claude resumes a subagent under the same id; other providers' rows behave as before.

Scope and approval

Bug fix for #17486, following the fix the issue proposes, in the one component that renders the row.

Verification

  • vp test run src/components/chat/V2LifecycleRow.logic.test.ts: 5/5 pass. The tests cover a resumed run that's still running, a notification delivered after the resume, a resumed run that has settled, the original run, and a missing start time.
  • tsc --noEmit for apps/web and lint on the changed files both pass.
  • Checked in a real web client against an isolated dev server. I seeded a copy of a real thread, edited one delegated-task notification to failed, and set its subagent back to running with a later start time. That's the server state the issue reports. The before shot was taken by reverting the fix with hot reload, without changing the data.

Before (main): Failed badge with live progress

before

After: Running, elapsed time, live progress

after

Not checked: an actual Claude resume after a usage-limit failure. The fixture reproduces the projected state, not the provider flow.

Models

  • Development: Claude Opus 5.5 in Claude Code via T3 Code reproduced the bug in the browser, wrote the fix and tests, and captured the before/after screenshots.
  • Review: GPT-6.1 Sol in Codex CLI reviewed it twice. The first review found that a notification delivered late from the queue has a row time after the resume, so the start-time rule alone kept the stale badge. The active-status check was added for that. The second review flagged the remaining case, a late notification after the resumed run settles, which is documented above as a known limit.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Review in Change Stack →

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 15f5157a-85a0-4535-8b0b-04472a3bad6d

      📥 Commits

      Reviewing files that changed from the base of the PR and between b9afba59f435e2e0d6368392b49f10d187125a09 and b8c1afa7cf8df5f2752412efb5b7be72ee52eef8.


      📒 Files selected for processing (3)
      • apps/web/src/components/chat/V2LifecycleRow.logic.test.ts
      • apps/web/src/components/chat/V2LifecycleRow.logic.ts
      • apps/web/src/components/chat/V2LifecycleRow.tsx

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.



      📝 Walkthrough

      Walkthrough

      The lifecycle row now checks whether a subagent resumed after a terminal notification. When it did, the row omits the historical event and displays the subagent’s live status.

      Changes

      Subagent resume notification state

      Layer / File(s)Summary
      Detect subagent resumes
      apps/web/src/components/chat/V2LifecycleRow.logic.ts, apps/web/src/components/chat/V2LifecycleRow.logic.test.ts
      The new subagentResumedSince helper returns true for pending, running, or waiting subagents. For other statuses, it compares valid start and notification timestamps. Tests cover runs started after and before the notification, and a run without a start time.
      Render resumed subagent state
      apps/web/src/components/chat/V2LifecycleRow.tsx
      For terminal notification outcomes, the lifecycle row checks whether the subagent resumed after the notification. If it did, the row omits the historical event. Otherwise, it retains the mapped outcome, label, and formatted timestamp.

      Priority: ⬇️ Low

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix · Severity of issue fixed: Low


      Merge Risk: ⚪ Minimal · up to b8c1a

      The notification row can use the resumed subagent’s state, and no merge-blocking issue is established. A queued notification delivered after a resumed run settles may still show the original outcome.

      Pre-merge checks | Passed 4
      ✅ Passed checks (4 passed)
      Check nameStatusExplanation
      Title checkPassedThe title clearly and concisely describes the main fix: resumed subagent notifications should show the live running state instead of the stale failed state.
      Description checkPassedThe description covers the problem, implementation, scope and approval, verification results, screenshots, limitations, and untested provider flow. It is complete and aligned with the repository templ…
      Linked Issues checkPassedIssue #17486 requires the notification row to stop mixing a prior failure with current subagent progress after a same-ID resume. SubagentNotificationLink now omits the historical outcome event when …
      Out of Scope Changes checkPassedThe changes stay within the linked issue's apps/web scope. The new helper and focused tests directly support the notification-row behavior. The component preserves the existing event for non-resumed…

      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create a new PR

      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Comment `@coderabbitai help` to get the list of available commands.
    3. juliusmarminge merged this6670dc7

    4. juliusmarminge closed this

Sign in to join this conversation.