{"slug": "show-hn-memcode-ai-goes-open-source-with-claude-code-inspired-coding-agent", "title": "Show HN: Memcode AI goes open source with Claude Code inspired coding agent", "summary": "Memcode AI, a coding agent that maintains a persistent model of a repository in a `.memcode` directory, has been released as open source under the MIT license. The single Go binary features a terminal UI, supports multiple model providers including OpenAI, Anthropic, Gemini, xAI, and local endpoints like Ollama, and includes capabilities such as model policy routing, session history, and self-hosting. The project is available on GitHub and can be installed via curl or Go, with the hosted service at memcode.ai running the same code.", "body_md": "**The coding agent that remembers your repo.**\n\nMost coding agents start every session from zero. memcode keeps a persistent model of your repo in `.memcode`\n\n: the subsystems, what you worked on last week, which approaches failed and why, and the preferences you have corrected it on. The longer you use it, the less you have to explain.\n\nOne Go binary, a full terminal UI, and it runs against whatever models you already have: the hosted memcode gateway, your own API keys, or a local endpoint like Ollama.\n\nRemembers your repo | Version-control-friendly state in `.memcode` that survives sessions and machines. Searchable session history. Repeated failures distill into lessons that resurface when they matter. Honors `MEMCODE.md` , `AGENTS.md` , and `CLAUDE.md` instructions, and compresses oversized ones once instead of re-reading them forever. |\nModel policy in the client | Automatic mode routes each call by what the turn needs: cheap models for routine work, strong models for planning, review, high-risk changes, and recovery after its own mistakes. Pin any model with `/model` . Failures walk catalog-defined fallback chains. See\n|\nBring your own models | Works with no account: point it at any OpenAI-compatible endpoint. Provider-native APIs get full fidelity, the Responses API on api.openai.com, Messages on api.anthropic.com, Gemini and xAI likewise. Standard key env vars are picked up automatically. |\nReads the room | Tracks the working mood of the session. When you are correcting it, it stops cutting corners, spends more on the model, and asks before acting. When things are calm it stays out of the way. |\nA real terminal UI | Multiline editing, slash commands with autocomplete, streaming tool output, interrupt and redirect mid-turn, themes, and a live context meter. |\nPlans before it builds | `/plan` researches with parallel scouts, drafts, gets a cross-model review, and turns the approved plan into a binding contract for execution. |\nDelegates and parallelizes | Spawn read-only explorers or full sub-agents, run detached background jobs, and manage them with `/jobs` , `/tail` , `/kill` . |\nTable stakes, done properly | MCP client, Agent Skills, hooks (\n|\n\n**Self-updating**`MEMCODE_AUTO_UPDATE=off`\n\nkeeps it manual.\n\n```\ncurl -fsSL https://memcode.ai/install.sh | sh\n```\n\nOr with Go:\n\n```\ngo install github.com/memcode-ai/memcode@latest\n```\n\nOr build from source:\n\n```\ngit clone https://github.com/memcode-ai/memcode\ncd memcode && go build -o memcode .\n```\n\nThen run `memcode`\n\nin a repo.\n\n```\nMEMCODE_ENDPOINT_URL=http://localhost:11434/v1 memcode      # Ollama, local\nMEMCODE_ENDPOINT_URL=https://api.openai.com/v1 memcode      # your OpenAI key (OPENAI_API_KEY)\nMEMCODE_ENDPOINT_URL=https://api.anthropic.com memcode      # your Anthropic key (ANTHROPIC_API_KEY)\n```\n\n`OPENAI_API_KEY`\n\n, `ANTHROPIC_API_KEY`\n\n, `GEMINI_API_KEY`\n\n, `XAI_API_KEY`\n\n, `FIREWORKS_API_KEY`\n\n, and friends are picked up automatically for their hosts. Named endpoints live in config, and `/model`\n\nswitches models mid-session.\n\nWith a memcode account you get one balance across every vendor, a key vault for BYOK, and hosted web search:\n\n```\nmemcode login\n```\n\nThe whole product is in this repo, gateway included, and the gateway is a single stateless binary:\n\n```\ncd deploy/docker && cp ../../.example.env .env   # set a token + a provider key\ndocker compose up --build\n```\n\nSee [docs/self-hosting.md](/memcode-ai/memcode/blob/main/docs/self-hosting.md). The hosted service at [memcode.ai](https://memcode.ai) runs this same code with a private control plane on top (accounts, one balance across vendors, the BYOK vault, team features).\n\nThe CLI is the agent: all model selection, escalation, and recovery run client-side; every backend is a plain serving surface speaking one OpenAI-compatible wire ([protocol/PROTOCOL.md](/memcode-ai/memcode/blob/main/protocol/PROTOCOL.md)). The gateway under `gateway/`\n\nis that serving surface, metered and typed, sharing one provider implementation with the CLI. Cloud-only behavior sits behind one control-plane seam; self-host mode constructs none of it.\n\nMIT. See [LICENSE](/memcode-ai/memcode/blob/main/LICENSE).", "url": "https://wpnews.pro/news/show-hn-memcode-ai-goes-open-source-with-claude-code-inspired-coding-agent", "canonical_source": "https://github.com/memcode-ai/memcode", "published_at": "2026-08-10 05:06:05+00:00", "updated_at": "2026-08-10 05:35:57.448685+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "artificial-intelligence"], "entities": ["Memcode AI", "OpenAI", "Anthropic", "Gemini", "xAI", "Ollama", "GitHub", "memcode.ai"], "alternates": {"html": "https://wpnews.pro/news/show-hn-memcode-ai-goes-open-source-with-claude-code-inspired-coding-agent", "markdown": "https://wpnews.pro/news/show-hn-memcode-ai-goes-open-source-with-claude-code-inspired-coding-agent.md", "text": "https://wpnews.pro/news/show-hn-memcode-ai-goes-open-source-with-claude-code-inspired-coding-agent.txt", "jsonld": "https://wpnews.pro/news/show-hn-memcode-ai-goes-open-source-with-claude-code-inspired-coding-agent.jsonld"}}