A coding agent that finishes the task and shows its work.

Context indexes your repository, reads the current source before every edit, runs your project’s own tests and tells you exactly what it changed. Local-first, with any OpenAI-compatible model.

v0.1.1 · Free and open source · macOS, Windows and the terminal

The Context app for macOS

Context for macOS · v0.1.1

Point it at any OpenAI-compatible endpoint

  • OpenAI
  • ModelGateway
  • OpenRouter
  • Ollama
  • vLLM
  • LM Studio
  • llama.cpp

Features

Give your agent the context it was missing

  • Starts from the right code

    A Tree-sitter index, lexical search, a symbol graph, embeddings and memory are fused for every request and checked against the working tree, so each task starts from the files that matter.

  • Patches that never overwrite yours

    Every patch carries the hash of the text it was written against and is refused if the file changed underneath. Each file touched and command run is recorded.

  • Any model, checked first

    Point it at OpenAI, a gateway, a self-hosted server or a local runtime. ctx doctor --probe checks what the endpoint really supports, and Context relies only on that.

Everything an agent needs to finish the job.

Plan, edit, validate and recover in one tool loop, then review the result in a native app built for it.

Sub-agents that work in parallel

At the Ultra effort tier Context deploys bounded sub-agents — read-only explorers or full implementers under the same permissions — that work side by side and report back.

Review every change before it lands

See every diff the agent made in one place. Stage, commit, branch or open a pull request without leaving the app.

Context is assembled, not accumulated

Stable policy and tool schemas come first so provider caches hit; old turns are compacted into checkpoints. ctx context explain shows what the model saw and why.

Permissions you can read

Three permission profiles, a command classifier that looks through pipes and wrappers, path policy with symlink checks, and credential redaction everywhere.

At home in the terminal

The same runtime runs as a full-screen terminal UI and as headless ctx run with stable exit codes for CI. Sessions and memories follow you between the app and the terminal.

How it works

How a task runs

Every message goes through the same loop: find the work, gather the code, act through checked tools, validate the result, and remember it for next time.

Fig. 1The task loop

  1. 01crates/agent

    Match the task

    The message is matched against active and recent tasks: continue, refine, start new, refer to earlier work or reverse it.

  2. 02crates/retrieval

    Retrieve what matters

    Path, lexical, symbol, semantic and memory strategies run in parallel, are fused by reciprocal rank, expanded along imports and tests, and re-verified against the working tree.

  3. 03crates/context

    Compile the context

    Stable policy and tool schemas first, then the repository summary, the untrusted repository payload inside explicit delimiters, the retained conversation and the request.

  4. 04crates/tools

    Act through tools

    read_file, search_code, find_symbol, apply_patch, execute_command, run_validation and MCP tools. Every call is schema-checked, permission-gated and recorded.

  5. 05crates/agent

    Validate and recover

    Changes are checked with the project’s own validation commands. A failure starts a bounded recovery cycle with fresh retrieval, and the report never claims a test that no tool observed.

  6. 06crates/memory

    Remember the work

    Task state, checkpoints, the event log and episodic memory are saved, so later messages and later sessions build on the work instead of replaying it.

Fig. 2At a glance

  • 10

    languages indexed with Tree-sitter

  • 5

    retrieval strategies fused per request

  • 3

    permission profiles, from ask to bypass

  • 1

    data directory shared by the app, TUI and CLI

Download

Works where you work

One Rust runtime behind a native Mac app, a Windows app and a terminal UI. Sessions, tasks, the index and memories follow you between them.

v0.1.1 · All releases
  • macOS app

    macOS 26 Tahoe or later · Apple silicon

    • Signed and notarized, with ctx built in
    • Updates itself in the background
    • Chat, inspector, Changes and editor
  • Windows app

    Windows 10 or 11 · x64 .exe or .msi

    • Bundles ctx.exe, runs without WSL
    • CLI in PowerShell or Git Bash, too
    • Git for Windows recommended
  • Terminal UI and CLI

    Builds from source · stable Rust 1.85+

    • Headless ctx run with stable exit codes
    • Shares ~/.context-agent with the apps
    • Slash commands, @ mentions, approvals

