Repository navigation
OpenCode
Agentix connects to the original OpenCode TUI using its plugin API. OpenCode 1.19.3 or newer is required. Keep that terminal running while using IM; attaching does not start a resumed copy of the agent.
OpenCode support is unreleased and currently available from the feature checkout. Build/install Agentix and Taskix from that checkout and use SOURCE=local below. SOURCE=main becomes usable after this support lands on main; published release binaries do not yet include it.
Install the matching Agentix and Taskix builds, OpenCode, Node.js 24+ and npm. From the feature checkout, run:
make plugin SOURCE=local HOSTS=opencodeAfter the support lands on main, install from an Agentix checkout with Git available:
make plugin SOURCE=main HOSTS=opencodeUse these Make targets to install OpenCode support. Direct opencode plugin installation of the repository package is unsupported: the native installer does not install its nested OpenCode-only dependency or configure both entrypoints.
OpenCode is an explicit selection: bare make plugin still targets Codex, Pi, OMP and Claude Code. The installer stages a package under .agentix-plugin inside the OpenCode configuration directory and installs its pinned dependency automatically. No manual npm repair is required.
The configuration directory is OPENCODE_CONFIG_DIR, or $XDG_CONFIG_HOME/opencode, defaulting to ~/.config/opencode. The installer adds separate plugin file URLs to tui.json/tui.jsonc and opencode.json/opencode.jsonc. The TUI entrypoint provides Agentix Bridge; the server entrypoint provides Taskix Manager. Existing unrelated configuration, comments and plugin references are preserved. When both JSON and JSONC files exist, the installer removes stale Agentix references from both and adds the current reference once to JSONC.
An update stages its dependency installation before replacing the previous plugin package and configuration. A dependency installation failure preserves that previous installation. Restart OpenCode after installing or updating. To remove these integrations:
make remove-plugin HOSTS=opencodeRemoval preserves unrelated plugins and settings. See Taskix Manager for Taskix configuration and optional routing.
Add this table to ~/.config/agentix/config.toml alongside your chat channel:
[agent.opencode]
command = "opencode"
state_dir = "~/.local/share/agentix/opencode"The fields shown are their defaults. state_dir contains Agentix delivery receipts and queues; it is separate from OpenCode's database. If you customize it, export the same absolute path in terminals that start OpenCode:
export AGENTIX_OPENCODE_STATE_DIR=/absolute/path/to/opencode-bridge-stateFor a custom [server].endpoint, also export AGENTIX_CONTROL_ENDPOINT with the matching value. For example:
export AGENTIX_CONTROL_ENDPOINT=unix:///absolute/path/to/control.sockFor loopback TCP, including Windows, use an endpoint such as tcp://127.0.0.1:32198 on both sides. Agentix supplies the configured endpoint and state directory to OpenCode sessions launched from its terminal menu.
Start agentix serve. In another terminal, change to your project directory and run opencode. Run agentix doctor, then select the session with /sessions opencode in IM. Public IDs have the form opencode:<native-session-id>.
With rmux or tmux available to Agentix, /rmux opencode or /tmux opencode opens the corresponding terminal menu. Choose a pane and start OpenCode there to attach the new session. Ordinary attachment to an existing TUI does not require a multiplexer.
Send ordinary chat messages for prompts and streamed replies. /last, /history, /stop, /queue, /queue resume, /queue clear, /new, /status, /rename, /model, /compact, /diff and /skills use native APIs or the bridge's delivery queue. The session's help shows available controls. Steering, fork and reasoning controls are not exposed.
An IM model choice updates the native session model. The original TUI still sends its own locally selected model with its next prompt, so select the same model there if you want later terminal prompts to use it.
/new stops active work and creates a new native session in the same TUI. Agentix follows the replacement. Resuming an existing session does not inherit another session's queue. /detach leaves the terminal running.
Native permission requests appear as IM actions preserving OpenCode's choices: Allow once, Always allow, and Reject. Always allow retains OpenCode's native rule scope; it is not limited to the current IM attachment.
Questions appear one at a time. Multiple-choice questions allow selecting several options before Submit. An Other… path is hidden when the native event explicitly sets custom: false. OpenCode's built-in question tool may omit that field, in which case custom input remains available. Agentix submits all answers together; rejection uses OpenCode's question rejection operation. Answering in the original TUI retires the corresponding IM controls. Old buttons cannot answer a later request.
The bridge records accepted delivery IDs before submission and does not automatically resend them after a lost response or restart. An in-flight delivery recovered from disk is marked uncertain and pauses the queue. Inspect /history and /queue, then use /queue clear to abandon the uncertain receipt before submitting a new request if needed. Clearing does not cancel a prompt OpenCode already accepted.
The sidecar directory uses owner-only permissions and contains delivery state. Preserve it when restarting. These local writes support process-restart recovery; they are not a power-loss durability guarantee. See the technical protocol for implementation boundaries.