Use this file when cargo ai hatch <agent-name> --config <config.json> --check reports an error.
Check that the JSON includes:
versioninputsagent_schemaactions
Examples:
output_variableonagentoremail_me- missing
programforexec - missing
agentforkind: "agent" - missing
nameforkind: "tool" - unsupported or misspelled
platformvalues
Check for:
- collisions with top-level schema fields
- reusing the same captured variable name twice in one action
- using a captured variable before the step that creates it
Check for:
- absolute paths
../- child agents that are not written as
./child_name
Check for:
- using
--input-file,--input-url, or--input-imagewithout also supplying--input-textwhen the instructions were only baked into JSON and the run is still using the default replace behavior - expecting runtime input flags to append to JSON
inputswithout also setting--input-mode appendor--input-mode prepend - using a JSON
file.pathwhen the caller should really choose the file at invocation time
Check for:
- declaring a named input slot with
nameplustypebut no baked value, then never satisfying it before use - expecting anonymous runtime
--input-*flags to satisfy a named input slot; use--input-override NAME=VALUEfor that - using anonymous runtime
--input-*on a structural action-only agent, where the model call is skipped and only named top-level inputs remain valid - referencing
{ "input": "<name>" }from a child step when the parent did not declare that named top-level input - expecting a child to forward a named input onward without declaring the same named input locally first
- using child
inputswhen the intent was really to target one declared named child slot directly; prefer childinput_overridesfor that - expecting child
input_modeto change childinput_overrides; it only applies to anonymous childinputs
Check for:
- using
runtime.<name>without declaring<name>in top-levelruntime_vars - passing
--run-varfor a name that is not declared inruntime_vars - forgetting
--run-varfor a declared runtime var that has nodefault - passing an empty
--run-varvalue forboolean,integer, ornumber - forgetting to quote a
--run-varvalue that contains spaces or shell-sensitive characters - trying to use captured step vars in
generate_image.model; that field only accepts literal strings plus top-level string schema fields andruntime.*in the current contract
Check for:
- trying to run
cargo ai add tool <name>outside a Cargo AI project with no.cargo-ai/project.toml - forgetting to bootstrap the project boundary first with
cargo ai initorcargo ai new <path> - updating
tools/<tool_name>/src/tool.rsbut forgettingcargo ai tools build <tool_name> --target <triple> - pulling a published project and assuming source-backed tools are already materialized as runnable binaries
- wiring agent JSON to a tool
namethat does not match the managedtool.json - using param names or scalar types that do not match the tool
describecontract - setting
output_variableon a tool step when the tool returnsresult: null - expecting
--ignore-toolsto make a missing tool succeed; it only skips the upfront audit
Check for:
- expecting
cargo ai add guidanceorcargo ai add toolto create.cargo-ai/project.toml; usecargo ai initorcargo ai new <path>first - expecting
cargo ai init/newto install the Codex guidance bundle automatically; runcargo ai add guidance --style codexafter bootstrap when you wantAGENTS.mdplus.cargo-ai/guidance/ - forgetting that
cargo ai init/newdefaults to--vcs git - seeing a Git setup failure and missing the suggestion to either install Git or rerun with
--vcs none
Check for:
platformfiltering the step out on the current runtime OS- a macOS-only command being tested on another platform
- platform-specific assumptions that belong in sidecar notes
Check for:
- expecting parent actions to read child top-level output fields directly
- missing
status_variable/error_variablewhen the parent needs to react to child success or failure - expecting the parent to inline the entire child transcript; Cargo AI only surfaces child start/completion summaries plus any changed child
using:line by default
Check for:
- expecting a repeated
using:line when the effectiveprofile,auth,server, andmodeldid not change from the last printed context - expecting
url=...to appear for the standard OpenAI API or ChatGPT account transports; it only appears when the effective URL is custom or materially different - assuming a child inherited the same context just because the parent emitted
child: started ...; if the child changed context, look for a later childusing:line
If the user asked for portability across macOS, Windows, and Linux:
- remove shell-specific assumptions when possible
- minimize
execusage - keep commands and paths as generic as possible
If the user asked for macOS-only local behavior:
- prefer
/bin/echoor another explicit executable over a bare shell builtin - pair the step with
platform: "macos"when the step should not run elsewhere
- Read the reported field path.
- Fix one problem at a time.
- Re-run:
cargo ai hatch <agent-name> --config <config.json> --check
- Build only after the check passes.
If the JSON is technically valid but hard to explain:
- add a same-name sidecar Markdown file
- add an ASCII diagram near the top
- record any platform-specific assumptions there