Repository navigation
fix: stop replaying leftover model-name words as a Claude prompt - #32
Merged
Merged
Conversation
Older releases recorded the status-line display name as the Claude model, so stored launch flags held `--model Opus 4.8` or `--model Opus 5 (1M context)` in one space-joined string. A later model change consumed only `--model Opus` and left the remaining words behind. Every resume then passed them to Claude as a positional prompt, so the session started a turn on "4.8" or "5" that nobody sent. Resume and flag display now drop a bare Claude word that follows an on/off flag or an already-filled --model/--effort. Bare words after an option SAB does not know, such as an operator CCS_NEW_FLAGS value, are kept. The next start reports clean flags, so stored records heal themselves without a migration. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Older releases recorded the Claude status line's display name as the model, so stored launch flags held values like
--model Opus 4.8or--model Opus 5 (1M context). Launch flags are stored as one space-joined string. A later model change consumed only--model Opusand left the remaining words (4.8,5 (1M context)) behind.resumeArgsFor()passed those words through, so every resume started Claude with a positional argument. Claude treats that as a prompt and immediately runs a turn on "4.8" or "5" that nobody sent. Each new start reports its argv back throughCCS_FLAGS, so the leftover words also stayed in the stored flags.Current code already records a validated model ID (
claudeModelForResume), so no new records get these words. This change cleans up the ones that already exist.Fix
displayFlagsFor(), which feeds both resume and/sab-flagsdisplay, now drops a bare Claude word in two cases:--dangerously-skip-permissions,--chrome) or another dropped word;--model/--effortthat already has its value.Bare words after an option SAB does not know are kept, so operator
CCS_NEW_FLAGS/CCS_RESUME_FLAGSsuch as--permission-mode acceptEditsor--add-dir /a /bstill resume unchanged. The next start reports clean flags, so stored records heal themselves without a state migration. Codex and Pi parsing is unchanged.Verification
--model Opus 4.8, an inline--option=valuefollowed by a leftover word, and preserved values of unknown options. It fails without the fix.npm test: 594/594 pass.--dangerously-skip-permissions 4.8 --model claude-opus-5-5[1m] …becomes--dangerously-skip-permissions --model claude-opus-5-5[1m] ….🤖 Generated with Claude Code