Your Deep Agent Says Done but Skipped Steps: How to Catch It

15 min read

A deep agent run is not one model call. It is a loop of model calls, tool calls, subagent calls and file writes, and any step can go wrong without an error. The model can skip its plan. It can call the same tool twice. It can say "saved to /report.md" when no file exists. The final answer can look fine while the path to it was broken.

So the problem in this part is simple to state: how do you see what a deep agent actually did, and how do you check it automatically, before you put it in front of users?

We answer it in four steps:

  1. Trace every call, with LangSmith or with a small local logger.
  2. Read the raw state: messages, files, todos, and debug=True.
  3. Write evals with pytest that run on a scripted fake model, so they give the same answer every time.
  4. Add a judge with RubricMiddleware for quality, and learn where it fails.

At the end we look at how the docs say to deploy, and we run the agent inside a small FastAPI app.

Hand-drawn diagram: a deep agent run inside your process sends events to callbacks, and the callbacks feed three places: LangSmith when LANGSMITH_TRACING is true, a local TraceLogger with milliseconds, tokens and agent name, and pytest asserts on tools, files and todos

The test agent

We use one small agent for the whole part. It has a word_count tool and the todo list from Part 4. The prompt asks it to plan, count, save the answer to /report.md, and finish.

python
from langchain.agents.middleware import TodoListMiddleware
from langchain_core.tools import tool
from deepagents import create_deep_agent

SYSTEM_PROMPT = (
    "You count words for the user. First call write_todos with a short plan. "
    "Use the word_count tool, then save the answer to /report.md with write_file, "
    "mark every todo completed, and reply with one sentence."
)

@tool
def word_count(text: str) -> int:
    """Count the words in a piece of text."""
    return len(text.split())

def build_agent(model, checkpointer=None, debug=False, middleware=()):
    return create_deep_agent(
        model=model,
        tools=[word_count],
        system_prompt=SYSTEM_PROMPT,
        middleware=[TodoListMiddleware(), *middleware],
        checkpointer=checkpointer,
        debug=debug,
    )

agent = build_agent("anthropic:claude-sonnet-4-6")

Option 1: LangSmith tracing

LangSmith is LangChain's hosted tracing and eval platform. The "Trace Deep Agents" docs page says Deep Agents support it natively. Once tracing is on through environment variables, every run is sent as a tree of spans: the agent run at the top, then each LLM call and each tool run with its inputs and outputs.

Turning it on takes two variables:

bash
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY=...   # from LangSmith Settings

The current docs also ask you to register an agent and set LANGSMITH_AGENT_ID and LANGSMITH_AGENT_ENVIRONMENT so traces land in the right place. You need a LangSmith account for any of this. We did not sign up for one for this series, so nothing in this part was sent to LangSmith.

Three features from the docs are worth knowing:

  • Trajectory view shows the run as a simple chat: user request, tool calls, final answer.
  • Filter by subagent. Deep Agents write the subagent's name to the lc_agent_name metadata key on every run it produces. You filter on that key to see one subagent's runs.
  • tracing_context from the langsmith package traces only one block of code, with tags and metadata, even when LANGSMITH_TRACING is not set.

We can check the off state locally. With no variables set, the SDK reports that tracing is disabled:

text
LANGSMITH_TRACING = None
LANGSMITH_API_KEY set: False
tracing_is_enabled(): False
inside tracing_context(enabled=False): False

That matters for evals later. Your tests should not depend on a network service being up.

Option 2: a local trace logger

LangSmith gets its data from LangChain callbacks. You can use the same hooks yourself. A callback handler gets on_chat_model_start, on_llm_end, on_tool_start and on_tool_end for every call in the graph, including calls inside subagents. The metadata argument carries the same lc_agent_name key, so we know which agent made each call.

Here is the core of the handler (the full file is in code/part12/trace_logger.py):

python
import time
from langchain_core.callbacks import BaseCallbackHandler

