Repository navigation
Description
Bug Report: Repeated "Path outside media roots" 403 Errors in hermes:api Handler
Date: 2026-06-10
Reporter: BigDon86 (from PowerShell launch logs)
Severity: Medium-High (recurring errors on every image-related action in Desktop)
Component: Hermes Desktop (Electron) + Backend API
Version: 0.16.0 (commit 2f510ca)
Summary
When launching Hermes Desktop from PowerShell, repeated errors appear in the console:
Error occurred in handler for 'hermes:api': Error: 403: {"detail":"Path outside media roots"}
at IncomingMessage.<anonymous> (.../electron/main.cjs:2374:20)
This happens multiple times during normal operation (especially when dealing with images/attachments).
Steps to Reproduce
- Start Hermes Desktop from PowerShell using
hermes desktop - Use the chat interface (particularly any action involving images, pasting, or file attachments)
- Observe repeated
hermes:api403 errors in the terminal
Expected Behavior
Desktop should successfully communicate with the backend for media operations without 403 "Path outside media roots" errors. The image.attach_bytes or media upload path should be properly authorized and within configured media roots.
Actual Behavior
The Electron main process (main.cjs) receives 403 responses when calling the backend via hermes:api for paths that the server considers outside allowed media roots.
Evidence (Console Output)
[hermes] remote display detected (rdp (SESSIONNAME=RDP-Tcp#0)); disabling GPU hardware acceleration to prevent flicker
[hermes] install stamp: 2f510ca8e07b (main) from local
(node:29956) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
Error occurred in handler for 'hermes:api': Error: 403: {"detail":"Path outside media roots"}
at IncomingMessage.<anonymous> (C:\Users\Don\AppData\Local\hermes\hermes-agent\apps\desktop\release\win-unpacked\resources\app.asar\electron\main.cjs:2374:20)
... (repeated 4+ times)
Note: Username in path is Don (Windows profile: C:\Users\Don).
Environment
- OS: Windows (running via PowerShell)
- Hermes Desktop: 0.16.0 (win-unpacked)
- Backend: WSL (Ubuntu)
- Session: RDP session detected (
RDP-Tcp#0) - Related previous report:
Desktop_Image_Paste_Media_Roots_Error_20260608.md
Impact
- Console spam with errors
- Potential breakage of image pasting, attachment handling, and media features in the Desktop app
- Matches known pattern documented in
hermes-desktop-bug-reportingskill
Suggested Investigation
- Check how the desktop constructs paths for
image.attach_bytes/ media uploads - Verify media root configuration on the backend side
- Ensure the desktop is sending paths relative to allowed roots (not absolute Windows paths)
- Reference the existing
Desktop_Image_Paste_Media_Roots_Error_20260608.mdreport
Status: New occurrence captured from launch logs. Related to previously reported image paste media roots issue.
Activity
BigDon86 commentedon Jun 10, 2026
Additional observation:
When submitting the GitHub issue from within Hermes Desktop, the same 403 error fires, along with these URL loading failures:
This indicates the bug impacts URL construction/passing (likely in the hermes:api handler or shell.openExternal) in addition to media paths.
See updated report in vault for full details.
alt-glitch commentedon Jun 10, 2026
Duplicate of #42363 — same 403 "Path outside media roots" error in the Electron
hermes:apihandler atmain.cjs:2374, same media-upload/image path, reported by the same user. #42363 is the canonical open report tracking this Desktop media-root authorization bug.teknium1 commentedon Jul 14, 2026
Thanks for the report. This is implemented on current
main; automated hermes-sweeper review verified the same remote Desktop media path tracked by canonical duplicate #42363.apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts:81-104reads Desktop-local image bytes and callsimage.attach_bytesfor a remote gateway instead of handing it the client-local path.tui_gateway/server.py:9576-9634stages those bytes in the gateway's own image directory and queues the resulting gateway-local path.apps/desktop/src/lib/chat-runtime.ts:183-204prevents the optimistic preview from requesting a client-local image through/api/media, explicitly avoiding the reportedPath outside media roots403.tests/test_tui_gateway_server.py:8028-8053.16786f3bb392885cf1b9d5910b7fdcdb5fd5a8a5, included inv2026.6.19(Hermes Agent v0.17.0).The additional external-URL observation does not include a focused reproduction and is separate from this resolved media-root path; please report it separately if it persists on a current release.