Who it is forA developer whose long-running terminal agent runs keep stopping partway, with truncated output, stalls, or timeouts.
The problemLong runs fail in several ways at once, and it is hard to tell whether the cause is the context, the output limit, or the runtime.
The outcomeA short diagnosis of each failed run that maps it to context compaction, truncated output, or runtime idle time, with the matching fix from the agent layer.
What you need first
- uv installed, since the benchmark is set up with `uv sync`
- harbor installed, since the benchmark runs through `harbor run`
- Access to the terminal-bench/terminal-bench-2-1 dataset
- A model endpoint you can reach through the `openai/` model prefix used in the README command
Steps
- Read the 'What changed from pi' section of the README to list the four areas: context engine, agent loop, runtime, and tools.
- Run the failed task through the benchmark with
harbor run --dataset terminal-bench/terminal-bench-2-1 --agent crux.pi_agent:CruxPiAgent --model openai/<your-model>. (inferred, check the README) - Check the harness trial outcome for each run and sort failures into compaction failures, truncated outputs, or idle time in timed-out runs.
- Compare the failing pattern with the matching fix in the agent layer, such as the stream idle watchdog or the two-phase recovery from truncated output. (inferred, check the README)
Prompt for your agent
Use the alanhuangyoo/crux repository. Read the 'What changed from pi' section of its README, then run the failing <task> from Terminal-Bench 2.1 through harbor with crux.pi_agent:CruxPiAgent. Report which failure class the trial outcome falls into (compaction, truncated output, or idle time) and name the matching agent-layer feature, then verify the classification against the trial output.
Caveat. The README reports improvements in these failure rates as measured by the author, and it does not describe how to tune each feature for a different model or setup.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for alanhuangyoo/crux and "Find why long agent runs stall, truncate, or time out"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer