Skip to content

feat(code): running session cost in status bar and usage - #5036

Merged
Mason Daugherty (mdrxy) merged 32 commits into
mainfrom
mdrxy/code/session-cost-tracking
Jul 31, 2026
Merged

Mason Daugherty (mdrxy) merged 32 commits into
mainfrom
mdrxy/code/session-cost-tracking

Conversation

@mdrxy

@mdrxy Mason Daugherty (mdrxy) commented Jul 24, 2026

Copy link
Copy Markdown
Member

Closes #4519

Deep Agents Code now keeps a running estimated USD total for the active thread. The status bar shows it beside token usage, /cost and /tokens break it down on demand, and usage summaries include per-model cost. The total covers everything the thread spends — assistant turns, subagents, offload/compaction, and Auto mode's classifier — and it is restored on resume and thread switches.


Where the number lives

A thread's lifetime cost should be durable to support --resume and switching between threads. Consequently, the graph owns it and the client (e.g. TUI / headless CLI) can read it.

Concretely, _session_cost_usd is a new channel on the agent's state schema (CostState, which extends ResumeState), which means it is persisted by the graph's checkpointer, in the same checkpoint as messages.

FAQ: CostState, and why it extends ResumeState

CostState is the state schema CostTrackingMiddleware declares — the agent's state plus one channel:

class CostState(ResumeState):
    _session_cost_usd: Annotated[NotRequired[float], PrivateStateAttr, operator.add]

What ResumeState already holds. It's the schema for facts that belong to the thread as a whole rather than to any one message — the things the TUI/client needs the moment you open a thread, before the agent runs again:

  • _context_tokens — how full the context window was after the last turn. This drives token readout — e.g., the display in the TUI's footer status bar, where the cost figure now also sits.
  • _model_spec / _model_params — the model and settings the thread was using, so -r resumes on that model instead of whatever your current global default might happen to be.
  • _goal_objective, _goal_rubric, _goal_status, _goal_status_note, _sticky_rubric, and the pending-proposal fields — the goal the thread is working toward (if one is set) and where progress on said goal stands.

Every field here is private, including the new one. A graph has a public interface: its input and output schemas say what callers may pass in and receive back (messages is the obvious example). None of the fields above belong in that interface, as they aren't things a caller supplies or asks for — they're notes that dcode writes for itself so it can pick the thread back up later.

PrivateStateAttr omits a field from those public input/output schemas. It does not make the field ephemeral or unreadable: the channel remains ordinary checkpointed state, is available to graph nodes, and is returned by get_state. Its writes can also appear as raw deltas in the updates stream; the live status bar uses a dedicated absolute-total event instead so the client does not have to reproduce the reducer (details below).

These values are stored rather than recomputed, because recomputing them is expensive or impossible after the fact. Reopening a thread has to show the context gauge and the current model immediately. The context number originally came from the last response's usage_metadata — the provider counted it for us. If it weren't saved, the CLI would have to load the whole message history and count tokens itself to guess at it: slow, dependent on having a tokenizer that matches the provider's, and still only an approximation of what was actually billed. Cost is the same shape of problem and worse — re-deriving it would mean re-pricing every message in the thread every time you open it.

So why extend ResumeState? Cost is the same kind of resumable thread fact, and pricing also needs the model information that ResumeState already carries. LangChain's AIMessage contract does not require a model identifier: usage_metadata standardizes token counts, while response_metadata is optional. Provider integrations commonly include a model name, but custom and third-party integrations are allowed to omit it. When a response does, pricing falls back to the _model_spec persisted for that turn.

Riding the checkpoint is a deliberate choice over an alternative where the client prices a turn and then pushes the new total with aupdate_state. (That's a second round trip that can be interrupted — e.g. Ctrl-C, a crash, a dropped connection — after the messages have already been committed.) Writing from inside the graph puts the cost in the same commit as the response that incurred it. Importantly, it also keeps an UpdateState run/span out of LangSmith traces if configured. Restoring is then a single aget_state read from the checkpoint.

Two things about the channel's declaration matter downstream:

  • Additive. Its reducer is operator.add, so a writer returns only the delta it just priced — literally {"_session_cost_usd": 0.02}, never a replacement total. If a thread starts a turn at $1.00, after_model contributes $0.02 and a later rubric-grading drain contributes $0.005, the checkpoint ends at $1.025. Neither hook has to perform its own read-modify-write.
  • Private. It carries PrivateStateAttr, keeping cost out of the graph's public input/output contract while leaving it checkpointed and readable through get_state. Deep Agents also uses this marker to identify state that must not cross the main-agent/subagent boundary.

The cumulative channel has one writer: the CostTrackingMiddleware instance belonging to the thread's main agent. Subagents run the same middleware, but theirs is constructed with nested=True, which switches its pricing off — a subagent's spend is charged by its parent instead, as the next section explains.

To get every completed model call to that writer, the cost-tracking module installs one process-wide Recorder. The Recorder is an in-memory inbox for completed model calls, implemented as a LangChain callback (BaseCallbackHandler). When a request finishes, it files the request's usage, model/provider metadata, and message ID under that thread. It does not calculate cost or write graph state; it only holds records until the main agent's middleware drains them.

flowchart LR
    subgraph calls["every model call in the run"]
        direction TB
        A["assistant"]
        B["subagent"]
        C["offload / summarization"]
        D["Auto mode classifier"]
        E["rubric grader"]
    end
    calls --> REC["in-memory model-call recorder<br/>collects usage, keyed by thread"]
    REC --> MW["CostTrackingMiddleware<br/>drains, prices, adds the delta"]
    MW --> CK[("checkpoint<br/>_session_cost_usd")]
    MW -. "stream event: absolute total" .-> BAR["status bar and /cost"]
    CK -. "resume, thread switch, end of turn" .-> BAR
Loading

The client is purely a reader; nothing outside the graph writes to the channel.

Why collecting is split from pricing

The obvious place to price a request is after_model, but that hook only ever sees the agent's own model node, and a large share of a thread's spend can happen somewhere else entirely:

Model call Runs in
Assistant turn, Auto mode classifier model node
Offload / summarization before_model (stock) or the model wrap chain (deepagents)
Subagent turns tool node, in a child graph
compact_conversation tool node
Rubric grading after_agent

The Recorder and the middleware have complementary access:

  • The Recorder sits at LangChain's callback layer, so it can observe model calls made by the main agent, a subagent, summarization, or another direct invocation. But a callback is not a graph node and cannot return an update to _session_cost_usd.
  • CostTrackingMiddleware runs inside the main agent's graph, so its hooks can return an additive update that the checkpointer persists. But those hooks do not run inside a child graph or around a bare side invocation, so they cannot discover all spend on their own.

The in-memory queue bridges those two scopes. The callback places one record in the queue when a request completes; CostTrackingMiddleware drains the current thread's records in after_model and after_agent, prices them, and returns their sum as one state update.

Example: one turn with hidden model work

Suppose a thread already sits at $1.00. Before the main response, summarization spends $0.004; the main response then spends $0.020. The Recorder files both completions under the thread. after_model drains those two records and writes +0.024, taking the checkpoint to $1.024.

If rubric grading then spends $0.005 after the final model step, after_agent drains that later record and writes +0.005. The committed total is $1.029. A subagent call works the same way: its record waits in the shared thread queue until the parent's next drain.

Why the main response is also checked in state

Normally, a main-agent response with message ID m1 produces a Recorder entry for m1. The middleware prices that entry, remembers that m1 was charged, and skips the copy of m1 already present in graph state.

If a custom or third-party integration returns an AIMessage with usage metadata but no usable callback record was filed — for example, the callback could not associate the request with a thread — after_model can still price that main response from state. Comparing message IDs lets the normal and fallback paths coexist without double-counting. This fallback is limited to the main response; hidden calls are not in the parent's state and therefore still rely on the Recorder.

How subagent spend is counted

An earlier version of this PR had subagents accumulate into their own copy of the channel and merge the total back. That silently did nothing because Deep Agents intentionally treats PrivateStateAttr as agent-local state: SubAgentMiddleware discovers those keys and strips them both when seeding a child and when merging its result. This prevents one agent's internal bookkeeping from leaking into another and avoids parallel subagents racing to write private LastValue channels. A parent-visible aggregate would need a separate shared/public contract; for cost, the thread-keyed recorder supplies that bridge without weakening private-state isolation.

Since a subagent inherits its parent's thread ID, its completed model calls land in the same in-memory recorder queue. The parent drains and prices those records on its next after_model or after_agent hook:

sequenceDiagram
    participant P as Main agent
    participant R as In-memory recorder
    participant S as Subagent
    participant C as Checkpoint
    P->>R: assistant call usage
    R-->>P: drain 1 record
    P->>C: add priced delta
    P->>S: task tool
    S->>R: nested call usage
    Note over S: Nested cost middleware does not<br/>price or accumulate spend
    S-->>P: result
    P->>R: next assistant call usage
    R-->>P: drain nested + assistant records
    P->>C: add priced delta
Loading

Keeping the status bar live

The updates stream can expose the private channel's writes, but those writes are reducer inputs such as +0.02, not the post-reducer lifetime total. Making the client accumulate them would create a second copy of the graph's state machine, vulnerable to missed stream chunks. Instead, the writer emits a small custom event carrying the absolute total and the client applies it with set_cost.

How an absolute event recovers from a dropped update

Suppose the client shows $1.00. The graph commits another $0.02 and emits $1.02, but that event is dropped. A later $0.005 charge emits $1.025. Because the payload is an absolute value, the client replaces $1.00 with $1.025 and is correct again; a delta-only stream would leave it permanently short by the missed $0.02. The end-of-turn checkpoint read provides another reconciliation point if the final event is the one that disappears.

The provisional number exists only to make the status bar react before the graph reaches its next cost-tracking hook. These two client-side fields have different jobs:

  • _session_cost_usd is the latest absolute total received from the graph. It is the durable value restored from the checkpoint.
  • _provisional_cost_usd is a temporary display estimate derived from usage on the message stream. It is never written to graph state.

For a request estimated at $0.02, the display moves through this sequence:

Moment Durable total Provisional Status bar
Before the request $1.00 $0.00 $1.00
Usage arrives on the message stream $1.00 $0.02 $1.02
The graph emits its new absolute total $1.02 $0.00 $1.02

The last step replaces the durable total and clears the provisional bucket, so the same request is not shown twice. The displayed number stays steady at $1.02; only its source changes from an early estimate to checkpointed state. On a completed turn, the final checkpoint read provides the same reconciliation if the custom event was missed.

/cost's per-type and per-model rows remain client-side and stay labeled “since this thread was loaded” — only the lifetime total above them comes from the graph.

Pricing

Pricing stays in one place: estimate_cost is the only function that touches canonical price data, currently through genai-prices. For each request it needs split input/output token counts, the model, and — when the model name is available from more than one host — the provider. Provider names are normalized to the identifiers in the price catalog; if response metadata omits the model or provider, the checkpointed model spec is the fallback.

Here are the main pricing paths.

Ordinary input and output. Suppose a catalog entry charges $2 per million input tokens and $8 per million output tokens. A request with 10,000 input tokens and 2,000 output tokens is estimated as:

input:  10,000 / 1,000,000 × $2 = $0.020
output:  2,000 / 1,000,000 × $8 = $0.016
total:                              $0.036

(Those rates are illustrative; genai-prices supplies the actual model/provider rates.)

Provider-specific lookup. The response's provider matters when the same model family is sold through different hosts. For example, LangChain's azure_openai provider name is normalized to the catalog's azure identifier, while a direct OpenAI request uses openai. This prevents a recognizable model name from silently selecting the wrong host's price.

Cached input. LangChain's input_tokens is inclusive of cache reads and writes. If a response reports 1,000 input tokens with 600 cache-read tokens and 100 cache-write tokens, only 300 are ordinary input:

ordinary input: 1,000 - 600 - 100 = 300
cache reads:                            600
cache writes:                           100

estimate_cost passes all three buckets to genai-prices, which applies the ordinary-input, cache-read, and cache-write rates separately. Output tokens are priced independently. If malformed provider metadata says the cache buckets exceed the inclusive input count, the tracker clamps them to the input total rather than creating a negative ordinary-input count.

Anthropic cache TTLs. When Anthropic reports its TTL breakdown, LangChain sets generic cache_creation to zero and exposes ephemeral_5m_input_tokens and ephemeral_1h_input_tokens instead. If those fields contain 100 and 50 tokens, the tracker passes 150 cache-write tokens rather than accidentally billing them as ordinary input. genai-prices currently exposes one cache-write bucket, so the two TTL buckets share that catalog estimate.

The estimator declines to guess when the available data cannot support a defensible calculation:

  • A response with only total_tokens=1_200 is unpriceable because those tokens could be input, output, or a mixture, and the rates usually differ.
  • An unknown model has no canonical catalog rate to apply.
  • Subscription-style access such as the Codex provider is not equivalent to per-token API billing.
  • Malformed or non-finite usage/price data is ignored rather than allowed to fail the model turn.

In each case estimate_cost returns None; the request is omitted from the dollar total while its token usage can still appear in /tokens.

@github-actions github-actions Bot added package:dcode Changes related to the `deepagents-code` terminal coding agent. dependencies type:feature A request, idea, or new user-facing functionality or behavior. org:internal Issue or pull request created by a member of the `langchain-ai` GitHub organization. size: XL Pull request with an extra-large diff. labels Jul 24, 2026
@socket-security

socket-security Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​genai-prices@​0.1.0100100100100100

View full report

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 2 potential issues.

Open in WebView Open SWE trace

Comment thread libs/code/deepagents_code/cost_tracking.py Outdated
Comment thread libs/code/deepagents_code/tui/textual_adapter.py Outdated
LangChain zeroes cache_creation when ephemeral TTL breakdown fields are
present. Sum those fields so cache writes are not priced as plain input.
Record stream usage before subagent/summarization render filters, install
cost middleware on subagents with additive channel merge, and clear nested
cost on start so parent totals are not double-counted.

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 1 potential issue.

Open in WebView Open SWE trace

Comment thread libs/code/deepagents_code/cost_tracking.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced that we're helping ourselves with graph-state-level cost tracking here. Imo it's making the system more complex than it needs to be and is out of scope of main lift for this feature

Given that we're already accumulating the cost client-side and the client-side accumulation is built to segment by model etc, the server-side accumulation feels unrelated + like it's shoehorned into the client-side impl

Better imo to simplify and make client-side SSoT. What do you think?

Comment thread libs/code/tests/unit_tests/tui/widgets/test_startup_tip.py Outdated
Comment thread libs/code/deepagents_code/app.py
Comment thread libs/code/deepagents_code/app.py Outdated
Comment thread libs/code/deepagents_code/tui/textual_adapter.py Outdated
Mason Daugherty (mdrxy) and others added 10 commits July 27, 2026 11:24
Include offload and Auto mode spend in the live total and checkpointed
thread total, and surface assistant/subagent/offload/auto cost buckets in
`/cost` alongside the per-model breakdown.
Mark `_session_cost_usd` with `PrivateStateAttr` while leaving the additive reducer last so LangGraph still accumulates nested cost deltas without exposing the channel in public graph I/O schemas.
Resolve COMMANDS.md public-count drift after /cost and main catalog updates,
and keep both CostTrackingMiddleware and ServerHooksMiddleware imports in the
subagent middleware combination test.
Prices every model request a thread makes — assistant, subagent,
offload/summarization, and the Auto mode classifier — from a
thread-keyed callback recorder that `CostTrackingMiddleware` drains in
`after_model` and `after_agent`. `after_model` only ever sees the agent's
own model node, so no amount of middleware reordering reaches the rest.

Nested spend now reaches the checkpoint at all: `task` strips
`PrivateStateAttr` keys both when seeding a subagent and when merging its
result, so the previous accumulate-and-merge wrote nothing and only
looked correct because the client added its own estimates. Subagents keep
the middleware in `nested=True` mode, which zeroes the channel and
records nothing.

The status bar now reads an absolute total streamed from the writer;
client-side estimates only feed a provisional display figure that every
server total resets. Drops `_persist_displayed_cost_to_checkpoint` and
its call sites, so no client path writes the channel.
…st-tracking

# Conflicts:
#	libs/code/deepagents_code/app.py
#	libs/code/deepagents_code/client/non_interactive.py
#	libs/code/tests/unit_tests/test_agent.py
#	libs/code/tests/unit_tests/tui/test_textual_adapter.py
@mdrxy

Copy link
Copy Markdown
Member Author

Alexander Olsen (@aolsenjazz) This was a fair concern with the version you reviewed. At that point, the graph and client both participated in accumulation/persistence, so the graph-side piece did feel bolted onto the client implementation.

I’ve since reworked the ownership boundary: the graph is now the sole writer of the total, while the client only renders that total and keeps an explicitly provisional, since-loaded breakdown for /cost. There is no client-side checkpoint write anymore.

I think this is the better long-term boundary because the graph is the only layer that can reliably account for the entire thread—not just assistant messages, but also subagents, summarization/offload, Auto classification, compaction, and rubric grading. Making each client reconstruct and persist that total would duplicate pricing logic across TUI, headless, and future clients, and hidden invocation paths would be easy to miss.

Keeping the total in private graph state also makes the response and its cost part of the same checkpoint. That avoids a second aupdate_state round trip that could be interrupted after the response was already committed, and resume/thread switching becomes a single state read.

So I agree that graph-level tracking was hard to justify in the earlier dual-writer shape. In the current shape, it gives us one durable source of truth at the layer that sees all spend, while leaving presentation-only detail in the client. I think that separation will hold up much better as we add clients and new model-call paths.

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 1 potential issue.

Open in WebView Open SWE trace

Comment thread libs/code/deepagents_code/tui/textual_adapter.py

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 1 potential issue.

Open in WebView Open SWE trace

Comment thread libs/code/deepagents_code/cost_tracking.py Outdated
@mdrxy

Copy link
Copy Markdown
Member Author

Looked into models.dev as an alternative pricing source. It's a static JSON catalog (models.dev/api.json, ~3 MB) with an npm SDK — no Python package and no pricing function, so we'd vendor a snapshot and write the rate arithmetic ourselves. That's feasible since everything funnels through estimate_cost, but comparing the data on what this PR actually uses:

  • Cache writes: models.dev has a single flat cache_write rate. No 5m/1h TTL split, so Anthropic 1h cache writes lose their premium rate (genai-prices prices them).
  • Tiered pricing: ~250 models have context_over_200k-style tiers. genai-prices applies these; with models.dev we'd implement tier selection ourselves or underprice long-context requests.
  • Provider coverage: no aws/bedrock providers at all, and IDs differ elsewhere (xai vs x-ai), so _PROVIDER_ALIASES would need rework and Bedrock pricing would become a coverage gap.
  • Freshness: models.dev is actively community-maintained, but new models frequently land with $0.00 placeholder pricing before real rates are filled in.

The one thing models.dev offers that genai-prices doesn't is a long tail of obscure providers, but we only ever price against the provider the request ran on, so that breadth doesn't help us.

Net: genai-prices is the better fit on rate fidelity and provider coverage, and the integration here is already written against its usage model (inclusive token totals, TTL buckets, the audio/cache-read overlap constraint). Keeping it. If data staleness in genai-prices becomes a problem, bumping the pin is a much smaller change than swapping sources.

@mdrxy

Copy link
Copy Markdown
Member Author

A question came up about whether the cost data source here could come from LangSmith instead of being computed locally with genai-prices. I dug into what's actually possible and wanted to write it down, since "use LangSmith" turns out to be several different things with very different implications:

1. Usage + cost from the LangSmith API (query runs server-side). Technically possible via list_runs, but it inverts this PR's architecture. Trace ingestion is async, so the status bar and /cost couldn't be live mid-turn; the feature silently degrades whenever LANGSMITH_TRACING is off, a self-hosted/proxied endpoint is in use, or there's no API key; and the checkpointed _session_cost_usd channel + session_cost stream events would have to be reworked around eventual consistency and a network dependency. This loses the durable, offline, tracing-optional, works-with-remote-graph properties the design is built around.

2. Rates from LangSmith's pricing table, computed locally. Doesn't exist — there's no public API to pull the model pricing map, and the langsmith SDK ships no local rate catalog. Cost is only ever computed server-side at ingestion.

3. Send client-computed costs to LangSmith (usage_metadata.total_cost et al.). This is supported per the LangSmith cost-tracking docs: costs you send are stored verbatim and the server doesn't re-run its own pricing on that run (note it's all-or-nothing per run — send total_cost only and the prompt/completion breakdown isn't backfilled). But this is additive, not a replacement: the client still needs its own price table to produce the dollars, so genai-prices stays. It also only flows when tracing is enabled.

Net: keeping local estimation with genai-prices is the right call for what this PR is doing. Option 3 is worth considering separately and only if we want the LangSmith UI dashboards to show the exact same numbers the CLI does — it's a small, optional, tracing-only addition (write total_cost onto the run tree where _SessionCostRecorder already sees the priced usage), not a data-source swap.

@mdrxy
Mason Daugherty (mdrxy) merged commit 539d4a0 into main Jul 31, 2026
62 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the mdrxy/code/session-cost-tracking branch July 31, 2026 04:25
Mason Daugherty (mdrxy) pushed a commit that referenced this pull request Jul 31, 2026
> [!CAUTION]
> Merging this PR will automatically publish to **PyPI** and create a
**GitHub release**.

For the full release process, see
[`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md).

---

_Release notes preview: keep this section in sync with the package
`CHANGELOG.md`. Publish reads the merged CHANGELOG via `release.yml`,
not this PR description — keep them aligned anyway so the PR stays an
accurate historical record for reviewers and anyone returning later._

---


##
[0.1.51](deepagents-code==0.1.50...deepagents-code==0.1.51)
(2026-07-31)

### Features

- The status bar and usage view now show the running session cost.
([#5036](#5036))
- Removed redundant `shell` and `web_search` prompt guidance.
([#5213](#5213))
- After switching threads, Deep Agents now points back to the previous
thread.
([#5172](#5172))
- Leaving `/mcp` with pending toggles now prompts you to reconnect.
([#5211](#5211))
- `dcode config get` now accepts configuration sections.
([#5134](#5134))

### Fixes

- Kept the `/goal` criteria prompt responsive.
([#5142](#5142))
- Improved goal handling so underspecified objectives can be resolved
from conversation context.
([#5201](#5201))
- Released the turn when an interrupted worker never starts.
([#5196](#5196))
- Hid timestamp footers together with their associated rows.
([#5167](#5167))
- Fixed editable SDK detection by scanning and correlating SDK locations
more accurately.
([#5199](#5199))
- Improved `doctor` output to explain why it may not have a
latest-version answer.
([#5209](#5209))

_End release notes preview._

---

> [!NOTE]
> A **New Contributors** section is appended to the GitHub release notes
automatically at publish time (see [Release
Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline),
step 2).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: langchain-oss-automated-triage[bot] <248757908+langchain-oss-automated-triage[bot]@users.noreply.github.com>
Prekshi Vyas (prekshivyas) added a commit to NVIDIA/NemoClaw that referenced this pull request Aug 19, 2026
<!--
patch-walker:action=sha256:4664592e4dabe18250a1e41ea73d7121d7ef19dd4cbc6c01bfe297c519a75974
-->
<!--
patch-walker:manifest=sha256:95728f38d033eae61d4905337245c21043f166f5ef57eaac4908f89e2cc24d7f
-->
<!-- patch-walker:dependency=LangChain Deep Agents Code -->
<!-- patch-walker:target=0.1.55 -->

<!-- markdownlint-disable MD041 -->
## Summary

Updates LangChain Deep Agents Code from 0.1.34 to 0.1.55 using the
sealed NemoPin migration evidence. The implementation and
requested-review fixes are complete; the PR is ready for maintainer
re-review.
<!-- 1-3 plain sentences: what changes and why. Describe
before-and-after behavior when it applies. Follow the NemoClaw Writing
Guide: https://github.com/NVIDIA/NemoClaw/blob/main/WRITING.md. Do not
add unrelated prose cleanup. -->

## Related Issue

No issue closure is claimed.
<!-- Fixes #NNN or Closes #NNN. Remove this section if none. -->

## Changes\n\n- Keeps the dependency migration scoped to LangChain Deep
Agents Code and its onboarding, validation, documentation, and
managed-image checks.\n- Migrates the exact base
`5bb69ed66947fbd2fab6133748866567eb520692` across 21 adjacent release
ranges.\n- Changed paths: `.github/workflows/managed-images.yaml`,
`agents/langchain-deepagents-code/Dockerfile`,
`agents/langchain-deepagents-code/Dockerfile.base`,
`agents/langchain-deepagents-code/dcode-wrapper.sh`,
`agents/langchain-deepagents-code/dependency-review.md`,
`agents/langchain-deepagents-code/manifest.yaml`,
`agents/langchain-deepagents-code/patch-managed-deepagents-code.py`,
`agents/langchain-deepagents-code/profile-plugin/pyproject.toml`,
`agents/langchain-deepagents-code/profile-plugin/src/nemoclaw_deepagents_profile/__init__.py`,
`agents/langchain-deepagents-code/progressive_tool_disclosure.py`,
`agents/langchain-deepagents-code/requirements.in`,
`agents/langchain-deepagents-code/requirements.lock`,
`agents/langchain-deepagents-code/start.sh`,
`agents/langchain-deepagents-code/validate-nemotron-ultra-profile.py`,
`agents/langchain-deepagents-code/validate-observability.py`,
`agents/langchain-deepagents-code/validate-progressive-tool-disclosure.py`,
`docs/deployment/set-up-mcp-bridge.mdx`,
`docs/get-started/quickstart-langchain-deepagents-code.mdx`,
`src/lib/actions/sandbox/rebuild-flow-helpers.test.ts`,
`src/lib/agent/base-image.test.ts`,
`src/lib/agent/deep-agents-code-base-image.test.ts`,
`src/lib/agent/onboard-terminal-fixtures.test.ts`,
`src/lib/agent/onboard-terminal-fixtures.ts`,
`src/lib/agent/onboard-terminal.test.ts`,
`src/lib/inference/onboard-probes.test.ts`,
`src/lib/inference/onboard-probes.ts`,
`src/lib/inference/openai-validation-session.ts`, `src/lib/onboard.ts`,
`src/lib/onboard/created-sandbox-finalization.test.ts`,
`src/lib/onboard/created-sandbox-finalization.ts`,
`src/lib/onboard/dcode-selection-drift.test.ts`,
`src/lib/onboard/dcode-selection-drift.ts`,
`src/lib/onboard/inference-selection-validation.test.ts`,
`src/lib/onboard/machine/handlers/sandbox-checkpoint-crash-recovery.test.ts`,
`src/lib/onboard/machine/handlers/sandbox.ts`,
`src/lib/onboard/sandbox-lifecycle.test.ts`,
`src/lib/onboard/sandbox-lifecycle.ts`,
`src/lib/sandbox-base-image-agent-resolution.test.ts`,
`src/lib/sandbox-base-image-release-resolution.test.ts`,
`src/lib/sandbox-base-image/resolution-key.test.ts`,
`test/Dockerfile.dcode-profile-missing-dependencies`,
`test/cli/connect-terminal-agent.test.ts`,
`test/deepagents-code-tui-startup-check.test.ts`,
`test/e2e/e2e-cloud-experimental/checks/03-deepagents-code-nemotron-ultra-profile.sh`,
`test/e2e/e2e-cloud-experimental/checks/04-deepagents-code-fresh-reonboard.sh`,
`test/e2e/e2e-cloud-experimental/checks/10-deepagents-code-tui-startup.sh`,
`test/e2e/e2e-cloud-experimental/checks/12-deepagents-code-thread-auto-approval.sh`,
`test/e2e/lib/select-authorized-chat-model.mts`,
`test/e2e/live/mcp-bridge-servers.ts`,
`test/e2e/support/authorized-chat-model-selection.test.ts`,
`test/fixtures/deepagents-progressive-disclosure-harness.py`,
`test/fixtures/langchain-deepagents-code/server.py`,
`test/helpers/langchain-deepagents-code-patch-fixture.ts`,
`test/helpers/managed-image-buildless-e2e.ts`,
`test/issue-5667-hosted-inference-model-namespace.test.ts`,
`test/langchain-deepagents-code-direct-module-patch.test.ts`,
`test/langchain-deepagents-code-image.test.ts`,
`test/langchain-deepagents-code-nemotron-profile-plugin.test.ts`,
`test/langchain-deepagents-code-progressive-tool-disclosure.test.ts`,
`test/managed-image-publication-workflow.test.ts`,
`test/managed-image-staging-qa-workflow.test.ts`,
`test/mcp-bridge-servers.test.ts`,
`test/onboard-mcp-observability-redirect.test.ts`,
`test/onboard-prepared-build-context.test.ts`,
`test/onboard-terminal-dashboard.test.ts`\n\n### Release ranges

| Range | Commits | State | Concerns |
|---|---|---|---|
| 0.1.34 → 0.1.35 | `bd9bafaad3f5` → `09daab5772ff` | published | 1 |
| 0.1.35 → 0.1.36 | `09daab5772ff` → `2f56309d821d` | published | 1 |
| 0.1.36 → 0.1.37 | `2f56309d821d` → `def6369aed1a` | published | 2 |
| 0.1.37 → 0.1.38 | `def6369aed1a` → `4338671aa1d9` | published | 4 |
| 0.1.38 → 0.1.39 | `4338671aa1d9` → `8eb909a59b82` | published | 1 |
| 0.1.39 → 0.1.40 | `8eb909a59b82` → `019489edb9c0` | published | 6 |
| 0.1.40 → 0.1.41 | `019489edb9c0` → `d46a2cb033b8` | published | 4 |
| 0.1.41 → 0.1.42 | `d46a2cb033b8` → `18679a1a88a3` | published | 3 |
| 0.1.42 → 0.1.43 | `18679a1a88a3` → `e14e0adcbe78` | published | 2 |
| 0.1.43 → 0.1.44 | `e14e0adcbe78` → `2b9cd08f0492` | published | 5 |
| 0.1.44 → 0.1.45 | `2b9cd08f0492` → `7794b61a6e76` | published | 4 |
| 0.1.45 → 0.1.46 | `7794b61a6e76` → `efa86c51fedd` | published | 1 |
| 0.1.46 → 0.1.47 | `efa86c51fedd` → `8aa29ddc2833` | published | 3 |
| 0.1.47 → 0.1.48 | `8aa29ddc2833` → `803b8329db7d` | published | 3 |
| 0.1.48 → 0.1.49 | `803b8329db7d` → `44910bc2ef3f` | published | 0 |
| 0.1.49 → 0.1.50 | `44910bc2ef3f` → `63adb9645687` | published | 2 |
| 0.1.50 → 0.1.51 | `63adb9645687` → `d2b663fca277` | published | 0 |
| 0.1.51 → 0.1.52 | `d2b663fca277` → `b428644d31dd` | published | 3 |
| 0.1.52 → 0.1.53 | `b428644d31dd` → `0bd15dc0e1c5` | published | 2 |
| 0.1.53 → 0.1.54 | `0bd15dc0e1c5` → `81258067f4c7` | published | 0 |
| 0.1.54 → 0.1.55 | `81258067f4c7` → `80fe3d3cbcd2` | published | 9 |

### Concern dispositions

| Concern | Surface | Planned disposition | Failure prevented |
Remaining gate |
|---|---|---|---|---|
| `langchain-deep-agents-code-0.1.34..0.1.35-lifecycle-state-1` |
lifecycle state | test | 0.1.55 reports lifecycle state: ### Features -
Added a `/context` usage report for inspecting context consumption
([#5407](langchain-ai/deepagents#5407... |
none |
| `langchain-deep-agents-code-0.1.35..0.1.36-lifecycle-state-1` |
lifecycle state | test | 0.1.54 reports lifecycle state: ### Features -
Added Meta `muse-spark-1.2` to the model switcher
([#5389](langchain-ai/deepagents#5389)). -
Improved di... | none |
| `langchain-deep-agents-code-0.1.36..0.1.37-lifecycle-state-1` |
lifecycle state | test | 0.1.53 reports lifecycle state: ### Features -
Added pricing coverage with Baseten built-in overrides and local
fallback overrides when `genai-prices` is missing data ([#5312](h... |
none |
| `langchain-deep-agents-code-0.1.36..0.1.37-runtime-topology-2` |
runtime topology | test | 0.1.53 reports runtime topology: ### Features
- Added pricing coverage with Baseten built-in overrides and local
fallback overrides when `genai-prices` is missing data ([#5312](... |
none |
| `langchain-deep-agents-code-0.1.37..0.1.38-compatibility-change-1` |
compatibility change | test | 0.1.52 reports compatibility change: ###
Features - Hooks v2 is now generally available, with support for loading
hooks from installed plugins. ([#5307](https://github.com/langc... |
none |
| `langchain-deep-agents-code-0.1.37..0.1.38-configuration-2` |
configuration | test | 0.1.52 reports configuration: ### Features -
Hooks v2 is now generally available, with support for loading hooks from
installed plugins. ([#5307](https://github.com/langchain-ai... | none |
| `langchain-deep-agents-code-0.1.37..0.1.38-execution-control-3` |
execution control | guard | 0.1.52 reports execution control: ###
Features - Hooks v2 is now generally available, with support for loading
hooks from installed plugins. ([#5307](https://github.com/langchai... |
none |
| `langchain-deep-agents-code-0.1.37..0.1.38-lifecycle-state-4` |
lifecycle state | test | 0.1.52 reports lifecycle state: ### Features -
Hooks v2 is now generally available, with support for loading hooks from
installed plugins. ([#5307](https://github.com/langchain-... | none |
| `langchain-deep-agents-code-0.1.38..0.1.39-configuration-1` |
configuration | test | 0.1.51 reports configuration: ### Features - The
status bar and usage view now show the running session cost.
([#5036](langchain-ai/deepagents#5036)) -... |
none |
| `langchain-deep-agents-code-0.1.39..0.1.40-compatibility-change-1` |
compatibility change | test | 0.1.50 reports compatibility change: ###
Highlights - Added project hooks workspace trust and expanded Hooks v2
support with client and server lifecycle events plus runtime feed... |
none |
| `langchain-deep-agents-code-0.1.39..0.1.40-execution-control-2` |
execution control | guard | 0.1.50 reports execution control: ###
Highlights - Added project hooks workspace trust and expanded Hooks v2
support with client and server lifecycle events plus runtime feedbac...
| none |
| `langchain-deep-agents-code-0.1.39..0.1.40-lifecycle-state-3` |
lifecycle state | test | 0.1.50 reports lifecycle state: ### Highlights
- Added project hooks workspace trust and expanded Hooks v2 support with
client and server lifecycle events plus runtime feedback ... | none |
| `langchain-deep-agents-code-0.1.39..0.1.40-packaging-artifact-4` |
packaging artifact | test | 0.1.50 reports packaging artifact: ###
Highlights - Added project hooks workspace trust and expanded Hooks v2
support with client and server lifecycle events plus runtime feedba... |
none |
| `langchain-deep-agents-code-0.1.39..0.1.40-runtime-topology-5` |
runtime topology | test | 0.1.50 reports runtime topology: ###
Highlights - Added project hooks workspace trust and expanded Hooks v2
support with client and server lifecycle events plus runtime feedback...
| none |
| `langchain-deep-agents-code-0.1.39..0.1.40-security-identity-6` |
security identity | guard | 0.1.50 reports security identity: ###
Highlights - Added project hooks workspace trust and expanded Hooks v2
support with client and server lifecycle events plus runtime feedbac...
| none |
| `langchain-deep-agents-code-0.1.40..0.1.41-compatibility-change-1` |
compatibility change | test | 0.1.49 reports compatibility change: ###
Features - Added recognition for LangSmith Gateway credentials.
([#5042](langchain-ai/deepagents#5042)) -
Adde... | none |
| `langchain-deep-agents-code-0.1.40..0.1.41-execution-control-2` |
execution control | guard | 0.1.49 reports execution control: ###
Features - Added recognition for LangSmith Gateway credentials.
([#5042](langchain-ai/deepagents#5042)) -
Added s... | none |
| `langchain-deep-agents-code-0.1.40..0.1.41-lifecycle-state-3` |
lifecycle state | test | 0.1.49 reports lifecycle state: ### Features -
Added recognition for LangSmith Gateway credentials.
([#5042](langchain-ai/deepagents#5042)) -
Added sla... | none |
| `langchain-deep-agents-code-0.1.40..0.1.41-runtime-topology-4` |
runtime topology | test | 0.1.49 reports runtime topology: ### Features
- Added recognition for LangSmith Gateway credentials.
([#5042](langchain-ai/deepagents#5042)) -
Added sl... | none |
| `langchain-deep-agents-code-0.1.41..0.1.42-compatibility-change-1` |
compatibility change | test | 0.1.48 reports compatibility change: ###
Features - Added Fireworks `kimi-k3`, GLM-5.2-Fast, and Kimi-K3 to model
selection and recommended models. ([#5082](https://github.com/l... |
none |
| `langchain-deep-agents-code-0.1.41..0.1.42-execution-control-2` |
execution control | guard | 0.1.48 reports execution control: ###
Features - Added Fireworks `kimi-k3`, GLM-5.2-Fast, and Kimi-K3 to model
selection and recommended models. ([#5082](https://github.com/lang... |
none |
| `langchain-deep-agents-code-0.1.41..0.1.42-lifecycle-state-3` |
lifecycle state | test | 0.1.48 reports lifecycle state: ### Features -
Added Fireworks `kimi-k3`, GLM-5.2-Fast, and Kimi-K3 to model selection
and recommended models. ([#5082](https://github.com/langch... | none |
| `langchain-deep-agents-code-0.1.42..0.1.43-compatibility-change-1` |
compatibility change | test | 0.1.47 reports compatibility change: ###
Features - Added `yolo` mode to the `Shift+Tab` approval cycle
([#5035](langchain-ai/deepagents#5035)). -
Show... | none |
| `langchain-deep-agents-code-0.1.42..0.1.43-execution-control-2` |
execution control | guard | 0.1.47 reports execution control: ###
Features - Added `yolo` mode to the `Shift+Tab` approval cycle
([#5035](langchain-ai/deepagents#5035)). -
Show th... | none |
| `langchain-deep-agents-code-0.1.43..0.1.44-compatibility-change-1` |
compatibility change | test | 0.1.46 reports compatibility change: ###
Highlights - Auto mode is now generally available.
[#4957](langchain-ai/deepagents#4957) - Added
configurable ... | none |
| `langchain-deep-agents-code-0.1.43..0.1.44-configuration-2` |
configuration | test | 0.1.46 reports configuration: ### Highlights -
Auto mode is now generally available.
[#4957](langchain-ai/deepagents#4957) - Added
configurable Auto go... | none |
| `langchain-deep-agents-code-0.1.43..0.1.44-execution-control-3` |
execution control | guard | 0.1.46 reports execution control: ###
Highlights - Auto mode is now generally available.
[#4957](langchain-ai/deepagents#4957) - Added
configurable Aut... | none |
| `langchain-deep-agents-code-0.1.43..0.1.44-protocol-schema-4` |
protocol schema | test | 0.1.46 reports protocol schema: ### Highlights
- Auto mode is now generally available.
[#4957](langchain-ai/deepagents#4957) - Added
configurable Auto ... | none |
| `langchain-deep-agents-code-0.1.43..0.1.44-security-identity-5` |
security identity | guard | 0.1.46 reports security identity: ###
Highlights - Auto mode is now generally available.
[#4957](langchain-ai/deepagents#4957) - Added
configurable Aut... | none |
| `langchain-deep-agents-code-0.1.44..0.1.45-compatibility-change-1` |
compatibility change | test | 0.1.45 reports compatibility change: ###
Features - Added the Hooks v2 execution engine and typed hooks data
models ([#4880](langchain-ai/deepagents#48...
| none |
| `langchain-deep-agents-code-0.1.44..0.1.45-execution-control-2` |
execution control | guard | 0.1.45 reports execution control: ###
Features - Added the Hooks v2 execution engine and typed hooks data
models
([#4880](langchain-ai/deepagents#4880)... |
none |
| `langchain-deep-agents-code-0.1.44..0.1.45-lifecycle-state-3` |
lifecycle state | test | 0.1.45 reports lifecycle state: ### Features -
Added the Hooks v2 execution engine and typed hooks data models
([#4880](langchain-ai/deepagents#4880), ... |
none |
| `langchain-deep-agents-code-0.1.44..0.1.45-packaging-artifact-4` |
packaging artifact | test | 0.1.45 reports packaging artifact: ###
Features - Added the Hooks v2 execution engine and typed hooks data
models
([#4880](langchain-ai/deepagents#4880... |
none |
| `langchain-deep-agents-code-0.1.45..0.1.46-runtime-topology-1` |
runtime topology | test | 0.1.44 reports runtime topology: ### Bug Fixes
- Improved approval handling by hiding the `Auto` option when it isn't
eligible and moving Auto mode path checks off the event loo... | none |
| `langchain-deep-agents-code-0.1.46..0.1.47-compatibility-change-1` |
compatibility change | test | 0.1.43 reports compatibility change: ###
Features - Added classifier-backed Auto approval mode behind
`DEEPAGENTS_CODE_EXPERIMENTAL=1`
([#4804](https://github.com/langchain-ai/d... | none |
| `langchain-deep-agents-code-0.1.46..0.1.47-execution-control-2` |
execution control | guard | 0.1.43 reports execution control: ###
Features - Added classifier-backed Auto approval mode behind
`DEEPAGENTS_CODE_EXPERIMENTAL=1`
([#4804](https://github.com/langchain-ai/deep... | none |
| `langchain-deep-agents-code-0.1.46..0.1.47-lifecycle-state-3` |
lifecycle state | test | 0.1.43 reports lifecycle state: ### Features -
Added classifier-backed Auto approval mode behind
`DEEPAGENTS_CODE_EXPERIMENTAL=1`
([#4804](https://github.com/langchain-ai/deepag... | none |
| `langchain-deep-agents-code-0.1.47..0.1.48-compatibility-change-1` |
compatibility change | test | 0.1.42 reports compatibility change: ###
Features - Plugins are now generally available.
([#4797](langchain-ai/deepagents#4797)) -
Added search to the ... | none |
| `langchain-deep-agents-code-0.1.47..0.1.48-execution-control-2` |
execution control | guard | 0.1.42 reports execution control: ###
Features - Plugins are now generally available.
([#4797](langchain-ai/deepagents#4797)) -
Added search to the plu... | none |
| `langchain-deep-agents-code-0.1.47..0.1.48-lifecycle-state-3` |
lifecycle state | test | 0.1.42 reports lifecycle state: ### Features -
Plugins are now generally available.
([#4797](langchain-ai/deepagents#4797)) -
Added search to the plugi... | none |
| `langchain-deep-agents-code-0.1.49..0.1.50-compatibility-change-1` |
compatibility change | test | 0.1.40 reports compatibility change: ###
Features - Added plugin marketplace support
([#4554](langchain-ai/deepagents#4554)). -
Added an “always allow”... | none |
| `langchain-deep-agents-code-0.1.49..0.1.50-execution-control-2` |
execution control | guard | 0.1.40 reports execution control: ###
Features - Added plugin marketplace support
([#4554](langchain-ai/deepagents#4554)). -
Added an “always allow” op... | none |
| `langchain-deep-agents-code-0.1.51..0.1.52-compatibility-change-1` |
compatibility change | test | 0.1.38 reports compatibility change: ###
Features * Improve `/goal` criteria UX
([#4694](langchain-ai/deepagents#4694))
([06f46ff](https://github.com/l... | none |
| `langchain-deep-agents-code-0.1.51..0.1.52-configuration-2` |
configuration | test | 0.1.38 reports configuration: ### Features *
Improve `/goal` criteria UX
([#4694](langchain-ai/deepagents#4694))
([06f46ff](https://github.com/langchai... | none |
| `langchain-deep-agents-code-0.1.51..0.1.52-lifecycle-state-3` |
lifecycle state | test | 0.1.38 reports lifecycle state: ### Features *
Improve `/goal` criteria UX
([#4694](langchain-ai/deepagents#4694))
([06f46ff](https://github.com/langch... | none |
| `langchain-deep-agents-code-0.1.52..0.1.53-configuration-1` |
configuration | test | 0.1.37 reports configuration: ### Features * Add
Meta model provider
([#4650](langchain-ai/deepagents#4650))
([70829c5](https://github.com/langchain-ai... | none |
| `langchain-deep-agents-code-0.1.52..0.1.53-security-identity-2` |
security identity | guard | 0.1.37 reports security identity: ###
Features * Add Meta model provider
([#4650](langchain-ai/deepagents#4650))
([70829c5](https://github.com/langchai... | none |
| `langchain-deep-agents-code-0.1.54..0.1.55-compatibility-change-1` |
compatibility change | test | 0.1.35 reports compatibility change: ###
Features * Restore interrupted prompt to input on ESC
([#4544](langchain-ai/deepagents#4544))
([fccf037](https... | none |
| `langchain-deep-agents-code-0.1.54..0.1.55-configuration-2` |
configuration | test | 0.1.35 reports configuration: ### Features *
Restore interrupted prompt to input on ESC
([#4544](langchain-ai/deepagents#4544))
([fccf037](https://gith... | none |
| `langchain-deep-agents-code-0.1.54..0.1.55-execution-control-3` |
execution control | guard | 0.1.35 reports execution control: ###
Features * Restore interrupted prompt to input on ESC
([#4544](langchain-ai/deepagents#4544))
([fccf037](https://... | none |
| `langchain-deep-agents-code-0.1.54..0.1.55-lifecycle-state-4` |
lifecycle state | test | 0.1.35 reports lifecycle state: ### Features *
Restore interrupted prompt to input on ESC
([#4544](langchain-ai/deepagents#4544))
([fccf037](https://gi... | none |
| `langchain-deep-agents-code-0.1.54..0.1.55-protocol-schema-5` |
protocol schema | test | 0.1.35 reports protocol schema: ### Features *
Restore interrupted prompt to input on ESC
([#4544](langchain-ai/deepagents#4544))
([fccf037](https://gi... | none |
|
`langchain-deep-agents-code-0.1.54..0.1.55-code-impact-configuration-1`
| mapped configuration | test | The exact-ref diff reports configuration
changes in .pre-commit-config.yaml, libs/acp/deepagents_acp/server.py,
libs/acp/tests/test_agent.py. Mapped NemoClaw examples: src/lib/a... |
none |
|
`langchain-deep-agents-code-0.1.54..0.1.55-code-impact-contract-or-schema-2`
| mapped contract or schema | test | The exact-ref diff reports contract
or schema changes in libs/acp/deepagents_acp/_version.py,
libs/acp/deepagents_acp/server.py,
libs/code/deepagents_code/_ask_user_types.py. Ma... | none |
| `langchain-deep-agents-code-0.1.54..0.1.55-code-impact-security-3` |
mapped security | test | The exact-ref diff reports security changes in
libs/code/deepagents_code/_cli_context.py,
libs/code/deepagents_code/_env_vars.py,
libs/code/deepagents_code/_repository_bounds.py... | none |
| `langchain-deep-agents-code-0.1.54..0.1.55-code-impact-test-4` |
mapped test | test | The exact-ref diff reports test changes in
libs/acp/tests/chat_model.py, libs/acp/tests/test_agent.py,
libs/code/tests/integration_tests/benchmarks/test_local_context_benchmarks...
| none |

### Immutable artifacts

| Artifact | SHA-256 |
|---|---|
| deepagents_code-0.1.55-py3-none-any.whl | `3a0d3e332f132d0e…` |
| deepagents_code-0.1.55.tar.gz | `91c30b62cb96d5e8…` |

### Validation receipt

| Gate | Current result |
|---|---|
| targeted | Pass — 130 affected local tests, commit hooks, growth
guardrails, and pre-push typechecks passed on the unchanged PR patch now
at `78268b19e` |
| full-e2e | In progress on the latest PR commit — all required checks
pass; three non-required managed-image jobs are still running |
<!-- List concrete changes. If this adds an abstraction, configuration,
fallback, migration, or compatibility path, name its current requirement
and consumer, explain why a direct change is insufficient, and identify
the test that protects it. -->

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [x] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — CodeRabbit completed successfully on the unchanged PR patch
and all inline review threads are resolved; human re-review remains
requested.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: `docs/deployment/set-up-mcp-bridge.mdx` and
`docs/get-started/quickstart-langchain-deepagents-code.mdx` accurately
document the changed Deep Agents Code behavior and versions. The
documented deepagents-code 0.1.55 and deepagents 0.7.5 versions match
the manifest, inputs, lockfile, and profile plugin. `npm run docs`
passed with 0 errors and two pre-existing Fern warnings.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 78268b1 -->
<!-- docs-review-agents-blob-sha: e30afb2 -->

## DGX Station Hardware Evidence
<!-- Required only when scripts/prepare-dgx-station-host.sh changes.
Maintainers must review the linked evidence before approving or merging.
This is human-reviewed evidence, not authenticated hardware provenance.
Exceptional bypasses use existing repository governance and must be
documented on the PR. -->
- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification
<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [x] PR description includes a `Signed-off-by:` line and all 81 commits
appear as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed on
the unchanged PR patch now at `78268b19e`
- [x] Targeted behavior tests pass for the current change set — affected
local suites: 130/130; growth guardrails passed
- [ ] Applicable broad gate passed — all required GitHub checks pass;
non-required managed-image validation is still in progress
- [x] Quality Gates section completed with required justifications
- [x] No secrets, API keys, or credentials committed; gitleaks passed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

<!-- patch-walker-status:start -->
## NemoPatch latest PR commit status

- Status: **ready for maintainer re-review**
- Latest PR commit: `78268b19e8229ffbc2a0591ad310caf96aab7fa6`
- Checked: 2026-08-19T19:39:34Z
- Merge: GitHub reports **MERGEABLE**; the local patch check against
current `upstream/main` is clean.
- Review: all 8 inline review threads are resolved and no new review
finding was posted for the unchanged patch. Human approval remains
required.
- CI: all required checks pass. Three broader non-required managed-image
jobs are still running with no deterministic failure at this check.
- External advisor infrastructure: GPT-5.6 Terra and Nemotron 3 Ultra
failed with `investigate omitted required analysis`; the trusted
publisher reports 0 blockers, 0 warnings, 0 suggestions, and no
follow-up needed.
<!-- patch-walker-status:end -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Upgraded Deep Agents Code support to 0.1.55 and Deep Agents to 0.7.5.
* Expanded approval controls with manual, automatic, startup, and YOLO
modes.
* Tool search and discovery now include registered tools across agents
and subagents.
* Added gateway-aware sandbox operations and authorized chat-model
selection during onboarding.

* **Bug Fixes**
  * Improved sandbox crash recovery and identity detection.
* Strengthened MCP result validation and protected private inference
endpoints.

* **Documentation**
  * Updated setup and quickstart guidance for supported versions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshiv <prekshiv@nvidia.com>
Mason Daugherty (mdrxy) added a commit to langchain-ai/docs that referenced this pull request Aug 27, 2026
Document the /context-doctor, /tools, and /cost slash commands in the
Deep Agents Code command workflow pages:

- New 'Diagnose and audit a session' section in cli-reference.mdx with
  verified example output, /context and dcode doctor relationships, and
  version notes (0.1.62, 0.1.37, 0.1.51).
- Slash-command list entries and a context-window usage pointer in
  quickstart.mdx.

Refs langchain-ai/deepagents#5830, langchain-ai/deepagents#4649,
langchain-ai/deepagents#5036.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Mason Daugherty (mdrxy) added a commit to langchain-ai/docs that referenced this pull request Aug 27, 2026
## Summary

Documents the Deep Agents Code diagnostic slash commands shipped in
langchain-ai/deepagents#5830 (`/context-doctor`, 0.1.62),
langchain-ai/deepagents#4649 (`/tools`, 0.1.37), and
langchain-ai/deepagents#5036 (`/cost`, 0.1.51).

- **`cli-reference.mdx`**: new "Diagnose and audit a session" section
covering `/tools` (active tool set, unavailable MCP servers,
tool-shaping flags), `/context-doctor` (injected-context audit,
estimated tokens, unexpected growth, relationship to `/context` and
`dcode doctor`), and `/cost` (estimated thread cost, checkpoint
persistence, genai-prices source, display-only caveat). Each carries its
minimum-version `<Note>`.
- **`quickstart.mdx`**: slash-command list entries plus a pointer from
"Inspect context-window usage"; refreshes `/clear` and `/force-clear`
descriptions and current shortcuts (`Ctrl+G` editor, `Ctrl+T` subagent
panel, `Shift+Tab` approval cycle).

Example output was generated by exercising the real rendering code
(`context_doctor.py`, `tool_catalog.py`, `_session_stats.py`) against
the current source at langchain-ai/deepagents@9f3a1dd38; command names,
descriptions, and visibility match `command_registry.py` and the
generated `COMMANDS.md`.

## Verification

- `vale` 3.9.6 (scoped `lint_prose` on both changed files): 0 errors, 0
warnings, 0 suggestions.
- `mint broken-links` and `mint broken-links --check-anchors` on a fresh
`pipeline build`: no broken links.
- 241 related deepagents unit tests pass (`test_context_doctor.py`,
`test_cost_tracking.py`, `test_command_registry.py`,
`test_tool_catalog.py`).

AI agent involvement: authored by Open SWE.

## Stack

This is stack 3/4 and targets #5692 (`mdrxy/docs/dcode-approval-goals`).

Made by [Open
SWE](https://openswe.vercel.app/agents/90221b46-f65a-5c24-95e1-bb8ae62dadd9)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

org:internal Issue or pull request created by a member of the `langchain-ai` GitHub organization. package:dcode Changes related to the `deepagents-code` terminal coding agent. size: XL Pull request with an extra-large diff. type:feature A request, idea, or new user-facing functionality or behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cost tracking to dcode

2 participants