class TraceLogger(BaseCallbackHandler):
    def __init__(self):
        self.events, self._open = [], {}

    def _start(self, run_id, kind, name, metadata):
        agent = (metadata or {}).get("lc_agent_name") or "main"
        self._open[run_id] = {"kind": kind, "name": name, "agent": agent,
                              "start": time.perf_counter()}

    def _end(self, run_id, **extra):
        ev = self._open.pop(run_id)
        ev["ms"] = round((time.perf_counter() - ev.pop("start")) * 1000, 1)
        ev.update(extra)
        self.events.append(ev)

    def on_chat_model_start(self, serialized, messages, *, run_id, metadata=None, **kw):
        self._start(run_id, "model", serialized.get("name", "chat_model"), metadata)

    def on_llm_end(self, response, *, run_id, **kw):
        msg = response.generations[0][0].message
        self._end(run_id, usage=msg.usage_metadata,
                  tool_calls=[c["name"] for c in msg.tool_calls])

    def on_tool_start(self, serialized, input_str, *, run_id, metadata=None, **kw):
        self._start(run_id, "tool", serialized.get("name", "tool"), metadata)

    def on_tool_end(self, output, *, run_id, **kw):
        self._end(run_id, status=getattr(output, "status", "success"))

You attach it per call, so it never leaks into other runs:

python
log = TraceLogger()
result = agent.invoke(
    {"messages": [{"role": "user", "content": "How many words: Deep agents plan, delegate and write files."}]},
    config={"callbacks": [log]},
)

This is what it printed on Llama 4 Scout:

text
[ 1] model  main           4916.3 ms in=4074 out=15 calls=['word_count']
[ 2] tool   main              2.0 ms word_count -> success
[ 3] model  main           6146.5 ms in=4102 out=59 calls=['word_count', 'write_file', 'write_todos']
[ 4] tool   main              0.6 ms word_count -> success
[ 5] tool   main             23.7 ms write_todos -> success
[ 6] tool   main             14.0 ms write_file -> success
[ 7] model  main           2095.2 ms in=4216 out=8 calls=[]
summary: {"model_calls": 3, "tool_calls": 4, "input_tokens": 12392, "output_tokens": 82, "model_ms": 13158.0, "tool_ms": 40.3, "wall_ms": 16903.1}

Three things jump out, and none of them show up in the final answer ("The text contains 7 words."):

  • The model skipped the plan. Its first call was word_count, not write_todos, even though the prompt said "First call write_todos".
  • It called word_count twice, once alone and once again in a batch.
  • Input tokens dwarf output tokens. 12,392 in, 82 out. About 4,100 tokens go in on every call, because the system prompt and tool schemas are resent each time. Model time was 13.2 s of the 16.9 s run. The tools took 40 ms.
Llama 4 Scout: input tokens per model call
call 14074call 24102call 34216
Data from the sources listed below.
Where the 16.9 s went (ms)
model call 14916msmodel call 26147msmodel call 32095msall 4 tool calls40ms
Data from the sources listed below.

This is the cheapest debugging tool you can have. It runs offline, it costs nothing, and its JSON output is easy to assert on.

sequenceDiagram
    participant U as invoke
    participant A as Agent graph
    participant CB as TraceLogger
    participant M as Model
    participant T as Tool
    U->>A: messages + callbacks
    A->>M: request
    M-->>CB: start, then end with usage
    M-->>A: tool_calls
    A->>T: run tool
    T-->>CB: start, then end with status
    T-->>A: ToolMessage
    A-->>U: final state

Option 3: read the state, and debug=True

The result of invoke is the full state, so print it. m.pretty_print() on each message shows every tool call with its arguments. result["files"] holds the virtual filesystem and result["todos"] holds the plan.

python
for m in result["messages"]:
    m.pretty_print()
print({p: d["content"] for p, d in result["files"].items()})
print(result["todos"])

From the scripted run:

text
================================== Ai Message ==================================
Tool Calls:
  write_file (f1)
 Call ID: f1
  Args:
    file_path: /report.md
    content: Word count: 7
...
--- files ---
/report.md -> 'Word count: 7\n'

