Skip to content

[Bug]: cwd is lost during docker init, making hermes effectively unusable #35472

Closed

Description

@0xCA

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)

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

Activity

  1. changed the title [-][Bug]: cwd is lost during docker init[/-] [+][Bug]: cwd is lost during docker init, making hermes effectively unusable[/+] on May 30, 2026
  2. 0xCA commented on May 30, 2026

    @0xCA
    Author

    Temporary workaround: /bin/bash -c "cd $CONTAINER_WORKSPACE && hermes chat --toolsets file,memory,skills"

  3. added
    type/bugSomething isn't working
    comp/cliCLI entry point, hermes_cli/, setup wizard
    P1High — major feature broken, no workaround
    on May 30, 2026
  4. added a commit that references this issue on May 30, 2026
    f811616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundarea/install-updateInstaller, updater, packaging, wheels, doctorbackend/dockerDocker container executioncomp/cliCLI entry point, hermes_cli/, setup wizardtype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions