Skip to content

CL-9362: resolve restricted-worktree carve-out for agentId-targeted fleet calls - #1184

Merged
TheGreatAxios merged 4 commits into
mainfrom
cl-9362-resolve-restricted-worktree-carve-out-for-agentid-targeted
Sep 27, 2026
Merged

TheGreatAxios merged 4 commits into
mainfrom
cl-9362-resolve-restricted-worktree-carve-out-for-agentid-targeted

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Stacks on #1168 (base: cl-8987-auto-mode-still-asks-on-fleet-continuation-tools); merge after it lands.

CL-9362 decision: agentId-to-worktree resolution does NOT belong in callTargetsRestricted. The vacuous !restricted carve-out for close_agent/interrupt_agent/send_input/resume_agent/read_agent_trace is intentional — these verbs address workers by opaque agent id, never by path, so there is nothing path-shaped for isRestricted to judge. Path restriction is enforced where paths are actually touched: inside the target worker, whose own gate binds restriction judgments to its process cwd. Resolving ids to worktrees in classify would duplicate that enforcement at a layer with no session access.

Pinned by a regression test: the five agentId-targeted fleet verbs auto-allow in auto mode, and callTargetsRestricted(..., alwaysRestricted) stays false. The same-gate write_file("notes.md") control is an in-bounds auto-allow so the fixture cannot be read as a restricted worktree.

Fixes CL-9362

@linear-code

linear-code Bot commented Sep 26, 2026

Copy link
Copy Markdown

CL-9362

@TheGreatAxios
TheGreatAxios deleted the branch main September 27, 2026 22:26
@TheGreatAxios TheGreatAxios reopened this Sep 27, 2026
@TheGreatAxios
TheGreatAxios changed the base branch from cl-8987-auto-mode-still-asks-on-fleet-continuation-tools to main September 27, 2026 22:29
Name resume_agent and read_agent_trace in the agentId carve-out so all five single-target verbs are explicit, and build the CL-9362 gate on a registered worktree with a session-state control write that still asks.
…rve-out pin

The previous fixture registered cwd as a root, which is the in-bounds
pattern, and the session-state write control already lives in its own
test. The alwaysRestricted classify loop is the real pin.
@TheGreatAxios
TheGreatAxios force-pushed the cl-9362-resolve-restricted-worktree-carve-out-for-agentid-targeted branch from 24b4b15 to 84e9048 Compare September 27, 2026 22:32
@TheGreatAxios
TheGreatAxios enabled auto-merge (squash) September 27, 2026 22:33
@TheGreatAxios
TheGreatAxios merged commit aac1b61 into main Sep 27, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant