agentleFS
iapiap/hermes-guide/skills/diagnosing-sessions/SKILL.md

diagnosing-sessions

Skill6 starsChanged 8 days agoMITView on GitHub

Diagnose Hermes session issues — runaway sessions, loop signatures, context bloat, and session management problems.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Start a new session for new topics

    line 73
  2. Very specific:

    Use /compact if available

    line 74
  3. Distinctive:

    After applying the fix:

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Diagnosing Sessions

Goal: reduce any session problem to one concrete fix — a fresh session, a model change, or a context split.

1. How to inspect

  • hermes guide — runs check_session_health (runaway session audit)
  • hermes sessions list — all sessions with metadata
  • hermes sessions list --limit 50 — find session by ID
  • hermes sessions optimize-storage — reclaim space (stop gateway first)
  • tail -100 ~/.hermes/logs/agent.log — recent session activity

2. Common failures

Runaway session (loop signature)

Symptom: hermes guide flags a session with many turns + high tool use + large context resends.

Cause: Free-tier model struggling with complex research; context window filling up; generate-then-verify in same turn.

Fix:

# Start a fresh session
hermes  # new session
# Or use a more capable model for research:
# Set model to a non-free-tier default in config.yaml
# Split work: generate in one turn, verify in another

Session not found

Symptom: hermes sessions list shows no matching session ID.

Cause: Session expired, deleted, or wrong $HERMES_HOME.

Fix:

hermes sessions list          # find correct ID
hermes config path            # verify $HERMES_HOME

Session database corrupted

Symptom: hermes sessions list errors; state.db unreadable.

Cause: Crash during write, disk full, or concurrent access.

Fix:

cp ~/.hermes/state.db ~/.hermes/state.db.bak
# Let Hermes recreate:
rm ~/.hermes/state.db
hermes --version

Context bloat (slow responses)

Symptom: Responses get slower as conversation grows; high token usage.

Cause: Large context window accumulating; tool outputs not being compacted.

Fix:

  • Start a new session for new topics
  • Use /compact if available
  • Reduce tool output verbosity
  • See diagnosing-host-pressure for OOM-related slowdowns

3. Verification

hermes guide               # session health check passes
hermes sessions list       # sessions load correctly
hermes  # new session works

Pass: session health check shows healthy; new sessions work.

Fail: session health check flags runaway — start fresh session and split work.

Verification

After applying the fix:

hermes guide               # session health check passes
hermes sessions list       # sessions load correctly
hermes  # new session works

Pass: session health check shows healthy; new sessions work.

Fail: session health check flags runaway — start fresh session and split work.

4. Related

  • diagnosing-host-pressure — OOM and host load
  • diagnosing-storage — disk and database issues
  • hermes-disk-housekeeping — cleanup procedures

Facts re-verified 2026-10-31 against upstream source at commit cedf4a3d78675283fa93e4e6ea2d6212bf414667: hermes_cli/checks.py (check_session_health), hermes_constants.py (get_hermes_home). Re-verify before reuse.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.