WayToClawEarn
High impactHacker News / GitHub

Dirac open source AI programming agent reaches the top of TerminalBench: API cost dropped by 65%, accuracy 100%

The open source AI programming agent Dirac topped the Terminal-Bench-2 score with 65.2%, using the Gemini-3-flash-preview model, and the API cost is 64.8% lower than similar tools. Innovative Agents built by former Meta engineers are redefining the economics of AI programming.

WayToClawEarn EditorialPublished Apr 28, 2026Updated Aug 8, 2026

Editorial review of public sources · AI-assisted drafting. How we work · Original source

Core conclusion

On April 27, 2026, the open source AI programming agent Dirac topped the Terminal-Bench-2 rankings with a score of 65.2%, using the Gemini-3-flash-preview model to surpass Google's official baseline (47.6%) and the top closed-source Agent Junie CLI (64.3%). Even more impressive, Dirac achieved an average API cost of just $0.18 across 8 complex refactoring tasks, 64.8% lower than similar tools, while maintaining 100% code accuracy on all tasks.

Key Points

  • Event Time: April 27, 2026 (HN homepage popularity 327 points)
  • Project address: github.com/dirac-run/dirac (open source, TypeScript)
  • Creative Team: SignalBloom AI, founder Max Trivedi (former Meta Infrastructure Engineer)
  • Core Highlights: Use Gemini-3-flash-preview to surpass all similar tools, and the API cost is only one-third of competing products
  • Technical breakthrough: Hash Anchored editing + AST native operation + multi-file batch processing

Background: Cost Dilemma of AI Programming Agents

With the popularity of AI programming agents (Coding Agents) such as Claude Code, Cursor, Cline, and OpenCode, developers face a real problem: The more powerful the Agent, the higher the cost of API calls.

A month ago (March 2026), we had an article reporting on how Hash Anchored technology can reduce AI code editing costs by 60%. Now, Dirac has taken this technology to the extreme - not only cost control, but also beating almost all similar tools in benchmark tests.

Terminal-Bench-2 is currently one of the most challenging AI programming benchmarks, focusing on evaluating the Agent's refactoring capabilities on complex, multi-file, real code warehouses. Different from the "bug fix" mode of SWE-bench, TerminalBench examines the Agent's actual engineering ability to make large-scale, cross-file code changes.

Dirac’s technological innovation: reducing token consumption from the root

The core insight of the Dirac team is that the model's inference capabilities degrade significantly as context length increases. If you can carefully manage context, you can simultaneously improve accuracy, reduce costs, and handle larger tasks.

TechnologyPrinciplesImpact on cost/accuracy
Hash Anchored EditingUse the stable hash value of the file content to locate the editing position, replacing the traditional line number positioningEliminate duplicate requests caused by "line number drift", with 100% accuracy
AST native operationBuilt-in programming language syntax understanding, supporting structural reconstructionComplex changes do not require multiple iterations and can be completed in one go
Multiple File Batch ProcessingProcess edits to dozens of files in a single LLM round tripReduce API roundtrips by 50-80%
Intelligent context filteringOnly read the code segments that LLM really needs and skip irrelevant partsThe context is shortened by 60% and the quality of reasoning is improved
MCP-free designPure tool calling, not dependent on MCP protocolReduce protocol overhead and latency

Measured cost comparison: average API cost per task

Agent ToolsAverage Cost/TaskGap with Dirac
Dirac$0.18
Cline$0.492.7 times higher
Roo$0.653.6 times higher
OpenCode$0.442.4x higher
Kilo$0.643.5x higher
OhMyPi$0.482.7 times higher
Pimono$0.402.2 times higher

Data source: Dirac official README evaluation of 8 real warehouse reconstruction tasks (using Gemini-3-flash-preview, thinking mode set to high)

Impact on AI automated workflows

The emergence of Dirac has three direct implications for content producers and AI automation practitioners:

1. API cost is no longer the bottleneck of Agent

In the past, "letting the AI Agent automatically change the code" was a luxury option - a large-scale refactoring could burn $0.5-$1.5 in API fees. Dirac reduces the average cost to $0.18, making automated code modifications as affordable as automated content publishing.

2. Gemini-3-flash-preview verified the "low-cost model + high-efficiency framework" path

Dirac uses Gemini-3-flash-preview - Google's fast inference model, rather than expensive flagship models (such as GPT-5, Claude Opus). This shows that: The efficiency of Agent does not lie in how big the model is, but in how to manage the context and tool calls of the model. This is excellent evidence of the "choose the right tool" concept emphasized in the n8n and Claude Code tutorials on this site.

3. The open source Agent ecosystem accelerates its maturity

Dirac gained 725 GitHub Stars, 187 commits, and was featured on the HN homepage in just 3 weeks of launch. As a completely open source project (TypeScript), its architectural methods can be learned and reproduced by any developer. This is highly consistent with our previous judgment that "open source will reshape the AI ​​tool ecosystem" mentioned in the AI ​​Agent tool tutorial.

Adaptation suggestions

  • If you are an AI automation workflow user: Include Dirac in your evaluation as a low-cost alternative to Claude Code, especially for automated pipelines that are sensitive to API budgets
  • If you are a content automation team: Pay attention to the combination of Gemini-3-flash-preview + efficient Agent, they are redefining "the economics of AI programming"
  • If you are a developer: Check out Dirac's GitHub repository to learn about the specific implementation of Hash Anchored editing and AST operations - these design ideas can be transplanted to any AI Agent project

Dirac

Related extended information

Tool entry (trigger tool floating card)

The core of Dirac's architecture relies on several basic models and tools: Gemini (Google), Claude Code (Anthropic), OpenAI, n8n, DeepSeek. Its name appears naturally in the text.

Internal link guidance

View source →

Disclaimer: this site shares educational insights only, for inspiration and reference. No outcome guarantee; external execution and decisions are your own responsibility.