Hermes Sessions Set-Journal-Mode: Fix a Stuck SQLite Store (2026)

Julian Goldie — founder, AI Profit Boardroom
By Julian Goldie · 8 min read
Get The AI Profit Stack Join AIPB →
🎯 1,000+ done-for-you AI agent workflows 📅 4 live coaching calls every week 🛡️ 7-day refund + 30-day ROI guarantee 👥 3,400+ AI operators inside

Stop every process that touches your Hermes profile's store — the gateway, the dashboard, any open CLIs and your cron jobs — then run hermes sessions set-journal-mode delete (or wal) in your terminal, and Hermes converts the profile's state.db to the SQLite journal mode you asked for, checks the file header to confirm the switch took, and hands the store back ready to open cleanly. The command shipped in Hermes Agent v0.21.4, released by Nous Research on 21 September 2026 under the tag v2026.9.21, and it exists for one specific, painful situation: a session database that is stuck in the wrong journal mode and refuses to come quietly. Before this release, per the pull request that introduced it (#117684, merged 21 September 2026), the only way out was hand-typed PRAGMA statements against a live SQLite file — exactly the kind of surgery most Hermes users never want to perform on the database that holds their sessions.

📺 Watch: NEW Hermes Agent Update is ABSOLUTELY WILD!

🔥 Get the Agent OS as a free bonus: AI Profit Boardroom members get the full Agent OS zip, prompt libraries, daily tutorials and weekly live coaching calls. → Get inside

What hermes sessions set-journal-mode Actually Does

The command is an offline journal converter for Hermes stores. According to the v0.21.4 release notes and pull request #117684, hermes sessions set-journal-mode accepts one of two modes: delete, which converts the store to SQLite's classic rollback journal, and wal, which converts it to write-ahead logging. By default it operates on the active profile's state.db — the database where Hermes keeps session state — and an optional db flag lets you point it at any other Hermes store instead, such as the kanban.db board file or cron stores.

The word offline matters. The tool is deliberately built to run only when nothing else has the database open. Per the pull request, Hermes refuses to convert while any other process holds the database file or its wal and shm sidecar files, and when it refuses it prints each offending process ID and command so you know exactly what to shut down. That is the opposite of the old manual approach, where you could issue a PRAGMA against a file another process was still writing and hope for the best.

Why a Hermes Store Gets Stuck in the Wrong Journal Mode

SQLite databases carry their journal mode with them. Write-ahead logging is the high-concurrency option and the sensible default for a busy agent, but there are environments where WAL is actively dangerous — and, per pull request #117684, Hermes deliberately refuses to downgrade a live WAL database automatically while other processes may hold uncommitted WAL commits. The result, before v0.21.4, was an escape-hatch gap: a store configured into WAL mode could not be walked back to a rollback journal through Hermes itself, even when you had a good reason to want that, such as moving the profile onto a filesystem where WAL misbehaves.

The release notes describe the new command as the sanctioned way out of that trap. You take the database offline, run the conversion, and the tool verifies the result by reading bytes 18 and 19 of the SQLite file header — the values 1 and 1 confirm a rollback journal, 2 and 2 confirm WAL, per the pull request. If the header does not report the mode you asked for, you find out immediately rather than on the next failed session write. If session data itself has been damaged rather than merely mis-moded, that is a different problem — the September releases also shipped separate corruption recovery work, covered in the v0.21.2 notes of 11 September 2026 — but for a healthy file in the wrong mode, this one command is the fix.

How to Run the Command Step by Step

The safe sequence, following the behaviour documented in the pull request, looks like this:

  1. Stop everything that uses the profile's store: the Hermes gateway, the desktop dashboard, any terminal sessions running the CLI, and any cron jobs that wake the agent on a schedule.
  2. Run hermes sessions set-journal-mode delete to convert to a rollback journal, or hermes sessions set-journal-mode wal to convert to write-ahead logging.
  3. If Hermes refuses and lists processes still holding the file, close those processes and run the command again — the refusal is the safety system working, not a bug.
  4. Watch for the header verification. The command confirms the file now reports the new mode before it exits.
  5. Update the database journal mode setting in your config if the command tells you it now disagrees — more on that below.
  6. Restart the gateway and dashboard and open a session to confirm normal operation.

If you have never touched your Hermes install beyond the defaults and nothing is broken, you do not need this command at all — it is a repair tool, not routine maintenance. The Hermes agent setup guide covers the configuration most people should actually be running day to day.

If you want a Hermes agent that runs your business instead of breaking down mid-week, the AI Profit Boardroom is where Julian shares the full battle-tested stack — join in and get the complete Hermes playbook. Prefer to talk it through 1-on-1 first? Book a free SEO strategy session and map out your setup live.

The Safety Checks Built Into the Command

Pull request #117684 documents an unusually defensive design for a one-shot CLI command, and the details are worth knowing before you rely on it:

That last two points are easy to underestimate: the command will actively stop you from putting a store into a mode that is known to corrupt on your filesystem, and it will not let a successful conversion be silently undone by a stale config line.

Fixing Other Hermes Stores with the db Flag

The default target is the profile's state.db, but Hermes keeps more than one SQLite store. Per the pull request, the db flag redirects the conversion at any other store path — the documented example converts the kanban board database, and cron stores are called out as valid targets too. The syntax pattern is the same command with the db flag pointing at the file you want converted. Everything else behaves identically: same holder detection, same header verification, same refusal to work on a file something else has open. If you are not sure which store is misbehaving, the Hermes memory system guide maps out what the agent keeps where, and which files hold what kind of state.

Keep database.journal_mode in Sync with Your Config

The conversion command changes the file; it does not change your configuration. Hermes has a database journal mode key in config.yaml that accepts the same two values, delete and wal, and — per pull request #117684 — whenever the actual file mode differs from the configured mode, the next open re-applies the configured one. Convert a store to a rollback journal while your config still says wal, and Hermes will politely flip it straight back the next time the gateway starts. This is why the command explicitly warns you when the two disagree. Treat the warning as a required step: change the config value to match the mode you converted to, then restart. Operators running Hermes across several machines — the pattern in the Hermes workspace guide — should check the config on every host that opens the same profile.

Windows, Virtual Machines and Network Filesystems

Two environments get special treatment, according to the pull request. On Windows, Hermes cannot scan for foreign processes holding the database, so the command refuses outright unless you add the force flag — which shifts the burden of making sure nothing has the file open entirely onto you. Inside virtual machines using virtiofs or 9p shared folders, the command refuses to enable WAL at all, with no override for good reason: SQLite's write-ahead log depends on shared memory that those filesystems do not implement correctly, and the failure mode is silent corruption rather than an error. If your Hermes install lives on a mount like that, run it in rollback journal mode or move the profile to a native disk — the Hermes desktop installation guide covers sensible install locations per platform.

Where This Fits in the v0.21.4 Update

The journal-mode command is one of nine notable additions in v0.21.4, alongside stream-json CLI output, a skills auto-load setting, bounded session search and a set of gateway hardening changes — the full rundown is in the Hermes Agent v0.21.4 update breakdown. It is the least glamorous feature in the release and arguably the most important one to know exists, because you will only go looking for it on a bad day. It also fits a wider pattern across the September 2026 releases: v0.21.2 shipped extensive database corruption prevention and recovery work, per its 11 September release notes, and v0.21.4 adds the sanctioned escape hatch for mode problems specifically. If you are building serious systems on top of Hermes, pair this knowledge with the Agent OS resource for structuring agent work, and the Goldie Bench write-up for how the different agent brains compare in hands-on tests before you commit a stack.

The honest summary: hermes sessions set-journal-mode is a command you should hope never to need, learn in five minutes, and be very glad exists the day state.db locks itself into the wrong mode. Stop the processes, run the conversion, sync the config, restart — and you are back to work.

If you want working Hermes systems handed to you — the Agent OS zip, prompt libraries, daily tutorials and five live coaching calls a week — check out the AI Profit Boardroom and get inside today. And if you would rather have Julian look at your setup first, book a free SEO strategy session and get a plan built around your business.

What members say about the AI Profit Boardroom

Read all 114 reviews on Skool →

★ 4.9 out of 5 from 114 member reviews on Skool

Yosuke Sato, AI Profit Boardroom member review (5 stars, paying member for 17 months): The best Skool course you get for AI! I have attended a few Skool courses before, but AI Profit Boardroom is the most active community and has great support from the management team, including Julian! You can get the most up-to-date information and practical implementations in this community. I highly recommend this!Mazzie T, AI Profit Boardroom member review (5 stars, paying member for 10 months): My mind is blown everyday with all the content and the incredible information. So much support and I love the personalised attention and quick responses. The community is great and people are very responsive and helpful.Rene Clayton, AI Profit Boardroom member review (5 stars, paying member for 9 months): The AI Profit Boardroom is a GAME CHANGER people. I could not be more thrilled that I joined!! So much support, more information than you can even consume, a huge value for what the small fee was. I have grown my business, my knowledge and my FUN!. SUCH a fantastic leader and group of humans. I am incredibly honored to be a part of this fantastic group of intelligent humans :-) THANK YOU!Arpiet Malpani, AI Profit Boardroom member review (5 stars, paying member for 8 months): Incredible learning from Julian and team. I started out in march and was able to build end to end SAAS with the help and learning from this group. I am incredibly thankful to Julian for crazy support and prompt response.James Grimm, AI Profit Boardroom member review (5 stars, paying member for 7 months): I asked Julian for help finding local business websites with little to no traffic. Julian was gracious in providing me my personal "how-to" video instruction. Wow, this is the pinnacle of customer service! I am just one of 3,400 subscribers and Julian took the time to help me personally. Thank you Julian for your assistance and outstanding custoemr support and care. James (Jim) GrimmNick Good, AI Profit Boardroom member review (5 stars, paying member for 4 months): I’m part of many AI groups and hands down, what Julian Goldie, has built here…the classroom trainings are amazing, but the community he has created is second to none (the community is worth the cost of joining!). If you’re looking to become the AI expert and build/create something meaningful, then AI Profit Boardroom is for YOU!Steven Gray, AI Profit Boardroom member review (5 stars, paying member for 4 months): Been in awhile. I’m a dad on a factory shift, not a tech bloke. Julian’s lot showed me how to use AI without drowning in tools. Avatar, voice, the workflow thinking — that’s what I needed. If you’re stuck on “where do I start,” this group’s worth it. I always read them.Steve Erickson, AI Profit Boardroom member review (5 stars, paying member for 4 months): I asked Julian a simple question, and he ended up creating a 10-minute video and a guide breaking down in extreme detail what I had asked. Amazing response!Rod Martin, AI Profit Boardroom member review (5 stars, paying member for 3 months): Julian is brilliant, and more prolific than I can keep up with (which is a great thing). His AgentOS is remarkable, and he is THE go-to guy for what you can really do (and not do) with the ever-increasing deluge of new AI upgrades and tools. HIGHLY recommend.Daniel Shulman, AI Profit Boardroom member review (5 stars, paying member for 4 months): Julian is very helpful. He doesn't try sell stuff you dont need and will give you a straight answer to your questions.Rj Herzog, AI Profit Boardroom member review (5 stars, paying member for 5 months): Top notch. If you are searching & searching thinking there is always something better out there.... You just found it. No need to look any further. Goldie covers it all & is super helpful. Can't beat the group either. Really can't recommend this group enough.Jermey Matthews, AI Profit Boardroom member review (5 stars, paying member for 6 months): While he has the capacity to do it, Julian is definitely doing the unscalable things to support his community.

Ready To Join The #1 AI Community?

Join 3,400+ entrepreneurs inside the AI Profit Boardroom. Get the Agent OS, 1,000+ plug-and-play AI agent workflows, daily Q&A with Julian and 4 live coaching calls every week.

Join The AI Profit Boardroom →

7-Day No-Questions Refund • 30-Day ROI Guarantee

← Back to all posts