minihax

Open source · Built for learning

minihax

See how an AI coding harness works.

A small, inspectable agent loop with a Windows interface.
Follow the conversation. Watch the tools. Understand the machinery.

C# / .NET · Windows · MIT licence · Inspired by hax

minihax / inside the agent loopconversation · execution · context
The minihax Windows application showing its conversation, agent-loop log and model context.

The running program, with the conversation and the machinery behind it in view.

> The loop, made visible

Follow each request to the model, the tools it asks to use, and the results sent back. Watch an agent work one step at a time.

> Inspect the context

See the conversation the model receives, coloured by its source. Open the underlying JSON to understand exactly what crosses the boundary.

> Tools you can understand

A small set of read-only file tools lets the model explore a project. Each tool call and its result become part of the conversation.

> Memory between conversations

Explore how project memories are saved and recalled, and how a harness brings that knowledge into a later conversation.

> External tools through MCP

Connect an MCP server and offer its tools to the model alongside the built-in tools. See where the protocol fits into the same agent loop.

> Small enough to study

Read the C# source, set a breakpoint, and step through the loop in VS Code. Experiment with models, reasoning settings and token usage.

The idea behind minihax

The model decides.
The harness runs the loop.

A coding agent can look mysterious from the outside. minihax opens it up: the model receives context and tool definitions; the harness executes requested tools and returns their results.

Built for developers, students and curious people who want to understand agentic software development from the inside.

sendconversation + available tools
receivemodel response + tool requests
runrequested tools
appendresults to the conversation
repeatuntil the model answers

$ Get started

Build it, open a project, and ask a question. Then follow what happens behind the answer.

You’ll need Windows 10 or 11, .NET 10, Git, WebView2 and the ChatGPT Windows app signed in to your account.

Read the step-by-step setup guide

An educational program, deliberately kept small. Not intended for production use.

git clone https://github.com/Modsoftman/minihax.git
cd minihax
dotnet build
dotnet run --project src/minihax.GUI

PowerShell · after installing the prerequisites

> Take a closer look

Watch a guided tour of minihax and the ideas behind a coding harness. Then explore the source and try your own experiments.

Explore the architecture
Experiment with reasoning

Created by Dave Penny. Inspired by hax, the minimalist C coding agent by Oleksandr Chekhovskyi.

GitHub · MIT licence