Skip to content

Fix Claude model attribution on long sessions - #2496

Open
XSY-28 wants to merge 1 commit into
git-ai-project:mainfrom
XSY-28:fix/claude-model-tail
Open

XSY-28 wants to merge 1 commit into
git-ai-project:mainfrom
XSY-28:fix/claude-model-tail

Conversation

@XSY-28

@XSY-28 XSY-28 commented Nov 25, 2026 •

Copy link
Copy Markdown

Fixes #2424.

A long Claude session can put its model record outside the 50 KiB lookup window, leaving the commit's authorship note with an unknown model. On a miss, search up to 2 MiB from the transcript tail before using the existing lookup at the head. The bounded reader handles an initial partial JSONL record and preserves a complete record that starts at the boundary.

Verification

  • Ran real Claude checkpoints around an edit and read the resulting Git note. With two 550 KB tool results after the model record, the baseline reported unknown; the patch reported claude-opus-4-6. The test verified line attribution after both Git commits.
  • 21 Claude integration tests, 48 model extraction tests and 11 JSONL reader tests passed on macOS arm64. Rust 1.93.0 formatting and all-target Clippy passed.
  • The search is intentionally bounded. If the model record is beyond the expanded window, lookup continues with the existing head fallback. Other platforms and the full test suite remain for hosted checks.

Prepared with OpenAI Codex (GPT-6.2 Sol, xhigh, standard service tier).


Devin Review

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Devin Review: 2 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

This branch has not been deployed

No deployments
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.

[Bug]: Claude preset records model: unknown when the transcript tail is filled by large tool results

2 participants