AI

Google Elephant-Goldfish Model (EGM) in Claude Code and Codex

Google’s Elephant-Goldfish Model (EGM) makes your coding agent write and defend a spec before anyone writes code. The elephant is the session that knows everything about your feature and drafts the design. The goldfish are fresh subagents that read only the finished document, so every assumption the elephant forgot to write down shows up as a finding. You approve what ships.

Original content from computingforgeeks.com - post 190851

This guide installs the EGM plugin in Claude Code and in Codex CLI, checks that the goldfish reviewers really start without your project context, and runs the brainstorm, draft, review and drift report skills on a small URL shortener. Every run used a local Ollama model instead of a frontier one, which breaks in ways the README doesn’t mention. Built and run on Ubuntu 26.04 in November 2026 against EGM 0.1.1; the commands, output and the first three errors below come from that VM, and the other three come from the EGM docs and issue tracker.

Know the elephant-goldfish model workflow

EGM is a plugin of seven skills plus ten agent personas (eight reviewers, a bootstrap orchestrator and a synthesizer), released by Google under Apache-2.0 on the google/elephant-goldfish-model repo. The repo states it isn’t an officially supported Google product, so treat it like any other open source plugin. The idea it packages is simple: the session that wrote a design is the worst reviewer of it, because it fills gaps from memory without noticing. The Google Open Source Blog announcement frames the review as a comprehension check, an antagonistic review and an implementation readiness check.

A full feature runs through the skills in this order:

  1. egm-brainstorm asks clarifying questions and writes concepts_brief.md.
  2. egm-draft turns the brief into design_draft.md one section at a time, with an approval gate per section.
  3. egm-review sends the draft to goldfish reviewers in five stages (5 to 9) and writes one report per stage.
  4. egm-resolve answers each finding with a proposed fix, a contest, an escalation or a decline, then edits the doc after you approve.

The approved spec belongs in docs/designs/ next to the code it describes. Later, egm-drift-report compares those docs against the code and tells you where they disagree. That last skill is the part teams tend to skip and then miss, since a spec nobody re-checks goes stale within a sprint.

Install Claude Code and Codex CLI

You need at least one of the two agents. EGM also runs in Antigravity and a few other harnesses, but Claude Code and Codex are the two this guide tested. The lab box ran this stack:

  • Ubuntu 26.04 (the plugin steps are the same on any OS; the apt and systemd steps are Ubuntu specific)
  • git, plus Node.js and npm for Codex CLI
  • A model login: a Claude subscription or API key for Claude Code, a ChatGPT login or OpenAI key for Codex. EGM spends real tokens, since every goldfish is a separate session.

Claude Code ships a native installer that drops the binary in ~/.local/bin. If you already have it, skip ahead; the Claude Code on Ubuntu 26.04 guide covers login and first run in more detail.

curl -fsSL https://claude.ai/install.sh | bash

The installer warned that ~/.local/bin wasn’t on the PATH of a fresh Ubuntu account. Add it to your profile so new shells find claude:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Codex CLI comes from npm. Ubuntu’s own nodejs and npm packages are enough, but a global install into /usr needs root, so point npm at a prefix in your home directory first:

sudo apt install -y nodejs npm git
npm config set prefix ~/.npm-global
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.profile
source ~/.profile
npm install -g @openai/codex

Check both binaries answer before you touch plugins. Any recent Claude Code release is fine here; the one version floor that matters is covered in the errors section.

claude --version
codex --version

Both printed their versions on the lab VM:

Codex CLI installed with npm, then claude --version and codex --version printing their versions on Ubuntu 26.04

Log in to each agent once (claude and codex both open a login flow on first start) before you add EGM. The plugin commands themselves work without a login, but every skill needs a model.

Install EGM in Claude Code

EGM ships its own plugin marketplace inside the GitHub repo, so you add the marketplace first and then install the plugin from it. This guide is pinned to the v0.1.1 release, tagged on 6 November 2026, which added the TRIZ reviewer and experimental Cursor, OpenCode and Copilot adapters. The unpinned form tracks the repo’s default branch:

claude plugin marketplace add google/elephant-goldfish-model
claude plugin install egm@egm
claude plugin list

