Skip to content

fix(app): correct background subagent status - #42944

Merged
Hona merged 2 commits into
anomalyco:v2from
Hona:remove-background-suffix
Aug 16, 2026
Merged

Hona merged 2 commits into
anomalyco:v2from
Hona:remove-background-suffix

Conversation

@Hona

@Hona Hona commented Aug 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • classify V2 background subagents only after the parent tool completes with a running child result
  • preserve the legacy task background metadata behavior
  • keep the subagent progress indicator animated from the child session state
  • stop the indicator when the child session becomes idle while retaining the background label
  • add regression coverage for foreground labels, requested transitions, and background progress state

Tests

  • bun run typecheck in packages/session-ui
  • bun run typecheck in packages/app
  • bun run typecheck:e2e in packages/app
  • playwright test e2e/regression/session-timeline-notices.spec.ts (6 passed)

@Hona
Hona requested a review from Brendonovich as a code owner August 16, 2026 22:35
Copilot AI lite review requested due to automatic review settings August 16, 2026 22:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes how subagent tool parts are classified and rendered in the app/session timeline: it prevents active foreground subagents from being mislabeled as “background”, and keeps the progress indicator active only while the referenced background child session remains non-idle. It also adds regression coverage to lock in the intended labeling and indicator behavior.

Changes:

  • Refines “background subagent” detection for task/subagent tool parts to match the intended semantics (completed tool part while child session is still running).
  • Updates the “running”/spinner state for background subagent cards to follow the child session’s live session_status rather than the tool-part completion state alone.
  • Extends Playwright regression coverage to assert correct foreground labeling and that the background progress indicator stops when the child becomes idle.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/session-ui/src/components/message-part.tsx Adjusts task/subagent background detection and ties the running indicator to child session status.
packages/app/e2e/regression/session-timeline-notices.spec.ts Adds regression assertions for foreground “(background)” labeling and background progress indicator start/stop behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Hona
Hona merged commit 01c8bf2 into anomalyco:v2 Aug 16, 2026
9 checks passed
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants