Skip to content

fix(proxy): terminal workdir should be /opt/data, not empty /workspace - #50

Merged
johnson7788 merged 1 commit into
johnson7788:mainfrom
Mason-zy:fix-terminal-workdir-opt-data
Jun 30, 2026
Merged

fix(proxy): terminal workdir should be /opt/data, not empty /workspace#50
johnson7788 merged 1 commit into
johnson7788:mainfrom
Mason-zy:fix-terminal-workdir-opt-data

Conversation

@Mason-zy

Copy link
Copy Markdown
Contributor

Problem

The frontend terminal (docker exec PTY into the user's dedicated runtime container) starts with workdir=/workspace. But /workspace only holds platform-runtime.json — it's an essentially empty data volume. The user's actual files (profiles, skills, sessions, .env) live in /opt/data (HERMES_HOME). Opening the terminal drops the user into an empty directory, forcing a cd /opt/data every time.

Fix

Set the terminal workdir to /opt/data so users land in their real data directory.

 def _start_hermes_terminal_socket(container_id_or_name: str, command: str):
     container = get_docker_container(container_id_or_name)
     result = container.exec_run(
         ["sh", "-lc", command],
         stdin=True,
         stdout=True,
         stderr=True,
         tty=True,
         socket=True,
-        workdir="/workspace",
+        workdir="/opt/data",
     )

Verification

On a running container: /opt/data contains profiles/, skills/, sessions/, .env, etc.; /workspace contains only platform-runtime.json. After the fix the terminal opens in /opt/data and the user sees their files immediately.

One-line change, no behavior change beyond the starting directory.

🤖 Generated with Claude Code

…pace

The runtime container mounts a data volume at /workspace (holds only platform-runtime.json) and HERMES_HOME at /opt/data (profiles/skills/sessions/.env). Starting the PTY shell in /workspace lands users in an empty dir; /opt/data is where their files live, so use it as the terminal cwd.

Co-Authored-By: Claude <noreply@anthropic.com>
@johnson7788
johnson7788 merged commit ebf68b8 into johnson7788:main Jun 30, 2026
johnson7788 pushed a commit that referenced this pull request Jul 6, 2026
…),memory.md 加归档指向

按 CLAUDE.md 约定,详细过程进 archive-*,memory.md 只留精简索引 + 📖 指向。
@Mason-zy
Mason-zy deleted the fix-terminal-workdir-opt-data branch July 14, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants