Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/adapters/devin-cli/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add regression coverage for the permission-mode mapping

The default-mode fix remains untested: the injected spawn in tests/providers/devin-cli-adapter.test.ts currently ignores its options, but it can capture options.env.DEVIN_PERMISSION_MODE without requiring the real CLI. As written, restoring ask or introducing another rejected value would leave all focused tests green while breaking every default-configured live turn again. Add assertions that the default path passes normal and that the tools-enabled path preserves its intended bypass/override behavior.

AGENTS.md reference: src/AGENTS.md:L24-L25

Useful? React with 👍 / 👎.

},
});
} catch (error) {
Expand Down
Loading