To stay on the tested version, put the tag after a #. Claude Code clones the marketplace at that ref and stores "ref": "v0.1.1" in ~/.claude/plugins/known_marketplaces.json, so you upgrade by choosing a new tag rather than by accident:

claude plugin marketplace add google/elephant-goldfish-model#v0.1.1
claude plugin marketplace list
claude plugin install egm@egm

The clone line reports (ref: v0.1.1), and the marketplace list shows the source as google/[email protected]. The output below skips the progress lines between the add and the clone:

Cloning repository (timeout: 120s): https://github.com/google/elephant-goldfish-model.git (ref: v0.1.1)
Clone complete, validating marketplace…
✔ Successfully added marketplace: egm (declared in user settings)
Configured marketplaces:

  ❯ anthropic-plugin-directory
    Source: Built in (Anthropic Directory)

  ❯ egm
    Source: GitHub (google/[email protected])

Installing plugin "egm@egm"...✔ Successfully installed plugin: egm@egm (scope: user)

The marketplace is named egm and so is the plugin, hence egm@egm. Look for Status: enabled in the list output:

claude plugin marketplace add google/elephant-goldfish-model and claude plugin install egm@egm with the plugin listed as enabled

The plugin came up enabled straight after install, so the separate claude plugin enable egm@egm step in the EGM docs did nothing new here. Run it anyway if your list shows the plugin as disabled. The yellow note about the default agents/ folder is expected, and the next section explains why it’s actually a good sign. If plugins are new to you, the Claude Code plugins guide explains marketplaces, scopes and updates.

Install EGM in Codex CLI

Codex uses the same marketplace repo with its own plugin commands. Note the verb: Codex says add where Claude Code says install. The lab added it unpinned, from the default branch, which installed the same 0.1.1 release; the #v0.1.1 form above was only checked in Claude Code.

codex plugin marketplace add google/elephant-goldfish-model
codex plugin add egm@egm
codex plugin list

The add step prints the install root under ~/.codex/plugins/cache/egm/egm/, and the list should show egm@egm as installed, enabled:

codex plugin marketplace add and codex plugin add egm@egm, with codex plugin list showing egm installed and enabled

Goldfish reviewers are subagents, so Codex needs its multi-agent feature switched on. It was already on in this build, which you can confirm with the features list:

codex features list | grep -E "^(multi_agent|multi_agent_v2|plugins|skill_search) "

multi_agent reads true even though Codex marks it deprecated, and plugins is stable and on:

codex features list showing multi_agent true, multi_agent_v2 false, plugins true and skill_search true

If multi_agent shows false on your machine, the EGM review skill has no way to spawn a goldfish and stops by design, because a review in the same context isn’t a goldfish review. Start a fresh Codex session after installing so the skill list reloads. The Codex CLI cheat sheet has the rest of the feature and config switches.

Check the goldfish isolation

The whole method rests on reviewers not seeing your context. In Claude Code that’s enforced by the adapter files under .claude-plugin/agents/, which is why Claude Code ignores the default agents/ folder. Open one of them to see the settings:

head -9 ~/.claude/plugins/cache/egm/egm/0.1.1/.claude-plugin/agents/design_critic.md

Three lines matter in the frontmatter:

Frontmatter of the EGM design_critic agent showing tools Read Grep Glob, model inherit and omitClaudeMd true

tools: [Read, Grep, Glob] means the reviewer can’t edit files or run shell commands. model: inherit gives it the same model as your session. omitClaudeMd: true keeps your user and project CLAUDE.md out of the reviewer, on top of the usual rule that Claude Code subagents never see the parent conversation. The version folder in that path changes with every EGM update, so adjust it to what claude plugin list reports.

Codex is weaker here. EGM asks Codex to spawn each goldfish with fork_context: false or fork_turns: "none", whichever the spawn tool exposes, which drops the parent turns, but the open issue #237 shows Codex still injecting the project and user AGENTS.md into the reviewer. In practice: keep design assumptions out of AGENTS.md if you review on Codex, or the goldfish starts with the author’s priors.

Open the EGM commands

Start claude in your project and type /egm:. All seven skills appear with the egm: plugin prefix:

Claude Code slash command menu listing egm-draft, egm-review, egm-resolve, egm-bootstrap, egm-brainstorm, egm-review-loop and egm-drift-report

Every EGM skill sets disable-model-invocation: true, so the model never starts one on its own. That’s deliberate: a review that fires whenever the model feels like it would burn tokens on half-written drafts. Codex has no slash prefix for plugin skills. Start codex in the project, type $egm in the prompt box and the skill picker lists the same seven:

Codex CLI skill picker opened with $egm listing EGM Bootstrap, Brainstorm, Draft, Drift report, Resolve, Review and Review loop

The model name at the bottom of that picker is gpt-oss:20b because the lab started Codex with codex --oss -m gpt-oss:20b, which points it at the local Ollama model from the next section; the setup there covers the Claude Code side. Press Enter to insert the skill, then type the rest of the request after it, such as the doc path and the stage. The review runs in this guide were done in Claude Code; on Codex the same skill spawns goldfish through its own subagent tool, with the AGENTS.md caveat from the previous section.

Run a goldfish review on a design doc

The fastest way to see EGM work is to review a doc you already have, without the brainstorm and draft steps. The lab used a tiny Python link shortener with this design for rate limits in docs/designs/rate-limits.md. It has gaps on purpose: shared IPs, process restarts and more than one app worker are all unaddressed.

# Rate limiting for link creation

## Problem

Anyone can call `POST /api/links` as often as they like. Last week one client created 40,000 links in an hour
and the database grew to 2 GB.

## Proposal

Limit each client to 100 new links per hour. Clients over the limit get HTTP 429.

- Identify the client by IP address.
- Keep a counter per IP in memory, in a dict inside `shorty/app.py`.
- Reset all counters every hour.

## Out of scope

Limits on redirects (`GET /<code>`).

## Rollout

Ship it behind no flag. It is a small change.

Inside a Claude Code session in the repo root, start the review with the doc path. EGM first asks for GoldfishContext, any background the reviewers may see beyond the doc (answer “none” for a pure cold read), and then, without a step argument, which preset you want:

/egm:egm-review docs/designs/rate-limits.md

The four presets map to the step argument, so you can also pass it on the same line and skip the question:

Step argumentWhat runsReport files
interactiveStages 5 to 9 with a checkpoint after eachOne per stage
uninterruptedStages 5 to 9 without stoppingOne per stage plus consolidated_review_report.md
feature_specStages 5 to 8, design onlyUp to intermediate_zoom_out_report.md
implementationStage 9 onlyimplementation_readiness_report.md
5 to 9One stage on its ownThat stage’s report

Stage 6 is the comprehension test and the cheapest one to try: a single goldfish reads only the doc and paraphrases what it thinks you’re building. Where its paraphrase is wrong, your doc is unclear. The lab ran it headless so every tool call landed in a JSON log:

cd ~/shorty
claude -p "/egm:egm-review docs/designs/rate-limits.md 6" \
  --permission-mode acceptEdits \
  --allowedTools "Read,Grep,Glob,Write,Edit,Agent,Task" \
  --add-dir ~/.claude/plugins/cache/egm \
  --output-format stream-json --verbose > ~/egm-s6.jsonl

That prompt carries no GoldfishContext answer. gpt-oss:20b went ahead anyway, but the skill tells a compliant model to ask for it and end the turn, which in -p mode ends the run with no report, so on a hosted model add GoldfishContext: none to the prompt string. Headless runs also need the plugin’s persona and standards folders readable, because they live outside your project. --add-dir does that, but it also grants edit access to the plugin cache. The EGM docs recommend narrower Read(//absolute/path/agents/**) rules in /permissions for the agents, docs, resources and skills folders instead, which is the better choice on a machine you care about.

The session read the skill, then called the Agent tool with subagent_type set to egm:egm-comprehension. Claude Code keeps each subagent’s transcript under ~/.claude/projects/<project>/<session>/subagents/, so you can check exactly what the goldfish got. Its entire input was four lines, the doc path and two line ranges:

Goldfish subagent transcript showing agent type egm:egm-comprehension, a four line prompt with only the target file and line ranges, and the files it read

No conversation history, no project notes, just the file: isolation works. The list of reads also shows a small-model habit. The skill tells Stage 6 to read the doc alone with no document standard, yet the goldfish globbed the plugin folder and read all five standards anyway, which is why some of its findings below read like a spec checklist rather than a comprehension test.

When the run finishes, the report sits in the working directory. The lab run took 68 minutes on CPU, so check the totals and the severity lines once it’s done:

comprehension_report.md written by the EGM Stage 6 review with 16 turns, two paraphrase headings and seven findings: three Blocker, three Major, one Nit

The report opens with the two paraphrase headings EGM requires, “What this proposes” and “How the existing system works, per this document”, and the paraphrase was accurate. Then came seven findings. The useful ones hit two of the gaps planted in the doc: an IP is a bad client identity behind NAT, and an in-memory dict breaks once the app runs more than one worker. The goldfish didn’t call out that a restart wipes every counter. It also flagged the missing alternatives and test plan, which is fair for a real spec. One finding was wrong: it read GET /<code> as an unexplained placeholder, when it’s the redirect route. That’s the point of the “you approve” step: findings are input, not orders.

One more local-model defect showed up here. gpt-oss:20b wrote the whole report as a single line with literal \n sequences instead of line breaks. If you hit the same thing, this turns the escapes back into newlines:

sed -i 's/\\n/\n/g' comprehension_report.md

From here, the usual next move is /egm:egm-resolve on the same doc, which answers each finding with a proposed fix, a contest, an escalation or a decline, and edits the doc only after you approve. Replying “auto accept” approves every proposed fix at once, so read the list before you send it. Or edit the doc yourself and rerun the stage; EGM allows one re-audit per stage before it records what’s left as accepted trade-offs.

Brainstorm and draft a spec

The review above started from a doc written by hand. EGM can also write the doc: /egm:egm-brainstorm questions a rough idea and has the goldfish attack it, then /egm:egm-draft turns the result into a design doc one section at a time, asking for approval after each. Both are conversations, so in a headless run every answer is another claude -p --resume <session-id> call. The lab fed them a link expiry feature for the same shorty project, with the constraints spelled out up front:

/egm:egm-brainstorm Add link expiry to shorty. Problem: links never expire, so the links table keeps growing with dead campaign links and we delete old rows by hand once a month. Idea: POST /api/links accepts an optional expires_in_days (1 to 365); GET /<code> on an expired link returns 410 Gone; a daily cleanup deletes rows that expired more than 30 days ago. Consumers: the marketing team's scripts, no SLA. Hard constraints: SQLite only, no new dependencies, links created before this change never expire. Out of scope: changing expiry after creation, per-user quotas. Success: the table stops growing month over month and no live link ever returns 410.

Even with all that, the first turn spent 19 minutes and came back with six clarifying questions: the current schema, how the parameter is sent, the 410 body, how the cleanup runs, where expiry is stored, and whether it needs an index. That is the skill working as written, since it must keep questioning until the problem is pinned down. Answering all six in one message got the readiness gate back in under two minutes, with a three-sentence “anchored feature hypothesis” and two options, Review with Goldfishes or keep clarifying.

Choosing the review is where the local model came apart. The main agent first asked for an agent type called egm-synthesizer, got “Agent type ‘egm-synthesizer’ not found”, and retried with the plugin name egm:egm-synthesizer, which launched as a background agent. Claude Code then stopped it ten minutes later (the fix is in the errors section below). With the wait limit lifted, the synthesizer finished 24 minutes later, but it never spawned a single reviewer. Its transcript shows nine reads of the plugin’s agent files, three greps and one write: it wrote all seven lenses itself, in one context, and saved the brief in its own git worktree under .claude/worktrees/ rather than the project root. The outline of that brief:

Outline of the concepts_brief.md that egm-brainstorm wrote for shorty link expiry, with two Blocker rows and five recommendations

So this is not a goldfish brief, and it shows. It skips the template’s Author, Goals vs. Non-Goals and Alternatives Weighed sections, and it recommends a “database TTL” and a feature flag even though the prompt said SQLite only and SQLite has no row expiry. One line from its risk table:

| **Design Critic** | 🔴 Blocker | Potential scalability issue if many short‑lived links accumulate before cleanup, risking table bloat and slow lookups. | Use a database TTL or sharding strategy and monitor hit rates; consider partitioning by expiration date. |

Check the transcript before trusting a brainstorm on a small model. If the synthesizer’s tool list has no Agent calls, no goldfish ever saw the idea. The lab copied the brief to the project root, where egm-draft looks for it first, and started the draft:

/egm:egm-draft concepts_brief.md

Drafting went better than brainstorming, at first. In nine minutes it wrote Problem Statement, Overview, Goals and Non-Goals to design_draft.md and stopped at the section gate. One approval later it added the Technical Plan in six minutes. Then the session fell apart over four turns:

  1. It asked which alternatives were rejected, correctly, because the brief had no Alternatives Weighed section to copy.
  2. Given two, it replied “Drafted the Alternatives Considered section” without calling any tool. The file was byte-for-byte unchanged.
  3. Told so, it wrote the file again, but from scratch: 89 lines became 73, and Problem Statement, Overview, Goals and Non-Goals were gone.
  4. Asked to restore them, it searched the project for *.go files in a Python repo and was stopped after 28 minutes with nothing written.

The last complete version, saved after the Technical Plan approval, went to docs/designs/link-expiry.md for review. Read against the real code, it is wrong in ways a newcomer would copy straight into a pull request:

Outline of the design_draft.md that egm-draft wrote for link expiry, with the POST /links/create route, an INTERVAL cleanup query and a node cron job

The route is POST /links/create where shorty serves POST /api/links. The cleanup query uses PostgreSQL’s INTERVAL '30 days' on a SQLite database, the cron line runs a Node script in a Python project, and the Feature Flag subsection the brief suggested is still there, because this copy predates the request to drop it. The route, the query and the Node script came from neither the brief nor the answers. They’re the model filling gaps with a generic web stack instead of reading shorty/app.py.

Then the goldfish got its turn: /egm:egm-review docs/designs/link-expiry.md 6, the same comprehension stage as before. It spawned egm:egm-comprehension in the foreground this time and finished in 30 minutes over five turns, writing a comprehension_report.md with four Major and three Nit findings. The four Majors are the useful part:

- **Severity**: Major
  **Affected Scope**: Reference to `/home/joshua/work/shorty/src/jobs/cleanup_expired_links.js` (lines 42‑47)
  **Discrepancy Description & Rationale**: The cron job script is referenced but absent from the codebase, so the daily purge operation cannot be implemented or tested until the script is added.

That one is half a misread, since the plan says to add the script, but the other three Majors are real: the draft says to update docs/api.yaml, docs/api.md and a Dockerfile, and none of them exist. A fresh reader caught three files the draft assumed were already there, which the session that wrote it never would. It still let the invented migration file 20241114_add_expires_at_column.sql pass. Look at what it missed, though. It read the README, which states POST /api/links, and still didn’t flag /links/create. It never opened shorty/app.py, so the PostgreSQL syntax and the Node script got flagged only as missing files, not as the wrong stack. A frontier model would likely read further, but on this setup a comprehension pass is a cheap filter for invented paths, not a correctness check. Use the stages after it, or your own read of the code, for that.

Check docs against code with the drift report

A design doc goes stale the day someone changes the code without updating it. /egm:egm-drift-report reads every doc in a folder, finds the files and symbols each one names, and writes down only the places where the code disagrees. Unlike the review, it runs in your own session with no goldfish. To give it something to find, the lab implemented the rate limiter in shorty/app.py with two departures from rate-limits.md:

  1. Set LIMIT_PER_HOUR = 200, where the doc says 100 new links per hour.
  2. Took the client from the X-Forwarded-For header when present, where the doc says to identify the client by IP address.

Point the skill at the folder that holds the design docs, from the project root:

/egm:egm-drift-report docs/designs

It writes one dated file in the working directory, with a heading per design doc and a bullet per divergence:

EGM drift report for rate-limits.md flagging LIMIT_PER_HOUR 200 in shorty/app.py against the 100 links per hour in the design doc

The limit mismatch was caught exactly. The header change was not, even though the skill’s own checklist names “architectural divergence” and trusting a client-supplied header is the bigger problem of the two, because any client can now dodge the limit by sending a new X-Forwarded-For value. So read a drift report as a list of things that are definitely wrong, not proof that everything else matches. That miss is the 20B local model’s, and a stronger model may catch it.

The successful run took 8 minutes 25 seconds on the CPU box: six turns, one read of the doc and one of app.py, and 1,929 output tokens. The first attempt, with the same slash command but without Agent and Task in the allowed tools, failed the way review Run 1 did. The model called the Skill tool, got the disable-model-invocation refusal, and after 14 minutes told the user to run /egm:egm-drift-report themselves. The second attempt hit the same refusal on its first call and then carried on with the workflow already expanded into its prompt. If a run ends with “please run the command yourself”, run it again. The lab had no hosted model to compare against, so whether a frontier model skips that first call is untested here.

EGM vs spec-kit, Kiro specs and plain subagents

All three spec tools have the agent write a spec before it writes code. The difference is who checks that spec, and whether the checker has already seen the conversation that produced it. The EGM column comes from the plugin source and the lab. The spec-kit column comes from its Agentic SDD reference, and the Kiro column from the Kiro specs docs and its pricing page, all read in November 2026.

EGMspec-kitKiro specsPlain subagents
Who writes the specYour session, through egm-brainstorm and egm-draft, one section at a timeYour agent, through /speckit.specify, plan and tasksKiro’s agent writes requirements.md (or bugfix.md), design.md and tasks.mdYou or your main agent, with no template
Who reviews itUp to 8 goldfish reviewer personas across stages 5 to 9, then youThe same agent via /speckit.clarify, checklist and analyze; you own the custom checklistsYou, through Markdown Review comments; Analyze Requirements flags inconsistencies, ambiguities and unstated assumptionsWhatever reviewer subagent you define
Reviewer context-isolatedYes: fresh context, read-only tools, no CLAUDE.md on Claude Code 2.1.271+No: the commands run in your agent sessionNo separate reviewer context is documentedFresh conversation, but it still reads CLAUDE.md unless you turn that off
Approval gateReadiness gate before brainstorm reviewers; per-section gate in egm-draft; egm-resolve edits only after approval/speckit.implement asks before running when checklist items are uncheckedYou approve each phase; Quick Spec skips the gatesNone unless you build one
Drift checking/egm:egm-drift-report compares design docs with the code/speckit.converge checks code against spec, plan and tasks and appends missing tasksProperty-based tests generated from requirements (IDE only)None
CostFree, Apache 2.0, plus model tokensFree, MIT, plus your agent’s tokensFree tier with 50 credits a month; Pro from $20 per user a monthBuilt in; model tokens only

A goldfish review is worth its extra tokens when the same session wrote the doc. That session already knows what each vague sentence was meant to say, so it reads its own gaps as clear. That’s exactly what Stage 6 caught in the rate-limit doc: a reviewer with no context pointed out that an IP address is a poor client identity behind NAT, which the doc simply assumed. Same-session review is fine for typos and for checking that tasks match the plan, which is what /speckit.analyze does, but it can’t tell you whether a newcomer could build from the doc.

If you’d rather have the spec workflow built into the editor, the Cursor vs Windsurf vs Kiro comparison covers Kiro as an IDE. To build your own reviewer instead, start from the Claude Code subagents guide and copy the three settings in EGM’s adapter frontmatter.

Run EGM on a local Ollama model

The lab had no frontier model login, so every EGM run above used Ollama’s Anthropic-compatible endpoint with gpt-oss:20b on a 32 vCPU cloud VM with no GPU. That’s a real option if your code can’t leave the building, and it shows exactly where EGM leans on model quality. Install Ollama with its script first. It installs the binary under /usr/local and registers an ollama systemd service:

curl -fsSL https://ollama.com/install.sh | sh

Ollama needs a long context for EGM, because a single goldfish reads its persona plus several document standards before it reads your doc. Ollama’s context length docs give a 4K default on machines with under 24 GiB of VRAM (a CPU box counts) and ask for at least 64K for coding agents, so raise it in a systemd override and pull the model:

sudo mkdir -p /etc/systemd/system/ollama.service.d
printf "[Service]\nEnvironment=OLLAMA_CONTEXT_LENGTH=65536\nEnvironment=OLLAMA_NUM_PARALLEL=4\nEnvironment=OLLAMA_KEEP_ALIVE=2h\n" | sudo tee /etc/systemd/system/ollama.service.d/override.conf
sudo systemctl daemon-reload
sudo systemctl restart ollama
ollama pull gpt-oss:20b

Four parallel slots let Ollama answer Claude Code’s background calls while a main or goldfish turn is still generating, instead of queueing them, and the two hour keep-alive stops it from unloading the 13 GB model between turns. Memory grows with slots times context, so size the box for it: the lab VM had 31 GB of RAM and 23 GB in use during a review. On a 16 GB machine, drop OLLAMA_NUM_PARALLEL to 1. The override file reads back like this:

[Service]
Environment=OLLAMA_CONTEXT_LENGTH=65536
Environment=OLLAMA_NUM_PARALLEL=4
Environment=OLLAMA_KEEP_ALIVE=2h

Claude Code then talks to Ollama through environment variables. The reviewer adapters use model: inherit, so they follow ANTHROPIC_MODEL. The three tier variables are there for Claude Code’s own background calls, which otherwise ask for a Claude model Ollama doesn’t have. The long API timeout stops Claude Code from giving up on slow CPU turns:

export ANTHROPIC_BASE_URL=http://localhost:11434
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
export ANTHROPIC_MODEL=gpt-oss:20b
export ANTHROPIC_DEFAULT_HAIKU_MODEL=gpt-oss:20b
export ANTHROPIC_DEFAULT_SONNET_MODEL=gpt-oss:20b
export ANTHROPIC_DEFAULT_OPUS_MODEL=gpt-oss:20b
export API_TIMEOUT_MS=3600000

Claude Code starts with a warning that the model isn’t recognized and assumes a 1M token context, which you can see at the top of the slash menu screenshot earlier. Don’t ignore that number: Claude Code compacts the conversation only as it nears the window it assumes, so with 1M it never compacts before Ollama’s 64K limit and Ollama silently truncates the prompt instead. The lab runs peaked near 32K and never hit it, but a full review can. The Claude Code environment variable reference lists CLAUDE_CODE_MAX_CONTEXT_TOKENS for telling it the real window; the lab runs didn’t set it. The two headless review runs compare like this:

RunPrompt argumentsWall timeTurns / output tokensGoldfish spawnedResult
1uninterrupted. GoldfishContext: none, proceed with no additional context.25 min12 / 4,1740Called the Skill tool, got refused, ended the turn with no report
2668 min16 / 13,6811 (10 min)comprehension_report.md with 7 findings, written as one line

Generation speed is the bottleneck, not prompt reading. Ollama’s log showed the parent’s last turn starting at a 31,715 token context, with prompt caching cutting the new input to 1,106 tokens, then generating 7,037 tokens of reasoning and report at under 4 tokens a second. That one turn took about half an hour. A full uninterrupted review is five stages with up to three reviewers each, so on this hardware it’s an all-day job.

The verdict is blunt. EGM works mechanically on a local model, since the slash command, the plugin agents and the goldfish isolation all behave the same, but a 20B model on CPU turns a single stage into an hour-long job and fumbles the orchestration once. Use a local model to try the plumbing or for code that can’t leave your network, and expect to babysit it. For day-to-day spec reviews, a hosted Claude or GPT model is what EGM was built and tested against.

Fix common EGM errors

The first three came up during the lab runs; the other three are called out in the EGM docs and issue tracker for the versions tested.

“Skill egm:egm-review cannot be used with Skill tool due to disable-model-invocation”

The model tried to start an EGM skill through the Skill tool, which Claude Code refuses for any skill marked disable-model-invocation. In the lab this happened even though the prompt began with /egm:egm-review, which already expands the skill: gpt-oss:20b called it through the tool anyway, got the refusal, printed “Please wait while the review runs” and ended the turn with no reports written. The slash command is the right way in, so the fix is the model, not the prompt. A frontier model follows EGM’s instruction to read egm-review-loop or egm-resolve from their SKILL.md files instead of calling them. On a small local model, pass a single stage number such as 6 instead of a long argument string, which is what got the second lab run past this point.

“Background tasks still running 10m after the last turn”

This one only bites in headless claude -p runs. The brainstorm skill spawned egm:egm-synthesizer as a background agent, the main turn ended with “Your Goldfish review has started in the background”, and ten minutes later Claude Code printed this to stderr and killed the synthesizer before it wrote anything:

Background tasks still running 10m after the last turn (subagent "Conduct multi-lens brainstorm for feature concept: Add an op"); stopping them. Set CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS=0 to wait indefinitely.

Ten minutes is plenty for a hosted model and nowhere near enough for a local one. Export the variable the message names before any scripted EGM run, then resume the session with the same answer. On the rerun the main agent resumed the stopped synthesizer and the brief landed 24 minutes later:

export CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS=0

The variable’s name ties it to print mode, and this guide only hit the limit there. An interactive session stays open while background agents work, so it wasn’t tested for the same cutoff.

“Default agents/ folder is ignored because the manifest sets “agents””

Harmless. EGM keeps the shared personas in agents/ and the Claude Code adapters, with omitClaudeMd and read-only tools, in .claude-plugin/agents/. The manifest lists the adapters explicitly, so Claude Code skips the root folder. Don’t remove that list to silence the note, or the reviewers lose their tool restrictions.

Reviewers still see CLAUDE.md

omitClaudeMd needs Claude Code 2.1.271 or later. The EGM docs say older versions must not be treated as isolated, so upgrade with claude update before you trust a review. Managed policy files still apply to reviewers by design.

Codex reviewers quote your AGENTS.md

Issue #237 covers this, reproduced on Codex CLI 0.166.0 and still open in November 2026. Spawning with fork_turns: "none" hides the parent conversation but not instruction files. Until Codex gets a per-subagent switch, move design opinions out of AGENTS.md and ~/.codex/AGENTS.md before a review, or run the review stage in Claude Code.

Antigravity doesn’t recognize /egm-brainstorm

The EGM README used to say only Claude Code needs the /egm: prefix, so Antigravity users typed /egm-brainstorm and nothing loaded. Issue #196 reported it on the agy CLI 1.4.8 with EGM 0.1.0: the unprefixed commands weren’t recognized, while /egm:egm-brainstorm and /egm:egm-drift-report worked. Because every EGM skill sets disable-model-invocation, the skills don’t show up in the model’s skill list either, so nothing hints at the missing prefix. The fix is to always type the prefixed name, in Antigravity as in Claude Code.

#196 was closed on 28 October 2026 once the README said agy needs the prefix too. The follow-up, issue #220, found that agy 1.4.9 in print mode (agy -p) ran both forms, and a contributor’s interactive test on agy 1.4.10 showed the slash menu completing /egm-brainstorm to /egm:egm-brainstorm. It closed on 30 October 2026 with the prefix kept as the safe instruction, since the unprefixed form depends on the agy version. This guide didn’t test Antigravity, so treat this one as the issue tracker’s finding.

EGM command reference card

Keep this next to your terminal. Claude Code takes the slash form; in Codex, pick the same skill from the picker and give it the same arguments in plain text.

CommandUse it toWrites
/egm:egm-brainstormTurn a rough idea into goals, non-goals and optionsconcepts_brief.md
/egm:egm-draftWrite the design section by sectiondesign_draft.md
/egm:egm-review <doc> [step]Run goldfish stages 5 to 9Stage reports, consolidated_review_report.md
/egm:egm-review-loopReview, fix and re-review until two clean rounds (max 5)Updated doc plus reports
/egm:egm-resolveSort findings into fixes and contested itemsgoldfish_review_report.md
/egm:egm-drift-reportCompare design docs against the codeYYYY-MM-DD_DRIFT_REPORT.md
/egm:egm-bootstrapGenerate README files across a repo subtreeREADME.md per folder

To keep EGM’s files out of your repo root, add a line EGM artifact directory: docs/egm to CLAUDE.md or AGENTS.md and the skills write there instead. For the rest of the Claude Code commands around it, the Claude Code cheat sheet is the next tab to keep open.

Keep reading

Open Source LLM Comparison Table (2026) AI Open Source LLM Comparison Table (2026) Ollama Models Cheat Sheet: Best Models by VRAM, Tested (PDF) AI Ollama Models Cheat Sheet: Best Models by VRAM, Tested (PDF) OpenCode CLI Cheat Sheet: Commands, Sessions and Fixes (PDF) AI OpenCode CLI Cheat Sheet: Commands, Sessions and Fixes (PDF) Install InvokeAI 7 on Linux with NVIDIA: Tested VRAM per Model AI Install InvokeAI 7 on Linux with NVIDIA: Tested VRAM per Model Install openSUSE with Claude Code: Agama MCP Server Tested AI Install openSUSE with Claude Code: Agama MCP Server Tested Claude Sonnet 5 Released: Features, Benchmarks, and Pricing AI Claude Sonnet 5 Released: Features, Benchmarks, and Pricing

Leave a Comment

Press ESC to close