Skip to content
mutastic

Other agents

The gate is three commands, so any agent that can run a command at the right moments can be gated. Claude Code and Codex share a plugin, and opencode has one of its own.

The opencode plugin is the opencode-mutastic package, with the gate and the mutastic skill in it:

Terminal window
opencode plugin opencode-mutastic # for this project
opencode plugin opencode-mutastic -g # for every project

then restart opencode. opencode plugin opencode-mutastic --force updates it. Its source is beside the Claude Code plugin, in tasticlabs/plugins.

opencode can’t hold an agent’s stop, so the gate works a little differently there. The first prompt of a session opens it, and when the session goes idle, the plugin runs mutastic gate check. If the task isn’t done, the cards go back as the next prompt; when it passes, or the gate hands over to you, you see it in a toast. An idle after an error, or after you abort, isn’t checked, and nor are a subagent’s sessions.

If you’ve set bash commands to ask, allow mutastic in opencode.json:

{ "permission": { "bash": { "mutastic *": "allow" } } }

Run mutastic gate open when a task starts, and mutastic gate check when the agent says it’s done. check exits 0 when the task is done and 1 when it isn’t, and prints why: the cards, in the agent format, to give the agent as its next instruction. Then gate close, or open the next task.

Terminal window
mutastic gate open # at the start: prints where the task starts, for the agent
mutastic gate check || send-back # when it says it's done: 1, and the cards, if it isn't

Without a hook, check never hands over: it says what’s left however often it’s asked. So stop sending the agent back after a few tries, and tell the person what’s left. The gate says what holds a task, and the mutastic skill, in tasticlabs/plugins, is a starting point for the agent’s instructions: most agents read a SKILL.md, or the same text in their own instructions file, such as AGENTS.md.

An agent whose hooks take Claude Code’s input and answers, as Codex’s do, can run mutastic gate open --hook=claude and mutastic gate check --hook=claude as they are, and gets the hand-over too: see as a hook.