What happened?
When using Qwen Code's sub-agent feature, the permission confirmation dialog uses compact mode UI with only three options:
- "Yes, allow once"
- "Allow always"
- "No"
Selecting "Allow always" does not persist the permission. The next tool invocation still prompts for confirmation, requiring the user to select again.
Root cause analysis
Compact mode's "Allow always" button (ToolConfirmationMessage.tsx line 124) maps to ToolConfirmationOutcome.ProceedAlways.
However, persistPermissionOutcome() (packages/core/src/core/permission-helpers.ts) only handles ProceedAlwaysProject and ProceedAlwaysUser, completely ignoring ProceedAlways:
// Problematic code (line 176-181)
if (
outcome !== ToolConfirmationOutcome.ProceedAlwaysProject &&
outcome !== ToolConfirmationOutcome.ProceedAlwaysUser
) {
return; // ProceedAlways returns here, permission not saved
}
This causes compact mode's "Allow always" selection to:
- Not write to
settings.json
- Not update in-memory
PermissionManager
- Still require confirmation on subsequent tool calls
What did you expect to happen?
After selecting "Allow always", the permission should be persisted. Subsequent tool invocations should be auto-approved without prompting again.
Reproduction steps
- Start a sub-agent task (e.g., ask agent to search code)
- When sub-agent needs to execute a shell command, compact mode confirmation appears
- Select "Allow always"
- When sub-agent executes the same command again, the prompt reappears
Client information
- OS: macOS / Linux / Windows (all platforms)
- Qwen Code version: v0.14.x+
Fix
PR coming: treating ProceedAlways as project scope in persistPermissionOutcome().
What happened?
When using Qwen Code's sub-agent feature, the permission confirmation dialog uses compact mode UI with only three options:
Selecting "Allow always" does not persist the permission. The next tool invocation still prompts for confirmation, requiring the user to select again.
Root cause analysis
Compact mode's "Allow always" button (
ToolConfirmationMessage.tsxline 124) maps toToolConfirmationOutcome.ProceedAlways.However,
persistPermissionOutcome()(packages/core/src/core/permission-helpers.ts) only handlesProceedAlwaysProjectandProceedAlwaysUser, completely ignoringProceedAlways:This causes compact mode's "Allow always" selection to:
settings.jsonPermissionManagerWhat did you expect to happen?
After selecting "Allow always", the permission should be persisted. Subsequent tool invocations should be auto-approved without prompting again.
Reproduction steps
Client information
Fix
PR coming: treating
ProceedAlwaysas project scope inpersistPermissionOutcome().