Files
chemenu/docs/reference/exit-codes.md
T
torbenandClaude Code e9f4759727
CI / verify (push) Successful in 6m17s
CI / pwsh (push) Successful in 1m59s
Release / release (push) Successful in 34s
AGENTS.md § Gates is the one gate list; cli_contract.GATES and docs verify hold it
The gate list contradicted itself across AGENTS.md, instructions/gates.md and the
command records' gate names. The Rebase-Review Gate is now listed, `new project`'s
exit 42 is no longer a pseudo-gate, gates.md and the explanation page link to the one
list instead of counting, and a register plus a docs verify check keep the three in step.

Files changed:
- AGENTS.md
- CHANGES.md
- VERSION
- docs/explanation/why-gates-are-code.md
- docs/reference/commands/pages.md
- docs/reference/commands/types-instructions-and-docs.md
- docs/reference/exit-codes.md
- instructions/gates.md
- tools/CONTRACT.md
- tools/chemenu/cli_contract.py
- tools/chemenu/commands/docs_verify.py
- tools/chemenu/commands/doctor.py
- tools/chemenu/commands/git_publish.py
- tools/chemenu/commands/new_page.py
- tools/chemenu/errors.py
- tools/chemenu/mcp/server.py
- tools/chemenu/tests/test_cli_contract.py
- tools/chemenu/tests/test_docs_verify.py
- tools/chemenu/tests/test_git_publish.py
- tools/chemenu/tests/test_reference_doc.py

Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
2026-10-07 10:10:48 +02:00

2.2 KiB

Exit codes and gates

Which wikitool commands can stop and wait for a person - exit 42 - and for which gate, generated from the command records.

What each exit code means, and how a caller reacts to it, is AGENTS.md § Tool error contract. What a gate is and why it is enforced in code is AGENTS.md § Gates. This page lists which commands declare a gate, and every cause for which a command exits 42.

Gates by command

guideline-push

mass-update

publish-remote

rebase-review

upload-review

Exit 42 causes

  • new: new project: The provider cannot create the project itself (Super Productivity's access: "api"); the output says what a human has to create
  • upload accept: Upload Review Gate: --confirm is absent or does not match the manifest's current token
  • sync: Rebase-review gate: <remote>/<branch> moved and both sides changed the same file, generated files aside; the output lists the upstream commits, the overlapping files and their diff
  • publish: Mass-Update Gate: --threshold (default 10) or more counted files would be committed, or the --confirm token does not match this changeset
  • publish: Rebase-review gate: <remote>/<branch> moved and both sides changed the same file; the output lists the upstream commits, the overlapping files and their diff
  • publish: Publish-Remote Gate: .wikitool-remotes.json exists and the push URL of --remote is not listed in it, or --remote resolves to no push URL
  • export guidelines: Guideline Push Gate: --push without --confirm, or with a token that does not match the current set of targets