Skip to content

feat(sre): find the step and the agent that broke a failed agent run - #34

Open
svonava wants to merge 3 commits into
mainfrom
feat/sre-find-the-step-that-broke-an-agent-run
Open

svonava wants to merge 3 commits into
mainfrom
feat/sre-find-the-step-that-broke-an-agent-run

Conversation

@svonava

@svonava svonava commented Nov 12, 2026 •

Copy link
Copy Markdown

Summary

A new SRE recipe, sre/find_the_step_that_broke_an_agent_run: find the step, and the agent, where a failed agent run's decisive error came in.

  • Whole read: Qwen/Qwen3.8-27B-FP8 reads a run in one call when it fits whole_read.max_tokens.
  • RLM for longer runs: DSPy's RLM runs model-written Python against the run in its Deno sandbox (installed by uv from PyPI). Helpers search the run in plain Python (grep, show, steps_by) or ask Qwen about pieces of it (scan, ask); no call sends more than 24,000 tokens.
  • SIE calls: every model call goes through SIEClient.chat_completions, via a small DSPy engine (SIEEngine). The driver's engine declares response-schema support, so DSPy sends each turn's JSON schema and SIE constrains the answer to it.
  • Data: three synthetic runs of a coding team of agents on the made-up Ledgerline library, written by make_data.py: about 5,500, 36,000 and 420,000 tokens, each with a planted root step.

How it was run

On 12 Nov 2026 (UTC), using SIE Local: one SIE server on an RTX PRO 6000 with Qwen/Qwen3.8-27B-FP8:rtx-pro-6000-32k-thinking-bounded-rlm-no-spec, the profile proposed in superlinked/sie#949. 2 of 3 runs came out as expected, in 23 SIE calls and about 18 minutes. The long run found both steps that wrote the interest code and named the earlier one; the run before named the planted step. The README reports each answer and states the limits:

  • It can find the right step and still pick another, and two runs on the same trace often name different steps.
  • The examples are easy: each failing check names what went wrong.
  • One live run per example.
  • Slow on long runs: turns run one after another.

SIE Serverless: on the same day it served Qwen/Qwen3.8-27B-FP8 with an 8,192-token window, and its longer-window profiles answered "Generation route is unavailable for this deployment". So a Live workflow run against SIE Serverless will fail this recipe on the window until a longer one is served. The README says to run it using SIE Cluster or SIE Local.

Checks

  • uvx pre-commit run --all-files
  • mypy --strict
  • uv run recipe.py --help
  • uv run selfcheck.py: data, routing, pieces, helpers, a helper answer cut at the output limit, answers, and a round trip through the DSPy engine with a stand-in client.
  • tools/check_tree.py

A recipe for teams that read the traces of failed agent runs. Qwen/Qwen3.8-27B-FP8 on SIE reads a run
whole when it fits; a longer run goes to a recursive language model (DSPy's RLM), where Qwen writes
Python against the run in a sandbox with helpers that search it and ask Qwen about pieces of it, so no
call sends more than 24,000 tokens. Three synthetic runs of a coding team of agents (about 5,500,
36,000 and 420,000 tokens), each with a planted root step.

The model calls go through SIEClient via a small DSPy engine. The live run used SIE Local with the
rtx-pro-6000-32k-thinking-bounded-rlm profile; SIE Serverless serves Qwen3.8-27B with an 8,192-token
window today, which is too small for this recipe.
@svonava
svonava requested a review from a team as a code owner November 12, 2026 04:13
…answer past the thinking limit

Thinking counts against a call's output limit, so a helper capped at 4,096 tokens on a profile
that thinks up to 4,096 could end with no answer. Helpers now get 6,144, and an answer that still
reaches the limit is marked unfinished for the driver. The README now says reading a run whole did
as well as the RLM or better when it fit, which is what the benchmark runs showed.
…run with the helper fix

2 of 3 runs came out as expected. The long run found both steps that wrote the interest code and
named the earlier one; the README reports the miss and that the previous run named the planted step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant