Skip to content

feat(opencode): restore build and plan modes#272

Open
nicko-ai wants to merge 2 commits into
devfrom
codex/agent-builder-mode
Open

feat(opencode): restore build and plan modes#272
nicko-ai wants to merge 2 commits into
devfrom
codex/agent-builder-mode

Conversation

@nicko-ai

@nicko-ai nicko-ai commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Issue for this PR

N/A. Feature PR; no issue required by the current PR standards workflow for feat: titles.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Restores the three Agent Swarm CLI product modes behind /mode:

  • Build and Plan use native OpenCode mode behavior with Agent Swarm guidance.
  • Run stays backed by the Agency Swarm server.
  • Native Plan approval now switches the TUI into Build.
  • /build and /plan are not added as commands.
  • The final PR diff is limited to mode behavior, docs, and tests; it no longer changes AGENTS.md or packages/opencode/src/cli/cmd/agency.ts.

How did you verify your code works?

  • ../../node_modules/.bin/tsgo --noEmit from packages/opencode
  • npx --yes bun@1.3.13 test --timeout 30000 test/cli/tui/prompt-framework-mode.test.tsx test/cli/tui/transcript.test.ts test/agent/display.test.ts from packages/opencode: 21 pass, 0 fail
  • Full packages/opencode unit suite: 3321 pass, 13 skip, 1 todo, 0 fail
  • npx --yes bun@1.3.13 test --timeout 180000 --max-concurrency=1 ../../e2e/agent-swarm-tui from packages/opencode: 35 pass, 1 live-service skip, 0 fail
  • ../../node_modules/.bin/prettier --check ../../e2e/agent-swarm-tui/terminal-tui.test.ts src/session/prompt.ts src/tool/plan.ts from packages/opencode
  • git diff --check origin/dev
  • pre-push hook: bun turbo typecheck

Screenshots / recordings

No recording attached. The changed terminal states are covered by the terminal TUI E2E tests.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

- add /mode as the Build, Plan, and Run product switch

- route Build and Plan through native OpenCode instructions with Agent Swarm guidance

- keep Run server-backed and enable native Plan handoff to Build

- add terminal E2E coverage for mode visibility, routing, and plan approval
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

- Add /mode as the Build, Plan, and Run product switch

- Keep Run server-backed while Build and Plan use native OpenCode mode routing

- Add terminal E2E coverage for switching, native prompts, and Run return flow
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