Skip to content

fix(memory): --help must not run a side-effectful subcommand - #5

Merged
sandstream merged 1 commit into
mainfrom
fix/memory-help-flag
Jun 17, 2026
Merged

sandstream merged 1 commit into
mainfrom
fix/memory-help-flag

Conversation

@sandstream

Copy link
Copy Markdown
Owner

kit memory <subcommand> --help (e.g. kit memory install --help) executed the subcommand instead of printing help — so asking for help on install actually installed the memory hooks into ~/.claude/settings.json. A help flag should never have a side effect.

cmdMemory now treats a --help/-h flag anywhere in the args as "show help" before dispatching to a subcommand handler. Verified via smoke: kit memory install --help and kit memory index --help print help and do nothing else. Build clean.

Follow-up worth auditing: confirm no other top-level command runs on --help.

🤖 Generated with Claude Code

`kit memory <sub> --help` (e.g. `kit memory install --help`) ran the subcommand
instead of printing help, so asking for help on `install` actually installed the
hooks. cmdMemory now treats a --help/-h flag anywhere as "show help" before
dispatching. Verified by smoke (install/index --help print help, no side effect).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@sandstream sandstream mentioned this pull request Jun 17, 2026
@sandstream
sandstream merged commit 0ab7323 into main Jun 17, 2026
16 checks passed
@sandstream
sandstream deleted the fix/memory-help-flag branch June 20, 2026 05:36
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.

1 participant