Workspace confinement for agent file/shell tools #937

Closed
opened 2026-06-18 10:56:09 +02:00 by sleepy · 0 comments
Owner

Overview

Confine agent file and shell tools to a selectable workspace folder. Prevents the agent from operating outside intended directories.

Upstream References

  • PR #3665: Confine agent file/shell tools to a selectable workspace
  • PR #1103: Add workspace confinement
  • Upstream commit: 620fdd0 feat(agent): confine agent file/shell tools to a selectable workspace (#3665)
  • Local path: ../odysseus_upstream/src/tool_security.py — see workspace confinement logic

Current State

Our fork has no workspace confinement. Agent tools (bash, read_file, write_file) operate on the full filesystem.

Implementation

  1. Add workspace folder selection in settings
  2. Gate bash, read_file, write_file tools to workspace paths
  3. Symlink escape prevention (upstream has test_personal_dir_symlink_escape.py)
  4. Path validation in tool dispatch

Priority

High — critical safety improvement.

## Overview Confine agent file and shell tools to a selectable workspace folder. Prevents the agent from operating outside intended directories. ## Upstream References - **PR #3665**: Confine agent file/shell tools to a selectable workspace - **PR #1103**: Add workspace confinement - **Upstream commit**: `620fdd0 feat(agent): confine agent file/shell tools to a selectable workspace (#3665)` - **Local path**: `../odysseus_upstream/src/tool_security.py` — see workspace confinement logic ## Current State Our fork has no workspace confinement. Agent tools (bash, read_file, write_file) operate on the full filesystem. ## Implementation 1. Add workspace folder selection in settings 2. Gate `bash`, `read_file`, `write_file` tools to workspace paths 3. Symlink escape prevention (upstream has `test_personal_dir_symlink_escape.py`) 4. Path validation in tool dispatch ## Priority High — critical safety improvement.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/odysseus#937
No description provided.