Repository navigation
Plugins
Generated from docs/plugins.md at 5a6d70d. Edit the repository file, not the wiki.
The lead session is Claude Code. Two plugins let it hand work to the other agents without leaving the session: the Codex plugin from OpenAI, and a community Ollama plugin for a local model. They are optional. SAFO works without them, and nothing in the Action depends on them. This page is the setup, and why each one earns its place.
Routing sends a task to the agent measured best at it. Without a plugin, "send this to Codex" means leaving the session, pasting a prompt and copying the answer back. With one it is a slash command, the job shows up in the session, and the result lands where the lead can check it. The plugins move the work. safo hooks still decides whether a dispatch follows the rules, and the review loop still decides what gets merged.
The plugin is OpenAI's codex-plugin-cc. It needs Node 18.18 or later and either a ChatGPT plan or an OpenAI API key.
Its usage counts against your Codex limits, so safo usage is how to see what is left.
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setup
/codex:setup says whether Codex is ready, and offers to install the CLI if npm is available. To do it yourself:
npm install -g @openai/codexIf Codex is installed but not signed in, run codex login from the prompt with a leading !.
What you get: /codex:review, /codex:adversarial-review, /codex:rescue, /codex:status, /codex:result and
/codex:cancel, and a codex:codex-rescue subagent.
Where it fits here:
-
Adversarial review of security-relevant code before merge. This is the plugin's job in the measured workload: it found
what green CI and a Sonnet review had missed (lesson). Use
/codex:adversarial-reviewwith focus text naming the risk, such as trust boundaries or credential handling. The plugin'staskcannot pass-c, so it cannot select an access tier a security review may need; if your plan has one and the default model's filter cuts a review off, runcodex execdirectly with the model and-csetting that tier asks for (lesson). - Research and plan writing, per routing.
-
Not for work that must commit inside a git worktree. Codex's sandbox could not, and
--resume-lastfinds threads per repository path. Hand it self-contained prompts, and let the lead commit (lesson).
Two measured gotchas: the companion records only jobs started with --background, so safo usage reads
Codex's own session files for the rate-limit windows instead. And leave the stop-time review gate off until you have a
reason to turn it on, because it is a hook that runs a review whenever a turn stops, which is a cost nobody here has measured.
There is no first-party Ollama plugin, so this one is community maintained: darrylmorley/ollama-plugin-cc, an Ollama port
of the Codex plugin, Apache-2.0. Read it before you install it, as you would any plugin that adds hooks and runs commands.
The points that matter for a quick read:
- It adds
SessionStart,SessionEndandStophooks. TheStophook is the optional review gate. - Its network calls go to
OLLAMA_HOSTand nowhere else. - Its agentic
rescueruns allowlisted commands and applies patches withgit apply. - Models with a
:cloudsuffix run on Ollama's hosted service and send your diff context there. Pass one only on purpose.
-
Point it at your server before setup. The plugin reads
OLLAMA_HOSTand otherwise assumes127.0.0.1, so setup on a machine with no local server reports "not reachable". Put the export in a shell startup file that is not synced to a repository (a synced settings file would carry your address into every commit):echo 'export OLLAMA_HOST=http://ollama.lan:11434' >> ~/.bashrc
Replace the placeholder host with your own, open a new terminal and start Claude Code from it. A session that was already running will not see the change.
-
Check the server answers, with the same read-only call SAFO's own probe uses:
curl -s http://ollama.lan:11434/api/tags | head -c 300If this hangs or is refused, the fault is the server's bind address or a firewall, not the plugin. Ollama listens on loopback unless
OLLAMA_HOSTon the server says otherwise. -
Install, reload and run setup:
/plugin marketplace add darrylmorley/ollama-plugin-cc /plugin install ollama@darrylmorley-ollama /reload-plugins /ollama:setupThe marketplace registers as
darrylmorley-ollama, which is the name/plugin installtakes./ollama:setupchecks the server, pulls a model if there is none and sets a default. Leave the review gate off at first, for the reason above, and see the next section before turning it on.
With a default model set but no --model, the plugin's task command sends a request with no model, Ollama answers 400 model is required, and the Stop hook blocks every stop with an empty status: 1. /ollama:setup reports the default
correctly, so nothing looks wrong until the first stop. It is reported upstream
(issue 1). Until a release fixes it, handleTask in the
companion script needs to resolve the model through resolveRoleModel, the way the planner commands do, instead of using
only the --model flag. A plugin update overwrites a local patch, so check the gate again after one.
What you get: /ollama:review, /ollama:adversarial-review, /ollama:rescue, /ollama:status, /ollama:result,
/ollama:cancel, a plan, execute and review pipeline (/ollama:plan, /ollama:execute-plan) and an ollama:ollama-rescue
subagent.
They overlap, and they should not be mixed up. safo local run is for text in, text out work (summaries, triage, drafts)
and is built around the local model guard: it sends exactly the num_ctx a model is loaded with and never
picks one that would evict a protected model. The plugin is for review and code tasks, and SAFO has no measurement of it yet.
Until there is one, treat its output the way routing treats any local model's: a first draft that a paid model
or a person checks, and never the only reviewer of security-relevant code. Before pointing it at a server that keeps another
model resident, check which context size it requests, because any other value makes Ollama reload the model.
Both plugins add Claude Code hooks next to the ones safo hooks install writes, and they do not interfere. After adding a
plugin, run safo hooks status to confirm the guard is still healthy, and note the plugin in your outcomes log
(usage) the first time you route real work through it, so the next month's report has data on it.