Mohamed Boudra 6cb0322dd7 docs: complete parentAgentId debugging task - confirmed working
Added debug logging to trace the full data flow from MCP create_agent
through to toStoredAgentRecord. Testing confirmed that parentAgentId
IS being set correctly when agents are created via MCP:

- callerAgentId is correctly extracted from X-Caller-Agent-Id header
- resolvedParentAgentId is passed to agentManager.createAgent()
- config.parentAgentId is preserved through normalizeConfig()
- managed.parentAgentId is set in registerSession()
- toStoredAgentRecord() includes parentAgentId at top-level

The previous test failure was due to stale data from agents created
before the storage fix (adding parentAgentId to STORED_AGENT_SCHEMA)
was applied.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 18:03:53 +00:00
Description
Languages
TypeScript 98.1%
JavaScript 1.3%
Shell 0.1%
Swift 0.1%