Debugging with hermes doctor: Logs, Traces, and Failure Recovery

8 min read Module 7 of 9 Topic 21 of 25

What you'll learn

  • Use hermes doctor as a first-pass diagnostic across every subsystem covered in this course
  • Locate and read raw session traces to debug a tool-calling failure
  • Map a symptom to the module most likely responsible for it
  • Build a recovery checklist for a deployment that stops responding
Building this at your company? For enterprise and company teams taking this to production: book a 30-minute session with our AI engineers for architecture guidance, code review, and a rollout plan for your use case.
Book a Team Session

One Command, Every Subsystem

You’ve now built a Hermes deployment spanning models (Module 2), tools and MCP servers (Module 3), memory and skills (Module 4), a terminal backend (Module 5), and possibly a messaging gateway (Module 6) with guardrails layered on top (Lessons 19-20). When something breaks, you need a systematic way to find out where, not a fresh investigation strategy for each subsystem.

hermes doctor

is that unified first step, and it’s why this course has pointed to it repeatedly rather than introducing a different diagnostic per module. It checks:

  • Provider credentials and reachability (Module 2)
  • MCP server connectivity, both stdio and HTTP (Lesson 9)
  • Terminal backend availability, Docker daemon, SSH host/user vars, Modal/Daytona auth (Module 5)
  • Gateway adapter status per platform (Module 6)
  • Configuration file validity (config.yaml syntax, required fields)

When Doctor Passes but Something’s Still Wrong

hermes doctor validates configuration and connectivity, it can’t catch every behavioral issue, particularly ones that only show up in a specific model exchange. For those, go to the raw session trace:

hermes sessions list
hermes sessions show <session-id> --raw

The raw trace shows you the actual <tool_call> and <tool_response> exchanges (Lesson 7.2), which is exactly what you need for the self-hosted tool-call-parser failure mode from Lesson 7.4: doctor confirms the model endpoint is reachable, but only the raw trace shows you the model emitted a tool call as plain text instead of a properly parsed structure.

Symptom-to-Module Map

A quick-reference table for triaging where to look, before diving into logs:

SymptomLikely moduleFirst check
”Auth error” or “unreachable model”Module 2 (Providers)hermes doctor, check .env for the active provider
Tool call emitted as plain text, not parsedLesson 7.4 (Function-calling)Inference server’s --tool-call-parser flag (Lesson 5)
“Agent seems to forget things mid-task”Lesson 6 (Context) or Module 4 (Memory)context_length setting vs. actual model limit
MCP tool missing from hermes toolsLesson 9 (MCP)tools.include/exclude filters, server reachability
Skill not triggering automaticallyLesson 11 (Skills)Skill’s description field specificity
Docker backend “container not found”Lesson 13 (Terminal backends)docker version, container may have expired past its sleep window
One messaging platform down, others fineLesson 16 (Gateway)hermes gateway status for that specific adapter
Cron job never firesLesson 17 (Cron)hermes cron list, check schedule syntax and cron logs
Approval gate blocking an unattended jobLesson 20 (Guardrails)Job’s toolset likely needs tightening, not the gate removing

A Recovery Checklist

For a deployment that’s gone fully unresponsive, work through these in order rather than reaching for the most drastic fix first:

  1. hermes doctor, rule out configuration and connectivity issues.
  2. hermes gateway status (if using messaging platforms), isolate whether it’s a specific adapter or the whole gateway.
  3. hermes sessions show <id> --raw on the most recent failing session, look for a malformed tool call or unexpected model response.
  4. Check hermes cron logs if the failure correlates with a scheduled job’s run time.
  5. Only after the above: restart the specific failing component (one gateway adapter, the terminal backend), not the entire installation, restarting everything discards the diagnostic trail you just built and disrupts anything that was working fine.

Common pitfall: reaching for a full reinstall or rm -rf ~/.hermes as a first response to a confusing failure. That destroys your memory store, skills, and configuration, exactly the accumulated state that makes a well-used Hermes installation valuable (Lesson 1). Work the checklist above first; a full reset should be a last resort, not a reflex.

Exercise: deliberately break something, misconfigure an MCP server’s command field, or set an invalid context_length, and practice the recovery checklist above to find and fix it without guessing. Then restore the correct configuration and confirm hermes doctor passes clean.

Knowledge Check

3 questions to test your understanding

1 Across this entire course, hermes doctor has come up as the first diagnostic step for provider auth (Module 2), terminal backends (Module 5), and MCP servers (Module 3). Why is a single command able to cover such different subsystems?

2 hermes doctor reports everything as healthy, but a specific tool call is still failing to parse correctly, matching the symptom from Lesson 7.4 (self-hosted model, missing tool-call parser). What's the next diagnostic step?

3 A messaging-gateway deployment (Module 6) stops responding on one platform but keeps working on others. Based on this lesson's symptom-to-module map, where should you look first, and why not restart the whole gateway process immediately?

Go further with expert guidance

Ready to build production AI?
Talk to our R&D team.

These courses give you the foundation. Our embedded AI teams take you from prototype to production in 30–90 days, with your team, your codebase, your goals. Book a free strategy call to see how we can accelerate your AI initiative.

30 minutes · No obligation · Expert AI engineers, not sales reps

AI Architecture Review

Audit your current stack and identify high-impact improvements

Project Review

Get expert feedback on your AI implementation and codebase

Team Mentoring

Upskill your engineers with hands-on AI coaching sessions

AI Strategy

Define your AI roadmap, prioritization, and implementation plan