[PR #552] Include subagent transcripts in Claude Code JSONL parsing #558

Closed
opened 2026-03-02 04:13:58 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/552

State: closed
Merged: No


Summary

  • Extract JSONL line parsing into a reusable parse_claude_jsonl_content helper method
  • After parsing the main transcript, discover and parse subagent JSONL files from <session-uuid>/subagents/agent-*.jsonl
  • Append subagent messages to the main transcript in sorted filename order for deterministic results

Fixes #371

Stacked on #553 — This PR is rebased on top of #553 (fix-370: plan message extraction). Please merge #553 first; this PR's diff will then show only the subagent changes.

Context

Claude Code stores subagent (Task tool) transcripts in separate JSONL files at <session-uuid>/subagents/agent-<id>.jsonl, but the transcript parser only read the main session file. This meant all subagent conversation content was silently dropped from git-ai authorship records.

Test plan

  • New test test_parse_claude_code_jsonl_with_subagents verifies subagent messages are merged (user, assistant, tool_use)
  • New test test_parse_claude_code_jsonl_without_subagents_dir verifies backward compatibility
  • All 21 Claude Code tests pass (9 original + 10 from #553 + 2 new)
  • clippy clean, fmt clean

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/552 **State:** closed **Merged:** No --- ## Summary - Extract JSONL line parsing into a reusable `parse_claude_jsonl_content` helper method - After parsing the main transcript, discover and parse subagent JSONL files from `<session-uuid>/subagents/agent-*.jsonl` - Append subagent messages to the main transcript in sorted filename order for deterministic results Fixes #371 > **Stacked on #553** — This PR is rebased on top of #553 (fix-370: plan message extraction). Please merge #553 first; this PR's diff will then show only the subagent changes. ## Context Claude Code stores subagent (Task tool) transcripts in separate JSONL files at `<session-uuid>/subagents/agent-<id>.jsonl`, but the transcript parser only read the main session file. This meant all subagent conversation content was silently dropped from git-ai authorship records. ## Test plan - [x] New test `test_parse_claude_code_jsonl_with_subagents` verifies subagent messages are merged (user, assistant, tool_use) - [x] New test `test_parse_claude_code_jsonl_without_subagents_dir` verifies backward compatibility - [x] All 21 Claude Code tests pass (9 original + 10 from #553 + 2 new) - [x] clippy clean, fmt clean 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kerem 2026-03-02 04:13:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#558
No description provided.