feat: document and stabilize exit codes and error.code values
Maintainers usually reply within 1 day
@margaretjgu is already working on this.
Since Sep 22, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli, documentation, testing
Research direction
Read AGENTS.md and the help topic work in #630 to identify the existing error.code strings and documented exit-code expectations. Probe elastic status --json for the auth_required and transport_error flows, then add one test per documented code and verify missing-config JSON errors and the changelog note for any changed codes.
Written by the indexing model from the issue text.
Description
We almost always exit 1. JSON errors use ad hoc error.code strings (transport_error, confirmation_required, input_validation_failed, command_blocked) with no catalog.
For agents this is the difference between retry with --yes and give up.
- Publish a table (help topic in #630): 0 success, 1 generic, then reserve 2 usage, 3 validation, 4 auth/config, 5 network. Implementing the split can follow the table. Do not silently change codes on existing scripts without a changelog note.
- Freeze
error.codestrings inAGENTS.md. Add codes forauth_required,config_invalid,not_foundif we do not already emit them. elastic status --jsonshould be the probe agents run afterauth_required/transport_error.
Acceptance: help topic lists codes. --json errors on a missing config use a documented code. One test per code.
- Dominant language
- TypeScript
- Stars
- 45
- Forks
- 26
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 51
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elastic/cli
-
base command --help shows two LEARN MORE sectionsPossibly taken @margaretjgu claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
elastic/cli#707 · 1 assignee ·
Maintainers usually reply within 1 day
-
feat: ship skills/elastic/SKILL.md for agent invocationPossibly taken @onatozmenn claimed this 7 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
A per-context command allowlist can be bypassed with `--use-context` (no way to lock an agent to its context)Possibly taken @margaretjgu claimed this 3 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
elastic/cli#700 · 1 assignee ·
Maintainers usually reply within 1 day
-
bug: malformed JSON passed to --document (and other body object flags) silently passes validationPossibly taken @margaretjgu claimed this 3 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 74/100
elastic/cli#699 · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
solana-foundation/solana-com#2245 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
`document.cookie` with `max-age=0` does not delete the cookiePossibly taken @BartInTheField claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
capricorn86/happy-dom#2460 ·
Maintainers usually reply within 2 days