Skip to content

Verify: agent-sdk child sessions load host plugins #461

Closed

Description

@possiblyneal

Part of #448

Question

Do agent-sdk summary child sessions (src/providers/agent-sdk.ts) load the Operator's plugins and hooks and persist transcripts (fork issue #446)? Check the hooks firing back into agentmemory, and whether isolation settings fix it. Upstream: rohitg00#1752.

Activity

  1. self-assigned this
    on Nov 18, 2026
  2. possiblyneal commented on Nov 18, 2026

    @possiblyneal
    OwnerAuthor

    Verdict for #461 (fork #446): APPLY (latent, not reaching the Operator)

    • Defect exists: src/providers/agent-sdk.ts query() options set systemPrompt, maxTurns, allowedTools, abortController only. SDK 0.3.216 (sdk.d.ts): settingSources omitted loads user/project/local settings (and so their enabled plugins, hooks, MCP); persistSession defaults true (writes ~/.claude/projects). The existing AGENTMEMORY_SDK_CHILD env guard only stops hook REST callbacks; it does not stop plugin/MCP loading or transcripts.
    • Repro: test/agent-sdk-provider.test.ts "AgentSDKProvider child session isolation (agent-sdk provider's child sessions load host plugins and persist transcripts #446)" asserts options contain settingSources: [], strictMcpConfig: true, persistSession: false. Fails 1/1 on base, passes after fix (17/17 in file). No live SDK experiment run; option semantics read from the installed sdk.d.ts doc comments.
    • Fix: add those three options to the query() call. One file plus one test.
    • Operator reach: NO. ~/.agentmemory/.env has AGENTMEMORY_ALLOW_AGENT_SDK=false and empty FALLBACK_PROVIDERS; provider is OpenAI-compatible (OPENAI_BASE_URL set). src/config.ts:147-171,697-717 only selects agent-sdk when the flag is "true". So no child sessions are spawned.
    • Transcript count in ~/.claude/projects: none attributable. Only 3 files mention the summarizer/compression system-prompt text, which are consistent with dev sessions reading this repo; the child's system prompt is not persisted, so a precise count is not possible. Expected 0 given the gate.
    • Caveat: settingSources: [] also drops auth supplied via settings env; env vars / credentials file still work.
    • Class 2: NO (provider call options only; no Recall/Injection/storage content change). eval:suite was run anyway: all 15 metrics unchanged.
    • Bar (tmp/verify/446-verify.log, branch verify/446-agent-sdk-isolation): typecheck 0 errors; npm test 271 files, 3,117 passed, 1 skipped; build ok; eval:gate and eval:gate:rules pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions