From 2c6c2dc1dbba9058d3220cac1fb3a21a7cfbb840 Mon Sep 17 00:00:00 2001 From: JUN Date: Sat, 12 Sep 2026 11:48:45 +0900 Subject: [PATCH] fix(devin-cli): stop sending a permission mode the CLI rejects Every turn on the default configuration failed. The adapter set DEVIN_PERMISSION_MODE=ask when tools are not allowed, and Devin CLI 3000.10.21 exits 2 before answering: invalid value 'ask' for '--permission-mode ': Invalid permission mode: ask. Valid options: normal (auto), accept-edits, dangerous (yolo, bypass), autonomous (requires --sandbox) "normal" is the CLI's own refuse-by-default mode, so the intent is unchanged. Found by running a real turn against an installed, signed-in CLI; the unit tests inject the spawn and their fake child accepts any value, so no test could see it. --- src/adapters/devin-cli/adapter.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/adapters/devin-cli/adapter.ts b/src/adapters/devin-cli/adapter.ts index 1304521648..f31bf77373 100644 --- a/src/adapters/devin-cli/adapter.ts +++ b/src/adapters/devin-cli/adapter.ts @@ -119,7 +119,18 @@ export function createDevinCliAdapter(provider: OcxProviderConfig, deps?: { spaw // otherwise inherit every credential this process holds. ...baseScopedEnv(), NO_COLOR: "1", - DEVIN_PERMISSION_MODE: toolsAllowed ? (process.env.DEVIN_PERMISSION_MODE ?? "bypass") : "ask", + // "normal" is the CLI's own refuse-by-default mode. "ask" reads like + // the right name for it but is not a value the binary accepts: Devin + // CLI 3000.10.21 exits 2 with + // invalid value 'ask' for '--permission-mode ' + // Valid options: normal (auto), accept-edits, dangerous (yolo, + // bypass), autonomous (requires --sandbox) + // before answering a single prompt, so every turn on this provider + // failed with the default (tools not allowed) configuration — the + // one path most operators are on. Found by running a real turn + // against an installed, signed-in CLI; no unit test could see it, + // because the spawn is injected and the fake child accepts anything. + DEVIN_PERMISSION_MODE: toolsAllowed ? (process.env.DEVIN_PERMISSION_MODE ?? "bypass") : "normal", }, }); } catch (error) {