Google's EGM Plugin Splits AI Coding Into Architect and Coder Roles
Elephant-Goldfish Model separates long-term planning from stateless code generation to prevent context pollution in extended AI-assisted development sessions.
Google has released an open-source plugin called Elephant-Goldfish Model (EGM) that restructures how developers work with AI coding agents over long sessions. The tool addresses a familiar failure mode: after a few hours of productive collaboration, the conversation history grows so large that the model begins repeating earlier mistaken assumptions, turning one bug fix into two new regressions.
Why long contexts degrade code quality
Language models tend to anchor on prior statements in the same dialogue, even when those statements were speculative or wrong. When architectural debates, debugging traces, and incremental changes all share one context window, the agent inherits contradictory constraints and drifts from the original design.
Two roles, one specification file
EGM divides the workflow between an Elephant agent (/egm-brainstorm, /egm-draft) and a Goldfish agent. The Elephant holds long-term memory but is forbidden from writing business logic. It asks clarifying questions, refines the architecture, and produces a detailed Markdown specification named project_plan.md. Failed design choices are discarded during this planning phase.
The Goldfish receives a single, self-contained task drawn from that specification. It writes and verifies code in a fresh, short context with no memory of previous discussions. Because each coding session starts clean, the agent does not carry forward stale assumptions or debugging baggage.
Origin in a community workflow
The approach mirrors a rule a seasoned developer shared on Reddit, where the post gathered 600 upvotes. That developer spent a full day writing a specification before touching code — a discipline EGM now automates. The plugin is available for Claude Code users who want to enforce the same separation without manual context management.
By persisting the entire project architecture in a readable Markdown file and delegating implementation to stateless agents, EGM aims to make large AI-assisted projects finishable rather than collapsing under their own conversation history.
Sources
reddit.com — content not available without authorization
Related news
AI ToolsVibe-coded app leaks API keys in client bundleA non-programmer's AI-built booking app exposed Stripe, OpenAI, and Resend secrets in browser-loaded JavaScript. Automated bots probed for .env within weeks.·same source: reddit.com
- AI ToolsChrome, Edge, Firefox and MDN launch modern-web-guidance for coding agentsBrowser vendors collaborate on a skill set that steers AI agents toward native web APIs instead of legacy JavaScript patterns.·shared tag: AI Tools
AI ToolsAnthropic publishes guide on building always-on agents with five core primitivesAnthropic breaks down the architecture behind stateful, proactive AI agents that manage context across sessions and act without direct supervision.·shared tag: AI Tools
AI ToolsMCP Events Lets AI Agents React to External Triggers Without User PromptsThe Model Context Protocol adds a standardized event subscription system with three delivery modes — poll, push, and webhook — so agents can act on GitHub PRs, CI results, or any server-side change au·shared tag: AI Tools
AI ToolsOpenAI Introduces GPT-6.2 Astra and Sol: Frontier and Efficient Models Now AvailableOpenAI releases GPT-6.2 Astra for complex professional work and GPT-6.2 Sol for everyday tasks. Astra leads benchmarks at 20% lower cost than its predecessor.·shared tag: AI Tools
- AI ToolsPeakCut: Open-Source Tool Auto-Clips Streams to Vertical Shorts With Local AIPeakCut turns long videos and live streams into captioned 9:16 clips, runs entirely on your hardware, and supports any OpenAI-compatible model plus local speech recognition.·shared tag: AI Tools
Comments
Weekly digest
The best of vibe coding, AI agents and open source — once a week, no spam.