cd /news/ai-agents/mlx-code-a-coding-agent-that-speaks-… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-30679] src=mlx-code.com β†— pub= topic=ai-agents verified=true sentiment=↑ positive

Mlx-Code: A Coding Agent That Speaks Git Natively

Mlx-Code, a new coding agent, natively integrates Git as its core state machine, enabling developers to branch, diff, and resume from any checkpoint. By mapping the reasoning loop onto Git mechanisms, it allows isolated worktrees, concurrent multi-agent execution, and recursive sub-agent spawning. The tool supports multiple APIs and can be used as a library for custom workflows.

read3 min views1 publishedJun 17, 2026

[ 00_mlx_code ]

βœ” Git isn't just a backup. It's a state machine.

βœ” Git commits store file changes together with the conversation that produced them.

βœ” Parallel worktrees host multiple isolated agents concurrently.

βœ” Agents can spawn sub-agents recursively.

[ 01_cli_demo ]

[ 02_why_git ]

Agent Git What It Enables
Execution step changes files commit Inspect changes cleanly with git diff
Alternative approach branch Explore paths non-destructively
Isolated agent sandbox worktree Keep your active checkout clean and safe
Resuming from a past session checkout Rewind agent to any snapshot state

Most agents treat version control as an afterthought. mlx-code maps the reasoning loop directly onto Git mechanisms. Your complete agent state history lives inside git commit

history rather than an opaque database.

[ 03_primitives ]

Fork from any checkpoint

A branch opens a fresh interactive tab in an isolated worktree. Test divergent code designs securely without abandoning your active checkout.

/branch --rev 2 make it use httpx instead

Resume from anywhere

Every file-changing step is snapshot-committed with the chat/execution history. Rewind cleanly to any checkpoints.

mlc --resume abc1234

Switch configs on the fly

Swap agent configurations mid-session between planner, coder, and reviewer roles without losing your active context.

/clear --config reviewer.yaml

Concurrent multi-agent

Run multiple agents concurrently inside one batch step. Share your unified memory architecture compute pools dynamically.

mlc --engine batch

[ 04_architecture ]

Worktrees:

  main ──●──●──●──●──●──●──●──●──●──●──●──●──●──●──────► Node = git commit + chat history
            β”‚        β”‚
            β”‚        └── branch-1 ──●──●──●
            β”‚                          β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚                          └── branch-1-0 β”œβ”€β”€β—β”€β”€β—
            β”‚                            β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
            └── branch-0 ──●──●──●             β”‚
                                               β”‚
Tabs:                                          β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί Tab = git branch + Agent
                                               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  TUI tabs                                    β”‚         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ main β”‚  β”‚ branch-0 β”‚  β”‚ branch-1 β”‚  β”‚ branch-1-0 β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
Agents:           β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί Each tab runs its own Agent
                  β”‚
             β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
             β”‚  Agent                                   β”‚
             β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
             β”‚  β”‚ API:           β”‚  β”‚ Tools:         β”‚  β”‚
             β”‚  β”‚ Local (mlx-lm) β”‚  β”‚ Read    Write  β”‚  β”‚
             β”‚  β”‚ Gemini         β”‚  β”‚ Edit    Bash   β”‚  β”‚
             β”‚  β”‚ Claude         β”‚  β”‚ Grep    Find   β”‚  β”‚
             β”‚  β”‚ Codex          β”‚  β”‚ Ls      Skill  β”‚  β”‚
             β”‚  β”‚ DeepSeek       β”‚  β”‚ Agent ─────────┼──┼─► Recursively spawns sub-Agents
             β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
             β”‚  Git worktree                            β”‚
             β”‚  (isolation + session state)             β”‚
             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

[ 05_library_api ]

Use as a Library

Construct custom workflow pipelines, run programmatic background review checks, or coordinate distributed multi-agent workflows natively on your Mac.

from mlx_code.repl import Agent
from mlx_code.tools import ReadTool, WriteTool, EditTool

                    agent = Agent(api='claude', tool_names=['Read', 'Write', 'Edit'])
                    result = await agent.run('refactor utils.py to use dataclasses')

[ 06_user_manual ]

slash commands

/branch [--rev N]Fork tab from checkpoint

/diff [--all]Review worktree changes

/clear [--config F]Clear / reset session

/history [--raw]Show chat log

/toolsList active tools

!commandRun a shell command

$commandRun an interactive command

keyboard shortcuts

Ctrl-1 … Ctrl-9Jump directly to N-th tab

Ctrl-, / Ctrl-.Cycle adjacent tabs

EnterSubmit

Ctrl-JInsert newline

Ctrl-RRecall last prompt

Ctrl-CClear input or abort agent

Ctrl-DClose branch tab, or exit app

── more in #ai-agents 4 stories Β· sorted by recency
── more on @mlx-code 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/mlx-code-a-coding-ag…] indexed:0 read:3min 2026-06-17 Β· β€”