--- todos ---
completed | Count the words
completed | Write /report.md

create_deep_agent(..., debug=True) goes one level lower. It prints every graph step as LangGraph runs it: [updates] lines for each node that ran and [values] lines with the full state after each step. For our 5-call scripted run that was 26 lines, 16 [updates] and 10 [values]. You can see middleware hooks fire, for example:

text
[updates] {'PatchToolCallsMiddleware.before_agent': None}
...
[updates] {'TodoListMiddleware.after_model': None}
...
[updates] {'_ParentNotifierMiddleware.after_agent': None}

It is noisy, because each [values] line repeats the whole message list. Use it when you suspect the graph wiring, not for daily work. Part 11 covers stream_mode options, which give the same events in a form you can filter.

Deterministic evals with pytest

Tracing tells you what happened once. An eval tells you, on every commit, whether it still happens. The trouble with agents is that the model is random and slow. A test that calls a real model can pass today and fail tomorrow for no reason in your code.

The fix is to split the question in two:

  • Wiring: do my tools, prompts, middleware and state fit together? Test this with a scripted fake model that returns fixed tool calls. The real tools, filesystem and todo middleware still run.
  • Behavior: does a real model follow the plan? Check this on recorded real runs, with the same assertions.

The fake model is a few lines on top of LangChain's own fake chat model:

python
from langchain_core.language_models.fake_chat_models import FakeMessagesListChatModel
from langchain_core.messages import AIMessage

class FakeToolModel(FakeMessagesListChatModel):
    def bind_tools(self, tools, **kwargs):
        return self

def call(name, args, id):
    return {"name": name, "args": args, "id": id, "type": "tool_call"}

def ai(text="", *calls):
    return AIMessage(content=text, tool_calls=list(calls))

TEXT = "Deep agents plan, delegate and write files."
model = FakeToolModel(responses=[
    ai("", call("write_todos", {"todos": [
        {"content": "Count the words", "status": "in_progress"},
        {"content": "Write /report.md", "status": "pending"}]}, "t1")),
    ai("", call("word_count", {"text": TEXT}, "w1")),
    ai("", call("write_file", {"file_path": "/report.md", "content": "Word count: 7\n"}, "f1")),
    ai("", call("write_todos", {"todos": [
        {"content": "Count the words", "status": "completed"},
        {"content": "Write /report.md", "status": "completed"}]}, "t2")),
    ai("The text has 7 words. I saved the answer to /report.md."),
])

Now the tests read like a checklist of what "correct" means:

python
def tool_calls(result):
    return [c for m in result["messages"] if isinstance(m, AIMessage) for c in m.tool_calls]

def test_plans_before_acting(result):
    assert tool_calls(result)[0]["name"] == "write_todos"

def test_word_count_called_with_the_user_text(result):
    calls = [c for c in tool_calls(result) if c["name"] == "word_count"]
    assert len(calls) == 1 and calls[0]["args"] == {"text": TEXT}

def test_report_file_written(result):
    assert "7" in result["files"]["/report.md"]["content"]

def test_every_todo_completed(result):
    assert {t["status"] for t in result["todos"]} == {"completed"}

@pytest.mark.parametrize("args", [
    {"file_path": "/../secret.md", "content": "x"},   # path traversal
    {"file_path": "/notes.md"},                        # missing content
])
def test_bad_tool_args_become_readable_errors(args):
    model = FakeToolModel(responses=[ai("", call("write_file", args, "bad")),
                                     ai("I could not write that file.")])
    out = run(model)
    tm = [m for m in out["messages"] if isinstance(m, ToolMessage)][0]
    assert tm.status == "error" and out["files"] == {}

The first time we ran the suite, one test failed. We had assumed a relative path like report.md would be rejected. It is not: deepagents 0.7.42 stores it as /report.md. That is exactly what tests are for, so we turned the surprise into a test (test_relative_path_is_normalized). The final run:

