Bug Description
terminal.cwd not correctly injected into system prompt, which sometimes leads to unexpected behavior. For example, when I ask it to "clone the repo to the current working directory", it clones the repo into the directory injected into the system prompt, instead of terminal tool's cwd.
Steps to Reproduce
- Set
terminal.cwd in config.yaml to some path e.g. /Users/perqin-moego/Workspaces/hermes-workspace;
- Restart hermes gateway:
hermes gateway restart;
- Talk to the agent via discord and inspect the session json.
Expected Behavior
The current working directory in system prompt should be the same as that configured in config.yaml.
Actual Behavior
The current working directory in system prompt is set to the WorkingDirectory directive of macOS launchd profile. The trailing lines of system_prompt in the session json file:
Conversation started: Wednesday, May 13, 2026 10:01 AM
Model: gpt-5.4
Provider: custom
Host: macOS (26.4.1)
User home directory: /Users/perqin-moego
Current working directory: /Users/perqin-moego/.hermes/hermes-agent
You are in a Discord server or group chat communicating with your user. You can send media files natively: include MEDIA:/absolute/path/to/file in your response. Images (.png, .jpg, .webp) are sent as photo attachments, audio as file attachments. You can also include image URLs in markdown format  and they will be sent as attachments.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Discord
Debug Report
Report https://paste.rs/RgjYm
agent.log https://paste.rs/5cogQ
gateway.log https://paste.rs/jIp89
Operating System
macOS 26.4.1
Python Version
3.11.15
Hermes Version
0.13.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?
Bug Description
terminal.cwdnot correctly injected into system prompt, which sometimes leads to unexpected behavior. For example, when I ask it to "clone the repo to the current working directory", it clones the repo into the directory injected into the system prompt, instead of terminal tool's cwd.Steps to Reproduce
terminal.cwdin config.yaml to some path e.g./Users/perqin-moego/Workspaces/hermes-workspace;hermes gateway restart;Expected Behavior
The current working directory in system prompt should be the same as that configured in config.yaml.
Actual Behavior
The current working directory in system prompt is set to the WorkingDirectory directive of macOS launchd profile. The trailing lines of
system_promptin the session json file:Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Discord
Debug Report
Operating System
macOS 26.4.1
Python Version
3.11.15
Hermes Version
0.13.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?