What is uncut?
UNCUT is a headless coding-agent harness for developers who want to run an AI coding agent from a terminal, shell pipeline, CI job, or container. It sends prompts to OpenAI-compatible Chat Completions endpoints, including local servers, and gives the model tools to read and edit files and run commands. The MIT-licensed project is distributed as a small static binary for Linux, macOS, and Windows, with stdin/stdout as its interface.
uncut Features:
Lossless Context: UNCUT sends the full conversation on each model call and does not truncate valid UTF-8 prompts, file contents, stored messages, or combined command output.
Workspace Tools: The agent can read whole text files, write complete file contents, replace one exact text occurrence, and run shell commands that return their exit code and combined output.
Pipeline Input: Text piped to UNCUT is added verbatim to the prompt, with invalid UTF-8 rejected rather than silently converted.
Resumable Sessions: An optional append-only JSONL file stores the conversation and tool results, allowing a later run to resume the complete history.
Structured Events: The JSON mode emits newline-delimited records for user, assistant, tool, and completion or error events, including full tool calls and results.
Provider Truncation: If a provider reports that it cut a response at its output limit, UNCUT exits with an error instead of treating the partial answer as successful.
uncut Benefits:
Visible Failures: An explicit error on provider truncation helps prevent incomplete model output from being mistaken for a finished coding task.
Reviewable History: Keeping messages and tool results in a session file makes it possible to inspect what the agent saw and did before continuing.
Pipeline Fit: Plain stdin and stdout let teams place coding tasks in existing command-line workflows without relying on a graphical interface.
Controlled Setup: Using a configured compatible endpoint lets developers choose between a hosted provider and a local server for their agent runs.
Use Cases:
Repository Fixes: Ask the agent to inspect a code repository, run its tests, and edit files to address a failure.
Diff Review: Pipe a Git diff into UNCUT and ask for a review without granting the task permission to edit files.
Log Diagnosis: Send a failing test log through stdin and ask the agent to identify a likely cause.
Continued Refactors: Save a refactoring session, then resume it in a later command to continue with follow-up work such as running tests.

