Skip to content

Add OpenCode as an executor option#318

Merged
bborn merged 1 commit intomainfrom
task/787-add-opencode-as-executor-option
Jan 31, 2026
Merged

Add OpenCode as an executor option#318
bborn merged 1 commit intomainfrom
task/787-add-opencode-as-executor-option

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Jan 31, 2026

Summary

  • Add OpenCode (https://opencode.ai) as a new executor option alongside Claude, Codex, Gemini, and OpenClaw
  • OpenCode is an open-source AI coding assistant that supports multiple LLM providers
  • Implement full TaskExecutor interface with tmux integration

Changes

  • internal/db/tasks.go: Add ExecutorOpenCode = "opencode" constant
  • internal/executor/opencode_executor.go: New executor implementation (365 lines)
  • internal/executor/executor.go: Register OpenCode executor in both factory functions
  • internal/executor/dangerous_mode_test.go: Add tests for OpenCode executor behavior

Notes

  • OpenCode does not support session resume (interactive TUI based)
  • OpenCode does not support dangerous mode flags
  • Install via: npm install -g opencode-ai or brew install anomalyco/tap/opencode
  • Documentation: https://opencode.ai/docs

Test plan

  • Build compiles successfully
  • All executor tests pass including new OpenCode tests
  • All other tests pass
  • Manual testing with OpenCode installed (if available)

🤖 Generated with Claude Code

OpenCode (https://opencode.ai) is an open-source AI coding assistant that
runs in terminal, IDE, or desktop. It supports multiple LLM providers
including Claude, GPT, and Gemini.

This commit adds OpenCode as a new executor option alongside Claude, Codex,
Gemini, and OpenClaw.

Key changes:
- Add ExecutorOpenCode constant in db/tasks.go
- Create opencode_executor.go with full TaskExecutor interface implementation
- Register OpenCode executor in executor factory
- Add tests for OpenCode executor behavior

OpenCode notes:
- Does not support session resume (interactive TUI)
- Does not support dangerous mode flags
- Runs via `opencode` CLI command (install via: npm install -g opencode-ai)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bborn bborn merged commit 813b050 into main Jan 31, 2026
3 checks passed
@bborn bborn mentioned this pull request Jan 31, 2026
3 tasks
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