fix: with SWE_PRO_ENGINE on, expose only the pro surface (hide opencode-driven planner) - #139
Merged
Merged
Conversation
When the pro engine is enabled (the af-install / desktop default), the node still advertised the classic opencode-driven orchestrators (plan/build/execute/ resolve/resume_build) and implement_issue alongside the pro executor. Those entry points drive the opencode role harness, which fails wherever opencode isn't installed — the desktop bundle ships aforge, not opencode — so the Product Manager reasoner dies in ~500ms and swe-planner.plan/build are broken entries sitting next to swe-pro's working code_task. Make the flag a replacement, not an addition: with pro.Available(), register only the pro executor and withhold the classic entry points. Role reasoners stay registered (internal, undiscoverable) so pro_execute can still call them. The swe-pro sidecar (code_task/code_resume) is the coding surface. SWE_PRO_ENGINE=0 restores the full classic planning surface unchanged. Updated the surface/entrypoint tests for the pro-on case. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the pro engine is enabled — which the
af installmanifest defaults to(
SWE_PRO_ENGINE=1), so every desktop install gets it — the node registered thepro executor in addition to the classic surface. But the classic
orchestrators (
plan,build,execute,resolve,resume_build) andimplement_issuedrive the opencode role harness, and the desktop bundleships aforge, not opencode. With opencode absent from the node's PATH, the
Product Manager reasoner fails in ~500ms, so
swe-planner.plan/buildshow upin discovery as broken entry points right next to swe-pro's working
code_task.Fix
Treat
SWE_PRO_ENGINEas a replacement, not an addition. Withpro.Available():implement_issue);pro_executecan still call them.The swe-pro sidecar (
code_task/code_resume) is the coding surface. SettingSWE_PRO_ENGINE=0restores the full classic planning surface unchanged (forenvironments that do have opencode/claude configured).
Result:
af ls -eon a desktop install shows swe-pro's working entries and nobroken
swe-planner.plan.Tests
Updated the pro-on surface + entrypoint expectations;
go build ./...andgo test ./internal/...pass. Classic (SWE_PRO_ENGINE=0) surface tests areunchanged.
🤖 Generated with Claude Code