Let planning consult helper subagents; workers still wait for Ready

Planning blocked every subagent launch, so oracles and scouts could not run before Ready. Now only OpenGoalWorker and project.* are blocked in planning; pause still blocks all launches.

Co-Authored-By: PI[gpt-6-sol] <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassnameandPI[gpt-6-sol] committed 2026-10-02 15:27:00 +08:00
1 parent 5cd1ce90fd
commit 1c8abcb23a
2 files changed
+5 -2

No files matched your search

+2 -1
View File
@@ -701,7 +701,8 @@ export default function mainSupervisor(pi: ExtensionAPI) {
// Stock owns helper contracts and capabilities. Inspection and cancellation stay available.
if (event.toolName === "subagent" && typeof action === "string" && ["list", "get", "models", "guide", "status", "children.list", "project.status", "stop", "interrupt"].includes(action)) return;
const nativeWorkerControl = event.toolName === "OpenGoalWorker" || typeof action === "string" && action.startsWith("project.");
if (["planning", "paused"].includes(state.mode)) return { block: true, reason: goalToolBlocked(state.mode) };
// Planning may consult helpers (oracles, scouts); workers wait for Ready. Pause blocks all launches.
if (state.mode === "paused" || (state.mode === "planning" && nativeWorkerControl)) return { block: true, reason: goalToolBlocked(state.mode) };
if (nativeWorkerControl && (state.child || state.mode === "solo")) return { block: true, reason: goalToolBlocked(state.child ? "worker" : state.mode) };
});
+3 -1
View File
@@ -208,8 +208,10 @@ it.each(["menu", "command"])("enters planning conversation through %s without a
expect(f.ctx.ui.editor).toHaveBeenCalledTimes(route === "menu" ? 1 : 0);
expect(f.messages).toHaveLength(1);
expect(f.messages[0].message.content).toContain(route === "menu" ? "Initial idea: supplied instructions" : "Use the existing conversation");
expect(f.hooks.get("tool_call")({ toolName: "subagent" }).block).toBe(true);
expect(f.hooks.get("tool_call")({ toolName: "subagent", input: { agent: "oracle", task: "brief" } })).toBeUndefined();
expect(f.hooks.get("tool_call")({ toolName: "subagent", input: { action: "status" } })).toBeUndefined();
expect(f.hooks.get("tool_call")({ toolName: "subagent", input: { action: "project.open" } }).block).toBe(true);
expect(f.hooks.get("tool_call")({ toolName: "OpenGoalWorker", input: { task: "work" } }).block).toBe(true);
});
it("cancelled menu New creates nothing and sends nothing", async () => {