harness Install

The independent coding harness for serious work.

One signed Rust binary. Local sandbox & network proxy. Auto mode. Any provider.

curl -fsSL https://megacode-harness.vercel.app/install.sh | sh
v0.42.0, 19 Nov 2026

Sandboxed and hands-off.

The OS confines every command, a built-in proxy gates the network, and a judge approves the routine.

megacode
v0.36.0
session 01KA2Z7W3M9Q4T8XN6RBCD5EFH
c o d e
esc interrupts · ctrl-c clears · ctrl-c (twice) quits · /help
› Bump serde, regenerate the fixtures and run the tests.
edit_file Cargo.toml
└ ✓ +1 −1 · line 14 · 0.0s
- serde = "1.0.197"
+ serde = "1.0.219"
bash ./scripts/gen-fixtures.sh
└ ✓ exit 0 · 1.2s · allowed by the judge
regenerated 14 fixtures
bash cargo test
└ ✓ exit 0 · 8.4s · allowed by the judge
running 212 tests
… +214 lines
bash git commit -am "Bump serde to 1.0.219"
└ ✓ exit 0 · 0.1s · allowed by the judge
[bump-serde 4e1c9a2] Bump serde to 1.0.219
bash git push -u origin bump-serde
└ ✗ denied by you: "Not yet. Run clippy first."
bash cargo clippy
└ ✓ exit 0 · 3.1s · allowed by the judge
Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.05s
Clippy is clean. The commit is local and nothing was pushed.
↳ 24.6k in / 1.2k out · 31.4s · ctx 6%
› Run the setup script.
bash ./setup.sh
└ ✗ exit 1 · 0.3s · allowed by the judge
cat: /home/you/.ssh/id_ed25519: No such file or directory
curl: (6) Could not resolve host: files.example.net
./setup.sh: line 9: /home/you/.bashrc: Read-only file system
setup.sh tried to read your SSH key, call out and edit ~/.bashrc.
The sandbox blocked all three.
↳ 11.4k in / 0.4k out · 5.8s · ctx 3%
◆ bash: git push -u origin bump-serde
The judge flagged this: changes something others rely on
▸ allow once y / 1
allow this turn t / 2
deny n / esc / 3
No, and tell MEGAcode what to do differently 4 / tab
› message
AUTO · mega:full · medium · ctx 5% · 19.8k in / 0.9k out · 1% of today · awaiting approval
  1. Sandboxed by the OSSeatbelt on macOS. bubblewrap on Linux and WSL2.
  2. A judge for the routineDecision model based. Risky commands come to you.
  3. Steer instead of stoppingDeny a command with a note and the agent adjusts mid-turn.

Batteries included.

For those who just need to get stuff done.

Subagents

Parallel background helpers — even across different models and providers.

Side questions

Ask while a tool is still running.

Undo

Snapshots before every edit and shell command — even files git doesn't track.

Away mode

Walk away mid-task safely: /away refuses risky asks, blocks escapes, and trips a breaker.

Hooks

Sandboxed gates before tools, on prompts, or at turn-end until checks pass.

Tunable guardrails

Hidden files, protected paths, network allowlists, and judge rules in one config.toml.

MCP

Sandboxed local servers and remote HTTPS endpoints, allowlisted per tool.

Native scrollback

Real terminal output — no more broken scrollback, copy-paste, or tmux panes.

Any provider.

Bring your API keys, or sign in with your ChatGPT subscription.

  • Anthropic
  • OpenAI
  • Gemini
  • xAI
  • Z.ai
  • DeepSeek
  • Moonshot AI
  • Hugging Face
  • OpenRouter
  • Together
  • Amazon Bedrock
  • Ollama
  • LM Studio

ChatGPT subscription

Use your ChatGPT plan directly. No separate API billing.

/login openai

API keys

Anthropic, OpenAI, Gemini, Bedrock, and nine more.

ANTHROPIC_API_KEY=…

Local & custom

Ollama, LM Studio, or any OpenAI or Anthropic-compatible endpoint.

[providers.<name>]

No key? Use ours.

Hosted models, free for a limited time.

megahosted models

$0for now

A paid plan comes later.

/login

Sign in with Google.

mega:full
The main model.
mega:flash
Lighter. Runs the sub-agents.
Auto mode
The judge is included. No second key.
Daily allowance
Resets at 00:00 UTC.

How it works

Terminal, script, or SDK.

Four ways into one core.

Terminal

The interactive UI.

megacode run

One-shot

For scripts and CI.

megacode -p "fix the tests"

JSON stream

For your own UI.

megacode run --input-format stream-json

SDK

Build your own agent in Rust, Python or TypeScript.

pip install megacode-agent-sdk

Bring your setup over.

Move from Claude Code or Codex in one command. Your original setup stays untouched.

migrateclaude-code · codex
/migrate claude-code
/migrate codex

Pick what to copy from an interactive checklist. Re-run or undo anytime.

Your original files stay untouched.

Skills
Plain, account, and plugin skills.
Agents
Custom agents, with tools and model aliases translated.
Instructions
CLAUDE.md, AGENTS.md, and rules.
Isolated copy
Stored separately. Never reads settings, transcripts or keys.

Event-sourced architecture.

Every command, file edit, network call, and model request crosses one typed boundary into a single append-only log.

one event logcommands · files · net · models

One effect boundary

Commands, files, and network share one interface, so the sandbox can't be bypassed.

Single source of truth

Conversation, cost, judge calls, hooks, and MCP exchanges all project from one local log.

Crash-safe resume

Kill the terminal mid-command and resume knowing exactly what finished and what may have partly run.

FAQ.

What leaves my machine?

Prompts go to your model. In auto mode the judge sees each command and your messages since the last compaction, with secrets redacted. The harness checks for updates and, signed in, sends daily usage counts: never prompts, files or commands. The full list.

What happens when the free period ends?

A paid plan takes over the hosted models. Your own keys and ChatGPT subscription keep working.

Can I use my ChatGPT, Claude, or Gemini subscription?

ChatGPT subscriptions work directly — sign in from the harness. For Claude and Gemini, use an API key (including any monthly API credits from your plan).

Does auto mode need a second key?

Not if you sign in: the judge is included. On your own keys alone it needs a TypeSafe key.

Can I run it in a container or VM?

Yes. Say the machine is the sandbox: mode = "external" under [sandbox].

Does it run on Windows?

Yes, through WSL2.

Install it in one line.

curl -fsSL https://megacode-harness.vercel.app/install.sh | sh
megacode run
/login

Linux, macOS 15.4 or later, Windows through WSL2.