Skip to content

Enforce inherited permissions for spawned workers - #843

Open
TheGreatAxios wants to merge 3 commits into
mainfrom
cl-7531-subagent-workers-bypass-permission-enforcement
Open

Enforce inherited permissions for spawned workers#843
TheGreatAxios wants to merge 3 commits into
mainfrom
cl-7531-subagent-workers-bypass-permission-enforcement

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Spawned workers inherit the parent session's live permission policy and authorize tool calls through the same gate path as the main session.
  • Unresolved worker approvals deny instead of hanging or falling through; workers persist real audit and error records under their own audit store.
  • Integration coverage proves an unauthorized write is denied, matching and nonmatching grants behave as expected, and worker identity and audit lifecycle stay isolated from the parent.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • bun run check passes: 6,298 tests, 0 failed

Fixes CL-7531

@linear-code

linear-code Bot commented Sep 9, 2026

Copy link
Copy Markdown

CL-7531

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic · Comment

Independent review of 6d809a37 found no blocking defects. The worker permission bypass is closed at reactor authorize, middleware ownership, and audit persistence.

  • Workers inherit the live parent gate instead of permissiveAuthorize / noopAuditStore.
  • Unresolved asks deny without hanging or invoking an approval callback.
  • A worker-local ownership marker prevents middleware from double-evaluating or asking.
  • Worker audit records persist under a dedicated isogit store.

Residual nits are comment hygiene and extra grant-path coverage, not merge blockers. Runtime commitAudit failure remains nontransactional by existing collector design.

An identity-store ownership flag made the permission plugin
worker-aware. A view over the parent gate reports isReactorGated
and maps unresolved asks to denials that name the subject.
Parent MCP handlers closed over a middleware-gated isReactorGated of
false, so an allowed worker call re-entered evaluate and hung on
requestApproval. Workers now wrap inherited MCP tools with the same
reactor-gated view as posix.
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