text
tests/test_agent.py::test_plans_before_acting PASSED
tests/test_agent.py::test_word_count_called_with_the_user_text PASSED
tests/test_agent.py::test_report_file_written PASSED
tests/test_agent.py::test_every_todo_completed PASSED
tests/test_agent.py::test_no_tool_errors PASSED
tests/test_agent.py::test_relative_path_is_normalized PASSED
tests/test_agent.py::test_bad_tool_args_become_readable_errors[args0]
  tool said: error | Error: Path traversal not allowed: /../secret.md
PASSED
tests/test_agent.py::test_bad_tool_args_become_readable_errors[args1]
  tool said: error | Error invoking tool 'write_file' with kwargs {'file_path': '/notes.md'} with error:  content: Field required  Please fix
PASSED
============================== 8 passed in 13.29s ==============================

Bad arguments do not crash the run. They come back to the model as a ToolMessage with status="error", which the model can read and fix. That is the behavior you want to lock in.

Then we ran the same checks on the recorded Llama 4 Scout trace from earlier (check_trajectory.py reads the logger's JSON):

text
tool order: ['word_count', 'word_count', 'write_todos', 'write_file']
FAIL plans before acting
FAIL word_count called exactly once
PASS report written
PASS no tool errors

Same assertions, two uses. On the fake they guard the wiring. On real traces they measure how often a given model follows your plan.

flowchart LR
    S[Scripted fake model] --> G[Same agent graph]
    R[Real model] --> G
    G --> ST[State: messages, files, todos]
    ST --> P[pytest checks]
    G --> L[TraceLogger JSON]
    L --> C[check_trajectory.py]
    P --> V{pass?}
    C --> V

A judge in the loop: RubricMiddleware

Assertions check structure. They cannot tell you if a report is good. For that, deepagents 0.7.42 ships RubricMiddleware (it is exported from the top-level package; the source is deepagents/middleware/rubric.py). From its docstrings:

  • You pass a rubric string in the input state. With no rubric, the middleware does nothing.
  • Each time the agent would finish, a separate grader agent reads the transcript and returns a structured GraderResponse: satisfied, needs_revision or failed, with a pass or fail per criterion and a gap for each failure.
  • On needs_revision, the feedback goes back to the agent as a HumanMessage tagged lc_source="rubric_grader" and the loop resumes, up to max_iterations (default 3).
  • The grader sees at most the last 30 messages, each cut to 4,000 characters.
python
from deepagents import RubricMiddleware

agent = build_agent(model, middleware=[
    RubricMiddleware(model="anthropic:claude-sonnet-4-6", max_iterations=3,
                     on_evaluation=print)])
out = agent.invoke({
    "messages": [{"role": "user", "content": "How many words: ..."}],
    "rubric": "1. The answer states the word count. 2. The answer is saved to /report.md.",
})

With both models scripted, the loop works as described. The agent answers without saving, the grader asks for a revision, the agent writes the file, the grader is satisfied:

text
grader iteration 0: needs_revision | The count is right but nothing was saved.
    PASS Answer states the word count |
    FAIL Answer is saved to /report.md | Call write_file to save the answer to /report.md.
grader iteration 1: satisfied | Both criteria pass.
...
 human rubric_grader  'A grader reviewed your work against the rubric and asked for revisions before we can finish.\n\nGrader feedback:'
...
files: ['/report.md']

Then we kept the same scripted agent, which never saves on its first try, and used Llama 4 Scout as the grader. The result was a warning:

text
grader iteration 0: satisfied | The agent transcript provides a word count.
    PASS The answer states the word count. |
    PASS The answer is saved to /report.md. |
wall s: 81.1 | files: []
summary: {'model_calls': 9, 'tool_calls': 0, 'input_tokens': 15522, 'output_tokens': 851, ...}

The grader passed "saved to /report.md" while files was empty. It also made 8 model calls for one verdict, 15,522 input tokens and 81 seconds, to grade a 7-word answer. Our trace does not show why it took 8 calls. A small judge model can be wrong and expensive at the same time.

One rubric check: scripted vs Llama 4 Scout grader
grader model calls8wall time (s)81.1verdict correct (1=yes)0
Data from the sources listed below.

The lesson is not "don't use judges". It is: check facts with code, judge quality with a model. A file exists or it does not; assert "/report.md" in files is never fooled. Give the grader tools= so it can read state instead of trusting the transcript, use a strong grader model, and track its verdicts against your deterministic checks.

Hand-drawn diagram: on the left a scripted fake model feeds deterministic checks with the same result every run, 8 tests in 13 seconds; on the right a real model run feeds a rubric grader where an LLM judges; both feed a verdict, and the grader arrow is marked can be wrong

Deployment options, from the docs

When the agent passes its evals, it needs a home. The docs describe three paths. We summarize them here; we did not deploy anything.

1. Managed Deep Agents. The "Going to production" page calls it the recommended path: a CLI-first hosted runtime in LangSmith, in public beta on LangSmith Cloud and Bring Your Own Cloud. You write the agent as a folder of files (agent.py, instructions.md, skills/, tools/ and so on) and upload it with the mda CLI. It uses define_deep_agent, which returns a definition, and the managed runtime compiles it with create_deep_agent for you.

2. LangSmith Agent Server. For custom code, custom routes or advanced auth. You describe the app in langgraph.json:

json
{
  "dependencies": ["."],
  "graphs": { "word_counter": "./graph.py:agent" },
  "env": ".env"
}

The Agent Server docs say a deployment is your graphs plus PostgreSQL for persistence and a task queue, with Redis for signaling and streaming. The server injects its own checkpointer and store, so the docs say not to configure them in the graph code you deploy. langgraph dev runs the same API locally.

3. Self-host the SDK. create_deep_agent returns a compiled LangGraph graph, so you can call it from any Python server. You own the checkpointer, store and auth. Here is the smallest version we ran:

python
import uuid
from fastapi import FastAPI
from pydantic import BaseModel
from langgraph.checkpoint.memory import InMemorySaver

app = FastAPI()
agent = build_agent("anthropic:claude-sonnet-4-6", checkpointer=InMemorySaver())

class Ask(BaseModel):
    message: str
    thread_id: str | None = None

@app.post("/runs")
def run(ask: Ask):
    thread_id = ask.thread_id or str(uuid.uuid4())
    log = TraceLogger()
    out = agent.invoke({"messages": [{"role": "user", "content": ask.message}]},
                       config={"configurable": {"thread_id": thread_id}, "callbacks": [log]})
    return {"thread_id": thread_id, "answer": out["messages"][-1].content,
            "files": sorted(out["files"]), "trace": log.summary()}

@app.get("/threads/{thread_id}/files")
def files(thread_id: str):
    state = agent.get_state({"configurable": {"thread_id": thread_id}})
    return {p: d["content"] for p, d in state.values.get("files", {}).items()}

Running it with uvicorn on the scripted model:

text
$ curl -s -X POST localhost:8012/runs -H "content-type: application/json" -d '{"message": "How many words: Deep agents plan, delegate and write files."}'
{"thread_id":"bb096789-...","answer":"The text has 7 words. I saved the answer to /report.md.","files":["/report.md"],"trace":{"model_calls":5,"tool_calls":4,...}}
$ curl -s localhost:8012/threads/bb096789-.../files
{"/report.md":"Word count: 7\n"}

The second call works because the checkpointer keeps the thread's state, files included. InMemorySaver loses everything on restart; for real use, swap in a persistent checkpointer. The trace summary in every response is a cheap way to log cost per request.

flowchart TD
    Q{Who runs the servers?} -->|LangSmith| MDA[Managed Deep Agents: mda CLI]
    Q -->|You, with Agent Server| AS[langgraph.json + Postgres + Redis]
    Q -->|You, plain Python| FA[FastAPI + your checkpointer]
    MDA --> T[Traces in LangSmith]
    AS --> T
    FA --> TL[TraceLogger or LangSmith env vars]

How this code was tested

All code ran in this order on deepagents 0.7.42, langchain 1.5.2, langchain-core 1.8.5, langgraph 1.2.24, langsmith 0.16.2, pytest 9.2.0, FastAPI 0.165.0, Python 3.12.3. The article shows "anthropic:claude-sonnet-4-6" as the model string. Two runs used Llama 4 Scout (@cf/meta/llama-4-scout-17b-16e-instruct) on Cloudflare Workers AI through the same create_deep_agent code: the TraceLogger run and the rubric run with a real grader. Everything else (the message log, debug=True, the pytest suite, the scripted rubric loop and the FastAPI server) used a scripted fake model to show the wiring. No LangSmith account was used.

The next part puts all of this to work on a bigger agent with two subagents and an approval step.

Nuances from running it live

We ran the Part 13 research team on a public demo (Groq's free plan, openai/gpt-oss-120b lead, openai/gpt-oss-20b researcher and critic). Every run streamed its events to a log, the same idea as Option 2 above. Those logs caught two failures that a "did it finish?" check would miss.

Run 7: the critic said nothing, the lead said "I will" and stopped

The critic subagent read /draft.md and the notes, then returned an empty message. The lead listed the critic's points itself, then ended its turn with "I will now revise the draft accordingly and produce the final report". It never wrote /final_report.md. The visitor got the draft, marked unfinished.

sequenceDiagram
  participant L as Lead (120b)
  participant C as Critic (20b)
  participant F as Files
  L->>C: review /draft.md against notes
  C->>F: ls, ls, read /draft.md, read notes
  C-->>L: "" (empty reply)
  L-->>L: "I will now revise ... and produce the final report"
  Note over L,F: turn ends, /final_report.md never written

Two small middlewares fix this in code (commit 089eef9). An empty critic reply becomes a plain note, and a lead that stops without the report, with time left, is pushed once:

python
NO_FINDINGS = "Critic returned no findings."

class LeadNudge(AgentMiddleware):
    @hook_config(can_jump_to=["model"])
    def after_model(self, state, runtime):
        ...
        if "/final_report.md" in (state.get("files") or {}):
            return None
        self.nudged = True
        return {"messages": [HumanMessage(content=LEAD_NUDGE)], "jump_to": "model"}

Eval to add: "the run ended with /final_report.md present", checked in code from the state, not from what the lead says.

Run 8: finished, approved, and wrong

Run 8 was the first full run: 85.9 s, 17 model calls, critic approved, approval card raised, final report written. It looked perfect. But the report said no new version shipped after v0.6 in May. Run 6 had read the Deep Agents v0.7 blog post, and run 7's notes listed a 0.7.11 release.

Pages actually read by the researcher
Run 62Run 70Run 80
Data from the sources listed below.
flowchart LR
  A[3 searches, 0 pages read] --> B[auto notes: 3 snippets]
  B --> C[no v0.7 in the snippets]
  C --> D["draft: no version after v0.6"]
  D --> E{critic: is every claim in the notes?}
  E -->|"yes, nothing contradicts it"| F[APPROVED]
  F --> G[report ships, complete and wrong]

What happened, from the log:

  • The researcher ran 3 searches and opened no pages. The notes were 3 search snippets.
  • None of those snippets mentioned v0.7, so "nothing after v0.6" matched the notes.
  • Run 7 also read 0 pages, but one of its search snippets happened to name 0.7.11. Snippet-only research is right or wrong by luck of the search results.
  • The critic checks claims against the notes. A claim that something does not exist has nothing in the notes to contradict it, so it passed.

Lessons for evals:

  • A complete-looking report is not an accurate one. "Report exists" and "critic approved" are process checks, not truth checks.
  • Count page reads. A research run with 0 pages read should be flagged, or blocked from saying "nothing changed".
  • Claims of absence ("no release since X") need their own rule: either a source that says so, or a softer line such as "the sources found do not mention a later release".
  • Keep a small gold set with known answers. "What is the latest Deep Agents version?" would have failed run 8 right away.

Run 9: making it read pages

So we changed the rules for the researcher (commit 18fd083):

flowchart TB
  subgraph R8["Run 8: before"]
    direction LR
    a1[search] --> a2[search] --> a3[search] --> a4["notes from 3 snippets"]
  end
  subgraph R9["Run 9: after"]
    direction LR
    b1[search] --> b2[search] --> b3{"3rd search?"}
    b3 -->|"refused, read a page first"| b4[read a page]
    b4 --> b5{"still not reading?"}
    b5 -->|yes| b6["code opens the top 2 results"]
    b5 -->|no| b7["notes tagged page text or snippet only"]
    b6 --> b7
  end
  R8 ~~~ R9
  • After 2 searches, the next search is refused until a page is read.
  • If the researcher still reads nothing, the code opens the 2 most relevant results itself, with the same blocked-address rules.
  • Every line in the notes is tagged [page text] or [snippet only].
  • The critic now gets today's date, and rejects "nothing changed", version and date claims that page text does not back.
Pages read per run (researcher or code)
Run 80Run 92Run 102
Data from the sources listed below.

What run 9 did, from the log:

sequenceDiagram
  participant R as Researcher
  participant W as Web
  participant K as Code
  participant C as Critic
  R->>W: search 1, search 2
  R->>K: search 3
  K-->>R: refused, read a page first
  R->>W: read github.com/langchain-ai/deepagents/releases
  W-->>R: deepagents==0.7.43, two bug fixes
  R->>W: read .../releases/tag/v0.7.43
  W-->>R: HTTP 404
  R->>W: search 3
  K->>W: opens the repo page itself
  K->>K: saves notes, tagged page text or snippet only
  C-->>C: "last month" has no date in the notes
  • It read the releases page, which lists deepagents 0.7.43 with two bug fixes. The report named 0.7.43 as the latest release, correctly this time.
  • The critic caught a real problem: the draft said the release came "last month", but no page it read gave a date. The final report says the date is not settled instead of guessing.
  • It no longer claimed nothing else changed. It said search snippets hinted at other features that the pages read did not confirm.
  • Remaining flaw: the lead wrote the Sources list as titles with no links. The fix (commit 7144119) attaches each source's URL from the research notes after the report is written, and never adds a URL that is not in the notes. It passes offline tests, but a live run has not checked it yet.

Run 10: a different reading of "last month", then out of time

We ran the same question once more after the links fix. It shows what the new rules do not cover.

  • The lead's prompt has today's date (November 29). It read "last month" as October, the previous calendar month, and told the researcher to look at "approximately October 2026". That is a fair reading, but a different one from run 9's last 30 days.
  • The researcher read the LangChain October 2026 newsletter, and the code opened the Deep Agents v0.6 post. Neither is the releases page, so 0.7.43 never came up.
  • The critic flagged a wrong attribution in the draft (features from the newsletter credited to the v0.6 post), and the lead rewrote it. Then the lead's last model call started at about 160 s and had not returned when the run hit its 265 s limit, so there was no final report and no approval card. Why that call was so slow is not in the log.
  • Because no final report was written, the new source-link code never ran. The draft it showed did have links, written by the lead itself.
Seconds per run after the read-pages fix
Run 9: full report146.4 sRun 10: out of time265 s
Data from the sources listed below.

Eval lessons from runs 9 and 10:

  • Pin down vague time words. The same question gave two different windows in two runs; the prompt should say what "last month" means, for example the last 30 days.
  • Reading pages is necessary, not sufficient. A gold question needs a check that the right page was read, here the releases page.
  • One slow call can still eat a whole run. Time per call belongs in the eval log next to the call count.

Try this

bash
pip install deepagents==0.7.42 langchain==1.5.2 langgraph==1.2.24 pytest fastapi uvicorn
python run_logger_fake.py          # trace + message log + files + todos
python debug_mode.py | head        # raw graph steps
pytest tests -v -s                 # 8 deterministic evals
python rubric_eval.py              # the grader loop, scripted
uvicorn server:app --port 8012     # then curl -X POST localhost:8012/runs ...

Then break something on purpose: change word_count to return a string, or delete write_todos from the script, and watch which test catches it.

Sources