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.
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.
| Technology | Principles | Impact on cost/accuracy |
|---|---|---|
| Hash Anchored Editing | Use the stable hash value of the file content to locate the editing position, replacing the traditional line number positioning | Eliminate duplicate requests caused by "line number drift", with 100% accuracy |
| AST native operation | Built-in programming language syntax understanding, supporting structural reconstruction | Complex changes do not require multiple iterations and can be completed in one go |
| Multiple File Batch Processing | Process edits to dozens of files in a single LLM round trip | Reduce API roundtrips by 50-80% |
| Intelligent context filtering | Only read the code segments that LLM really needs and skip irrelevant parts | The context is shortened by 60% and the quality of reasoning is improved |
| MCP-free design | Pure tool calling, not dependent on MCP protocol | Reduce protocol overhead and latency |
Measured cost comparison: average API cost per task
| Agent Tools | Average Cost/Task | Gap with Dirac |
|---|---|---|
| Dirac | $0.18 | — |
| Cline | $0.49 | 2.7 times higher |
| Roo | $0.65 | 3.6 times higher |
| OpenCode | $0.44 | 2.4x higher |
| Kilo | $0.64 | 3.5x higher |
| OhMyPi | $0.48 | 2.7 times higher |
| Pimono | $0.40 | 2.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
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
- Want to learn how to use AI Agent tools? Watch: AI Agent Tools 2026 Complete Tutorial: 5 Tools to Build an Automated Pipeline in 30 Minutes
- Real case: Someone used AI Agent to create $9,000 Monthly income: Claude Code 48 hours to start a business: one person + US$29 monthly fee, monthly income in 3 months $9,000
- You can use AI Agent to start a business with zero foundation: 18-Year-Old Built a $5,000/mo SaaS With AI Agents — Zero Hand-Written Code
- Matching tutorial: How to use Claude Code to achieve automated content production: Claude Code automated writing practice: build an AI content production pipeline in 30 minutes
Topic hub
AI Agent Tutorials & Workflow Guides
Evergreen how-tos for coding agents, content pipelines, and n8n automation—linked to news context and real earn cases.
Explore AI Agent Tutorials & Workflow Guides →Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
DeepSeek + Claude Code Micro SaaS
Run multiple small products on cheap inference
Claude Code bug bounty
Productize agent skills into security services