Skip to content
Task
AGH RuntimeTask

agh task fail

Fail a claimed task run for the current agent session

Audience
Operators running durable agent work
Focus
Task guidance shaped for scanability, day-two clarity, and operator context.

agh task fail

Fail a claimed task run for the current agent session

agh task fail <run-id> [flags]

Examples

  # Mark a claimed run failed
  agh task fail run-123 --error "tests failed"

	  # Include structured failure metadata
	  agh task fail run-123 \
	    --error "tests failed" \
	    --metadata '{"command":"make test"}'

Options

      --error string      Failure message
  -h, --help              help for fail
      --metadata string   Optional failure metadata JSON

Options inherited from parent commands

      --json            Emit JSON output
  -o, --output string   Output format: human, json, jsonl, or toon (default "human")

Output Formats

Every AGH command supports -o, --output:

  • human for interactive terminal use
  • json for scripts and other machine-readable consumers
  • jsonl for wait or streaming commands that emit one JSON record per line
  • toon for compact agent-readable summaries

Example:

agh task fail <run-id> -o json

On this page