Quick start

ctx init# writes ~/.context-agent/config.toml
ctx doctor --probe# checks what your endpoint supports
ctx run "Add a loading indicator to the login button"# in your repo: one task, end to end

Set your endpoint and key in config.toml, or export OPENAI_API_KEY, before probing.CLI reference

Pricing

Free and open source. Bring your own key.

Context itself is free. You pay your model provider directly, or sign in to ModelGateway from the app for one account across many models.

Open source

No account needed

$0forever

Apache-2.0 or MIT, at your option.

  • Any OpenAI-compatible endpoint
  • macOS app, Windows app, terminal UI and CLI
  • Index, history and memory stay on your machine
  • MCP apps from a catalog or your own
  • Spending limits and per-model pricing in Settings

With ModelGateway

$10 credit

Pay as you go

Optional. One sign-in for many models, with usage and billing in the app.

  • Sign in from the app, no key to paste
  • Balance and usage by project in the app
  • A one-time $10 Context credit after your first deposit
  • Switch back to your own key any time
Visit ModelGatewayor sign in from the app

The $10 Context credit can be claimed once per ModelGateway account after a completed card or crypto deposit, and only Context’s own requests can spend it.

FAQ

Questions, answered

Something missing? Open an issue on GitHub.

Does my code leave my machine?

The index, history, memories and checkpoints live in ~/.context-agent on your machine, shared by the app, the terminal UI and ctx run.

The model endpoint you configure receives the prompts Context assembles for each request: the code the task needs, with credential files kept out and credential patterns redacted. ctx context explain shows exactly what the model saw and why, and with a local runtime those prompts never leave your machine. If the agent searches the web, only the query goes to a search provider, after credential redaction and, under the default Ask profile, your approval.

Which models can I use?

Any OpenAI-compatible endpoint: OpenAI, a gateway such as ModelGateway, a self-hosted server or a local runtime. ctx doctor --probe checks what the endpoint actually supports (tool calling, streaming, usage reporting and parallel calls), and Context only relies on what the probe verified.

Is it safe to let it run commands?

You decide how much it may do without asking. There are three permission profiles:

  • Ask (default)Prompts for every edit and for any command that is not read-only.
  • AutoEdits and build or test commands inside the workspace run freely; network, destructive and unrecognised commands still prompt.
  • BypassNever prompts. You pick it explicitly; cycling modes never lands on it.

A conservative classifier looks through pipes, wrappers and command substitutions to decide what needs approval. Under every profile, denied commands are refused, and file tools follow symlinks and refuse credential files and paths outside the workspace. There is no OS-level sandbox, so pick the profile that matches how far you trust the task.

Which platforms does it run on?
  • macOSmacOS 26 Tahoe or later on Apple silicon. A signed, notarized native app with ctx bundled.
  • WindowsWindows 10 (1809 or later) or 11. The x64 installer bundles ctx.exe and runs natively, without WSL; Git for Windows is recommended.
  • TerminalBoth apps bundle ctx; to use the CLI and terminal UI on their own, build from source with stable Rust 1.85 or later.
How does it stay up to date?

The Mac app checks for a new release once a day, downloads it in the background and installs it, ctx included, the next time you quit. Check for Updates… in the Context menu checks right away, and Settings → General → Updates turns the automatic parts off.

Can I run it in CI?

Yes. ctx run works headless: JSON mode prints events on stderr and the outcome on stdout.

$ ctx run --json --approval auto --timeout 600 \
    "Fix the failing tests"

The exit codes are stable:

0
completed
10
blocked
1
failed
130
cancelled
2
configuration error
3
permission denied
4
provider error
5
timeout
What does it cost?

Nothing. Context is free and open source, licensed under Apache-2.0 or MIT at your option. You pay your model provider for what you use, or nothing at all with a local runtime. Signing in with ModelGateway from the app is optional and puts usage and billing in one place; after a first deposit, an account can claim a one-time $10 Context credit.

Get started

Give it a real task.

Download Context, point it at your repository and describe the change. It will tell you what it did — and what it couldn’t verify.

Also for Windows x64 and the terminal · v0.1.1