You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Umbrella for making Meridian (the Claude Agent SDK proxy at rynfar/meridian) a production-safe provider for Prime Agent, including concurrent RLM subagents. Meridian's README currently rates Prime Agent "single-agent verified" with these failure modes: overload amplification, expensive cache churn after fresh-session replay, loss of child-task context during recovery, undelivered tool envelopes, incomplete parent-to-child cancellation.
Measured evidence (Meridian telemetry, real prime traffic 2026-08-17/18)
prime adapter averaged 65.8% cache hit vs 95.1% for OpenCode; 212 successful requests ran below 20% cache hit and wrote ~12M cache-creation tokens.
Repeated cache_miss: Cache hit rate 0% on resume (expected >50%) diagnostics on continuations.
Resume-failure cascade observed: "You've hit your session limit" on resume, then the same request retried resume=false (full fresh replay) one second later; a dozen requests failed in ~15s.
3× ENVELOPE VIOLATION [undelivered_tool_use] on the ipython tool, two coinciding with upstream 529s.
Root causes on the Prime Agent side (verified in this repo)
Provider identity is unstable and collapses for inline subagents. The Meridian extension stamps metadata.user_id from ctx.sessionManager.getSessionId() in before_provider_request. Inline RLM children reuse the parent's extension runner (packages/coding-agent/src/core/agent-session.ts inline child construction copies onPayload: this.agent.onPayload; the root streamFn/onPayload in packages/coding-agent/src/core/sdk.ts closes over the root extensionRunnerRef), so every inline child request is stamped with the parent's session key. Interleaved parent/child histories on one proxy session key force a fresh-session replay nearly every round. SessionManager.sessionId also mutates on fork/branch/load, and compaction/branch-summarization/refinement completeSimple calls bypass onPayload entirely (unkeyed). → feat(agent): stable child-scoped provider identity for RLM subagents, side questions, and auxiliary requests #23
Retries multiply against an overloaded upstream. Session-level auto-retry (_isRetryableError treats every stopReason === "error" as retryable; fixed 2s/4s/8s backoff, no jitter, no Retry-After) stacks on the Anthropic SDK's own maxRetries, ≈ 4 × (1 + sdkRetries) requests per failed turn per agent, times N concurrent children. maxRetryDelayMs is declared and threaded but never read by any provider (dead code). → fix(agent): kind-aware retry with Retry-After and jitter; implement dead maxRetryDelayMs; stop SDK-times-session retry multiplication #24
User-facing cancel does not reach children.requestAbort() does not call _cancelActiveRlmChildRuns() (only abort() does), and every user-facing cancel path uses requestAbort(). Orphaned children keep consuming the Max subscription. → fix(agent): requestAbort() must cascade to active RLM child runs #25
Meridian-side work (tracked in rynfar/meridian, cross-linked)
Emit Retry-After on 429/503 and scope [1m] rate-limit benching per session instead of profile-wide (today one child's rate limit downgrades and cold-caches every sibling).
Parent→child session registry + cancellation, keyed off a parent linkage stamped in metadata.user_id.
Umbrella for making Meridian (the Claude Agent SDK proxy at
rynfar/meridian) a production-safe provider for Prime Agent, including concurrent RLM subagents. Meridian's README currently rates Prime Agent "single-agent verified" with these failure modes: overload amplification, expensive cache churn after fresh-session replay, loss of child-task context during recovery, undelivered tool envelopes, incomplete parent-to-child cancellation.Measured evidence (Meridian telemetry, real prime traffic 2026-08-17/18)
cache_miss: Cache hit rate 0% on resume (expected >50%)diagnostics on continuations.resume=false(full fresh replay) one second later; a dozen requests failed in ~15s.ENVELOPE VIOLATION [undelivered_tool_use]on theipythontool, two coinciding with upstream 529s.Root causes on the Prime Agent side (verified in this repo)
metadata.user_idfromctx.sessionManager.getSessionId()inbefore_provider_request. Inline RLM children reuse the parent's extension runner (packages/coding-agent/src/core/agent-session.tsinline child construction copiesonPayload: this.agent.onPayload; the rootstreamFn/onPayloadinpackages/coding-agent/src/core/sdk.tscloses over the rootextensionRunnerRef), so every inline child request is stamped with the parent's session key. Interleaved parent/child histories on one proxy session key force a fresh-session replay nearly every round.SessionManager.sessionIdalso mutates on fork/branch/load, and compaction/branch-summarization/refinementcompleteSimplecalls bypassonPayloadentirely (unkeyed). → feat(agent): stable child-scoped provider identity for RLM subagents, side questions, and auxiliary requests #23_isRetryableErrortreats everystopReason === "error"as retryable; fixed 2s/4s/8s backoff, no jitter, noRetry-After) stacks on the Anthropic SDK's ownmaxRetries, ≈4 × (1 + sdkRetries)requests per failed turn per agent, times N concurrent children.maxRetryDelayMsis declared and threaded but never read by any provider (dead code). → fix(agent): kind-aware retry with Retry-After and jitter; implement dead maxRetryDelayMs; stop SDK-times-session retry multiplication #24requestAbort()does not call_cancelActiveRlmChildRuns()(onlyabort()does), and every user-facing cancel path usesrequestAbort(). Orphaned children keep consuming the Max subscription. → fix(agent): requestAbort() must cascade to active RLM child runs #25Current date:are serialized into the system prompt;cache_controlrides the last tool definition so tool-set changes/reordering invalidate the tool cache. → perf(agent): keep the prompt-cache prefix stable across harness updates, date flips, and tool refreshes #26Meridian-side work (tracked in rynfar/meridian, cross-linked)
Retry-Afteron 429/503 and scope[1m]rate-limit benching per session instead of profile-wide (today one child's rate limit downgrades and cold-caches every sibling).metadata.user_id.tool_useblocks (Fresh replay drops every assistant tool_use block, so a thinking-plus-tool-call turn becomes an empty turn rynfar/meridian#888) — the mechanism behind lost child-task context after recovery.Sequencing
maxRetryDelayMs, stop retry multiplication (P0)requestAbort()to RLM children (P1)Per PYLON.md, each item needs an upstream-overlap check and a
.pylon/features.yamldecision before landing.