Skip to content

fix(cli): clarify doctor memory diagnostics - #16490

Open
rubencu wants to merge 1 commit into
NousResearch:mainfrom
rubencu:codex/doctor-memory-status
Open

fix(cli): clarify doctor memory diagnostics#16490
rubencu wants to merge 1 commit into
NousResearch:mainfrom
rubencu:codex/doctor-memory-status

Conversation

@rubencu

@rubencu rubencu commented Apr 27, 2026

Copy link
Copy Markdown

What does this PR do?

Clarifies hermes doctor diagnostics for the built-in memory files under ~/.hermes/memories/.

Root cause: doctor reported a missing MEMORY.md with generic wording that implied no memory had been written yet, even when Hermes had saved user profile data in USER.md. The two files represent different stores, so the diagnostic should distinguish them.

This PR:

  • reports whether built-in memory data is present in MEMORY.md, USER.md, or both
  • uses the documented definitions: MEMORY.md is agent personal notes, USER.md is the user profile
  • distinguishes missing, empty, populated, and unreadable memory files
  • warns and adds a doctor issue when a memory file exists but cannot be read
  • adds regression tests for a populated USER.md with missing MEMORY.md and for invalid UTF-8 memory files

Related Issue

No dedicated issue exists. This addresses diagnostic confusion seen while checking hermes doctor memory output.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✅ Tests (adding or improving test coverage)

Changes Made

  • hermes_cli/doctor.py: extracts built-in memory-file status reporting and handles unreadable files explicitly.
  • tests/hermes_cli/test_doctor.py: adds focused doctor regression coverage for USER.md-only memory and unreadable memory files.

How to Test

  1. Create ~/.hermes/memories/USER.md without MEMORY.md.
  2. Run hermes doctor.
  3. Confirm doctor reports USER.md as the user profile and explains that MEMORY.md is the agent personal notes store.

Validation run locally:

TERMINAL_ENV=local scripts/run_tests.sh tests/hermes_cli/test_doctor.py -q

Result: 25 passed, 4 warnings (discord.player deprecation warning from dependency import).

Also run:

codex review --base origin/main
git diff --check

codex review found no actionable defects before the docs-wording alignment; the final wording-only update passed the focused doctor suite and git diff --check.

Checklist

  • I have read the Contributing Guide
  • My commit message follows Conventional Commits: fix(cli): clarify doctor memory diagnostics
  • I searched for existing PRs to make sure this is not a duplicate
  • My PR contains only changes related to this fix
  • I added tests for my changes
  • I tested on macOS
  • Documentation/config/tool-schema updates are N/A

Rebase / conflict refresh (2026-05-06)

  • Rebased onto current main and kept the hermes doctor memory-file diagnostics alongside the newer provider import checks.
  • Validation: scripts/run_tests.sh tests/hermes_cli/test_doctor.py -q (39 passed, warnings from dependency imports only).
  • Local merge check: git merge-tree --write-tree --name-only origin/main HEAD completed without conflicts.

@rubencu
rubencu force-pushed the codex/doctor-memory-status branch from b327426 to 35d7289 Compare April 27, 2026 10:21
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard tool/memory Memory tool and memory providers labels Apr 27, 2026
@rubencu rubencu changed the title [codex] fix(cli): clarify doctor memory diagnostics fix(cli): clarify doctor memory diagnostics Apr 27, 2026
@rubencu
rubencu marked this pull request as ready for review April 27, 2026 10:28
@rubencu
rubencu force-pushed the codex/doctor-memory-status branch from 35d7289 to fa7611e Compare May 6, 2026 21:48
@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users area/memory Memory subsystem: store, providers, sync, background reviews area/install-update Installer, updater, packaging, wheels, doctor labels Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install-update Installer, updater, packaging, wheels, doctor area/memory Memory subsystem: store, providers, sync, background reviews comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants