Skip to content

fix(config): recognize subcommands after leading global flags - #1487

Merged
bwachman merged 1 commit into
mainfrom
cl-10770-recognize-subcommands-after-leading-global-flags-corbits-cwd
Oct 17, 2026
Merged

bwachman merged 1 commit into
mainfrom
cl-10770-recognize-subcommands-after-leading-global-flags-corbits-cwd

Conversation

@bwachman

Copy link
Copy Markdown
Contributor

Summary

  • The subcommand (resume, continue, exec, run) is the first token that is neither a flag nor a flag's value, so corbits --cwd <dir> resume opens the resume picker instead of starting a session whose first message is "resume". Launchers that prepend global flags now work.
  • -- ends flag parsing, so a prompt that is literally a subcommand word stays expressible (corbits -- resume, corbits exec -- resume), and --help documents it.
  • -p resume now fails with the existing "cannot combine resume with -p" error, -p exec with no prompt prints the exec usage and exits 2, and --resume <id> exec "x" runs in exec mode.

Verification

  • bun run typecheck, bun run build, and bun run test pass (9233 tests)
  • The new config tests fail on main and pass on this branch

Fixes CL-10770

Launchers that prepend global flags (`corbits --cwd "$dir" "$@"`) turned
`resume` into the first message of a fresh session. The verb is now the
first token that is neither a flag nor a flag's value, and `--` ends flag
parsing so a prompt that is literally a verb stays expressible.
@linear-code

linear-code Bot commented Oct 17, 2026

Copy link
Copy Markdown

CL-10770

@corbits-triage

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Approve

Leading global flags no longer hide resume, continue, exec, or run. -- still keeps a literal subcommand word as the prompt.

No findings.

@bwachman
bwachman merged commit 4c882a0 into main Oct 17, 2026
13 checks passed
@bwachman
bwachman deleted the cl-10770-recognize-subcommands-after-leading-global-flags-corbits-cwd branch October 17, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants