Skip to content

spawn_agent regression in 0.24.1: subagents fail to launch and leave no per-session logs #1467

Description

@Aaronontheweb

Summary

After upgrading to 0.24.1, spawn_agent invocations can fail to launch their subagents, and when they do fail there are no entries in the per-session session.log — making the failure very hard to diagnose. Behavior was correct in 0.24.0.

Suspected cause (0.24.1 only)

Two commits in the 0.24.0..0.24.1 range touch the spawn path:

  • 4241f453 "fix(tools): respect self-monitoring spawn_agent liveness" — replaced the old "any activity resets the timeout" watchdog with a liveness classification. DispatchingToolExecutor.GetLivenessMode falls back to ToolLivenessMode.Opaque (?? ToolLivenessMode.Opaque); if spawn_agent doesn't resolve to SelfMonitoring at runtime it gets a hard WallClock budget instead of FirstItemOnly.
  • ef15c07d "refactor(sessions): extract subscriber manager (refactor(sessions): extract subscriber manager #1455)" — changed how subagent activity is streamed back into the spawn_agent tool stream; if the first stream item never arrives, the new FirstItemOnly watchdog kills the call during startup.

Either mechanism can produce "never launched"; we have not yet confirmed which fires in practice.

Why it was invisible

Subagent lifecycle logs go through Akka's async logger bridge, where the SessionDiagnosticsContext AsyncLocal is gone, so they only ever reach daemon.log. The only place a subagent pushes that scope is inside its first LLM call — so any failure before the LLM call leaves the per-session transcript empty. (Observability fix in progress on branch fix/subagent-spawn-observability adds parent-side spawn breadcrumbs.)

How to confirm

Inspect daemon.log (not session.log) for the affected timeframe; grep for SubAgent, spawn_agent, TimeoutException, produced no startup activity, cancelled by parent, filterable by the SessionId / SubSessionId log attributes.

Affected version

0.24.1 (regression from 0.24.0)

Next steps

  • Land the observability fix so the next occurrence is fully diagnosable
  • Confirm whether spawn_agent resolves to SelfMonitoring at runtime; harden the silent ?? Opaque fallback
  • Verify the subscriber-manager streaming path delivers the first activity item

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingobservabilityreliabilityRetries, resilience, graceful degradationsubagentsspawn_agent, SubAgentActor, definition loader, discovery context layer, and related features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions