
Google just open-sourced the plugin thousands of its engineers use every day to stop AI agents from writing perfectly good code for a perfectly bad plan. It is called the Elephant-Goldfish Model (EGM). The mechanic is simple in a way most developers miss: before your agent writes a single line, it drafts a design document and defends it to a panel of stateless reviewers who remember nothing about your project. That is not a metaphor. It is a literal multi-agent workflow, now installable in two commands.
The Problem Isn’t Hallucination
Most developers think the AI coding failure mode is hallucination — the agent invents an API, misremembers a library, produces plausible-looking nonsense. That happens. But it is not what kills production features. The real failure is this: after 45 minutes in a conversation with an agent, you and the agent share the same blind spots. You’ve both agreed on a framing. You’ve both forgotten what a fresh reader wouldn’t know. The agent writes code that perfectly implements your shared assumptions — which were wrong.
Research has quantified part of this: LLMs show 39% average performance degradation in multi-turn conversations compared to single-turn. Objectives drift. Context windows fill. The longer the session, the more you and the model are in the same tunnel together, looking at the same walls.
EGM’s answer is architectural: break the session. Use two agents with opposite memory profiles to do what code review never could — catch the plan before the code exists.
Elephant Remembers. Goldfish Forgets. That’s the Point.
The plugin assigns two roles, deliberately chosen for their contrasting memory:
The Elephant is a long-running, context-rich session with full project memory. No code gets written here. The Elephant interviews you, captures your architectural decisions, debates trade-offs, and produces a design document under docs/designs/<feature>.md. Think of it as the session where you and the agent argue through the plan and write it down.
The Goldfish is a stateless, zero-context session. It has never seen your conversation. It reads only the design document and acts as a hostile reviewer — hunting for gaps, unchecked assumptions, missing edge cases, and hidden dependencies. Multiple Goldfish review simultaneously. Their objections go back to the Elephant. The design does not move forward until issues are resolved.
“The goal is to catch the gaps that creep in when you and an agent have talked for an hour and both forgotten what a fresh reader wouldn’t know.”
Google Open Source Blog, October 2026
The Workflow: Four Commands
EGM ships as agent skills, not a standalone tool. The typical sequence:
/egm-brainstorm— Ideation session. A 6-lens Goldfish swarm stress-tests your concept and produces aconcepts_brief.mdartifact./egm-draft— The Elephant converts the brief into a full design document./egm-review docs/designs/<feature>.md— Multi-stage Goldfish swarm reviews the design doc./egm-resolve— Interactive triage: CONTEST, ESCALATE, PROPOSE FIX, or DECLINE each finding.
In Claude Code specifically, commands use the /egm: prefix — so /egm:egm-brainstorm, /egm:egm-draft, and so on. The /egm-drift-report command detects spec drift between your design docs and the current codebase, which matters once a project is live and evolving.
Installing EGM
On Codex, two commands get you running:
codex plugin marketplace add google/elephant-goldfish-model
codex plugin add egm@egm
On Antigravity (Google’s own agent): agy plugin install https://github.com/google/elephant-goldfish-model. EGM officially supports Antigravity, Claude Code, Codex, Claude Cowork, and ChatGPT Work. Community ports for Cursor and Pi are already appearing on GitHub.
The Numbers Say It Caught On Fast
EGM went from zero to 6,700 GitHub stars in 12 days — enough to hit #1 on GitHub Trending multiple days between October 25 and 27. For a developer tooling release with no product launch hype, that is a significant signal. The University of Maryland has already added EGM to its CMSC389A coursework for Fall 2026.
The adoption velocity makes sense. Google framed this as a production tool, not a research experiment. Thousands of engineers were already running this workflow internally before anyone outside saw it. The Google Open Source Blog announcement does not hedge: this is what Googlers use daily to ship production code.
Worth Installing on Your Next Feature
Google is direct about the limits: EGM is overkill for small, obvious fixes. The overhead of drafting and reviewing a design doc doesn’t pay off on a two-line change. But on anything with real design decisions — new service boundaries, permissions models, background jobs, data migrations — the cost of a bad plan dwarfs the cost of running the Goldfish protocol once.
Traditional code review catches bad code. EGM catches bad plans. Those are different problems at different stages, and most teams only solve the first one. If you are using AI coding agents seriously, you now have a production-tested workflow for the second. The adoption signal suggests the rest of the industry agrees.

