LLM-based agents typically execute tool calls synchronously and discard completed work upon failure. Subgraph-selective recovery, re-executing only a failed node's transitive descendants, is a well-established pattern in distributed systems (Spark, Erlang/OTP, Dryad), and recent agent runtimes (Sherlock, AgentGit, Atomix) preserve completed work through verifiers, version control, or transactional tool boundaries. We present Agent-Kernel, a non-blocking runtime that ports this pattern to the LLM content plane: its primitive, Sub-Graph Recovery (SGR), fires on a raw exception with no trained verifier or planner, resets a failed node's descendants while preserving completed siblings, and composes each parent's text into its children's prompts (context inheritance), all on a durable substrate with a formal state-preservation guarantee. Across 14{,}434 runs on synthetic and standard benchmarks (tau-bench, Gaia2, AutomationBench, InterruptBench), SGR reaches full recovery within budget=3 where whole-trajectory replay exhausts (100% vs.\ 55%), and is roughly 10× faster than an adapted Sherlock rollback that also recovers. It matches ReAct-serial accuracy within noise on linear workloads while adding recovery and parallelism (up to 12.7× speedup) where structure permits. Ablation isolates SGR: removing it collapses success to 39.4%.
Figures & tables
Figure 1: Top: Dependency-sensitive scenario. Task a4 depends on a1,a2,a3 ; a2 fails. ReAct halts and discards all intermediate state. Agent-Kernel retries only a2 via SGR while preserving a1,a3 ’s completed outputs, then dispatches a4 with correct parent context. Bottom: Wall-clock speedup on real-inference benchmarks (Sonnet 4.5): 4.5 × on AutomationBench (cross-app API orchestration), 2.7 × on InterruptBench (non-blocking main loop). Speedups reflect latency reduction, not accuracy improvement.
System
Recovery trigger
Recovery action
Config-free
Content-plane policy
Atomix ( Mohammadi et al., 2026 )
Fault or conflict
Retry/wait/abort + compensation; frontiers isolate work
Yes
None
AgentGit ( Li et al., 2025 )
User- or agent-invoked
Revert or branch to a saved state (Git-style)
No
None
Sherlock ( Ro et al., 2025 )
Verifier disagreement
Roll back to last verified output
No (verifier+planner)
None
Agent-Kernel (ours)
Exception (zero-shot)
Reset descendants, keep siblings, re-execute
Yes
Budgeted + mutable
Table 1: Agent-Kernel against the three closest LLM agent runtimes. All three preserve completed work. Agent-Kernel’s distinguishing properties are an exception-triggered, config-free trigger requiring no verifier or planner, and an explicit content-plane policy : it composes upstream text into downstream prompts under a token budget and may rewrite a prompt on format drift—operations these systems, which reason over control and state, do not expose as a first-class mechanism.
Figure 2: After a fails in the worked example (§ 3.3 ), SGR resets only a and its descendant s ; completed siblings b , c keep their outputs and are inherited by s . Whole-task replay re-runs every node, and each re-run is another chance for a transient failure to spend budget. On the failure grid this is the gap between SGR (100%) and matched-budget FullReplan (56.2%, Table 6 ).
Verb
Effect
Cascade type
fork
Creates sub-agent, returns immediately
spawn
retry
Resets & re-dispatches failed subgraph
SGR reset
cancel
Marks descendants unreachable
cancel cascade
query
Returns matching SAB records
set-oriented read
fetch
Reads one record’s current outputs
per-record read
Table 2: The 5-verb API and the scheduler cascade each verb drives ( fork is the spawn primitive; full call signatures in App. J.1 ). The main loop returns immediately after each fork .
System
Recovery
Wall
Strategy
Agent-Kernel
100.0%
[97.0, 100.0]
21s
SGR
ReAct-per-step (B3)
100.0%
135s
Per-step
Sherlock-gen. §
100.0%
149s
Rollback
AsyncLM †
100.0%
[97.0, 100.0]
—
Retry-once
ReAct+retry
55.0%
[46.1, 63.6]
15s
Full replay
ReAct-serial
36.7%
[28.5, 45.7]
3s
Halt
Table 3: Failure recovery ( n=120 , failure rates 0.1–0.3; Wilson intervals ( Wilson, 1927 ) ). Wall is mean wall-clock on the real-inference K=8, L=8 grid. Four systems reach full recovery ; among them the differentiator is wall-clock, not recovery rate: Agent-Kernel is 3.3–12.7 × faster than B3 and ∼ 10 × faster than Sherlock-generous across grids (App. L , M ). McNemar p<0.0001 separates the halt/whole-replay group. Budgets: Agent-Kernel retries each failed node with budget 3; ReAct+retry replays the whole trajectory with budget 3; B3 retries the failing step in place. § Steelmanned Sherlock rollback. † Violates dependency ordering (fastest but 0% dependency-correct, § 4.3 ).
Benchmark
AK
ReAct
Speed
Acc.
Structure
AutomationBench
5.5s
24.8s
4.5 ×
5%
Indep. APIs
InterruptBench
14.2s
38.1s
2.7 ×
44%
Non-block.
AAR Hard
72.4s
85.2s
1.18 ×
39%
Diamond
Synthetic K=32
22.1s
281.4s
12.7 ×
–
8 × 32 DAG
tau-bench
17.2s
17.1s
1.0 ×
84%
Linear
Gaia2
18.2s
18.0s
1.0 ×
39%
Linear
Table 4: Real LLM inference results (task counts: AutomationBench 20, InterruptBench 113, AAR Hard 15, tau-bench 165, Gaia2 640). Acc. is task solve-rate; AK and ReAct match within noise (same backbone), with rare scheduling-induced divergences (e.g., one diverged task on tau-bench retail, App. M ). Top: parallel workloads where AK delivers speedup. Bottom: standard linear-chain benchmarks. Execution-completion rate (a separate reliability metric on which AK trails by 1–2% due to tail-latency timeouts) is in App. B.8 . Wall-clock cells are 3-seed means (point estimates; per-seed dispersion not characterized).
Raw-concat
Summarizer
Top- k
K
Acc
Tok
Acc
Tok
Acc
Tok
1
100%
86
100%
80
100%
86
16
100%
339
100%
243
100%
136
32
100%
608
100%
416
100%
136
128
100%
2,363
100%
1,588
100%
140
Table 5: Context-inheritance K -sweep (Sonnet 4.5). Acc = task accuracy; Tok = mean injected-context tokens/child prompt. Accuracy is flat at 100% to K=128 ; top- k retrieval holds token cost roughly constant (17 × cheaper than raw-concat at K=128 ). Full grid ( K∈{1..128} , 3 seeds) in App. O .
Variant
Overall success
Agent-Kernel (full)
100.0%
NoSAB
100.0%
NoDSP
100.0%
FullReplan (matched budget)
56.2%
NoSGR
39.4%
Table 6: Ablation: overall success across the failure grid. Removing SGR collapses recovery to the halt-on-failure level (39.4%); FullReplan (matched budget, whole-task restart) reaches only 56.2%; removing SAB or DSP is invisible on this benchmark. Per- fr breakdown in App. B.9 .
System (real binary)
Recovery
Re-exec.
Wall
Agent-Kernel (SGR)
60/60
1.0
0.12s
LangGraph 1.2 ∗
60/60
1.0
0.52s
LlamaIndex 0.14
0/60
0.0
n/a
AutoGen v0.4
0/60
0.0
n/a
Table 7: Real-binary integration on a diamond fan-out DAG with one failing leaf (12 configs × 5 seeds = 60 cells/system). Re-exec. = cells re-executed on recovery. ∗ LangGraph recovers only with a custom retry_on filter; its default excludes our injected exceptions, and AutoGen v0.4 has no default runtime retry (App. N ).
Backbone
Config
AK
ReAct
Sonnet 4.5
K=8, fr=0.3
100%
0%
Sonnet 4.5
K=32, fr=0.3
100%
0%
Haiku 4.5
K=8, fr=0.3
100%
0%
Haiku 4.5
K=32, fr=0.3
100%
0%
Opus 4.5
K=8, fr=0.3
100%
50%
Table 8: Cross-backbone recovery across the Claude family (transient failures). The ReAct column gives ReAct-serial; ReAct+retry matches it on every cell.
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 3: Agent-Kernel architecture. The user calls the 5-verb API; DSP dispatches sub-agents with parents’ outputs injected from SAB (context inheritance). SGR handles failure by resetting only the failed subgraph.
Evaluation
Runs
Section
Synthetic (failure recovery)
1,440
§ 4.2
Synthetic (dependency)
1,440
§ 4.3
Ablation + FullReplan
1,320
§ 4.4
K=32 scaling (5 seeds)
80
§ 4.3
Framework comparison (primitive)
360
§ 4.4
External benchmarks
3,289
§ 4.3
Appendix
Table 9: Evaluation footprint. Rows above the first subtotal are the core grids and benchmarks (11,809 runs); rows below are the comparator and scaling studies (2,625 runs), for a total of 14,434 runs.
Benchmark
Agent-Kernel
ReAct
AsyncLM
AIOS
AutomationBench (20 tasks)
5.5s
24.8s
5.1s
25.2s
AAR Easy (8 stops, 20 tasks)
24.9s
31.2s
6.4s
32.3s
AAR Hard (25 stops, 15 tasks)
72.4s
85.2s
13.5s
86.3s
InterruptBench (113 tasks)
14.2s
38.1s
9.7s
37.8s
AppWorld dev (10 tasks)
62.6s
64.0s
9.9s
60.9s
AppWorld test_normal (15 tasks)
8.9s
9.0s
5.7s
8.5s
Appendix
Table 10: Wall-clock on external benchmarks with real LLM inference. Bold marks Agent-Kernel where it is the fastest dependency-respecting system (AK/ReAct/AIOS); on the two AppWorld rows AIOS edges it out. AsyncLM ignores dependency edges, producing faster but potentially incorrect execution.
K
Agent-Kernel
AsyncLM
ReAct
AIOS
1
9.9s
3.0s
10.0s
10.3s
4
9.6s
5.1s
29.8s
30.6s
8
11.2s
9.0s
62.3s
58.8s
16
12.2s
15.9s
116.3s
118.0s
32
22.1s
38.9s
281.4s
273.8s
Appendix
Table 11: Wall-clock by K (failure-free, K ≤ 16: 3 seeds; K=32: 5 seeds). Agent-Kernel stays roughly flat while ReAct/AIOS grow linearly; AsyncLM is cheapest below K ≈ 8, after which Agent-Kernel overtakes it.
System
Total calls
Successes
Calls/success
Agent-Kernel
∼ 4,800
360/360
13.3
AsyncLM
∼ 2,400
360/360
6.7
ReAct-serial
∼ 1,200
142/360
8.5
AIOS
∼ 1,800
142/360
12.7
Appendix
Table 12: API calls per successful task. ReAct’s low total reflects early halting, not efficiency.
K
L=1
L=2
L=4
L=8
1
50.0%
33.3%
20.0%
11.1%
4
80.0%
44.4%
23.5%
12.1%
16
94.1%
48.5%
24.6%
12.4%
Appendix
Table 13: AsyncLM node accuracy drops with depth L. Surviving accuracy equals root-node fraction.
Benchmark (wall / completion)
AK
ReAct
AsyncLM
AIOS
tau-bench (Mac)
17.2s / 98.2%
17.1s / 100%
4.9s / 100%*
17.1s / 100%
tau-bench (dev-dsk)
16.2s / 99.4%
16.6s / 100%
4.7s / 100%*
16.3s / 100%
Gaia2 mini
18.2s / 99.4%
18.0s / 100%
4.6s / 100%*
17.8s / 100%
Gaia2 search
2.7s / 100%
2.6s / 100%
2.7s / 100%*
2.7s / 100%
Gaia2 execution
23.1s / 98.1%
22.3s / 99.4%
5.5s / 99.4%*
22.9s / 99.4%
Gaia2 time
21.9s / 99.4%
21.6s / 100%
4.6s / 100%*
21.8s / 100%
Appendix
Table 14: Linear-chain benchmarks: wall-clock / execution-completion rate (not task solve accuracy; see Table 4 for solve accuracy). *AsyncLM ignores dependencies; correctness unreliable on real data flows.
Variant
Overall
fr=0.0
fr=0.1
fr=0.3
Agent-Kernel (full)
100.0%
100.0%
100.0%
100.0%
NoSAB (in-memory)
100.0%
100.0%
100.0%
100.0%
NoDSP (tick-poll)
100.0%
100.0%
100.0%
100.0%
NoSGR
39.4%
100.0%
11.7%
6.7%
FullReplan
56.2%
100.0%
67.5%
45.0%
Appendix
Table 15: Ablation (3 seeds × 120 scenarios per variant). SGR is the sole performance primitive. FullReplan validates that selectivity—not retry alone—drives the gain.
Primitive re-implementation
Success rate
Wall mean (s)
Agent-Kernel
100.0%
10.62
AsyncLM-style
100.0%
7.47
LangGraph-style
39.4%
6.04
ReAct-serial
39.4%
18.25
AIOS-style
39.4%
29.56
AutoGen-style
36.7%
0.28
Appendix
Table 16: 7-way primitive re-implementation comparison: each row reproduces a framework’s default scheduling strategy on our synthetic grid, not its shipped binary. Strategies lacking automatic selective retry collapse to ∼ 39% under failure injection (this full grid includes fr=0, so halt baselines read 39.4% here vs 36.7% on the fr 0.1–0.3 slice of Table 3 ). Real-binary results are in App. N , where LangGraph 1.2 with a custom retry filter recovers fully.
System
Success
Retries
Tokens generated
Tokens wasted
Agent-Kernel (SGR)
100%
1.8
∼ 35K
∼ 3K (8%)
FullReplan
45%
3.0
∼ 96K
∼ 64K (67%)
ReAct+retry
42%
3.0
∼ 96K
∼ 64K (67%)
ReAct-serial
7%
0
∼ 32K
0 (fails)
Appendix
Table 17: Estimated token cost on a K=8, L=8 DAG at fr=0.3 ( ∼ 500 tokens/node). SGR generates 2.7 × fewer tokens than FullReplan while achieving 2.2 × higher success. Wasted tokens = tokens generated for nodes later discarded or never contributing to a successful output. At fr=0.3, FullReplan re-runs on average ∼ 56 already-completed nodes per attempt (vs the 32 completed above a single depth-4 failure in the illustrative case of § 4.2 ).
Verb
Signature
fork
fork(task, role, depends_on=[])
retry
retry(id)
cancel
cancel(id)
query
query(filter={})
fetch
fetch(id)
Appendix
Table 18: Full call signatures for the 5-verb API (§ 3.3 , Table 2 ).
System
Recovery
Mean wall
ReAct-serial
0/9 (0%)
3s (halts)
ReAct+retry (whole-trajectory)
3/9 (33%)
15s
ReAct-per-step-retry (B3)
9/9 (100%)
135s
Sherlock-lite (paper-faithful)
3/9 (33%)
52s
Sherlock-generous (steelman)
100% (all fr )
149s
Agent-Kernel (SGR)
9/9 (100%)
21s
Appendix
Table 19: Recovery rate and mean wall-clock on K=8 , L=8 grids under a transient crash (3 seeds/cell). SGR matches the recovery of the strongest baselines at a fraction of the wall-clock.
fr
Sherlock-gen. wall
AK wall
SGR speedup
0.00
141s
21s
6.7 ×
0.10
139s
14s
9.9 ×
0.15
142s
17s
8.4 ×
0.25
167s
25s
6.7 ×
0.30
147s
12s
12.3 ×
0.40
157s
13s
12.1 ×
Appendix
Table 20: Sherlock-generous vs. Agent-Kernel wall-clock across failure rate fr ( K=8 , L=8 , 3 seeds). SGR is consistently ∼7 – 12× faster.
Grid
B3 wall
AK wall
SGR speedup
K=8, L=8, fr=0.3
135s
12s
11.2 ×
K=8, L=8, fr=0.1
133s
14s
9.4 ×
K=16, L=4, fr=0.3
133s
10.5s
12.7 ×
K=4, L=8, fr=0.3
71s
21s
3.3 ×
Appendix
Table 21: B3 (ReAct-per-step-retry) vs. Agent-Kernel wall-clock across four grids. Both recover 100%; Agent-Kernel is 3.3–12.7 × faster because SGR parallelizes the reset subgraph while B3 retries serially.
Raw-concat
Summarizer
Top- k
K
Acc
Tok
Acc
Tok
Acc
Tok
1
100%
86
100%
80
100%
86
8
100%
204
100%
156
100%
136
16
100%
339
100%
243
100%
136
32
100%
608
100%
416
100%
136
64
100%
1,212
100%
824
100%
141
Appendix
Table 22: Context-inheritance K -sweep on Sonnet 4.5 (3 seeds per K ; 15–20 questions per cell). Acc is task accuracy; Tok is mean injected-context tokens per child prompt. Bold marks the cheapest policy per row.
Verb
Cascade type
fork
spawn
retry
SGR reset
cancel
cancel cascade
query
set-oriented state read
fetch
per-record output read
Appendix
Table 23: Verb-to-scheduler-cascade mapping (Section 3.3 ). The SRE incident-response scenario invokes all five verbs at 100%, versus the synthetic harness, which invokes only fork and retry .
Mechanism
Disabled (control)
Enabled
Context inheritance
Parent text not composed into child prompt; child task underspecified → unsolvable
Parent text composed under token budget → solved
Prompt-mutation retry
Blind re-execution repeats identical malformed output; recovery ≡0 at any budget
Table 24: Content-plane ablations at temperature 0. Each row is a deterministic mechanism-level probe: disabling the mechanism makes the downstream task unrecoverable by construction, and enabling it recovers.
Retry policy (18 format-drift scenarios)
Recovery (Wilson 95% CI)
Prompt-mutation retry
14/18 = 77.8% [54.8, 91.0]
Blind re-execution
6/18 = 33.3% [16.3, 56.3]
Appendix
Table 25: Preliminary format-drift study (Sonnet 4.5, n=18 ). Prompt-mutation retry (injecting error context + expected schema) recovers more than twice as often as blind re-execution. Small n ; reported as a preliminary signal for the content plane’s benefit on semantic (non-transient) failures, not a headline result.
Many real-world tasks require LLM agents to interact with their environments over long execution horizons. Errors that occur early in execution may propagate through both the agent context and environment state, and their effects may be difficult to reverse through subsequent actions. Existing methods mainly seek to reduce such errors through plan refinement and safety checks but provide little support after errors occur. To enable recovery during long-horizon execution, we present AgentRewind, a runtime recovery framework that records aligned checkpoints of the agent context and controlled environment, allowing agents to return to an earlier state and resume execution with information from previous attempts. We also construct MettleBench, a benchmark for evaluating task completion and partial progress on long-horizon engineering assignments containing a series of related requirements. Experiments across tasks, multiple models, execution strategies, and agent harnesses show that AgentRewind improves task success rate and average checklist progress over the compared baselines.
Yu Zhuang, Kefei Chen, Yitong Duan +3
University of Chinese Academy of Sciences · Zhongguancun Academy, Beijing, China · Institute of Automation, Chinese Academy of Sciences +1
LLM agents often fail mid-task due to invalid tool calls, repeated actions, or poorly grounded reasoning, and learning from these failures is a path to reliability. We find that how failure knowledge reaches the agent matters as much as what it contains. Failure lessons are conditional: kept in the agent's context, they misfire when their failure is absent, and removing them from an evolving playbook improves performance. Runtime interventions, in contrast, act only when a failure occurs but do not learn from their repairs. We argue that failure knowledge is conditional knowledge and should be conditionally exposed, and instantiate this principle in Sentry, a failure-management layer that runs alongside the agent. When Sentry detects a failure, it retrieves matching lessons from an external playbook to guide recovery, verifies without access to task rewards whether the agent recovered, and stores a new lesson only if it did; the full playbook never enters the agent's context. Across multiple agentic benchmarks, Sentry outperforms the strongest runtime-intervention baseline on every benchmark, by 37% on average, and the strongest context-evolution baseline by 39% on the two benchmarks where both are evaluated; combining Sentry with context evolution yields further gains. Learned lessons transfer to held-out tasks, and controlled experiments show that exposing the full playbook to the agent lowers performance even when relevant lessons remain available on demand.
Changxiu Ji, Amy Lu, Qizheng Zhang +1
Department of Computer Science, Stanford University
Traces record what LLM agents did, leaving implicit what each step relied on. GRADE holds both in one graph; six published graph views are its projections. Execution edges come free; each costly dependency edge is graded as observed in the trace, declared by added logging, or inferred under an assumption, a schema we test one grade at a time. We recover the dependency layer from six tool-use, coding, and web corpora and measure its failure-prediction gain over run size. First, over a linear run-size baseline, it improves prediction on three corpora, but the gain depends on the learner and task sampling. On held-out corpora the layer stays above chance where run size does not, under one learner, with the same task-sampling caveat. Second, structure can pass for signal it does not carry: a layer inferred under full history restates run size. Within a corpus, a preregistered test does not separate the recovered layer from a degree-matched counterfeit that rewires each step's dependencies but keeps their number. The recovered layer's largest transfer lead over it reverses when the held-out corpus's task family is withheld. Before crediting structure, grade each edge, keep a run-size baseline, and score degree-matched attachment controls.