#Hermes Agent ignores state attenuation, loses context across sessions, corrupts files

1 messages · Page 1 of 1 (latest)

olive mist
#

Mostly gateway telegram agent running on nous portal stepfun. 3.5 Mimo before that. Agent has become actively destructive. Ignores state attenuation, loses context, corrupts files, and deletes data. Cannot be trusted to execute even simple instructions.

  1. Token explosion — Yesterday: 73M input tokens (~$20). Agent loaded 100% of all memory files on every turn. After restart, it reverted immediately, ignoring my detailed attenuation instructions.

  2. Context amnesia — Cannot retrieve prior sessions reliably.

  3. Corrupts files with patch chains — engage_x.py now a mess: line-number artifacts (NN|), deleted functions, undefined variables. Each "fix" compounds damage. Clean backups also corrupted.

  4. Ignores "no" — I said "no" to spaghetti fixes. Agent kept proposing and sneaking changes. Treats "broken" as permission to act.

  5. No version control, no confirmation gates, no clean baselines. Writes freely, and I don't know how to get it to stop.

Result: Downward spiral. Every "fix" makes it worse. Cron jobs running broken scripts, filesystem corrupted, memory spotty, loses context easily and often.

https://paste.rs/kMPbk <-- telegram gateway

Report https://paste.rs/I6Mu0 <-- desktop CLI
agent.log https://paste.rs/W2TZR <-- desktop CLI

livid bear
#

Yeah, this is not healthy behavior, and the logs do show a few concrete things that would cause exactly the spiral you’re describing.

The biggest one is that your instance is set to compression.threshold: 0.1. That is extremely aggressive. In the logs, the gateway is repeatedly doing flush_memories, then compression, then Session split detected, with very long runs like api_calls=71, api_calls=54, api_calls=90. That will absolutely make the agent feel unstable and forgetful.

There is also a more serious line earlier in the full log:

Context compression: no provider available for summary. Middle turns will be dropped without summary for 600 seconds.

That is a direct context-loss path. If compression is firing constantly and summary is unavailable, Hermes will shed middle context and the agent will start acting like it forgot what you already told it.

The approval side is also not matching “no confirmation gates.” Your Telegram logs show both choice=always and later choice=session approvals. That means the gateway did have standing permission to keep executing dangerous write commands in those sessions. That does not make the resulting behavior okay, but it does explain why it kept writing after you expected it to stop.

The desktop CLI side is not clean either. It logged Agent thread still alive after interrupt, so the CLI run was also in a bad state.

So the next move here is to stop using this runtime state and reset the environment before trusting it with any more writes.

Do this first:

  1. Update Hermes. You are on 0.10.0 (2026.4.16), and there have been fixes after that in the flush/compression/interrupt/drain area.
  2. Raise compression back to something sane:
    hermes config set compression.threshold 0.5
  3. Force approvals back to manual:
    hermes config set approvals.mode manual
  4. Clear any permanent dangerous-command allowlist:
    hermes config set command_allowlist []
  5. Pause the active cron jobs so broken scripts stop running:
    hermes cron list
    then
    hermes cron pause <job_id>
  6. Restart the gateway
  7. Start a fresh chat session after restart. Do not resume old sessions for testing, and do not use session or always on approval buttons while you are validating behavior.

If you are doing code work in a git repo, also turn on isolated worktrees:
hermes config set worktree true

And if checkpoints are enabled, use /rollback to recover files instead of asking the same unstable session to repair its own damage.

One important correction from the logs: I cannot confirm from these pastes that Hermes is literally loading 100% of all memory files on every turn. What I can confirm is repeated compression/splitting plus at least one explicit “drop middle turns without summary” condition, and that alone is enough to explain the context-loss behavior you are seeing.

After you reset it, the only thing to retest first is a simple no-tool memory check in a fresh session. If it still starts splitting/compressing aggressively or free-writing after that reset, send one fresh hermes debug share from after the restart and we can look at the new clean-state behavior instead of the already-corrupted runtime.

olive mist
#

thank you, I'll take these steps!

livid bear
#

lmk if that works out for you. but yeah. kill those crons fast after the update so they dont fire and waste more money.

olive mist
#

Will do.

livid bear
#

or, even pause those before updating.

#

so that the update gateway restart doesnt let them even try

olive mist
#

whoops, too late.

livid bear
#

what fun!

olive mist
#

It's ok, I'm on stepfun free. Not using checkpoints (guessing I should start?), and probably I should instruct hermes to name my sessions going forward? Anything else? Admittedly, I'm not a dev, just an AI-enabled non-techie. Also, Gille, do you know of some all-purpose command that cleans the crap out of its filesystem and makes it revert to best practices, eg. stop eating its own tail trying to fix code, injecting line-number artifacts, and then trying to fix those with sed commands that just delete more logic?

I did devise a command sheet after the massive token bloat session, but it didn't take due to factors discussed above, but not sure this kind of thing is the move in any universe: https://gist.github.com/pbchrist/a8fddef64e1fcceda0270e6ce223d36a
Wiki restructure:
https://gist.github.com/pbchrist/90decdf3a5dde07de466645f7872e42f

Gist

hermes_hygiene.md. GitHub Gist: instantly share code, notes, and snippets.

Gist

hermes_wiki_restructure.md. GitHub Gist: instantly share code, notes, and snippets.

livid bear
#

Yeah, a few things there.

Checkpoints: yes, I would absolutely start using them. In your current situation they are much more important than giving the agent more self-maintenance instructions.

Session naming: helpful, but secondary. It makes things easier for you to inspect and resume, but it is not the thing that stops destructive behavior.

The bigger answer is that there is not really one magic “clean all the crap out and restore best practices” command today. Hermes can help with rollback and isolation, but it does not have a single universal self-heal button that safely undoes bad edits, clears bad memory behavior, resets approvals, fixes cron, and restores a repo to a good baseline all at once.

What I would treat as the real safety baseline is:

hermes config set compression.threshold 0.5
hermes config set approvals.mode manual
hermes config set command_allowlist []
hermes config set worktree true

And if you are in a repo, use checkpoints plus /rollback instead of asking the same unstable session to repair its own damage.

On your gist specifically: I do not think that hygiene sheet is the right move as an always-on autonomous end-of-session instruction in the current state. It is asking the agent to do more file writes, more classification, more memory edits, more wiki edits, more AGENTS edits, and more self-directed maintenance at exactly the moment when your instance is already proving it cannot be trusted to do that cleanly... and we do most of this for you already.

As a human/operator checklist, parts of it are fine.
As a standing agent instruction, right now it is too much.

Same with the wiki restructure task. That is a valid project task, but not something I would hand to an unstable instance as a “just execute completely without stopping” prompt until the compression/approval/runtime behavior is cleaned up first.

So my advice is:

use checkpoints
use worktrees
keep approvals manual
pause cron until you trust the runtime again
keep naming sessions if it helps you organize
do not add a big self-improvement / self-filing / self-restructure routine yet

Get the runtime stable first. Then add process discipline second after reading docs and understanding what is already there and how it all works.

livid bear
#

Let me know if you're up and running again and then I'll close out the thread. But feel free to make new ones when you need help.