Skip to content

feat(fabric): keep agents' state across sandbox replacement - #14052

Merged
cv merged 1 commit into
v1from
feat/keep-agent-state
Nov 1, 2026
Merged

cv merged 1 commit into
v1from
feat/keep-agent-state

Conversation

@cv

@cv cv commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Failure

Fabric adapters keep an agent's native state in a folder named after the runtime, and every start gets a new runtime ID. With /sandbox/artifacts on a mounted volume, the files survive a sandbox replacement, but the new runtime starts in an empty folder: a Hermes agent loses its sessions, memory and skills from its point of view.

Decision

Resolves #14051; PRs into v1 don't close issues, so it gets closed after merge.

Pins Fabric a3b57155 from the cv/NeMo-Fabric reference implementation (compare). Its last commit adds runtime.keep_state:

  • Fabric gives every runtime of the agent one folder, <artifact root>/.fabric/state/<adapter id>/<agent name>, passed to the adapter as RuntimeContext.state_dir. Only one runtime holds it at a time; the lock goes away with the process. Fabric never deletes it.
  • An adapter opts in by accepting runtime.keep_state in its descriptor; planning rejects it for others. Hermes's adapter accepts it and keeps its home there.

The other commits in the range were already on the fork's interface branch: a Deep Agents Code .env fix, a fix that counts a redirect as an unhealthy Hermes interface, docs, and a merge.

NemoClaw keeps the harness out of it: fabric_config::for_sandbox sets runtime.keep_state when the bundled catalog says the image's adapter accepts it, as it already does for models.base_url. Apply reports a kept-state agent's interface tokens under that folder, which doesn't depend on the runtime ID.

On upgrade, a Hermes deployment's Fabric configuration changes, so its next apply replaces the sandbox; state in the old runtimes/<runtime-id> folder isn't moved.

Changes

  • The Fabric pin in image/fabric/Dockerfile, three Cargo.toml files, Cargo.lock, the regenerated catalog, and docs links that name the revision.
  • crates/nemoclaw-sdk/src/fabric_config.rs and crates/nemoclaw-fabric/src/interfaces.rs, with SDK tests.
  • docs/state.md and docs/interfaces.md describe the kept state folder and its token path.
  • interfaces_live mounts a Docker volume on the Hermes sandbox's /sandbox/artifacts, creates a session through the API server, replaces the sandbox by changing a Hermes setting, and gets the session back. The test document's gateway allows driver configuration for the mount.
  • The pin moves the computed fixture image, so two HCL cases name the new digest and one HCL test the inference registrations derived from it. The provider schema snapshot, now with keep_state on fabric_agent, and three OpenShell contract fixtures are regenerated.

Validation

On linux_arm64:

  • cargo ci: passed, 1807 tests and 162 lifecycle tests.
  • cargo ci live-docker: passed, 7 tests. interfaces_live took 101.6 s, up from about 52 s, within the 180 s per-test budget.
  • Fabric a3b57155: Rust workspace tests, the Hermes adapter suite, the TypeScript contract tests, and the touched Python tests passed. The full Python suite's remaining failures need unbuilt TypeScript adapters or predate the change.

Deferred: cargo ci live-kind. The new path is volume mounts on Docker, and the Kubernetes images change only by the Fabric pin; CI runs the image builds.

Fabric adapters kept an agent's native state in a folder named after the
runtime, and every start gets a new runtime ID. With /sandbox/artifacts on
a volume, the files survived a sandbox replacement, but the new runtime
started in an empty folder.

Pin Fabric a3b57155 from the cv/NeMo-Fabric reference implementation,
which adds `runtime.keep_state`: Fabric gives every runtime of the agent
one folder, `<artifact root>/.fabric/state/<adapter id>/<agent name>`,
and Hermes's adapter keeps its home there. NemoClaw sets it for an agent
whose image's adapter accepts it, from the bundled catalog, with no
harness-specific code. Apply reports interface tokens under that folder.

The interfaces live test mounts a volume on the Hermes sandbox, creates a
session through the API server, replaces the sandbox by changing Hermes's
settings, and finds the session again. The gateway in its document allows
driver configuration for the mount.

The pin moves the computed fixture image, so the HCL cases name the new
digest and the inference registrations it derives. The provider schema
snapshot and OpenShell contract fixtures are regenerated.

Refs #14051

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv

cv commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded pi 1.4.0 (session format 3) with the Pit TypeScript tool Session header and installed package metadata
Skills recorded nemoclaw-contributor-create-pr (complete read) Tool reads to cutoff; other skills were listed but not read
Instruction files recorded AGENTS.md (injected); WRITING.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read) Startup context and tool reads to cutoff; NeMo-Fabric's AGENTS.md was read only in part
Tool calls partial typescript: 230 (7 failed) Wrapper calls in the record; nested shell, git and gh calls inside each program are not recorded separately
Session window recorded 2026-11-01T08:27Z to 2026-11-01T10:40Z; 2 h 13 min First event to cutoff, including idle time; the change itself started at 09:34Z after issue triage in the same session
Compactions recorded 0 Complete record to cutoff; context elisions are not compactions
Models recorded claude-opus-5-5 Model change event; no changes
Reasoning levels recorded high Thinking-level event; no changes

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 24b3528 into v1 Nov 1, 2026
92 of 94 checks passed
@cv
cv deleted the feat/keep-agent-state branch November 1, 2026 11:12
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure area: integrations Third-party service integration behavior area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality integration: hermes Hermes integration behavior v1 NemoClaw v1 branch labels Nov 2, 2026
cv added a commit that referenced this pull request Nov 11, 2026
…ms (#14413)

The release notes now list every user-visible change on `v1` since the
`v0.1.0-rc9` tag, including the breaking ones, and four example pages
drop claims that later changes made false.

## Problem

`docs/about/release-notes.md` listed three breaking changes and none of
the features, fixes, and onboarding changes that reached `v1` after
`v0.1.0-rc9`; it didn't name the configuration shapes the parser now
rejects or the intent record version `v0.1.0-rc9` writes.
Some example claims went stale:

- `examples/spark/README.md` said the pinned OpenShell has the Podman
TLS initialization blocker, ai-openshell/openshell#3427; its fix merged before
OpenShell 0.1.0, and `v1` pins 0.1.7.
- `examples/station/README.md` and `examples/gtc-dc/README.md` required
exactly one visible GPU on the host; since #13929,
`container.gpuDevices` lets a service on a host with more GPUs request
one.
- `examples/hcl/travel-team` said Fabric's Deep Agents adapter can't
turn reasoning off, NVIDIA/NeMo-Fabric#433; NVIDIA/NeMo-Fabric#439 fixed
that, and the pinned catalog's Deep Agents `reasoning_effort` accepts
`none`.
- The travel team cited #13313 for the booking key its service doesn't
receive, but #13313 closed when `openshell_api` landed.

## Change

- `docs/about/release-notes.md` gains "Changes Since v0.1.0-rc9",
grouped by area, from the commits in `v0.1.0-rc9..origin/v1`; where a
later commit changed an earlier one, the entry describes the current
code, and changes added and removed after the tag aren't listed:
- Agents and interfaces: #14037, #14038, #14269, #13981, #14024, #14186,
#14052, #14385, #13971, #13858, #13947, #14039, #14042, #14044, #14343.
- Inference: #13929, #14391, #14396, #14398, #14400, #13963, #13912,
#13964, #14388, #14390, #14397.
- Gateways and Kubernetes: #13909, #13970, #13922 (an existing
namespace, refused at plan by #13756, is now bound; cluster-wide reads
dropped), #14014, #14169, #13921.
- Plan, apply, and diagnostics: #14224, #13756, #14141, #14133, #14135,
#13775, #13744, #13701.
- Onboarding: #13693, #13695, #13741, #13757, #13851, #13978, #14228,
#14233, #14334, #14336.
- Examples and builds: #14166, #14184, #14188, #14191, #14192, #14200,
#13889, #14267, #14312, #14315, #14355, b30e9b4, #13781, #13813,
#14246, and the pins in `versions.json` and `image/fabric/Dockerfile`.
- Its breaking changes since the tag:
- the intent record moving from 15, which `v0.1.0-rc9` writes, through
16 (#14266), 17 (#14343), 18 (#13929), 19 (#14391) and 20 (#14394);
  - name-keyed `sandboxes` and `inferenceProviders` (#13703, #13705);
- a recipe `compatibility.gpu` outside every hardware profile (#13912);
- model tuning the adapter doesn't accept (#14111), and Hermes's
`max_tokens` losing its default (#14296);
  - `skills.paths` resolution (#14296);
  - endpoint and `networkCIDR` validation (#13847, #14081);
- the HCL `gateway_values` attribute (#14014), and Kubernetes ownership
receipts from before #13922 and #14014.
  The two earlier items stay, under their own heading.
- `examples/spark/README.md` replaces the closed OpenShell#3427 blocker
with the Podman and remote-model limits in `docs/resources/limits.md`.
- `examples/station/README.md` and `examples/gtc-dc/README.md` require
one GPU visible in the model container, and point to
`container.gpuDevices` for a host with more.
- `examples/hcl/travel-team/README.md` and `WALKTHROUGH.md` drop the
NeMo-Fabric#433 limitation, and the travel team's booking-key statements
link #14417 instead of #13313.

Not listed, because both changes landed after the tag: Deep Agents Code
(#14043, #14250), `compatibility.gpuCount` (#14391, #14394), and the
"Creating infrastructure state" progress step (#14169, #14248).

Checked and left unchanged: the root `README.md`,
`crates/nemoclaw-onboarding/README.md`,
`crates/nemoclaw-cli/assets/README.md`, `internal-docs/README.md`, the
other example READMEs, and every example YAML header comment. The GPU
autoscaling README and `load.sh` read the JSON fields `OperationResult`
serializes, and ai-openshell/openshell#4287 is fixed only after the pinned
0.1.7. The two pre-tag release-note items still match the schema and
SDK. `docs/README.md` is left to #14412, which retires the stale field
reference snapshot it describes.

Not verified: whether Hermes sends the booking key's placeholder to MCP
servers; #14417 tracks the live check.

## Beyond CI

Each relative link and anchor in the changed files resolves to an
existing file and heading.
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: e2e End-to-end tests, nightly failures, or validation infrastructure area: integrations Third-party service integration behavior area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality integration: hermes Hermes integration behavior v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants