Skip to content

Fix PE handoff and planner routing / 修复 PE 交接与规划路由#4938

Merged
SivanCola merged 2 commits into
esengine:main-v2from
SivanCola:fix/pe-handoff-planner-routing
Jun 20, 2026
Merged

Fix PE handoff and planner routing / 修复 PE 交接与规划路由#4938
SivanCola merged 2 commits into
esengine:main-v2from
SivanCola:fix/pe-handoff-planner-routing

Conversation

@SivanCola

@SivanCola SivanCola commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Consolidates the overlapping Plan+Execute handoff fixes into one focused PR.
  • Allows guidance-only executor handoffs to finish with a text-only answer while keeping the missing-action nudge for real work tasks.
  • Skips the executor when the planner explicitly concludes no changes/action are needed.
  • Reinforces executor handoffs so planner tool limitations or MCP-unavailable claims do not become executor facts.
  • Routes PE planner gating through the same synthetic-message, low-risk-question, and optional auto-plan classifier logic used by the single-model flow.

Fixes #4867.
Fixes #4909.
Fixes #4830.
Refs #4732.

Consolidation Notes

Kept or adapted:

Reviewed and credited as repository contributor work, but not adopted in the final code:

Repository Contributor Credits

This integration PR intentionally credits both adopted work and reviewed alternatives. Even when a source PR was not adopted in the final code, its author still contributed to the repository by investigating the problem space, testing a possible direction, or clarifying the integration boundary.

Cache Impact

Cache-impact: low. This PR does not change the system prompt, memory prefix, tool schema bytes/order, provider request serialization, or compaction behavior. The handoff text is a runtime user-turn payload for PE turns only, and the tool-name summary is bounded.

Cache-guard: focused coordinator and planner-gate regressions cover the new behavior; full root and desktop Go test suites passed.
System-prompt-review: N/A.

Verification

  • go test ./internal/agent ./internal/control ./internal/boot -run 'TestCoordinator|TestTaskWarrantsPlanner|TestAutoPlanScore|TestNewPlannerGate|TestBuild' -count=1
  • go test ./internal/agent ./internal/control ./internal/boot -count=1
  • go test ./...
  • (cd desktop && go test ./...)
  • go vet ./...
  • (cd desktop && go vet ./...)
  • git diff --check
  • gofmt -l internal/agent/agent.go internal/agent/coordinator.go internal/agent/coordinator_test.go internal/boot/boot.go internal/control/auto_plan.go internal/control/auto_plan_test.go internal/control/input.go

@SivanCola SivanCola requested a review from esengine as a code owner June 20, 2026 15:05
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) labels Jun 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 582f31fd67

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/agent/agent.go
Comment thread internal/agent/coordinator.go
Comment thread internal/agent/coordinator.go
Comment thread internal/agent/coordinator.go
Comment thread internal/control/auto_plan.go
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) config Configuration & setup (internal/config) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

1 participant