hermes - 💡(How to fix) Fix [Bug]: cwd is lost during docker init, making hermes effectively unusable [1 pull requests]

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…

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

exec podman run --rm -it \
  --name $CONTAINER_NAME \
  --uidmap "+$HERMES_UID:@$(id -u):1" \
  --gidmap "+$HERMES_GID:@$(id -g):1" \
  --security-opt=no-new-privileges \
  -e OPENROUTER_API_KEY \
  -e HERMES_INFERENCE_PROVIDER=openrouter \
  -e HERMES_YOLO_MODE=0 \
  -e HERMES_TUI=1 \
  -e HERMES_UID \
  -e HERMES_GID \
  -e HERMES_WORKSPACE_DIR=$CONTAINER_WORKSPACE \
  -v "$TUI_DIR/1:/opt/hermes/ui-tui/packages/hermes-ink/dist:rw,U" \
  -v "$TUI_DIR/2:/opt/hermes/ui-tui/dist:rw,U" \
  -v "$DATA_DIR:/opt/data:rw" \
  -v "$WORKSPACE:$CONTAINER_WORKSPACE:rw" \
  -w "$CONTAINER_WORKSPACE" \
  docker.io/nousresearch/hermes-agent:latest \
  hermes chat --toolsets file,memory,skills

---

Irrelevant

---
RAW_BUFFERClick to expand / collapse

Bug Description

hermes chat starts in /opt/data instead of a specified workdir New init scripts perform cd to /opt/data without going back afterwards

Steps to Reproduce

  1. docker run --rm -it -w '/workdir_1' docker.io/nousresearch/hermes-agent:latest hermes chat --toolsets file,memory,skills or Podman:
exec podman run --rm -it \
  --name $CONTAINER_NAME \
  --uidmap "+$HERMES_UID:@$(id -u):1" \
  --gidmap "+$HERMES_GID:@$(id -g):1" \
  --security-opt=no-new-privileges \
  -e OPENROUTER_API_KEY \
  -e HERMES_INFERENCE_PROVIDER=openrouter \
  -e HERMES_YOLO_MODE=0 \
  -e HERMES_TUI=1 \
  -e HERMES_UID \
  -e HERMES_GID \
  -e HERMES_WORKSPACE_DIR=$CONTAINER_WORKSPACE \
  -v "$TUI_DIR/1:/opt/hermes/ui-tui/packages/hermes-ink/dist:rw,U" \
  -v "$TUI_DIR/2:/opt/hermes/ui-tui/dist:rw,U" \
  -v "$DATA_DIR:/opt/data:rw" \
  -v "$WORKSPACE:$CONTAINER_WORKSPACE:rw" \
  -w "$CONTAINER_WORKSPACE" \
  docker.io/nousresearch/hermes-agent:latest \
  hermes chat --toolsets file,memory,skills
  1. hermes shows cwd as /opt/data instead of /workdir_1

Expected Behavior

cwd to be preserved as /workdir_1

Actual Behavior

cwd is /opt/data

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Irrelevant

Operating System

Debian 13

Python Version

No response

Hermes Version

0.15.1

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

https://github.com/NousResearch/hermes-agent/blob/5921d667855880b0aa2083a50f001748aed52f3e/docker/main-wrapper.sh#L29

without storing and restoring cwd

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

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

hermes - 💡(How to fix) Fix [Bug]: cwd is lost during docker init, making hermes effectively unusable [1 pull requests]