chargehand
Runs coding-agent workers on a codebase question; every claim in the answer carries evidence.
Que pouvez-vous faire avec chargehand ?
- Answers with checked citations. A citation is a file and line range, a commit, a diff range, a session
- Splits a question into 2 to 4 read-only subtasks run as a task graph, when intake chooses it and the preset
- Presets set the tools, the token and dollar budgets and the allowed actions:
default,cheap,thorough, - Driven batches run a list of tasks as parallel Claude Code sessions, one locked-down container each, and end
- Plugs into your tools. An MCP server (stdio or HTTP), an HTTP API, a CLI, a Claude Code plugin
- Measures itself. The run log records tokens, cache hits, cost and the prompt chain of every call; Prompt CI
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
Chargehandclaude mcp add chargehand -e 'CHARGEHAND_RUNTIME=<CHARGEHAND_RUNTIME>' -e 'CHARGEHAND_PROFILE=<CHARGEHAND_PROFILE>' -e 'CLAUDE_CODE_OAUTH_TOKEN=<your claude_code_oauth_token>' -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- dnx Chargehand@0.19.3 --yes mcp
{
"mcpServers": {
"chargehand": {
"command": "dnx",
"args": [
"Chargehand@0.19.3",
"--yes",
"mcp"
],
"env": {
"CHARGEHAND_RUNTIME": "<CHARGEHAND_RUNTIME>",
"CHARGEHAND_PROFILE": "<CHARGEHAND_PROFILE>",
"CLAUDE_CODE_OAUTH_TOKEN": "<your claude_code_oauth_token>",
"ANTHROPIC_API_KEY": "<your anthropic_api_key>"
}
}
}
}
Variables d'environnement
CHARGEHAND_RUNTIMEWorker runtime, when both or neither of claude and opencode are on PATH.CHARGEHAND_PROFILEA profile/v1 file for budgets, prices, memory or a pinned runtime version.CLAUDE_CODE_OAUTH_TOKENsecret Claude Code subscription token from claude setup-token. Set this or ANTHROPIC_API_KEY.ANTHROPIC_API_KEYsecret Anthropic API key for Claude Code workers. Set this or CLAUDE_CODE_OAUTH_TOKEN.
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
chargehand
An orchestrator for coding agents (Claude Code, OpenCode): send a question or a change, get back typed JSON where every claim cites a file at a pinned commit.
Active. I work on it this month.
flowchart LR
caller[You or a program<br/>CLI · HTTP · MCP] -- request --> intake[Intake<br/>picks an action]
intake -- answer or split --> workers[Agent sessions<br/>Claude Code or OpenCode]
intake -- ask · deny · improve --> result
workers -- claims + citations --> resolver[Evidence resolver<br/>checks each citation]
resolver --> result[Typed result<br/>claims · open questions · cost]
workers -. code preset, driven batches .-> branch[Tested branch<br/>or draft pull request]
resolver --> log[(Run log<br/>tokens · cache · prompts)]
Why
Coding agents answer in prose. A program that calls one needs something it can check: claims tied to files at a commit, diffs, session messages or the caller's own inputs, plus a confidence and the exact prompts behind the answer. I also wanted the control flow (the task graph, budgets, retries, parallelism) in code rather than in a prompt, so each agent's context stays small, cached and disposable.
What it does
- Answers with checked citations. A citation is a file and line range, a commit, a diff range, a session message or an input id. Each one must exist at the pinned commit before a claim leaves its worker; the worker gets one repair turn, and claims that still fail move to open questions.
- Splits a question into 2 to 4 read-only subtasks run as a task graph, when intake chooses it and the preset allows it. Later subtasks reuse the first one's cached prompt prefix.
- Presets set the tools, the token and dollar budgets and the allowed actions:
default,cheap,thorough,strict,draft(for programs that bring their own facts),review, andcode, which writes a branch that passes its tests in a sandbox. - Driven batches run a list of tasks as parallel Claude Code sessions, one locked-down container each, and end each in a draft pull request.
- Plugs into your tools. An MCP server (stdio or HTTP), an HTTP API, a CLI, a Claude Code plugin
(
/chargehand:change: one prompt to a reviewed change on a local branch) and an operator console in the browser. - Measures itself. The run log records tokens, cache hits, cost and the prompt chain of every call; Prompt CI gates prompt and preset changes on paired evals before they merge.
Not here: an agent loop of its own, direct calls to model providers, a model gateway, a memory store (it uses yours over MCP), a hosted service. A citation that resolves points at something that exists; checking that the cited text supports the claim is planned, not built (roadmap).
[!WARNING] Before 1.0. The images have no
latesttag: pin an exact version and read the changelog before you upgrade.
Quick start
From a clone, ask one question about chargehand itself. Needs the .NET 10 SDK, git, and Claude Code 2.1.283 on
PATH, signed in (run claude once). With no profile, the workers use the CLI's own login and default model.
git clone https://github.com/Egoushka/chargehand.git && cd chargehand
cat > request.json <<EOF
{
"contract_version": "request/v1",
"text": "Where does a split node decide whether to fork the first node's session? Cite the code.",
"context": { "interactive": false, "preset": "default",
"repository": { "path": "$PWD", "commit": "$(git rev-parse HEAD)" } }
}
EOF
dotnet run --project src/Chargehand.Cli -- run < request.json
It prints result/v1 on stdout: claims with citations, open questions, a confidence and the cost. The
quickstart guide explains every field, OpenCode instead of Claude Code, and what to do
when a run fails.
To use it from an MCP client without a clone, run the package from nuget.org with dnx, pinned to a release:
claude mcp add chargehand -e CLAUDE_CODE_OAUTH_TOKEN=<token> -- dnx Chargehand@<version> --yes -- mcp
How it works
- Intake reads the request (
request/v1) and writes a Task Spec: one action,answer,split,ask,denyorimprove. The last three stop the run with questions, a reason or a better request. A preset can also stop a run for approval above a risk or cost estimate. - Workers are ordinary Claude Code or OpenCode sessions on a clone of the repository at the pinned commit, inside the directories the profile allows. chargehand never calls a model provider itself.
- The evidence resolver checks every citation against git, the session and the request. The invariant: no claim reaches the result unless its citations resolved.
- The result (
result/v1) carries the claims, the open questions, usage and the prompt chain. The same record goes to the run log, whichshow,cacheandroutesread.
Writing runs follow the same path with a sandboxed worker: the code preset verifies a branch with the repository's
tests, and driven batches add an egress allowlist, a runner that alone holds the Docker socket, and a check gate
before a pull request opens. ARCHITECTURE.md maps the code.
Numbers
| Value | Source | |
|---|---|---|
| Citations that resolved, read-only runs | 50 of 50 (phase 3), 99 of 99 (phase 4) | benchmarks |
| Cost of a split against one plain session | 1.53× ($0.00754 vs $0.00492 a run) for a blind score of 0.967 vs 0.950 | phase 4 |
| Deliberate prompt regressions Prompt CI blocked | 1 of 2, and only after the score added completeness | Prompt CI |
| Quality benchmark on public repositories | 13 tasks over 4 pinned repositories; no real run yet | benchmark |
| Users | 1, me | counted |
Lessons
- Parallelism did not pay on the questions I measured. Splits resolved every citation but cost half again as
much for a small score gain, so the shipped
default,reviewanddraftpresets allow no split (ADR 0017). - A score that measures what run-time checks already enforce catches nothing. The first Prompt CI score measured grounding, which the resolver already forces, so a prompt that dropped a third of the claims passed. The score now multiplies grounding by completeness (ADR 0019).
Docs
- Overview: what it is, how a run works, what it leaves out, status
- What it does, and how we know: each capability with its status and evidence
- Quickstart · Install with Docker Compose: from a clone, or from the release images
- Use it from an MCP client · Run the HTTP server · Web UI
- Writing a branch · Driven writing sessions · Several runners
- The change command: the Claude Code plugin
- Memory and services · Prompt CI · Benchmark
- Reference: commands, routes, presets, contracts, profile fields, environment variables
- Architecture · Decisions · Changelog · Roadmap
- Contributing · Security · Apache-2.0 license
Questions fréquentes
Qu'est-ce que chargehand ?
Runs coding-agent workers on a codebase question; every claim in the answer carries evidence.
Comment installer chargehand ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add chargehand -e 'CHARGEHAND_RUNTIME=<CHARGEHAND_RUNTIME>' -e 'CHARGEHAND_PROFILE=<CHARGEHAND_PROFILE>' -e 'CLAUDE_CODE_OAUTH_TOKEN=<your claude_code_oauth_token>' -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- dnx Chargehand@0.19.3 --yes mcp. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour chargehand ?
Oui. Il attend CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY, à renseigner dans sa configuration.
chargehand est-il open source ?
Oui. Son code est sur GitHub sous licence Apache-2.0.
Qui maintient chargehand ?
Il est publié par Egoushka. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.