# UNCUT

> A lossless, headless coding agent harness distributed as a single static Go binary with four tools and plain stdin/stdout.

UNCUT is an open-source, MIT-licensed coding-agent harness written in Go by Anton Balanov. It runs as a single static binary for shell pipelines, CI jobs, containers, and agent experiments, with no TUI, telemetry, plugin system, background agents, automatic retries, or context compaction. The latest listed release is v0.1.1.

## What It Is

UNCUT is a command-line agent harness that connects a language model to a workspace through four tools. You give it a prompt (optionally with piped input such as a git diff or a test log), and it runs an agent loop against an OpenAI-compatible Chat Completions endpoint, including local servers such as Ollama. Final text goes to stdout, and structured NDJSON events are available with `--json`.

## How the lossless contract works

The whole conversation is sent on every model call. UNCUT does not truncate, summarize, or rewrite valid UTF-8 prompts, stored messages, file contents, or command output. If the provider cuts a response at its output limit, UNCUT exits with an error instead of presenting a partial answer as success. Binary files and invalid UTF-8 are rejected explicitly. It does not extend a model's context window and cannot control provider-side processing. The repository includes a proof script and recorded benchmarks, which the README describes as transport tests rather than model-quality benchmarks.

## Tools, sessions, and configuration

The four tools are `read_file`, `write_file`, `replace` (exactly one match required), and `run_command`, which returns the exit code and complete combined output. File paths must stay inside the workspace. Optional append-only JSONL sessions can be created or resumed with `--session`. Configuration uses environment variables (`UNCUT_MODEL`, `UNCUT_BASE_URL`, `UNCUT_API_KEY`) and flags such as `--cwd`, `--max-steps`, `--max-tokens`, `--request-timeout`, and `--no-agents`. A workspace `AGENTS.md` is read in full into the system prompt. Distinct exit codes cover errors, invalid usage, provider truncation, and the step limit.

## Safety notes

The README states that UNCUT is not a sandbox: the model can run shell commands with your user's permissions, so untrusted tasks should run in a disposable container or isolated environment. Session files can contain source code and secrets. The binaries are not code-signed yet, and each release includes a checksums file.

## Features
- Single statically linked Go binary with no runtime or third-party Go dependencies
- Four tools: read_file, write_file, replace, run_command
- Lossless handling of prompts, file contents, and command output
- Errors out when the provider truncates output instead of returning a partial answer
- Headless stdout output with optional NDJSON events via --json
- Append-only JSONL sessions that can be resumed
- Reads workspace AGENTS.md into the system prompt
- Works with OpenAI-compatible endpoints and local servers such as Ollama
- Unix pipeline input appended to the prompt verbatim
- Reproducible proof script and recorded benchmarks
- Linux, macOS, and Windows builds for amd64 and arm64

## Integrations
OpenAI-compatible Chat Completions APIs, Ollama, OpenRouter

## Platforms
WINDOWS, MACOS, LINUX, API, CLI

## Pricing
Open Source

## Version
0.1.1

## Links
- Website: https://balanov.pro/uncut/
- Documentation: https://github.com/Balanov/uncut#readme
- Repository: https://github.com/Balanov/uncut
- EveryDev.ai: https://www.everydev.ai/tools/uncut
