Skip to content

fix(terminal): Docker-safe default cwd and missing-path fallback - #409

Closed
Norema19 wants to merge 4 commits into
outsourc-e:mainfrom
Norema19:main
Closed

fix(terminal): Docker-safe default cwd and missing-path fallback#409
Norema19 wants to merge 4 commits into
outsourc-e:mainfrom
Norema19:main

Conversation

@Norema19

@Norema19 Norema19 commented May 11, 2026

Copy link
Copy Markdown
Contributor

Problem

The embedded terminal defaulted to ~/.hermes. In the workspace container, that expands to a path under passwd HOME (e.g. /home/workspace/.hermes) that is often absent, so pty-helper.py fails on os.chdir and the UI reconnects in a loop.

Changes

  • Default terminal cwd to ~ instead of ~/.hermes.
  • In terminal-sessions.ts, if the resolved cwd does not exist, fall back to HOME.

Note

Ocass Coolify compose sets HOME=/opt/data on hermes-workspace so ~ is a real persisted directory.

Norema19 and others added 4 commits May 11, 2026 03:46
PTY helper chdir fails when ~/.hermes is absent (common in Docker).
Default shell cwd to home; server falls back to HOME if cwd does not exist.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace module-load BEARER_TOKEN with getGatewayBearerToken() so
HERMES_API_TOKEN is honored after SSR/env hydration. Update routes
and tests; terminal/pty hardening unchanged in this commit batch.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer GET /api/auth/session-token over HTML scrape so workspace ↔
hermes-dashboard works reliably in split-container Compose.

Export looksLikeAuthFailure; narrow chat connection banner auth heuristics
and clarify gateway vs dashboard env hints. Add Vitest for API-first path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Merge dashboard session-token API fix into main.
@outsourc-e

Copy link
Copy Markdown
Owner

Closing as superseded by #432. The validated fix was folded into the consolidated batch branch fix/issue-sweep-batch-20260514 for one review/merge path.

@outsourc-e outsourc-e closed this May 14, 2026
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