Skip to content

document one CLI rejection shape and exit 4 - #181

Merged
indykish merged 2 commits into
mainfrom
chore/m171-cli-rejection-changelog
Aug 20, 2026
Merged

document one CLI rejection shape and exit 4#181
indykish merged 2 commits into
mainfrom
chore/m171-cli-rejection-changelog

Conversation

@indykish

@indykishindykish commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Pairs with agentsfleet/agentsfleet#617.

The published exit-code table in cli/flags.mdx already said 4 meant invalid command input. The client only did that for the handful of commands that validated their own flags — everything else exited 2, which the same table assigns to network failure. Now that the client agrees, cli/agentsfleet.mdx stops listing invalid input under 2; that row is network failure alone.

Adds the rejection output shape, the --json error envelope with its stable codes, and the group-help-on-stdout behavior.

🤖 Generated with Claude Code

Greptile Summary

The PR documents standardized CLI rejection handling, machine-readable error codes, exit code 4 for invalid invocations, and command-group help behavior.

  • Updates the CLI exit-code reference so exit code 2 is reserved for network failures and rate limits.
  • Adds human-readable and JSON rejection examples plus stable rejection codes.
  • Records the behavior change in the changelog and documents group help on standard output.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

FilenameOverview
changelog.mdxAdds release notes for standardized CLI rejection output, exit codes, JSON errors, and group help behavior.
cli/agentsfleet.mdxRevises the command-reference error table and documents rejection output and stable JSON codes.
cli/flags.mdxDocuments exit code 4 for invalid input and standard-output help for bare command groups.

Reviews (2): Last reviewed commit: "docs(m171): the rejection sentence cover..." | Re-trigger Greptile

The published exit-code table already said `4` meant invalid command
input; the client only did that for the handful of commands that
validated their own flags. Now that every command agrees, the command
reference stops listing invalid input under `2` — that row is network
failure alone.
Adds the rejection output shape, the `--json` error envelope with its
stable codes, and the group-help-on-stdout behavior.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment threadcli/agentsfleet.mdx Outdated
…bsence
Review caught the over-promise: "what is missing" describes a missing
argument, but an unknown command, an unrecognized flag, a malformed
value, and excess arguments all reject with nothing missing. The shape
claim (detail line, then Suggestion line) does hold for all of them, so
the sentence now says what is wrong rather than what is absent, and
names the three kinds.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@indykish
indykish merged commit f9fcee0 into mainAug 20, 2026
4 checks passed
@indykish
indykish deleted the chore/m171-cli-rejection-changelog branch August 20, 2026 02:52
Sign up for freeto 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

@indykish