Skip to content

fix: drop auto-resume on bare claudely (Claude >=2.1 broke prompt-less --continue) - #27

Merged
mforce merged 2 commits into
mainfrom
fix/auto-resume-pins-local-model
Aug 1, 2026
Merged

mforce merged 2 commits into
mainfrom
fix/auto-resume-pins-local-model

Conversation

@mforce

@mforce mforce commented Aug 1, 2026 •

Copy link
Copy Markdown
Owner

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 --continue without --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 --continue

The 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 bare claudely simply couldn't resume anymore — model fix or not.

Fix (this PR)

  • Remove auto-resume. Bare claudely now always starts a fresh session with the configured provider model.
  • Resume explicitly: claudely -c "<prompt>" / -r / --session-id / --from-pr still work and keep the saved session's model.
  • --new is kept as a no-op (backward compat) so old claudely --new doesn't error as an unknown claude flag.
  • Fresh runs always inject --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 pure resolveModelForSpawn() for fresh vs explicit-resume.
  • src/cli.ts: drop the auto-resume --continue push; --new becomes 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.
  • E2E with fake claude shim + a saved session present:
    • Bare 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> (--new absorbed, not forwarded) ✅
  • Fresh run against the real vllm server: replies correctly.

mforce 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
@mforce mforce changed the title fix: pin local model on bare claudely auto-resume fix: drop auto-resume on bare claudely (Claude >=2.1 broke prompt-less --continue) Aug 1, 2026
@mforce
mforce merged commit 56d79ad into main Aug 1, 2026
3 checks passed
@mforce
mforce deleted the fix/auto-resume-pins-local-model branch August 1, 2026 23:13
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.

Bare claudely (auto-resume) launches claude against the wrong model, failing with "issue with the selected model"

1 participant