Skip to content

bug: Docker sandbox cannot access clipboard images (images/ directory not mounted) #6004

@Tranquil-Flow

Description

@Tranquil-Flow

Summary

Clipboard images pasted into the CLI are saved to ~/.hermes/images/ but this directory is never mounted into the hermes-aegis Docker sandbox. As a result, vision_analyze and any tool referencing a clipboard image path silently fails to find the file inside the container.

Root cause

cli.py:2597 saves clipboard images to:

img_dir = get_hermes_home() / "images"   # → ~/.hermes/images/

tools/credential_files.py defines _CACHE_DIRS (the source of truth for Docker volume mounts) as:

_CACHE_DIRS: list[tuple[str, str]] = [
    ("cache/documents", "document_cache"),
    ("cache/images",    "image_cache"),       # ← only the processed cache is mounted
    ("cache/audio",     "audio_cache"),
    ("cache/screenshots", "browser_screenshots"),
]

~/.hermes/images/ (the clipboard save directory) has no entry in _CACHE_DIRS and therefore no -v mount is generated in tools/environments/docker.py (lines 382–395).

The existing test at tests/tools/test_clipboard.py:811 confirms the expected path:

assert path.parent == Path(os.environ["HERMES_HOME"]) / "images"

Impact

Any image pasted via the clipboard is invisible to agents running inside the Docker sandbox. vision_analyze cannot read the file even when given the correct host path — the path simply does not exist inside the container.

Fix

Add ("images", "images") (or equivalent) to _CACHE_DIRS in tools/credential_files.py. No changes needed in docker.py — it already iterates get_cache_directory_mounts().

_CACHE_DIRS: list[tuple[str, str]] = [
    ("cache/documents", "document_cache"),
    ("cache/images",    "image_cache"),
    ("cache/audio",     "audio_cache"),
    ("cache/screenshots", "browser_screenshots"),
    ("images",          "images"),            # ← add this
]

Files

  • tools/credential_files.py_CACHE_DIRS definition
  • tools/environments/docker.py — volume mount construction (no change needed)
  • cli.py:2597 — clipboard save path

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsbackend/dockerDocker container executiontool/visionVision analysis and image generationtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions