Skip to content

fix(app-server): isolate runtime skill scopes#3296

Draft
sarahwooders wants to merge 1 commit into
mainfrom
agent/reflection-runtime-isolation
Draft

fix(app-server): isolate runtime skill scopes#3296
sarahwooders wants to merge 1 commit into
mainfrom
agent/reflection-runtime-isolation

Conversation

@sarahwooders

Copy link
Copy Markdown
Contributor

Summary

Adds the remaining app-server runtime isolation needed by SDK-managed reflection workers:

  • accepts skill_sources on runtime_start, preserving an explicit empty array as "no skills";
  • stores the override on the conversation runtime and applies it to tool preparation, client-skill discovery, normal turns, and recovered approval continuations;
  • resets omitted skill sources to the normal harness defaults when a runtime is started again; and
  • treats runtime_start as a readiness boundary for memfs-enabled agent creation, waiting for the checkout before returning it to SDK callers.

Why

PR #3285 added memfs-less worker creation and explicit per-session memory scopes, but the app-server still ignored the SDK's per-session skill-source override. Reflection workers created with skillSources: [] therefore received normal bundled/global/agent/project skills instead of an empty skill set.

Separately, runtime_start returned before asynchronous MemFS setup completed. An SDK caller could seed and commit initial files, only for the delayed checkout to replace that working tree.

Impact

SDK pipelines can run concurrent worker sessions against isolated memory clones without attaching Letta Code skills, including on approval-recovery turns. Newly created memfs-enabled agents are safe to initialize as soon as runtime_start resolves.

This is the focused harness follow-up needed by letta-ai/letta-agent-sdk#179.

Test plan

  • bun test src/agent/message-client-skills.test.ts src/app-server-client.test.ts src/websocket/listen-client-protocol.test.ts src/websocket/listener/protocol-inbound.test.ts — 239 pass, 0 fail
  • bun run check — all 10 checks pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant