Module 8: DebuggingLesson 2 of 4

Logs vs Hallucinations

Logs vs Hallucinations

How do you know if the agent actually did something?

The Trust Problem

Agents can say:

"I've saved the file to output.md"

But did they actually?

Verification Strategies

1. Check the Logs

OpenClaw logs all actions. Find them:

ls logs/ cat logs/latest.log

What to look for:

  • Tool calls with parameters
  • Tool responses
  • Errors or warnings

2. Check the Results

If agent says it created a file:

cat workspace/output.md # Does it exist?

If agent says it ran a command:

# Check command history # Check expected side effects

3. Ask for Proof

Good prompting:

"Show me the contents of the file you just created" "What was the output of that command?"

The agent should be able to demonstrate its work.

Red Flags: Likely Hallucinations

Generic Confirmations

❌ "Done!" ❌ "I've completed the task" ❌ "Everything is set up"

These say nothing verifiable.

Missing Details

❌ "I found several results" ❌ "The file has been updated" ❌ "I ran the necessary commands"

Real actions have specific details.

Impossible Claims

❌ "I've sent you an email" (no email tool) ❌ "I've updated the database" (no database access) ❌ "I remember our conversation from last month" (likely doesn't)

Claims beyond agent's capabilities.

Green Flags: Likely Real

Specific Details

✅ "Created workspace/output.md with 47 lines" ✅ "Command returned exit code 0 with output: ..." ✅ "Found 3 results: A, B, C"

Details that would be hard to fake.

Verifiable Actions

✅ "Here's the file content: ..." ✅ "The command output was: ..." ✅ "Screenshot shows: ..."

Evidence attached to claims.

Error Acknowledgment

✅ "The command failed with: permission denied" ✅ "I couldn't find that file" ✅ "The API returned an error"

Honest about failures = more trustworthy about successes.

Verification Checklist

When the agent claims to do something:

  • Check logs for the action
  • Verify the result exists
  • Ask for specific details
  • Look for red flags
  • Test the outcome yourself