Stanford researchers did it again.
They just built the agent-native version of Git.
When an agent works on a longer task, the run builds up a lot of state.
This includes files edited/created, a dev server, a database, installed packages, KV cache, etc.
Say the agent is at step 10 and makes a mistake, maybe it misreads a traceback and rewrites a file that was actually fine.
The tests start failing, and the run goes off track, although everything through step eight was correct.
By default, the agent just tries to fix it, which creates more edits and tool calls. This burns more tokens and grows the context.
The other options are a person stepping in to redirect it or restarting the whole run from step one.
That's wasteful, because it pays for every model/tool call again and re-prefills the context. Moreover, since an agent's run is non-deterministic, it doesn't reproduce the same early steps anyway.
The reason it's hard to just jump back exactly to a previous correct step and resume from there is that the trajectory is only a message log.
It records what the agent said and which tools it called, but not the live state underneath.
That state includes things like memory, open file handles, child processes, installed packages, /tmp, and KV cache. None of that is in the log.
Git can version the files, but it doesn't snapshot the running process or the KV cache. Checking out step eight moves the files back, but the process is still sitting in step-ten memory with a cold cache.
Shepherd is a runtime layer by Stanford that records the run as a trace of typed events rather than a flat log.
Each agent-environment interaction becomes a commit, similar to Git, but it tracks the live run.
Its commit includes the agent process and the filesystem together, copy-on-write, so a branch carries the actual state and not just the files.
Going back to a previous step is then a single call that forks from that commit and continues from the exact state.
The copy-on-write fork is roughly five times faster than docker commit, and because the prompt prefix through step eight is unchanged, the KV cache is reused over 95% on replay, so early steps aren't reprocessed again.
Once the run can be forked, a meta-agent can sit on top and operate it. It watches the trace and reverts as soon as it looks wrong, before the bad write is committed.
In practice, it's just Python calling fork, replay, and revert on the trace, rather than a separate control plane wired into the harness.
Not everything is reversible though.
Files and sandbox changes undo themselves, but a database write has no automatic undo, so it needs a matching undo step set up in advance.
Something external, like a sent email or a real charge, can't be undone, so the supervisor's job there is to catch it before it fires.
They tested this on a few public benchmarks. On CooperBench, where two agents work on the same codebase, adding a live supervisor took the pair-coding pass rate from 28.8% to 54.7%.
It's still early and labeled alpha. The benefit mostly shows up when a run gets branched a lot over a heavy sandbox state, which is exactly where restarting wastes the most tokens and time.
If Git was made to make file changes reversible, Shepherd is trying to do the same thing for a live agent run.
Shepherd Repo: https://t.co/5e8W5oxY6F
(don't forget to star it ⭐ )
That said, Shepherd reverts a bad step inside a run. The harness around it, the prompts, tools, and checks the supervisor relies on, still drifts across runs as models and dependencies change.
Akshay wrote about making that harness repair itself, where a failing trace gets diagnosed, the fix is verified against the exact input that failed, and the failure is locked as a regression test so it can't recur.
Read it below.
Anthropic Engineer Andrej Karpathy:
"The biggest mistake in AI right now - people are forcing agents to work instead of mastering the model first
We made that mistake in 2016 at OpenAI - It cost us 5 years "
what Karpathy actually means:
step 1 → stop forcing your agent to do everything, understand the model underneath first
step 2 → demos are easy - products take a decade. self-driving proved it - if you skip the foundation, everything breaks
step 3 → the agent is not the product. the foundation is. build that - and agents emerge on their own
"you building agents right now - you're at the forefront. not OpenAI. not DeepMind. you "
watch - bookmark, then read article below ↓
Hot take: I think it's still important to understand the code that our agents write!
In this mega thread (based on my AIE talk today), I will explain why that's the case, and show some ideas for how to efficiently understand code. Alright, let's dive in. 1/
Excited to introduce Computer Use support for Gemini 3.5 Flash!🔥
This enables Gemini to reason and act across platforms (browser, mobile, and desktop environments)
We see significant improvements across many work-related automation tasks, from filing tickets and more. Enjoy!
How to keep AI spend flat while token usage grows exponentially: Not with friction and spend alerts. With better defaults, routing, and caching.
Better Defaults (not Usage Caps) – Engineers can choose any model they want, but defaults matter. We’re experimenting with defaulting to open weight models like GLM 5.2 and Kimi 2.7 through our LLM gateway, while still encouraging engineers to choose the right model for the task. 91% of our employees were never hitting their usage caps, so instead of lowering caps and driving up alerts, we're moving to cheaper defaults. Note that code reviews use a diversity of models, so they can check each other's work.
Better Routing – In our custom harnesses, we preprocess prompts and route to the best model for the job, considering cache hits and model pricing. For instance, you may want a frontier model for planning, but not for execution where they can be overkill. Ultimately, humans shouldn't be choosing models - AI can automate this task.
Better Caching – Cache misses are the easiest way to drive your cost up. All of our requests are cache aware, so we’re reusing a warm cache wherever possible. For example, our cache hit rate went from 5% → 60% in LibreChat once properly implemented.
Keep Context Lean – Start fresh sessions when switching tasks. Scope file context narrowly. Disconnect unused tools. Don't just compact. The goal isn't fewer tokens used, it's fewer tokens wasted.
Better Visibility – Our engineers can use as many tokens as they want, from whatever model they want, but we’ve made usage visible – and the more you spend on AI, the more impact we expect.
The goal isn't to suppress usage. It's to build the infrastructure that makes exponential growth sustainable.
Putting this into practice has cut our AI spend nearly in half, while our token usage continues to grow.
Today we're releasing a new set of components for building chat interfaces.
We've taken the patterns we build every day, rethought the abstractions behind them, and turned them into components you can compose and customize.
We're starting with the conversation layer: streaming, scrolling, messages, bubbles, attachments, and markers.
MASSIVE Hermes Agent update over the last few days
Totally changes the way I use Hermes
Here's 8 new features you need to start using immediately:
1. Native iMessage support: This is by far the easiest way to message Hermes on the go. Totally free to set up. I now use iMessage for quick prompts on the go, Hermes Desktop at home
2. Background agents: Background agents are now on by default. Now you can give Hermes complex prompts and by default Hermes will spin up subagents and put them in the background. Instead of waiting a long time to follow up with your agent while it works, you can immediately message it while background agents work quietly
3. Updated Desktop App: Bunch of new quality of life features in the desktop app including:
• pop out chats in their own window
• model selector now at bottom
• live subagents pane
• built in terminal
4. Profile builder in the browser: profiles in Hermes are basically new Hermes agents that work side by side. You should have at least 2 profiles set up so if one goes down, the other can fix it. Never been easier to set up new profiles, type hermes dashboard in your terminal and go to profiles
5. Skills Hub: There's now a skills hub in Hermes dashboard as well. Makes it really easy to browse and install new and popular skills
6. Smarter memory edits: your agent will now self improve way more and with better improvements too. Your agent will constantly write and update new skills as you work
7. Unreal Engine 5.8 MCP: For the first time you can now use AI to build video games in the most popular and powerful engine on Earth: Unreal Engine. Install the MCP in Hermes and you can have your agent build super complex and in depth 3D games.
8. Better Telegram formatting: Hermes now takes advantage of complex formatting in telegram like tables and charts. I like to use Telegram when I'm doing deep work on the go and iMessage when I have quick prompts on the go
Excellent updates that have significantly improved the experience. Video showing how to use and set this all up shortly.
Hermes Agent can now /learn from anything: feed it directories of any source material (code, API docs, manuals, PDFs, configs) and it distills a verifiable reusable skill