Skip to content

fix(agent): make goal lifecycle available to every primary agent - #2180

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-primary-agent-goal-tools
Aug 9, 2026
Merged

fix(agent): make goal lifecycle available to every primary agent#2180
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-primary-agent-goal-tools

Conversation

@bobleer

@bobleer bobleer commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Make the complete thread-goal lifecycle available to every BitFun-runtime primary agent, including Claw, DeepResearch, Team, custom modes, and external-source primary projections.
  • Treat get_goal, create_goal, and update_goal as a required primary-session bundle so legacy or partial mode overrides cannot strand an active goal; Task child agents remain scoped to their declared tools.
  • Stop advertising or querying BitFun thread goals in ACP-owned sessions, whose execution loop cannot consume local BitFun tools.

Motivation / Impact

Follow-up to #2178 and #2009. The earlier fix covered Cowork only. A full audit found the same UI/tool mismatch in the Assistant workspace (Claw), DeepResearch, Team, custom primary agents, external-source primary agents, and user profiles that removed one of the lifecycle tools.

The composer can activate a goal independently of a model tool call. A primary agent must therefore always be able to inspect and finish that goal, while child agents must not gain an independent thread-goal lifecycle.

Verification

  • cargo test --locked -p bitfun-agent-runtime --lib — 284 passed
  • Focused bitfun-core tests for built-in modes, custom modes, external primary/subagent projection, mode-profile overrides, and primary/subagent runtime policy — all passed
  • pnpm --dir src/web-ui run test:run src/flow_chat/session-drivers/useComposerCapabilities.test.ts — 2 passed
  • pnpm run type-check:web
  • pnpm run check:core-boundaries
  • pnpm run check:repo-hygiene
  • git diff --check

Reviewer Notes

ACP sessions intentionally do not receive BitFun-local goal tools. The renderer now hides the local goal affordance and skips backend goal refreshes there; an ACP-native slash command with the same text can still be sent to the ACP agent.

AI-assisted; fully tested for the changed primary-agent goal capability contract.

@bobleer
bobleer merged commit c6badb7 into GCWing:main Aug 9, 2026
7 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