Skip to content

fix(workspace): silence nested delegation permission errors - #236

Open
ixjosemi wants to merge 4 commits into
mainfrom
fix/116-subagent-task-permission-fallback
Open

fix(workspace): silence nested delegation permission errors#236
ixjosemi wants to merge 4 commits into
mainfrom
fix/116-subagent-task-permission-fallback

Conversation

@ixjosemi

@ixjosemi ixjosemi commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

What changed

This fixes issue #116 by treating nested task delegation permission failures as an internal runtime condition instead of a user-visible chat error.

Why this happened

A subagent could attempt task delegation to another subagent. When the runtime denied that nested delegation, Arche forwarded the raw permission payload through SSE and the chat UI rendered the internal rules list.

Scope of this fix

This PR keeps nested subagent-to-subagent delegation blocked. It only removes the bad UX and information leak:

  • suppresses the matching session.error in the SSE bridge,
  • sanitizes streamed task tool failures before status/error emission,
  • drops the same internal failure from persisted message transforms,
  • adds a small UI guard so the raw payload is never rendered if it slips through.

Verification

  • pnpm exec vitest run src/lib/__tests__/workspace-runtime-errors.test.ts src/lib/opencode/__tests__/transform.test.ts tests/chat-stream-attachments.test.ts src/components/workspace/__tests__/chat-panel.test.tsx
  • pnpm lint

Notes

pnpm exec vitest run across the whole worktree still reports unrelated pre-existing failures under .next/standalone that are outside the scope of this issue.

@ixjosemi
ixjosemi requested a review from Inakitajes April 3, 2026 18:42
@ixjosemi
ixjosemi force-pushed the fix/116-subagent-task-permission-fallback branch from fcd618f to babea02 Compare April 4, 2026 19:22
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