Skip to content

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

Merged
nicko-ai merged 7 commits into
devfrom
codex/agent-builder-mode
Jun 27, 2026
Merged

feat(opencode): restore build and plan modes#272
nicko-ai merged 7 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; issue check is skipped for feat: titles.

Type of change

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

What does this PR do?

Restores the Agent Swarm CLI product modes behind /modes:

  • Build and Plan use native OpenCode behavior with Agent Swarm guidance.
  • Run stays backed by the Agency Swarm server.
  • Native Plan approval switches the TUI into Build.
  • /build and /plan are not added as commands.
  • User-flow docs explain the fork-specific mode behavior.

How did you verify your code works?

Local checks on the latest branch head:

  • npx --yes bun@1.3.13 run typecheck
  • npx --yes bun@1.3.13 test test/cli/tui/local.test.ts --timeout 120000
  • npx --yes bun@1.3.13 test --timeout 180000 --max-concurrency=1 ../../e2e/agent-swarm-tui/terminal-tui.test.ts
  • npx --yes bun@1.3.13 turbo test:ci
  • npx --yes bun@1.3.13 run build --single --skip-install
  • npx --yes bun@1.3.13 /tmp/agent-builder-binary-qa.ts

Binary QA proves /modes -> Plan -> Yes switches to Build, Build gets Agent Swarm Build instructions, Plan and Build make zero Agency server requests, and Run still reaches the Agency server.

Screenshots / recordings

Terminal TUI behavior is covered by automated PTY E2E and binary QA.

Checklist

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@nicko-ai

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 18a25d3ae4

ℹ️ 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 packages/opencode/src/session/prompt.ts Outdated
Comment thread packages/opencode/src/session/prompt.ts
@nicko-ai
nicko-ai marked this pull request as draft June 19, 2026 15:43
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@nicko-ai
nicko-ai force-pushed the codex/agent-builder-mode branch from 18a25d3 to c191378 Compare June 25, 2026 10:49
nicko-ai added 4 commits June 26, 2026 07:54
- 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
- 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
- keep /mode switches local instead of writing global model config
- route Build and Plan slash commands through native OpenCode paths
- preserve Run bridge routing when visible native model state is present
- add focused model, schema, and terminal TUI coverage
- isolate question key handling with the upstream OpenCode mode stack shape

- keep Build and Plan native while preserving /modes docs and E2E coverage

- hide the non-natural-language agency agent helper from command help
@nicko-ai
nicko-ai force-pushed the codex/agent-builder-mode branch from c191378 to f072fe2 Compare June 26, 2026 12:55
@nicko-ai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: f072fe253e

ℹ️ 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".

nicko-ai added 2 commits June 26, 2026 14:27
- clarify Plan handoff docs as upstream OpenCode behavior

- fix Plan prompt path assertion for Windows JSON escaping

- preserve mixed-mode undo and redo routing by target turn

- keep unsupported Build models out of Run routing

- remove unrelated and duplicate Agent Builder test coverage
@nicko-ai
nicko-ai marked this pull request as ready for review June 27, 2026 02:26
@nicko-ai
nicko-ai merged commit b2ae7bd into dev Jun 27, 2026
12 checks passed
@nicko-ai
nicko-ai deleted the codex/agent-builder-mode branch June 28, 2026 01:21
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