Skip to content

A running spawn's live account is keyed by a node id that is unique per conversation only #580

Description

@0xKT

Summary

While a spawned sub-agent runs, its live account (transcript, usage, tool calls) is held in a process-wide index keyed by the node id the model chose for the spawn. That id is unique for one conversation only. Two conversations running a spawn under the same id therefore share one entry.

Steps to reproduce

  1. In conversation A, have the model spawn a task with node_id: "step1" on a lane that publishes its transcript (the in-process Raven lane or an ACP agent), long enough to watch.
  2. While it runs, in conversation B spawn another task with the same node_id.
  3. Open A's task in the desk tasks tab (or read subagent.context for A's step1).

Expected behavior

A's context panel shows A's own run; B's shows B's; each run's live view lasts until that run ends.

Actual behavior

Where it is decided

  • raven/agent/subagent/activity.py: _live: dict[str, RunActivity], one per process, keyed by a plain string.
  • raven/agent/subagent/manager.py: activity.collecting(live_key=call_id, ...) with call_id = record.node_id (since a92514e, 2026-09-07, when the spawn record id became the model's own node_id; before that the key was a minted, globally unique call id).
  • Readers: raven/rpc/methods/subagent.py (subagent.context) and raven/rpc/methods/tasks.py (tasks.list, since fix(*): live spawn record, live usage and a leaner node panel subtitle #567).
  • The dag side does not have this problem: node_live_key(run_id, node_id) carries the run id, and the instance index _live_instances is already keyed by (session_key, agent, handle).

Fix

Key the spawn entry by the record's address (the conversation's node root plus the id), a spawn_live_key(root, node_id) helper beside node_live_key, used by the writer and both readers. No wire change. Fix in #577.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions