Support subagents directory structure (Claude Code 2.1.2+)#80
Conversation
Claude Code 2.1.17 stores agent transcripts in a new location:
{session-uuid}/subagents/agent-*.jsonl
This change checks both the legacy location (same directory as session)
and the new subagents subdirectory when loading agent files.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds -src-experiments-claude_p test project containing sessions with the new Claude Code 2.1.17+ subagents directory structure for testing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds support for discovering Claude Code 2.1+ subagent files by checking a session-scoped Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Research showed the subagents directory structure was present already in 2.1.2 (January 9, 2026). Update code comments accordingly. Test data files keep version 2.1.17 as that's what generated them. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Part 1 of Support new transcript structure (2026-01). Closes #79
Summary
{session-uuid}/subagents/directory structure introduced in Claude Code 2.1.2Changes
converter.py: Check both legacy and new subagents directory when loading agent files-src-experiments-claude_p) with the new structureTest plan
test_subagents_directory_structuretest validates new locationGenerated with Claude Code
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.