Skip to content

fix(background-subagent): keep card alive across turn for V1 background subagents - #264

Open
vheins wants to merge 1 commit into
grinev:mainfrom
vheins:fix/background-subagent-card
Open

vheins wants to merge 1 commit into
grinev:mainfrom
vheins:fix/background-subagent-card

Conversation

@vheins

@vheins vheins commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Problem

  • V1 background subagent card did not persist across the turn. The summary aggregation gate required tool.running + input.background, so completed states and metadata.background payloads were dropped. The next turn cleared the pending card before the child card could attach.

Fix

  • src/app/managers/summary-aggregation-manager.ts: accept running|completed and input.background|metadata.background; retain background intent until the child card attaches instead of clearing eagerly.
  • src/bot/events/handlers/tool-activity-handler.ts: isBackgroundTool honors metadata.background in addition to input.background.

Tests

  • Added cases in tests/app/managers/summary-aggregation-manager.test.ts covering running→completed transitions and both input.background / metadata.background signals.

…nd subagents

- FIX-BGSUB: V1 background subagents retired at turn boundary
  The gate now accepts running OR completed and input.background OR metadata.background; a background intent keyed by child session id is retained until the card attaches (task part can precede session.created); isBackgroundTool also honors metadata.background.
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.

1 participant