# Help is not reachable

> ax-check rule: None of --help, -h or help printed usage text with exit status 0.

Section: ax-check rule · CLI behaviour  
Canonical: https://agentexperience.tech/checks/axc-c009/

None of --help, -h or help printed usage text with exit status 0.

- **How serious**: **error** Something is broken or missing.
- **Kind of check**: **[Observed](https://agentexperience.tech/checks/#kinds)** Depends on the program and environment at run time.
- **ax-check command**: `ax-check probe-cli`
- **Where it applies**: Command-line programs, run as a subprocess
- **Topics**: [discovery](https://agentexperience.tech/evidence/#pattern-discovery), [docs-for-agents](https://agentexperience.tech/evidence/#pattern-docs-for-agents)
- **Rule text from**: ax-check 0.2.0Documented ahead of release

**Fix in one line** Make --help print usage to stdout and exit 0, without needing credentials or a network.

None of `--help`, `-h` or `help` printed text and exited with status 0. For a command-line tool, help is how an agent finds out what the tool can do. Without it, the agent has only its memory, which may be out of date.

## What it checks

The help probe tries `<cmd> --help` first, then `<cmd> -h`, then (only with `--probe help-word`) `<cmd> help`. The later variants run only if the earlier ones failed. The rule fires when none of them exits 0 with output, and a variant that timed out does not count. Output on stderr is accepted when stdout is empty.

## Why it matters

Agents learn a CLI by reading its help. The Command Line Interface Guidelines say “-h, –help: Help. This should only mean help.” The GNU Coding Standards say every program should support `--version` and `--help`. Help also feeds the other checks: [No machine-readable output flag](https://agentexperience.tech/checks/axc-c006/) and [No dry-run flag documented](https://agentexperience.tech/checks/axc-c008/) read it, so when help is missing those checks have nothing to inspect. Research on agent behaviour suggests that agents lean heavily on agent-facing documents; Gao and Chen (arXiv 2608.20195, a preprint) report that in 557 agentic coding sessions, agent-facing artefacts such as instruction files were 60.5% of documentation interactions, against 1.3% for API references (the paper’s claim). That study is about coding sessions, not CLI help, and it did not measure help text. Reading it as a reason to keep help one flag away is this rule’s design rationale.

Common ways to fail are: help that needs a login or a network, help that exits non-zero, help that prints to stderr only, and help that treats `--help` as an unknown flag.

## How to fix

Make `--help` print usage to stdout and exit 0, without credentials, a network call or a prompt. Keep `-h` working too if short flags are common in your ecosystem.

## Example

### Before

```console
$ invoicer --help </dev/null; echo $?
error: not logged in. Run: invoicer login
1
$ invoicer -h </dev/null; echo $?
error: unknown flag -h
2
```

### After

```console
$ invoicer --help </dev/null; echo $?
Usage: invoicer <command> [options]

Commands:
  create   Create a draft invoice
  list     List invoices
  show     Show one invoice
  export   Export invoices

Run "invoicer <command> --help" for details.
0
```

A Node fix: handle the flag before any authentication step.

```js
if (process.argv.includes('--help') || process.argv.includes('-h')) {
  process.stdout.write(usageText);
  process.exit(0);
}
await requireLogin();
```

## How ax-check detects it

Each help variant runs with no TTY and stdin closed. A variant counts as reachable if it exits 0 and prints something. The rule only fires when every variant that ran failed. If a variant fails because the program could not start at all (exit 126 or 127, or a missing interpreter, file or dependency), ax-check stops with a usage error (exit 2) instead of reporting this rule. It does not judge the quality of the text.

To reproduce by hand: `invoicer --help </dev/null; echo $?`, then `invoicer -h </dev/null; echo $?`, then `invoicer help </dev/null; echo $?`.

Known false positives: a CLI that prints its help only after a successful network call. That is itself the thing the rule is warning about. Silence the rule with `--disable <rule-id>` only if the program is not meant to be called by agents.

Safety note: This rule uses the default `--help` and `-h` probes. The `help` subcommand fallback is opt-in (`--probe help-word`), because a program without subcommands may read `help` as a file or target name. probe-cli executes your program under your own OS account. The temporary working directory and HOME it uses are not a sandbox: the program can still read and write anything your account can, and use the network. Probe a CLI you have not reviewed only inside a container or a throwaway virtual machine. Run `ax-check probe-cli --dry-run -- invoicer` first to see the probes that would run, and see the “Probe safety” section of the ax-check README for what is and is not isolated.

## Sources

- Guideline: Command Line Interface Guidelines, clig.dev. [https://clig.dev/](https://clig.dev/) . Says `-h, --help` should only mean help.
- Guideline: GNU Coding Standards, Command-Line Interfaces. [https://www.gnu.org/prep/standards/html\_node/Command\_002dLine-Interfaces.html](https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html) . Says every program should support `--version` and `--help`.
- Paper: Gao and Chen, “From Agent Behaviour to Agent-Friendly Documentation”, arXiv 2608.20195, 20 Aug 2026. [https://arxiv.org/abs/2608.20195](https://arxiv.org/abs/2608.20195) . The paper’s claim: in 557 agentic coding sessions, agent-facing artefacts were 60.5% of documentation interactions against 1.3% for API references.

## Related evidence

Records in the [AX evidence register](https://agentexperience.tech/evidence/) about the same pattern as this rule. They don’t test the rule itself.

- [A capable agent skipped the index and guessed the page](https://agentexperience.tech/evidence/ev-0027/): A preregistered ablation on a 709-page Markdown wiki (preprint) found that a capable tool-using agent never loaded the compact catalogue index, inferring page paths from the question instead, while retrieval-based access kept answer quality non-inferior and cut cost by about a third to over half. Preprint: not yet peer reviewed
- [Coding agents mostly read instruction files, not docs sites](https://agentexperience.tech/evidence/ev-0011/): An observational study of 557 agentic coding sessions (preprint) found that instruction files and working notes made up 60.5% of agents' documentation interactions, against 10.6% for classical technical documentation and 1.3% for API references. Preprint: not yet peer reviewed
- [Compact documentation did not help when the source was present](https://agentexperience.tech/evidence/ev-0012/): Across two model families and ten repositories, with a positive control, a preprint found that neither compact natural-language documentation nor retrieved context helped coding agents resolve issues better than the issue alone when the source code was present. Preprint: not yet peer reviewed
- [FAQ blocks and structured data showed no citation effect within a domain](https://agentexperience.tech/evidence/ev-0013/): An observational study of about 2 million AI-engine citations (preprint) found that FAQ blocks, structured data and Core Web Vitals had positive effects on citation in pooled data that reversed or fell to zero once domain fixed effects were applied. Preprint: not yet peer reviewed
- [Skill selection precision collapses as the skill pool grows](https://agentexperience.tech/evidence/ev-0019/): A preprint reports that as the pool of available skills grew from 5 to 100, the precision with which agents actually used the right skill fell from 29.6% to 3.3%. Preprint: not yet peer reviewed
- [Hiding tools is not enforcing permissions](https://agentexperience.tech/evidence/ev-0023/): Across 2,160 attempts with four frontier models (preprint), a server with only in-body permission checks exposed forbidden tools in 152 of 720 trials and permission-aware visibility cut that to 0 of 720, yet models named a hidden tool in up to 94% of settings when it was inferable from the prompt. Preprint: not yet peer reviewed

## Related guides

- [Agentic Resource Discovery, implemented](https://agentexperience.tech/insights/agentic-resource-discovery/): Agentic Resource Discovery explained: what ARD is, how /.well-known/ard.json relates to MCP's ai-catalog.json, and a worked example you can copy to publish your own. Guide
- [Agent tool catalogues need a pruning strategy](https://agentexperience.tech/insights/agent-tool-catalogs/): How to design an agent tool catalogue: why selection gets harder as an MCP tool catalog grows, three ways to prune it, and how to name neighbouring tools. Guide
- [Write agent-readable documentation](https://agentexperience.tech/insights/make-documentation-legible/): Agent-readable documentation in practice: what documentation for AI agents must answer, how to shape a page around one decision, and how to keep it true. Guide

## Go here next

- [Agentic Resource Discovery, implemented](https://agentexperience.tech/insights/agentic-resource-discovery/): What ARD is, how ard.json relates to MCP's ai-catalog.json, and a copy-pasteable manifest for a content site. Guide
- [A capable agent skipped the index and guessed the page](https://agentexperience.tech/evidence/ev-0027/): A preregistered ablation on a 709-page Markdown wiki (preprint) found that a capable tool-using agent never loaded the compact catalogue index, inferring page paths from the question instead, while retrieval-based access kept answer quality non-inferior and cut cost by about a third to over half. Evidence
- [ANSI colour codes without a terminal](https://agentexperience.tech/checks/axc-c010/): Output contained ANSI escape sequences although stdout and stderr were not terminals. Rule

## About this rule text

[No dry-run flag documented](https://agentexperience.tech/checks/axc-c008/)

[ANSI colour codes without a terminal](https://agentexperience.tech/checks/axc-c010/)

[All ax-check rules](https://agentexperience.tech/checks/)

Rule text from ax-check 0.2.0, by Himadri Mishra. The licence will be confirmed before the source repository is published.
