Skip to content

subagent: spawned sub-agents not registered in fleet agent_sessions table #4370

@bug-ops

Description

@bug-ops

Description

SubAgentManager in crates/zeph-subagent/src/manager.rs spawns and manages sub-agent lifecycles but never calls upsert_agent_session or update_agent_session_status. As a result, background sub-agent activity is invisible in the fleet dashboard.

Actual Behavior

The fleet panel shows only the top-level interactive session registered by fleet_session::start_session in runner.rs. Sub-agents spawned by the manager do not appear.

Expected Behavior

When a sub-agent is spawned (SubAgentDef + SessionKind::SubAgent), call upsert_agent_session with SessionStatus::Active. On completion or cancellation, call update_agent_session_status with the appropriate terminal status. This requires SubAgentManager to hold or receive a reference to a SqliteStore.

Environment

  • HEAD: 9d76476
  • File: crates/zeph-subagent/src/manager.rs

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexityenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions