From 3976962621d5c9d4006a72ee9ee4645c9a20f15f Mon Sep 17 00:00:00 2001 From: teknium1 Date: Sat, 21 Feb 2026 01:20:18 -0800 Subject: [PATCH] fix: update session logging directory path in README and code - Changed the session logging directory from `~/.hermes-agent/logs/` to `~/.hermes/sessions/` for consistency. - Updated the `run_agent.py` to reflect the new logging path, ensuring session logs are stored correctly alongside gateway sessions. --- README.md | 7 +++---- run_agent.py | 7 ++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dc4e8731..3f23f8ad 100644 --- a/README.md +++ b/README.md @@ -492,10 +492,10 @@ All CLI and messaging sessions are stored in a SQLite database (`~/.hermes/state ### 📝 Session Logging -Every conversation is logged to `~/.hermes-agent/logs/` for debugging: +Every conversation is logged to `~/.hermes/sessions/` for debugging: ``` -logs/ +sessions/ ├── session_20260201_143052_a1b2c3.json └── ... ``` @@ -1361,8 +1361,7 @@ All variables go in `~/.hermes/.env`. Run `hermes config set VAR value` to set t | `~/.hermes/auth.json` | OAuth provider credentials (managed by `hermes login`) | | `~/.hermes/cron/` | Scheduled jobs data | | `~/.hermes/sessions/` | Gateway session data | -| `~/.hermes-agent/` | Installation directory | -| `~/.hermes-agent/logs/` | Session logs | +| `~/.hermes/hermes-agent/` | Installation directory | | `hermes_cli/` | CLI implementation | | `hermes_cli/auth.py` | Multi-provider auth system | | `tools/` | Tool implementations | diff --git a/run_agent.py b/run_agent.py index 90699440..94074252 100644 --- a/run_agent.py +++ b/run_agent.py @@ -1295,9 +1295,10 @@ class AIAgent: short_uuid = uuid.uuid4().hex[:6] self.session_id = f"{timestamp_str}_{short_uuid}" - # Setup logs directory - self.logs_dir = Path(__file__).parent / "logs" - self.logs_dir.mkdir(exist_ok=True) + # Session logs go into ~/.hermes/sessions/ alongside gateway sessions + hermes_home = Path(os.getenv("HERMES_HOME", Path.home() / ".hermes")) + self.logs_dir = hermes_home / "sessions" + self.logs_dir.mkdir(parents=True, exist_ok=True) self.session_log_file = self.logs_dir / f"session_{self.session_id}.json" # Track conversation messages for session logging