Skip to content

Parse "Kept model as" and Claude Code 2.1.x transcript format - #5

Open
egerev wants to merge 2 commits into
mainfrom
feat/parse-kept-model-and-new-jsonl-format
Open

Parse "Kept model as" and Claude Code 2.1.x transcript format#5
egerev wants to merge 2 commits into
mainfrom
feat/parse-kept-model-and-new-jsonl-format

Conversation

@egerev

@egerev egerev commented Apr 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Match both Set model to and Kept model as in /model output so the status line reflects effort after both commands, not just model switches.
  • Handle the new JSONL format introduced in Claude Code 2.1.x, where /model output lives in top-level content on system entries (in addition to legacy message.content on assistant entries).

Without this, effort falls back to the stale settings.json value after a /model confirmation or on recent Claude Code versions, so [Opus 4.7] is shown without the effort suffix.

Test plan

  • Run /model in Claude Code 2.1.x, pick a model with explicit effort → status line shows [Opus 4.7 · max].
  • Run /model and choose "Kept model as" → status line keeps showing the correct effort.
  • Works on older Claude Code transcripts (legacy message.content) as well.

egerev added 2 commits April 17, 2026 09:07
- Match both "Set model to" and "Kept model as" in /model output
  so the status line reflects effort after both commands, not just
  model switches.
- Handle new JSONL format (Claude Code 2.1.x), where /model output
  lives in top-level `content` on system entries, in addition to the
  legacy `message.content` on assistant entries.

Without this, effort falls back to the stale settings.json value
after a `/model` confirmation or on recent Claude Code versions.
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.

1 participant