Skip to content

fix(threads): inherit subagent permissions from the active turn - #843

Merged
nixuuu merged 1 commit into
devfrom
fix/subagents-ignore-parent-setting
Nov 15, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/subagents-ignore-parent-setting

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 15, 2026

Copy link
Copy Markdown
Member

Change

When a thread defaults to Ask first but its current message runs in Full auto or Full access, Same as parent incorrectly starts subagents in Ask first. Subagents now inherit the effective calling-turn mode while later changes to the parent's default, fixed owner settings, and worker capability limits still cap new children.

Migration 0151_turn_thread_permission_mode records the thread default at dispatch separately from the turn's effective permissions. The snapshot and worker command are written under the same admission lock; model and effort defaults are resolved from that locked thread as well. Turns started before the migration keep the conservative permission ceiling until they finish. Includes Polish documentation and gateway/worker integration regressions.

Fixes: #547

Verification

  • Reproduced before the fix: an Ask first thread with a Full auto turn created an Ask first child.
  • Local: 56 tests passed through selective check:tmp runs: 23 schema tests and 33 tests across subagent-permission-inheritance, full-access-mode, thread-permission-mode, agent-bus, and models-steer. Temp-directory cleanup passed.
  • Gateway package typecheck, lint and formatting on edited TypeScript files, and git diff --check passed.
  • Integration coverage uses scripted workers and checks both persisted API permissions and the mode delivered over the worker link. Full repository checks and builds remain for CI.
  • No UI text changes; copy audit is not applicable.

Preserve explicit per-turn permissions when spawning subagents by recording the thread default at dispatch. Keep later parent changes and worker capability ceilings, with a conservative fallback for turns started before the migration.

Fixes: #547
@nixuuu
nixuuu enabled auto-merge (squash) November 15, 2026 18:10
@nixuuu
nixuuu merged commit bcbb9f6 into dev Nov 15, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/subagents-ignore-parent-setting branch November 15, 2026 18:21
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