fix: interactive_only hint omits --resume for non-resume-safe commands (#829)#3203
Merged
Merged
Conversation
#829) Commands like /commit, /pr, /issue, /bughunter, /ultraplan are interactive-only and NOT resume-safe. Previously the generic interactive_only error always suggested 'claw --resume SESSION.jsonl /commit', which would just re-trigger interactive_only. Fix: check commands::resume_supported_slash_commands() in the SlashCommand::Ok(Some(cmd)) arm. Resume-safe commands get the full --resume suggestion; non-resume-safe commands only say 'Start claw'. Also update two existing unit tests whose assertions checked for the old 'interactive-only' substring (now 'interactive_only:' prefix). Two new integration tests: - non_resume_safe_interactive_only_hint_omits_resume_suggestion - resume_safe_interactive_only_hint_includes_resume_suggestion 572 tests pass, 1 pre-existing worker_boot failure unrelated.
9104005 to
f5f2b4e
Compare
|
Nice fix — the generic interactive_only hint was misleading for non-resume-safe commands. Separating the hint logic based on resume_supported_slash_commands() is the right approach. Good to see this landed. |
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.
Fixes ROADMAP #829.
Before:
claw --output-format json /commithint →"use claw --resume SESSION.jsonl /commit"(wrong — /commit is not resume-safe)After:
claw --output-format json /commithint →"Start claw and run it there."Resume-safe commands like /diff still suggest
--resumein the hint.Root cause: Generic interactive_only format string always appended
--resumeregardless of whether the command appears inresume_supported_slash_commands().Tests: 2 new tests. 572 pass.