Skip to content

fix: with SWE_PRO_ENGINE on, expose only the pro surface (hide opencode-driven planner) - #139

Merged
AbirAbbas merged 1 commit into
mainfrom
fix/pro-engine-replaces-classic-surface
Aug 21, 2026
Merged

fix: with SWE_PRO_ENGINE on, expose only the pro surface (hide opencode-driven planner)#139
AbirAbbas merged 1 commit into
mainfrom
fix/pro-engine-replaces-classic-surface

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

Problem

When the pro engine is enabled — which the af install manifest defaults to
(SWE_PRO_ENGINE=1), so every desktop install gets it — the node registered the
pro executor in addition to the classic surface. But the classic
orchestrators (plan, build, execute, resolve, resume_build) and
implement_issue drive the opencode role harness, and the desktop bundle
ships aforge, not opencode. With opencode absent from the node's PATH, the
Product Manager reasoner fails in ~500ms, so swe-planner.plan / build show up
in discovery as broken entry points right next to swe-pro's working code_task.

Fix

Treat SWE_PRO_ENGINE as a replacement, not an addition. With
pro.Available():

  • register only the pro executor;
  • withhold the classic opencode-driven entry points (orchestrators +
    implement_issue);
  • keep the role reasoners registered but internal (undiscoverable) so
    pro_execute can still call them.

The swe-pro sidecar (code_task / code_resume) is the coding surface. Setting
SWE_PRO_ENGINE=0 restores the full classic planning surface unchanged (for
environments that do have opencode/claude configured).

Result: af ls -e on a desktop install shows swe-pro's working entries and no
broken swe-planner.plan.

Tests

Updated the pro-on surface + entrypoint expectations; go build ./... and
go test ./internal/... pass. Classic (SWE_PRO_ENGINE=0) surface tests are
unchanged.

🤖 Generated with Claude Code

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>
@AbirAbbas
AbirAbbas merged commit 9dfeb76 into main Aug 21, 2026
3 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