Skip to content

Ignore unlinked Claude child transcripts during recovery - #74

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
fix/sdk-351-352-claude-recovery
Sep 11, 2026
Merged

Ignore unlinked Claude child transcripts during recovery#74
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
fix/sdk-351-352-claude-recovery

Conversation

@Qard

@Qard Stephen Belanger (Qard) commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Fixes SDK-352.

Claude session directories can contain auxiliary or stale child transcript files that are not delegated agents in the parent conversation. Recovery previously attached every unlinked file to the final parent record, turning follow-ups and compacted summaries into synthetic subagent: agent outputs.

This change:

  • links completed child transcripts through the parent toolUseResult.agentId
  • retains interrupted delegated agents by correlating sidechain metadata with the nearest preceding unmatched parent Agent call, using native time and agent type when available
  • tolerates an incomplete trailing JSONL record in an interrupted child while preserving every complete record
  • ignores files with neither parent anchor
  • adds regressions for completed and interrupted agents, duplicate prompts, partial writes, and orphan follow-up/summary files

SDK-351 is intentionally no longer claimed here: its Codex timestamp case and historical repeated-turn evidence require separate treatment.

Validation:

  • cargo test --manifest-path bt-daemon/Cargo.toml --locked transcript_import::tests
  • cargo test --manifest-path bt-daemon/Cargo.toml --test replay --locked

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T16:12:05.753965Z 6001e66 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Qard
Stephen Belanger (Qard) force-pushed the fix/sdk-351-352-claude-recovery branch from 3910c04 to 94fc014 Compare September 11, 2026 15:41
@Qard Stephen Belanger (Qard) changed the title Cover Claude recovered follow-up turn classification Ignore unlinked Claude child transcripts during recovery Sep 11, 2026
@Qard

Copy link
Copy Markdown
Collaborator Author

Codex (@codex) review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94fc014c1f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread bt-daemon/src/transcript_import/claude.rs Outdated
@Qard
Stephen Belanger (Qard) force-pushed the fix/sdk-351-352-claude-recovery branch from 94fc014 to 1d120bd Compare September 11, 2026 15:50
@Qard

Copy link
Copy Markdown
Collaborator Author

Codex (@codex) review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d120bd16d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread bt-daemon/src/transcript_import/claude.rs Outdated
Comment thread bt-daemon/src/transcript_import/claude.rs Outdated
@Qard
Stephen Belanger (Qard) force-pushed the fix/sdk-351-352-claude-recovery branch from 1d120bd to 5a632bf Compare September 11, 2026 15:57
@Qard

Copy link
Copy Markdown
Collaborator Author

Codex (@codex) review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a632bf476

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread bt-daemon/src/transcript_import/mod.rs
@Qard
Stephen Belanger (Qard) force-pushed the fix/sdk-351-352-claude-recovery branch from 5a632bf to 84f5183 Compare September 11, 2026 16:04
@Qard

Copy link
Copy Markdown
Collaborator Author

Codex (@codex) review

@Qard
Stephen Belanger (Qard) force-pushed the fix/sdk-351-352-claude-recovery branch from 84f5183 to 6001e66 Compare September 11, 2026 16:08
@Qard

Copy link
Copy Markdown
Collaborator Author

Codex (@codex) review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 6001e66758

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit 856d8f0 into main Sep 11, 2026
20 checks passed
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) deleted the fix/sdk-351-352-claude-recovery branch September 11, 2026 19:20
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.

2 participants