Skip to content

Attribute approval prompts to the sub-agent requesting them - #289

Merged
TheGreatAxios merged 2 commits into
cl-4863-apply-new-permission-grants-to-already-queued-approvalfrom
cl-4865-approval-prompts-must-clearly-identify-which-sub-agent-is
Aug 4, 2026
Merged

Attribute approval prompts to the sub-agent requesting them#289
TheGreatAxios merged 2 commits into
cl-4863-apply-new-permission-grants-to-already-queued-approvalfrom
cl-4865-approval-prompts-must-clearly-identify-which-sub-agent-is

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Each sub-agent's tool calls now run under its own identity (dispatch description + cwd) in async-local storage, so a permission request raised from a sub-agent carries that agent's label instead of looking like a top-level request
  • The approval modal shows the requesting agent and its working directory prominently
  • The queued-behind list shows every other pending approval with a per-agent color tag so requests from different agents read as visually distinct

Verification

  • bun run typecheck && bun run build && bun test — full suite passes (3573/3573)
  • New coverage: src/permission/permission.test.ts (identity propagation through evaluate(), including ALS isolation across concurrent calls) and src/tui/components/permission-modal.tsx rendering paths exercised in tests/unit/tui/permission-modal.test.tsx

Closes CL-4865

@linear-code

linear-code Bot commented Aug 1, 2026

Copy link
Copy Markdown

CL-4865

@TheGreatAxios
TheGreatAxios force-pushed the cl-4865-approval-prompts-must-clearly-identify-which-sub-agent-is branch 2 times, most recently from 46513dd to c29f8ee Compare August 2, 2026 04:09
@TheGreatAxios
TheGreatAxios force-pushed the cl-4865-approval-prompts-must-clearly-identify-which-sub-agent-is branch from c29f8ee to 620abb4 Compare August 2, 2026 04:38
@TheGreatAxios
TheGreatAxios force-pushed the cl-4865-approval-prompts-must-clearly-identify-which-sub-agent-is branch 2 times, most recently from 78a3024 to 891f013 Compare August 4, 2026 00:12
Each sub-agent's tool calls now run under its own identity (dispatch
description + cwd) in async-local storage, so a permission request raised
from a sub-agent carries that agent's label instead of looking like a
top-level request. The approval modal shows the requesting agent and its
working directory prominently, and the queued-behind list shows every
other pending approval with a per-agent color tag so requests from
different agents read as visually distinct.
Two overlapping runWithSubAgentIdentity scopes must not cross-contaminate
agentLabel or cwd on the permission requests they raise.
@TheGreatAxios
TheGreatAxios force-pushed the cl-4865-approval-prompts-must-clearly-identify-which-sub-agent-is branch from 891f013 to 96049e7 Compare August 4, 2026 00:27
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review August 4, 2026 03:17
@TheGreatAxios
TheGreatAxios merged commit 1463e6f into main Aug 4, 2026
1 check 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