Skip to content

fix: mount clipboard images directory into remote sandboxes#6028

Open
Tranquil-Flow wants to merge 2 commits into
NousResearch:mainfrom
Tranquil-Flow:review/pr-clipboard-images
Open

fix: mount clipboard images directory into remote sandboxes#6028
Tranquil-Flow wants to merge 2 commits into
NousResearch:mainfrom
Tranquil-Flow:review/pr-clipboard-images

Conversation

@Tranquil-Flow

@Tranquil-Flow Tranquil-Flow commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Mounts ~/.hermes/images into remote sandboxes in addition to the existing cache directories. Clipboard screenshots are saved under ~/.hermes/images, but remote backends only mirrored cache directories like image_cache, which left pasted screenshots invisible inside Docker/remote sandboxes. This PR adds the missing mount + per-file sync coverage so pasted clipboard images become visible to sandboxed runs.

Related Issue

Closes #6004

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Add ("images", "images") to _CACHE_DIRS in tools/credential_files.py
  • Add tests verifying:
    • sandbox mount entry for /root/.hermes/images
    • per-file iteration includes files from ~/.hermes/images

How to Test

  1. Activate the repo venv
  2. Run:
    /workspace/Projects/hermes-agent/.venv/bin/python -m pytest -n 0 \
      tests/tools/test_credential_files.py \
      tests/tools/test_clipboard.py -q
  3. Confirm all tests pass (observed locally: 126 passed in 7.58s)

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15 (Darwin 24.6.0)

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

/workspace/Projects/hermes-agent/.venv/bin/python -m pytest -n 0 \
  tests/tools/test_credential_files.py \
  tests/tools/test_clipboard.py -q
# 126 passed in 7.58s

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists backend/docker Docker container execution labels Apr 30, 2026
@Tranquil-Flow Tranquil-Flow force-pushed the review/pr-clipboard-images branch from 5601679 to 7772948 Compare May 25, 2026 08:23
@Tranquil-Flow Tranquil-Flow force-pushed the review/pr-clipboard-images branch from 7772948 to 766bd79 Compare May 25, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend/docker Docker container execution P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants