Skip to content

Commit 56d396f

Browse files
brookscclaude
andcommitted
fix(mcp): default sub-tasks to skip-permissions and fix idle resolver race
MCP-created sub-tasks now default to skipPermissions=true so Claude Code spawns with --dangerously-skip-permissions. Without this, a fresh trust dialog blocks the PromptInput auto-send indefinitely, causing initial prompts to appear drafted but never execute. Also fires idle resolvers in the spawn-listener scrollback check so waitForIdle unblocks correctly when the ❯ prompt was already emitted before the orchestrator subscribed to output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b436f19 commit 56d396f

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

electron/mcp/orchestrator.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ export class Orchestrator {
167167
.trim();
168168
if (chunkContainsAgentPrompt(stripped)) {
169169
task.status = 'idle';
170+
const resolvers = this.idleResolvers.get(task.id);
171+
if (resolvers?.length) {
172+
for (const resolve of resolvers) resolve();
173+
this.idleResolvers.delete(task.id);
174+
}
170175
}
171176
}
172177
});

src/store/tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ export function initMCPListeners(): () => void {
803803
notes: '',
804804
lastPrompt: '',
805805
gitIsolation: evt.gitIsolation ?? 'worktree',
806-
skipPermissions: evt.skipPermissions ?? false,
806+
skipPermissions: evt.skipPermissions ?? true,
807807
coordinatedBy: evt.coordinatorTaskId,
808808
// Use the same initialPrompt path as manually created tasks —
809809
// PromptInput auto-delivers it with stability checks + quiescence.

0 commit comments

Comments
 (0)