@devries-cameron20 / t3code-1 / commits / 166cb00897
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(opencode): Full access subagents start without approval prompts (#35401)

Julius Marminge committed Nov 14, 2026 at 20:44 UTC 166cb008972b63a0537a5cdda153c45ac70f86eb
2 files changed +12 -1
packages/provider-opencode/src/server/adapter.test.ts
+7
@@ -4898,6 +4898,13 @@ describe("OpenCodeAdapterV2", () => {
4898 const fullAccess = openCodePermissionRules(runtimePolicy("full-access"));
4899 assert.equal(permissionAction(fullAccess, "bash"), "allow");
4900 assert.equal(permissionAction(fullAccess, "edit"), "allow");
4901 + const fullAccessRulesCopiedToTaskChildren = fullAccess.filter(
4902 + (rule) => rule.permission === "external_directory" || rule.action === "deny",
4903 + );
4904 + assert.equal(
4905 + permissionAction(fullAccessRulesCopiedToTaskChildren, "external_directory"),
4906 + "allow",
4907 + );
4908
4909 const granularApproval = openCodePermissionRules(
4910 runtimePolicy("full-access", {
packages/provider-opencode/src/server/adapter.ts
+5 -1
@@ -662,7 +662,11 @@ export function openCodePermissionRules(
662 sandboxType === undefined && runtimePolicy.runtimeMode === "full-access";
663
664 if (!requiresApproval && (externallySandboxed || dangerFullAccess || implicitFullAccess)) {
665 - return [{ permission: "*", pattern: "*", action: "allow" }];
665 + // Task children copy only external_directory and deny rules before their first tool call.
666 + return [
667 + { permission: "*", pattern: "*", action: "allow" },
668 + { permission: "external_directory", pattern: "*", action: "allow" },
669 + ];
670 }
671
672 // Children initially inherit only denies; seed them before overrides to protect the policy-install gap.