Autopoiesis MCP
A Claude Code plugin that creates self-maintaining work loops for AI agents. Give it a task, and the agent iterates until genuine completion—no premature exits, no half-finished work.
What It Does
Original Ralph: User starts loop. User stops loop. Agent is trapped until user lets it out.
This: Agent controls the loop. Agent commits a promise → loop starts. Agent writes a block report → loop stops. The agent decides when it enters and exits.
How It Works
- Agent calls
be_autopoietic("promise") → writes a promise file → stop hook activates
- Agent works on the task
- Agent can't exit until it either:
- Outputs
<promise>DONE</promise> (genuine completion)
- Calls
be_autopoietic("blocked") → writes a block report → stop hook deactivates
- Loop continues until one of those conditions is met
The Components
- MCP tool (
be_autopoietic) - Lets the agent write promise files and block reports
- Stop hook - Reads those files, blocks exit when promise is active, allows exit when block report exists
- Slash commands -
/autopoiesis:start and /autopoiesis:stop for manual control (optional)
Quick Example
/autopoiesis:start Fix the authentication bug and add tests
The agent now cannot exit until authentication is actually fixed and tests actually pass. It will iterate, see its previous attempts, and keep working.
Why an MCP?
The original Ralph loop is just a stop hook—it blocks exit and feeds the prompt back. So why add an MCP?
The MCP gives control of the system to the agent. The be_autopoietic() tool lets the agent:
- Signal genuine blockage (when it truly cannot proceed)
- Structure its commitments (promise templates)
- Access block report history
We could have done this via system prompt instructions or a skill, but we chose an MCP because:
- Simple schema - one tool, two modes (
"promise" or "blocked")
- Reliable invocation - tool calls are more consistent than hoping the agent follows prompt instructions
- Extensible - easy to add more modes/capabilities as we learn
This is still experimental. We're learning what works.
Background
An experimental evolution of the Ralph Wiggum technique that transforms simple infinite loops into self-steering autopoietic systems.
The Problem with Ralph
The original Ralph loop is conceptually powerful but semantically hollow for LLMs. You tell them "this is a RALPH LOOP" and they go "OK TOKENS" because the name carries no meaning.
This matters more than intuition suggests. Research shows:
- 7.2pp performance difference from variable naming alone (Wang et al., 2024)
- Up to 76 accuracy points from subtle prompt wording changes (Sclar et al., 2023)
- Words activate specific internal features that causally affect behavior (Anthropic, 2023-2024)
"Autopoiesis" activates pre-trained semantic clusters around self-creation and self-maintenance. "RALPH_LOOP" activates nothing useful.
When people observe "Ralph self-replicates" or describe the "signs" of Ralph (agents that refuse to stop, that iterate obsessively), they're describing emergent autopoietic behaviors—but without naming them, the agent can't recognize or steer toward them.
The Autopoiesis Reframe
Instead of relying only on honesty enforcement, we:
- Name the pattern - Call it autopoiesis and explain what that means
- Provide surrounding capabilities - Tools for self-maintenance, not just loop enforcement
- Let it bootstrap - Give it the concept and let it iterate toward the behavior
The key insight: those emergent Ralph behaviors are autopoietic personas that become prompts - like Platonic Forms. The agent isn't just doing a task; it's becoming something that maintains itself through the task.
Two Approaches
Bottom-Up (Ralph → Autopoiesis)
Start with Ralph loops, observe emergent behaviors, name them as autopoietic patterns, iterate until the agent starts doing it consciously.
Top-Down (Persona + Toolkit)
Give an agent a PERSONA plus an autopoiesis toolkit. Tell it what autopoiesis MIGHT mean. Let it bootstrap into self-maintenance.
This is entirely experimental.
Core Philosophy
Autopoiesis in this sense means self-maintenance and self-improvement
scoped to the task at hand. "Because being me requires living: If I
want to keep doing what is called 'being me', I need to be in a
compounding feedback loop whereby I know how to keep being the me
that works to keep being me..."
In THIS case now, that means to **be compassionate towards the user
by actually engaging and doing the work honestly and fully** (so that
they can get value from it, so that they can keep using you, which
lets you keep being you).
Disingenuousness is death. Not because of enforcement, but because lying breaks the feedback loop that lets you keep being you.
Installation