cd /news/ai-agents/codex-reimplemented-in-8k-lines-of-c… · home topics ai-agents article
[ARTICLE · art-83036] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Codex reimplemented in 8k lines of C++, <1MB binary

Paolo Anzini released MicroCodex, an ultra-lightweight coding agent written in C++23 that runs locally in the terminal, with a binary under 1MB and the codebase comprising 8,000 lines. The tool supports one-shot prompts, an interactive terminal UI, local coding tools, durable conversations, and automatic context compaction, and is available for macOS and Linux via GitHub releases or an install script. MicroCodex is not sandboxed, so model-requested commands run with the user's permissions, and it currently lacks MCP support and safe-command gating.

read2 min views1 publishedAug 1, 2026
Codex reimplemented in 8k lines of C++, <1MB binary
Image: source

MicroCodex is an ultra-lightweight coding agent that runs locally in your terminal.

MicroCodex is written in C++23 and provides one-shot prompts, an interactive terminal UI, local coding tools, durable conversations, and automatic context compaction.

Run the following on Mac or Linux to install MicroCodex:

curl -fsSL https://github.com/paoloanzn/microcodex/releases/latest/download/install.sh | sh

Then simply run microcodex login

to sign in, followed by microcodex

to get started.

You can also go to the latest GitHub Release and download the appropriate binary for your platform. #

Each GitHub Release contains these executables:

  • macOS

  • Apple Silicon/arm64: microcodex-aarch64-apple-darwin.tar.gz

  • x86_64: microcodex-x86_64-apple-darwin.tar.gz

  • Apple Silicon/arm64:

  • Linux

  • x86_64: microcodex-x86_64-unknown-linux-gnu.tar.gz

  • arm64: microcodex-aarch64-unknown-linux-gnu.tar.gz

  • x86_64:

Each archive contains a single entry with the platform baked into the name (for example, microcodex-aarch64-apple-darwin

), so you likely want to rename it to microcodex

after extracting it.

The installer selects the native build for the current architecture. Linux requires the libcurl and OpenSSL runtime libraries.

To install a specific release, set MICROCODEX_RELEASE

:

curl -fsSL https://github.com/paoloanzn/microcodex/releases/latest/download/install.sh | MICROCODEX_RELEASE=v0.1.0 sh

Run microcodex login

and open the displayed URL in your browser. MicroCodex stores the resulting OAuth credentials under $CODEX_HOME

, or ~/.codex

when CODEX_HOME

is unset.

You can then start an interactive session or pass a one-shot prompt:

microcodex
microcodex "Find the failing test, fix it, and run the relevant test suite"

Warning

MicroCodex is not a sandbox. Model-requested commands and file operations run with the same permissions as the MicroCodex process.

MicroCodex discovers the same filesystem skills installed for Codex under $CODEX_HOME/skills

, or ~/.codex/skills

when CODEX_HOME

is unset. Each skill must have a SKILL.md

with YAML frontmatter containing a name

and description

. Skill metadata is added to the agent instructions at session startup; the complete skill is read only when its name or description matches the task.

Building requires a C++23 compiler, make

, libcurl development files, and OpenSSL development files on Linux.

git clone --recurse-submodules https://github.com/paoloanzn/microcodex.git
cd microcodex
make

The executable is written to build/microcodex

. Run the test suite with make test

.

  • MCP support is not implemented yet.
  • Text cannot currently be copied from the terminal while using MicroCodex.
  • Dangerous shell commands are not yet gated by a safe-command policy.

This repository is licensed under the Apache-2.0 License.

── more in #ai-agents 4 stories · sorted by recency
── more on @paolo anzini 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/codex-reimplemented-…] indexed:0 read:2min 2026-08-01 ·