Skip to content

feat(agentic): add explicit background subagent result waiting - #1635

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev
Jul 19, 2026
Merged

feat(agentic): add explicit background subagent result waiting#1635
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replace automatic background-subagent result delivery with explicit AgentWait collection.

  • Add durable, parent-owned background task outcomes and the AgentWait tool.
  • Make background Task calls return background_task_id; completed results no longer wake or inject into the parent session automatically.
  • Remove the public allow_review_follow_up control and expose AgentWait in applicable agent modes and the Web UI delegation group.

Type and Areas

Type:

Feature / regression fix

Areas:

Rust core, agent runtime, web UI

Motivation / Impact

Automatic result delivery could wake a parent session after it had independently completed its work, while parents that depended on a result could appear to stop prematurely. Background work is now collected only when the parent explicitly calls AgentWait.

A background Task response now includes background_task_id. Agents whose final answer depends on background work must call AgentWait; otherwise they can finish without being reactivated by a late result.

Verification

  • pnpm run fmt:rs passed.
  • cargo check -p bitfun-core --tests -j 1 passed.
  • Focused bitfun-core lib tests passed for agent_wait_tool, one-time outcome consumption, timeout retention, and Task schema removal of allow_review_follow_up.
  • pnpm --dir src/web-ui run test:run src/app/scenes/agents/components/toolGroups.test.ts passed (6 tests).
  • pnpm run type-check:web passed.
  • git diff --cached --check passed.

Reviewer Notes

  • AgentWait can target explicit task IDs or collect unconsumed background outcomes from the current parent turn.
  • Outcomes are consumed only through AgentWait; a timeout leaves unfinished tasks available for a later wait.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above.
  • User-facing strings, docs, and locales are updated where applicable.

@wsp1911
wsp1911 marked this pull request as ready for review July 19, 2026 14:33
- add AgentWait for collecting parent-owned background task outcomes
- stop automatically delivering background subagent results to parent sessions
- return background task IDs from Task and remove allow_review_follow_up
- expose AgentWait in agent modes and the web delegation tool group
@wsp1911
wsp1911 merged commit b47c01e into GCWing:main Jul 19, 2026
5 checks passed
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