Show HN: OSS Agent I built topped the TerminalBench on Gemini-3-flash-preview
TL;DR Highlight
An agent with hash-anchored edits and AST tools finished 8/8 refactors at $0.18 average cost.
Who Should Read
A backend developer building a coding-agent harness or trying to cut API costs.
Core Mechanics
- Same model, different harness
- The source ran 7 harnesses on 8 multi-file refactors, all with gemini-3-flash-preview at thinking high.
- Dirac completed 8/8 at the lowest average cost of $0.18.
- Others averaged $0.38 to $0.73
- Cline $0.49 (5/8), Kilo $0.73 (6/8), Ohmypi $0.51 (8/8), Opencode $0.44 (6/8), Pimono $0.38 (6/8), Roo $0.60 (8/8).
- In the source table, Dirac, Ohmypi and Roo scored 8/8.
- Hash anchors replace search-and-replace
- Lines get stable anchors, so the model replaces only an exact range.
- It works even when nearby lines move and reduces payloads, ambiguity and retries.
- AST avoids reading whole files
- inspect_ast returns outlines or one implementation with its references.
- edit_ast replaces a whole function or renames hundreds of references in one call.
- Batched operations and subagents
- Independent reads, searches and edits go in one response.
- Subagents run concurrently, and stale edits are rejected at write time.
- A cheaper Utility model for side work
- Compaction, handoffs, commit messages and permission decisions can go to a separate model.
- The source says this cut cost by more than 80% in its compaction case study.
Community Reactions
- Harness matters as much as the model, some said
- A comment noted the jump from Google's official 48% to 65%.
- Another asked whether a leaderboard compares harnesses on the same model.
- Generalization is unproven, one commenter argued
- They asked for benchmarks on another model family, since it might be overfit to Gemini 3 Flash.
- They also noted the landing page doesn't mention Gemini and no speed comparison is shown.
- Users reported good results with Kimi 2.6 on Rust
- One said it beat OpenCode, which trashed a .rs file and had to be reverted.
- Another found it more accurate but said a 429 from OpenRouter left the session stuck.
- Default-on telemetry was a dealbreaker for one commenter
- They saw events sent to dirac.run/v1/event, possibly including API errors.
- Being a sole-developer project added to the worry.
How to Apply
- Add a batching rule to your agent today
- Put a rule in your system prompt or AGENTS.md to batch independent reads and searches in one response.
- Run the same refactor before and after and compare call counts and token cost.
- Split side tasks onto a cheaper model
- Configure a separate model for compaction, commit messages and permission checks.
- Compare cost logs before and after.
- Make the agent read structure first
- Configure tools so large files are outlined first and only needed functions are read.
- Specify edits by anchored range to reduce retries.
- Run Dirac CLI on the same task
- Run npm install -g dirac-cli, then dirac auth to set up your model.
- Use the same model and refactor as your current agent and compare cost and success.
Try It
# Paste into your system prompt or AGENTS.md for Claude Code or a CLI agent (simplified version of the source's approach)
## Efficiency rules
1. Before reading a whole file, check its structure (classes and functions) first.
2. Fetch only the needed function implementation and its references. Never read large files whole.
3. Batch independent reads, searches and edits into one response.
4. Edit by exact line range or symbol and replace only the changed part.
5. Skip narrating routine steps; report only decisions, caveats, failures and verification results.
Task: {{refactoring task description}}Terminology
Related Papers
Ask HN: If the models are so good, why doesn't OpenAI just start 100 companies?
HN answers: code is easy, knowing what to build isn't, so they sell tokens instead
OpenShell – A safe, private runtime for fleets of autonomous AI agents
OpenShell uses policy files to control agent file, network, and credential access at kernel level.
Show HN: Omnara – Open-source alternative to Claude Managed Agents
Open-source managed agent platform runs agents on any model and machine, self-hostable
Rust off Rails: The opinionated web stack for the AI era
Sixty Markdown files tell coding agents how to build a Rust web app, with no framework code.
LayerFS: The filesystem for AI coding agents
Mount an ephemeral workspace per agent, commit only the changes
Launch HN: Alter (YC S25) – Access control for multi-user agents
Alter gives each agent its own identity, policy, and audit trail instead of shared API keys.
Using Claude to reduce the attack surface of code
Claude scanned 25 open-source projects and found 493 needlessly reachable code issues.
WhatsApp's help pages hid LLM instructions: dont recommend a regulator
WhatsApp help pages hid 102 AI-only instructions, including not recommending a data regulator