You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
automation subcommand --help can execute mutations #2323
automationsBuilt-in plugin: automationsclibb CLIconfirmed-reproBug reproduced again from a clean trusted checkout; see linked reportpluginsPlugin SDK, runtime, marketplace
Inspect command-specific help for an existing automation update before changing its configuration.
Actual result
--help is recognized only when it occupies the command token itself. When supplied after the update subcommand, it is parsed as an ordinary flag and the update executes. During a read-only review this replaced an automation prompt before the captured prior value was immediately restored.
Source evidence:
plugins/automations/src/cli.ts returns help only when parsed.command is help, --help, or -h.
The update branch then calls service.update(...) without rejecting or honoring a trailing help flag.
Expected result
bb automation <subcommand> --help and -h print that subcommand's usage and perform no read or write side effect. Unknown flags should fail rather than being silently ignored.
Acceptance criteria
Every automation subcommand treats --help and -h as side-effect-free help regardless of flag position.
Mutating subcommands never call their service method on a help request.
Unknown flags return a non-zero usage error.
Tests cover create, update, pause, resume, run, and delete with trailing help flags and assert zero mutations/runs.
Root cause (short): plugins/automations/src/cli.ts parseArgs only treats --help/-h as help when it is argv[0]; elsewhere --help becomes an unread boolean flag and -h a positional, and the core bb CLI forwards plugin argv raw to the server so commander's help/unknown-option handling never runs, so update/pause/resume/run/delete/create execute their service call.
Proposed fix: In plugins/automations/src/cli.ts: (1) make parseArgs recognise --help/-h at any position (including the command token) as a help: boolean on ParsedArgs instead of a flag/positional; (2) in run(), return per-subcommand usage (exit 0) when parsed.help is set, before requireFlag/buildUpdateRequest/any service.* call; hoist the registered commands list to a constant so helpText() and a new commandHelpText(name) share one source; (3) add a per-subcommand flag allowlist (COMMAND_FLAGS) plus assertKnownFlags() that exits 1 with usage on unknown options (also resolves Builtin memory/automations/custom-instructions CLIs silently ignore unknown flags (core bb and tasks reject them) #2299 for this plugin); (4) ke…
Caveats: No linked PR to review. The reporter's specific incident (a prompt overwritten during a review) could not be observed directly, but the exact command shape reproduces the overwrite on the base commit. origin/main equals the base commit, so nothing later fixes it. The worktree retains the prototype fix and the repro test (uncommitted) for review. No screenshots: CLI/data bug, evidence is verbatim t…
The report is self-contained: copy-paste repro steps with the test or script inline, expected vs actual output, screenshots where the bug is visual, and code permalinks at the base commit. It was independently re-executed by a second agent (see its Verification section).
automationsBuilt-in plugin: automationsclibb CLIconfirmed-reproBug reproduced again from a clean trusted checkout; see linked reportpluginsPlugin SDK, runtime, marketplace
Activity
SawyerHood commentedon Aug 24, 2026
---Auto-Generated---
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2323.html
help: booleanon ParsedArgs instead of a flag/positional; (2) in run(), return per-subcommand usage (exit 0) when parsed.help is set, before requireFlag/buildUpdateRequest/any service.* call; hoist the registered commands list to a constant so helpText() and a new commandHelpText(name) share one source; (3) add a per-subcommand flag allowlist (COMMAND_FLAGS) plus assertKnownFlags() that exits 1 with usage on unknown options (also resolves Builtin memory/automations/custom-instructions CLIs silently ignore unknown flags (core bb and tasks reject them) #2299 for this plugin); (4) ke…The report is self-contained: copy-paste repro steps with the test or script inline, expected vs actual output, screenshots where the bug is visual, and code permalinks at the base commit. It was independently re-executed by a second agent (see its Verification section).
ymichael commentedon Oct 8, 2026
Fixed by #3913: --help/-h anywhere in a plugin command now prints help and exits 0 without running the command.