Skip to content

rfc: propose delegation lineage and session trace context (RFC 0008) - #13

Merged
trend-kyle-huang merged 1 commit into
mainfrom
rfc/0008-delegation-lineage-trace-context
Nov 4, 2026
Merged

trend-kyle-huang merged 1 commit into
mainfrom
rfc/0008-delegation-lineage-trace-context

Conversation

@trend-kyle-huang

Copy link
Copy Markdown
Contributor

Summary

Adds Draft RFC 0008, which closes the sub-agent tracking and session trace gaps in the 0.1 draft:

  • Acting-agent attribution (Core amendment): every event performed by a delegated agent MUST carry agent_id and delegation_id, assigned by the host and never taken from model or child-controlled content. Today agent_id is only a MAY and only the Subagent* pair carries delegation_id, so a child's PreToolUse or PermissionRequest cannot be told apart from the root agent's.
  • Delegation tree (Core amendment): SubagentStart gains parent_delegation_id and delegating_tool_use_id; delegation_depth becomes required (minimum 1), and delegation_chain length must equal depth.
  • Instance and session rules (Core amendment): one delegation_id per SubagentStart (including resumption), parent_session_id for child sessions, and no Core SubagentStop for host-internal agents that were never started.
  • Trace context (Core amendment): defines the schema-only trace member with W3C Trace Context semantics, adds parent_span_id, and states that trace data never replaces Core correlation or drives control decisions. An informative OpenTelemetry GenAI mapping is included.
  • Capability declaration: new delegation_attribution and trace_context properties.
  • Optional sec.enterprise.delegation profile (follows RFC 0006): delegated task hash, child scope relative to parent (broader = escalation), and budget counters so stateless policy decision points can deny runaway fan-out.
  • Claude Code adapter guidance: native SubagentStart cannot block (gate at PreToolUse on the Agent tool), child tool events already carry agent_id, and native SubagentStop also fires for internal agents.

No Core event is added, renamed, or reclassified. The RFC is Draft; the prerequisite Discussion and review window under GOVERNANCE.md are pending. rfcs/README.md gains an index entry.

Website impact

None. RFCs are not rendered on the website, and this PR does not change spec/, schemas/, or website docs. Schema and spec changes are listed as follow-up work in the RFC.

Validation

  • npm run validate: passed, including schema validation of the RFC's three JSON examples.
  • npm run build: passed.
  • Additional ajv check against a locally patched schema: the proposed TraceContext.parent_span_id, required delegation_depth, and dependentRequired of agent_id on delegation_id accept the examples and reject the expected invalid variants. The current schema rejects parent_span_id, as the Compatibility section states.
  • No Codex document review was run for this PR.

Checklist

  • I reviewed website impact and updated all affected content in this PR, or explained why no website change is needed.
  • Affected site summaries, examples, event counts, schema copies, and proposal status labels agree with the source changes.
  • I ran npm run validate and npm run build.
  • Proposed behavior is clearly distinguished from the current specification.

🤖 Generated with Claude Code

Require events performed by a delegated agent to carry agent_id and
delegation_id, link SubagentStart to its parent delegation and delegating
tool call, and define the schema's existing trace member with W3C Trace
Context semantics plus parent_span_id. Add delegation_attribution and
trace_context capability properties and an optional
sec.enterprise.delegation profile for task fingerprint, scope escalation,
and delegation budgets. No Core event is added or reclassified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trend-kyle-huang
trend-kyle-huang marked this pull request as ready for review November 4, 2026 02:28
@trend-kyle-huang
trend-kyle-huang merged commit 36850e0 into main Nov 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant