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.
Trust is a cognitive decision made without risk analysis.
In my new post, I explore how love and trust shape our perception.
#CognitiveScience
https://t.co/xSjP44YH26
Güven, risk analizi yapmadan verilen bilişsel bir karardır.
Yeni yazımda, sevgi ve güvenin algı üzerindeki etkisini inceliyorum. #BilişselBilim
https://t.co/C3lp8tFb6G
Zihinde Düşünceler Nasıl Ortaya Çıkar?
Serimin bu bölümünde, düşüncelerin zihinde nasıl oluştuğunu ve hangi beyin ağlarının devrede olduğunu inceliyor; zihinsel işleyişi biyolojik temelleriyle ele alıyorum.
#Nörobilim#BilişselBilim#BeyinAğları
https://t.co/Mm8lBrIgT4
How Do Thoughts Arise in the Mind?
In this post, I explore how thoughts arise in mind and which brain networks are involved, examining the biological basis of mental function as part of my ongoing series.
#Neuroscience#CognitiveScience#BrainNetworks
https://t.co/nHKnLlJ69u
Zihin Gerçekliği Nasıl İnşa Eder?
Bu yazıda insan zihninin dış dünyayı nasıl öngördüğünü, bu öngörülerin nasıl duygulara ve eylemlere dönüştüğünü ve zihnin kendi modellerini nasıl şekillendirdiğini inceliyorum.
#BilişselBilim#öngörücüYapayZeka
https://t.co/gcKtOT7JNY
How Does the Mind Construct Reality?
In this post, I explore how the human mind predicts the external world, how these predictions transform into emotions and actions, and how the mind shapes its own models. #CognitiveScience#predictiveAI
https://t.co/qclgn5gmDT
How Does the Mind Construct Reality?
In this post, I explore how the human mind predicts the external world, how these predictions transform into emotions and actions, and how the mind shapes its own models. #CognitiveScience#predictiveAI
https://t.co/qclgn5gmDT
Say hello to GPT-4o, our new flagship model which can reason across audio, vision, and text in real time: https://t.co/MYHZB79UqN
Text and image input rolling out today in API and ChatGPT with voice and video in the coming weeks.
Stack Overflow users are revolting against the deal with OpenAI, announcing they'd rather remove their posts than have their submissions used to train ChatGPT.
Stack Overflow has been banning users who have attempted to delete their own posts on the site.
We just announced the Phi-3 family of open models which are highly capable and cost-effective. Phi-3 models meet the growing need for different-size models for different tasks and significantly outperform language models of the same and larger sizes on key benchmarks.
End of the thread :)
Here is the link to watch the lecture on Youtube: https://t.co/FlHtl0Ziq1
And here is the link to the Google slides:
https://t.co/AJbUA1tG49
Enjoy –
We are proud to be one of the first cloud providers to offer @nvidia’s next-generation Blackwell GPU to customers, coming soon to Google Cloud. #GTC24 https://t.co/fa0WKg7NNr
Today, with @Tim_Dettmers, @huggingface, & @mobius_labs, we're releasing FSDP/QLoRA, a new project that lets you efficiently train very large (70b) models on a home computer with consumer gaming GPUs. 1/🧵
https://t.co/UAsWOLtn7a