Environment
- Hermes Agent: v0.17.x
- Hermes Workspace: Latest (Docker)
- Setup: Docker Compose + Traefik on Linux VPS (Hostinger)
Problem
When using Hermes Workspace, the following errors appear frequently:
Cannot read properties of undefined (reading 'map')
NotFoundError: Failed to execute 'insertBefore' on 'Node'
- "Failed to load sessions" in the sidebar and UI components
Verified Facts
/api/sessions returns HTTP 200 with valid JSON.
- One specific unprotected
.map() location (usage.sessions) was patched in /app/dist/server/assets/router-DxziTUUJ.js. The patch was successfully applied and verified, but the errors persisted.
- Multiple other locations in the same bundle file execute
.map() and .length directly on sessions, sessions2, and usage.sessions without defensive checks.
- Backend communication, database integrity (
state.db), and environment variables have been ruled out.
Steps to Reproduce
- Deploy Hermes Workspace via Docker Compose.
- Open the application.
- Interact with any UI that displays session lists (sidebar, chat panel, sessions drawer).
- The errors appear during rendering.
Expected Behavior
Session lists should render without JavaScript errors when valid data is returned by the API.
Actual Behavior
The frontend crashes when trying to iterate over session data that is undefined in some render paths, causing both TypeErrors and React DOM reconciliation failures.
What Was Already Tried
A minimal, reversible patch was applied to one of the unprotected .map() calls. While the patch was confirmed to be in place, the issue remained, indicating multiple unprotected call sites exist in the frontend bundle.
Conclusion
The root cause appears to be in the Hermes Workspace frontend. Several components render session data without sufficient null/undefined guards before calling array methods.
Request to Maintainers
The backend and Agent communication have been thoroughly verified. The problem seems isolated to the frontend bundle of Hermes Workspace. Adding defensive checks (or ensuring session data is always normalized before rendering) in the relevant components would likely resolve the issue.

Environment
Problem
When using Hermes Workspace, the following errors appear frequently:
Cannot read properties of undefined (reading 'map')NotFoundError: Failed to execute 'insertBefore' on 'Node'Verified Facts
/api/sessionsreturns HTTP 200 with valid JSON..map()location (usage.sessions) was patched in/app/dist/server/assets/router-DxziTUUJ.js. The patch was successfully applied and verified, but the errors persisted..map()and.lengthdirectly onsessions,sessions2, andusage.sessionswithout defensive checks.state.db), and environment variables have been ruled out.Steps to Reproduce
Expected Behavior
Session lists should render without JavaScript errors when valid data is returned by the API.
Actual Behavior
The frontend crashes when trying to iterate over session data that is
undefinedin some render paths, causing both TypeErrors and React DOM reconciliation failures.What Was Already Tried
A minimal, reversible patch was applied to one of the unprotected
.map()calls. While the patch was confirmed to be in place, the issue remained, indicating multiple unprotected call sites exist in the frontend bundle.Conclusion
The root cause appears to be in the Hermes Workspace frontend. Several components render session data without sufficient null/undefined guards before calling array methods.
Request to Maintainers
The backend and Agent communication have been thoroughly verified. The problem seems isolated to the frontend bundle of Hermes Workspace. Adding defensive checks (or ensuring session data is always normalized before rendering) in the relevant components would likely resolve the issue.