Repository navigation
fix: drop auto-resume on bare claudely (Claude >=2.1 broke prompt-less --continue) - #27
Merged
Merged
Conversation
added 2 commits
August 1, 2026 15:26
Auto-resume (bare `claudely`) spawned `claude --continue` without --model, so claude fell back to the model in ~/.claude/settings.json (e.g. opus[1m]). Because the shared ~/.claude/projects dir also holds Anthropic-API sessions, that session's model often didn't exist on the local server, failing with "issue with the selected model". Now auto-resume still injects the configured provider model via --model (claude supports --continue --model X). Explicit resume flags (-c/-r/--session-id/--from-pr) still keep the saved session's model. Adds resolveModelForSpawn() to resume.ts (pure, unit-tested) and distinguishes explicit vs auto resume before --continue is pushed. Fixes #26
…s --continue) Claude 2.1.187 rejects a bare `claude --continue` (no prompt): it errors "No conversation found to continue". claudely's auto-resume (from 0.1.4) spawned exactly that, so a bare `claudely` could no longer resume — and when it did, it fell back to the Anthropic model in ~/.claude/settings.json (opus[1m]) which doesn't exist on a local server. Remove auto-resume: bare `claudely` now always starts a fresh session with the configured provider model. Explicit resume still works via `claudely -c "<prompt>"` / `-r` / `--session-id` / `--from-pr`, which keep the saved session's model. The `--new` flag is kept as a no-op for backward compatibility (instead of erroring as an unknown claude flag). - resume.ts: remove auto-resume helpers (shouldAutoResume, hasRecentSessionForCwd, encodeCwdForClaude, etc.); keep the pure resolveModelForSpawn() used for fresh vs explicit-resume decisions. - cli.ts: drop the auto-resume push; always pin the local model on fresh. - resume.test.ts: drop auto-resume tests; add fresh/explicit-resume coverage. Refs #26
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.
Summary
Fixes #26. There were two breakages caused by Claude 2.1.187, and fixing just the model wasn't enough.
Root cause 1 — wrong model on resume
Auto-resume spawned
claude --continuewithout--model, so claude fell back to the model in~/.claude/settings.json(opus[1m]), which doesn't exist on a local server → "There's an issue with the selected model".Root cause 2 — Claude 2.1 dropped prompt-less
--continueThe bigger problem: Claude >=2.1 now rejects a bare
claude --continue(no prompt) with "No conversation found to continue". claudely's auto-resume (added in 0.1.4) spawned exactly that, so bareclaudelysimply couldn't resume anymore — model fix or not.Fix (this PR)
claudelynow always starts a fresh session with the configured provider model.claudely -c "<prompt>"/-r/--session-id/--from-prstill work and keep the saved session's model.--newis kept as a no-op (backward compat) so oldclaudely --newdoesn't error as an unknown claude flag.--model <configured>, so the local model is used, never the settings.json fallback.Changes
src/resume.ts: remove auto-resume helpers (shouldAutoResume,hasRecentSessionForCwd,encodeCwdForClaude); keep pureresolveModelForSpawn()for fresh vs explicit-resume.src/cli.ts: drop the auto-resume--continuepush;--newbecomes a recognized no-op; pin local model on fresh; explicit resume keeps saved model.src/resume.test.ts: drop auto-resume tests; add fresh/explicit-resume coverage.CHANGELOG.md: entry under[Unreleased].Verification
npm test: 80/80 pass.claudeshim + a saved session present:claudely→--model deepseek-ai/DeepSeek-V4-Flash-0731(no--continue, fresh) ✅claudely --continue <prompt>→--continue <prompt>(no model injected, keeps saved) ✅claudely --new→--model <local>(--newabsorbed, not forwarded) ✅