Skip to content

fix(agent): reinforce executor tool handoff#4842

Closed
GTC2080 wants to merge 1 commit into
esengine:main-v2from
GTC2080:GTC/fix-4830-executor-tool-handoff
Closed

fix(agent): reinforce executor tool handoff#4842
GTC2080 wants to merge 1 commit into
esengine:main-v2from
GTC2080:GTC/fix-4830-executor-tool-handoff

Conversation

@GTC2080

@GTC2080 GTC2080 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes [Bug]: Flash executor 不调用 MCP 工具,Planner 结论丢失工具列表导致 executor 摆烂 #4830 by making the two-model executor handoff explicitly state that the executor request still includes the full tool schema, including registered MCP tools.
  • Adds a bounded executor tool-name summary to the handoff so planner claims like "MCP is unavailable" do not become executor facts.
  • Strengthens the no-action executor retry nudge to require a real tool call or host error before reporting MCP/tools as unavailable.
  • Adds regression coverage for a planner that incorrectly claims GitHub MCP is unavailable while the executor still receives an MCP tool schema.

Verification

  • go test ./internal/agent -run TestCoordinatorHandoffAffirmsExecutorToolSchemasWhenPlannerClaimsNoMCP -count=1
  • go test ./internal/agent -run 'TestCoordinator' -count=1
  • go test ./internal/agent -count=1
  • go test ./...
  • cd desktop && go test ./...
  • go vet ./...
  • cd desktop && go vet ./...
  • git diff --check

Cache impact

Cache-impact: low - changes only the two-model executor handoff/retry user message, not the cache-stable system prompt, memory prefix, skill index, provider request shape, or tool schema bytes. The added tool-name summary is bounded.
Cache-guard: go test ./internal/agent -run TestCoordinatorHandoffAffirmsExecutorToolSchemasWhenPlannerClaimsNoMCP -count=1; go test ./....
System-prompt-review: N/A - no system prompt, memory prefix, output style, or skill index behavior change.

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development agent Core agent loop (internal/agent, internal/control) labels Jun 19, 2026
@SivanCola

Copy link
Copy Markdown
Collaborator

Thanks @GTC2080. I consolidated the executor tool-schema/MCP handoff reinforcement into #4938.

What was kept:

  • executor handoffs include bounded tool/MCP context;
  • the executor is instructed not to treat planner tool limitations or MCP-unavailable claims as executor facts;
  • the retry nudge now reminds the executor that the tool schema is still attached.

Your contribution is credited in #4938 under Repository Contributor Credits. Closing this PR in favor of the integration PR.

@SivanCola SivanCola closed this Jun 20, 2026
@GTC2080 GTC2080 deleted the GTC/fix-4830-executor-tool-handoff branch June 22, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Flash executor 不调用 MCP 工具,Planner 结论丢失工具列表导致 executor 摆烂

2 participants