Skip to main content
When errors or unexpected behavior happen during testing or production, you need to understand what went wrong and fix it quickly. Hive provides structured logging and AI-assisted debugging to make this as painless as possible.

Three-Level Observability

Hive uses three levels of logging to give you the right amount of detail at each stage of debugging. Start at L1 for the big picture, then drill down as needed.
LevelWhat It CapturesFileWhen to Use
L1 (Summary)Run outcomes — success/failure, execution quality, attention flagssummary.jsonQuick health check: did the agent succeed?
L2 (Details)Per-node results — retries, verdicts, latency, attention reasonsdetails.jsonlInvestigating which node failed or why routing went wrong
L3 (Tool Logs)Step-by-step execution — tool calls, LLM responses, judge feedbacktool_logs.jsonlDeep debugging: exactly what the LLM saw, said, and did
Start with L1 to find the problem area, then drill into L2 and L3 only for the failing nodes. This saves time and keeps you focused.

Debugging Workflow

1

Check the summary

Look at summary.json for the run outcome. Did the agent succeed or fail? Are there attention flags?
hive logs <agent_name> --level summary
2

Identify the failing node

If the run failed, check details.jsonl to find which node produced the error or unexpected result. Look for retries, timeouts, and attention reasons.
hive logs <agent_name> --level details
3

Inspect tool-level execution

For the failing node, examine tool_logs.jsonl to see the exact sequence of tool calls, LLM responses, and judge evaluations.
hive logs <agent_name> --level tools --node <node_name>
4

Reproduce interactively

Use the TUI to run the agent again with the same input and watch execution in real time.
hive tui <agent_name>
5

Fix and validate

Update your node code, edge logic, or goal definition, then re-run tests to confirm the fix.
hive run <agent_name> --debug --input '{...}'

AI-Assisted Debugging

Hive gives you an AI-assisted experience for checking logs and getting high signal-to-noise insights. Instead of reading through raw log files, the debugging tools help you:
  • Identify the root cause of failures from log patterns
  • Suggest specific fixes based on common failure modes
  • Highlight attention-worthy details you might otherwise miss
Use the debugger skill in your coding agent:
claude> /hive-debugger
This opens an interactive debugging session where the coding agent reads your logs, identifies issues, and proposes targeted fixes.

Common Issues

Check L3 logs for the exact tool call and its response. Common causes: missing credentials, API rate limits, or unexpected input format. Verify your credential store has the right keys set up.
Check L2 logs for routing decisions — the agent may be taking the wrong path through the graph. Review your edge conditions and goal criteria to make sure they match your intent.
Check L2 for the retry count and L3 for why each attempt fails. The root cause is often an unreachable success condition in the node’s evaluation logic. Adjust the node’s constraints or add a fallback edge.
Check the timeout configuration in your HITL node. Consider adjusting the timeout duration, changing the escalation policy, or adding an auto-approve fallback for low-risk decisions.
Check L1 for total token usage and L2 for per-node costs. Agents that retry frequently or use expensive models on simple tasks drive up costs. Review your model configuration and set budget limits.

Testing vs Debugging

Testing verifies your agent works correctly. Debugging investigates why it doesn’t. Use them together:
  • Before deployment: Write tests for your goal criteria and constraints
  • After a failure: Use the debugging workflow above to diagnose and fix
  • After a fix: Add a regression test so the same failure doesn’t happen again

Next Steps