frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

I have an interesting idea to reduce the output tokens almost by fifty percent

2•Brajesh2022k•1h ago
Most token-saving tools focus on input tokens, but output tokens are usually priced higher, and edit-heavy agent sessions waste a lot of them on a specific pattern: to safely edit a file, the agent has to output the old code block plus the new code block, just so the harness can match and swap it in. That's safe (content-based matching means line drift doesn't cause a bad edit), but it means half the tokens going out are just the agent restating content it already read.

Plain line-range edits ("replace lines 50-60") avoid the resend but aren't safe, the moment any prior edit shifts the file, the range is stale and the agent edits the wrong lines.

My proposed fix keeps content-based safety without the resend:

1. On file read, return numbered lines + a blob id for that exact snapshot. 2. On edit, the agent sends only the blob id, a line range from that snapshot, and the new content. No old code required. 3. The system finds that range in the stored blob (not the live file), applies the change there, and three-way merges it into the current file (git's merge machinery handles this well).

Since the anchor is an immutable snapshot rather than the live file, the agent is replaying a known edit against a known point-in-time, and letting the merge reconcile it with whatever the file looks like now. Net effect: only new content is emitted as output tokens, instead of new + old.

Caveat: I built a CLI proof of concept, and it works on small files, but now I found most agent harnesses truncate bash tool output around 16KB, so round-tripping file reads through a bash channel breaks down on anything bigger. That's a limitation of doing this externally, implemented natively inside a harness (where reads/edits don't have to go through a size-capped channel), it shouldn't apply.

Repo (mechanics reference, not production-ready): https://github.com/Brajesh2022/VCS-edit-tools

My attempt to fix it failed because of the truncation limitations. I hope any harness builder who sees this post will apply it to a harness.

Every night trillions of tiny creatures rise from the ocean depths

https://www.bbc.com/future/article/20260706-the-deep-sea-creatures-that-rise-every-night
1•saikatsg•34s ago•0 comments

A new runtime for k and q: l

https://lv1.sh/
1•skruger•1m ago•0 comments

The MFA Rollout Disaster

https://stuartdotson.substack.com/p/the-wetness-humaning-multiplier
1•sdotson•1m ago•0 comments

Tech jobs market in 2026, part 3: hiring managers and job seekers

https://newsletter.pragmaticengineer.com/p/tech-jobs-market-in-2026-part-3-hiring
2•nedruod•3m ago•0 comments

Real-time sync for plaintext files

https://www.opbox.dev/
1•shikhar•5m ago•0 comments

Who's doing what on AI security in the US government?

https://horizonlaunchpad.substack.com/p/whos-doing-what-on-ai-security
1•paulpauper•6m ago•0 comments

Why the West stopped making land

https://worksinprogress.co/issue/why-the-west-stopped-making-land/
1•paulpauper•7m ago•0 comments

Tell HN: Fable 5 promotion extended through July 12, 2026 at 11:59:59 PM PT

5•theanonymousone•7m ago•0 comments

Wiesbaden Notes

https://marginalrevolution.com/marginalrevolution/2026/07/wiesbaden-notes.html
1•paulpauper•7m ago•0 comments

Visual Studio Code Learn

https://code.visualstudio.com/learn
1•saikatsg•9m ago•0 comments

Show HN: An agentic CRM, built for AI agents to drive over plain HTTP

https://github.com/crmkit/crmkit
1•_pdp_•9m ago•0 comments

We will happily disempower ourselves: Go edition

https://blog.jcx.au/posts/we-will-happily-disempower-ourselves-go-edition
1•speckx•9m ago•0 comments

How to widen access to the critical minerals that the world needs

https://www.nature.com/articles/d41586-026-02100-8
1•Bender•10m ago•0 comments

Half-Naked Guy

https://www.halopedia.org/Half-naked_guy
1•joebig•11m ago•0 comments

A Great University Undermines Its Mission – Bring Back the SAT, California

https://www.nytimes.com/2026/07/06/opinion/university-california-sat-testing-admissions.html
1•ChrisArchitect•12m ago•1 comments

Longing for a Crash

https://masoncurrey.substack.com/p/kazuo-ishiguro-the-crash
2•herbertl•12m ago•0 comments

Dedicated Infrastructure vs. Cloud Cost at Scale

https://www.hostdime.com/blog/dedicated-infrastructure-vs-cloud-cost/
1•bhartzer•14m ago•0 comments

AF_ALG "Nightmare" Being Further Limited In Linux 7.3 With New Sysctl Knob

https://www.phoronix.com/news/AF-ALG-Restrict-Sysctl-Linux
1•Bender•17m ago•0 comments

Show HN: YOLO mode, not on your laptop

http://docs.voids.run/blog/yolo-mode-not-on-your-laptop/
1•zhshhan•19m ago•0 comments

Anthropic is launching Claude Cowork on mobile and web

https://www.theverge.com/ai-artificial-intelligence/961978/anthropic-claude-cowork-mobile-web
3•ilreb•19m ago•0 comments

General Radio Company

https://mitmuseum.mit.edu/collections/organization/3901
1•stmw•20m ago•1 comments

The Bessent Doctrine (Essay by Mohammed El-Erian)

https://www.nytimes.com/2026/07/07/opinion/scott-bessent-trade-economy.html
1•cs702•20m ago•0 comments

The Many Casualties of Precision Warfare

https://jacobin.com/2026/05/iraq-precision-weapons-civilians-responsibility
1•speckx•21m ago•0 comments

The Software Engineering War

https://www.manager.dev/newsletter/the-software-engineering-war
1•pmg101•21m ago•0 comments

America's missing middle: The shrinking 45-64 population

https://www.axios.com/2026/07/07/gen-x-population-shrinking-taxes-economy
2•toomuchtodo•23m ago•1 comments

Show HN: I Recreated Digg Labs

https://www.topaztee.com/digglabs/
1•topaztee•23m ago•0 comments

Enabling non-devs to contribute code at Slack

https://www.aviator.co/podcast/devex-slack-frances-coronel
1•tonkkatonka•23m ago•0 comments

"We're extending access to Claude Fable 5 on all paid plans through July 12."

https://twitter.com/claudeai/status/2074548242386178258
10•minimaxir•24m ago•2 comments

Run Multiple Claude Accounts Side by Side on macOS

https://old.reddit.com/r/ClaudeAI/comments/1uq27do/run_multiple_claude_accounts_side_by_side_on_m...
1•IGHOR•25m ago•0 comments

Your family's $300 stake in OpenAI

https://www.technologyreview.com/2026/07/06/1140176/your-familys-300-stake-in-openai/
2•Brajeshwar•27m ago•0 comments