hermes - ✅(Solved) Fix [Bug]: hermes -z creates durable JSONL transcripts that cannot be managed through session commands [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#19503Fetched 2026-05-05 06:06:25
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #19527: fix(cli): suppress one-shot session transcripts

Description (problem / solution / changelog)

Summary

  • prevent hermes -z from writing the hidden per-session JSON transcript during one-shot runs
  • keep the behavior scoped to hermes_cli.oneshot; interactive CLI/gateway persistence is unchanged
  • add a regression test that proves the one-shot agent's session persistence hook is suppressed

Fixes #19503.

Verification

  • scripts/run_tests.sh tests/hermes_cli/test_tui_resume_flow.py::test_oneshot_agent_suppresses_session_persistence tests/hermes_cli/test_tui_resume_flow.py::test_main_top_level_oneshot_accepts_toolsets tests/hermes_cli/test_tui_resume_flow.py::test_oneshot_rejects_invalid_only_toolsets -> 3 passed, 3 warnings
  • git diff --check -> passed

Additional check:

  • scripts/run_tests.sh tests/hermes_cli/test_tui_resume_flow.py::test_launch_tui_exports_model_provider_and_toolsets currently fails independently because this shell has NODE_ENV=development while the existing test expects production. This reproduces when run alone and is outside this change's one-shot persistence path.

Changed files

  • hermes_cli/oneshot.py (modified, +2/-0)
  • tests/hermes_cli/test_tui_resume_flow.py (modified, +56/-0)

Code Example

Report     https://dpaste.com/B8N6N9JQX
agent.log  https://dpaste.com/BBBBKUA93

---
RAW_BUFFERClick to expand / collapse

Bug Description

hermes -z is documented as a scripted one-shot entry point for shell scripts, CI, cron jobs, and parent processes.

But it still silently writes a durable JSON transcript containing the full prompt and response under ~/.hermes/sessions/. That transcript is not indexed in SQLite and cannot be managed through normal hermes sessions commands such as list, delete, etc.

This creates a hidden persistence side effect for one-shot callers: sensitive prompts/responses may be stored on disk unexpectedly, hidden transcript files may accumulate over time, and users have no documented session-management path to clean them up.

Steps to Reproduce

  1. Run hermes -z "Please reply exactly OK"
  2. Run hermes sessions list
  3. There is no new session info about hermes -z "Please reply exactly OK"
  4. Run ls ~/.hermes/sessions/
  5. There is one new session of hermes -z "Please reply exactly OK"

Expected Behavior

I couldn't find an exact specification for the persistence behavior of hermes -z, but I think it should have a coherent persistence policy:

Option A, preferred:

  • Do not create a durable JSON transcript by default for one-shot mode.

Option B, acceptable:

  • If Hermes intentionally persists -z transcripts, document this behavior clearly.
  • Make the transcript manageable through hermes sessions commands.
  • Provide a flag/config option to disable transcript persistence for scripts, CI, cron, and privacy-sensitive callers.

Actual Behavior

After executing hermes -z <prompt>, there is no metadata in SQLite database but there is its JSONL transcript in ~/.hermes/sessions/

Affected Component

Other

Messaging Platform (if gateway-related)

No response

Debug Report

Report     https://dpaste.com/B8N6N9JQX
agent.log  https://dpaste.com/BBBBKUA93

Operating System

Ubuntu 20.04.5 LTS

Python Version

3.11.15

Hermes Version

v0.12.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

To address the issue, consider adding a flag or configuration option to hermes -z to disable transcript persistence for one-shot mode, ensuring sensitive information is not stored unexpectedly.

Guidance

  • Review the hermes documentation and codebase to understand the current persistence policy for one-shot mode and identify potential areas for modification.
  • Investigate the feasibility of adding a flag or configuration option to hermes -z to control transcript persistence, allowing users to opt-out of storing sensitive information.
  • Consider updating the hermes sessions commands to include management options for transcripts generated by hermes -z, ensuring users have a clear path for cleaning up stored sessions.
  • Evaluate the trade-offs between implementing Option A (no default persistence) versus Option B (documented persistence with management options) and choose the approach that best aligns with the project's goals and user needs.

Example

No code snippet is provided as the issue does not contain sufficient information to generate a specific example.

Notes

The proposed fix may require modifications to the hermes codebase and documentation, and careful consideration should be given to the implications of changing the persistence policy for one-shot mode.

Recommendation

Apply a workaround by adding a flag or configuration option to hermes -z to disable transcript persistence, as this approach balances user needs for privacy and session management with the potential requirements of the hermes application.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING