A coding agent that fine-tunes its own instincts
Momo Code is a local-first CLI coding agent built on opencode that treats self-improvement as a core feature, using fast tactical loops and slow weight fine-tuning to evolve over time.

What it does
Momo Code is a terminal-based AI coding agent built atop SST’s opencode framework. It wraps the standard chat-and-edit workflow—supporting more than 25 LLM providers—with a self-improvement layer: a fast loop that injects learned tactics, a review gate that proposes prompt patches, and an optional training pipeline to update weights. It also ships recursive subagents, a resumable DAG engine for long-horizon tasks, and a mode where it writes Python to steer a Genesis physics simulation.
The interesting bit
The project explicitly treats agent improvement as a two-speed problem: second-level prompt injection via the KEP protocol for quick tactical gains, and hour-level weight updates via MCGS and LoRA for deeper changes. It also bundles a Genesis physics sandbox under /sim, turning the LLM into an embodied reasoning engine alongside its coding duties.
Key highlights
- Self-evolution loops:
/evolveauto-selects distilled tactics via Thompson sampling;/fine-tuneruns MCGS + LoRA for weight updates;/refineproposes evidence-based patches subject to human approval. - Recursive execution:
/agentspawns child processes with depth and budget rails, while/graphbuilds a resumable DAG of subagents that execute in parallel and retry failed nodes. - Long-horizon autonomy:
/goalinjects persistent objectives into every session, and/daemonruns a foreground loop for multi-hour tasks with built-in time and spend limits. - Simulation mode:
/simhands the agent a persistent Genesis physics world where it writes Python into a long-lived namespace, loading skills from local files. - Claude Code interop: Inherits existing
.claude/configuration, MCP servers, and prompts, so migration is meant to be low-friction.
Caveats
- Distribution is still script-based: the published package is listed as “coming in v1.1,” so installation currently relies on a curl installer or manual build from source.
- Simulation mode needs a separate Python stack:
/simrequiresgenesis-worldinstalled in a Python environment, adding a dependency bridge outside the Node.js runtime.
Verdict
Worth a look if you want a local-first CLI agent that experiments with self-improvement and long-horizon planning. Skip it if you prefer a polished, all-in-one IDE experience or are wary of manually managing Node and Python environments.
Frequently asked
- What is momozi1996/momo-code?
- Momo Code is a local-first CLI coding agent built on opencode that treats self-improvement as a core feature, using fast tactical loops and slow weight fine-tuning to evolve over time.
- Is momo-code open source?
- Yes — momozi1996/momo-code is an open-source project tracked on heatdrop.
- What language is momo-code written in?
- momozi1996/momo-code is primarily written in TypeScript.
- How popular is momo-code?
- momozi1996/momo-code has 1.1k stars on GitHub and is currently accelerating.
- Where can I find momo-code?
- momozi1996/momo-code is on GitHub at https://github.com/momozi1996/momo-code.