Repository navigation
fix(cli): generate refuses --continue/--resume/--fork instead of ignoring them - #426
Merged
Merged
Conversation
…ring them `--continue`, `--resume` and `--fork` are global flags, so `generate` accepted them, but it never read them: it always ran a new session, which it does not save, so the caller believed a continuation was running while the model saw none of the earlier history. `generate` now fails up front with a message that names the flag and points at `whycodes --plain --continue` / the TUI (text or JSON error, like the other setup errors). Co-Authored-By: Claude Opus 5.5 <[email protected]>
mrnasil
force-pushed
the
fix/generate-resume-flags
branch
from
November 7, 2026 14:20
603e8cc to
eff81bd
Compare
Merged
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.
Found while measuring token use for the efficiency series (#418–#425).
Problem
--continue,--resumeand--forkare global flags, sowhycodes generate --continue "…"is accepted. But only the interactiverunpath reads them (resolve_resume_wantincmd/run.rs).generatealways starts a new session, and that session is never saved to the database: after severalgenerateruns,session listshows only the interactive sessions.The caller therefore believes a continuation is running, while the model sees none of the earlier history and redoes the work.
Change
generatenow fails up front with a setup error that names the flag:The error is text on stderr, or a
CiEvent::Errorfor--format json|stream-json, the same as the other headless setup errors. It returns before config or credentials are touched.Saving
generatesessions so they can be continued would be a product change (CI runs would fill the session list), so it is left out here.Checks
cmd_generate_refuses_resume_flags_instead_of_ignoring_themcovers all three flags.whycodes-cli --bin whycodes: 399 passed. The 4 failures are the known Windows-only ones that fail identically onmain(lockfile PIDs ×2, upgrade zip,run_shell).🤖 Generated with Claude Code