mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
docs(telemetry): clarify reserved subagent-lineage hooks
The subagent_start/stop hooks are registered but no-op. The prior comment implied subagents need no handling because they inherit via contextvars — misleading, since a delegated child runs on a separate thread with its own session id and trace. Clarify the real situation: a subagent's model/tool calls are already captured as their own tel_runs row via the child's run_conversation, so nothing is lost. These hooks are reserved for recording parent->child lineage (needs a tel_runs.parent_run_id column), deferred until a consumer needs the delegation tree. Comment-only.
This commit is contained in:
parent
24c86e160b
commit
81a34156a5
1 changed files with 7 additions and 1 deletions
|
|
@ -296,9 +296,15 @@ def _as_float(v: Any) -> Optional[float]:
|
|||
|
||||
|
||||
# ── subagent lineage (reserved) ─────────────────────────────────────────────
|
||||
# A delegated subagent runs its own ``run_conversation`` with its own session id, so
|
||||
# its model/tool calls are already captured as a separate tel_runs row via the normal
|
||||
# hooks — no subagent activity is lost. These hooks fire with the parent<->child bridge
|
||||
# (parent_session_id, child_session_id, child_role, child_goal); they are reserved for
|
||||
# recording parent->child *lineage* (linking a child run back to its parent), which
|
||||
# needs a tel_runs.parent_run_id column. Deferred until a consumer needs the delegation
|
||||
# tree; left registered as the attachment point.
|
||||
@_safe
|
||||
def _on_subagent_start(**kw: Any) -> None:
|
||||
# Subagents inherit the run context via contextvars; no explicit handling needed.
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue