Skip to content

fix(devin): skip workspace trust for Orca launches - #21925

Merged
nwparker merged 4 commits into
mainfrom
nwparker/devin-workspace-trust
Sep 21, 2026
Merged

nwparker merged 4 commits into
mainfrom
nwparker/devin-workspace-trust

Conversation

@nwparker

@nwparker nwparker commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​15
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5

ELI5

Devin currently asks whether to trust every Orca workspace, then exits when the prompt is not accepted. Orca already starts Devin in its automatic-permissions mode, so this adds Devin's documented flag to skip that prompt for this launch.

What Changed

  • Added --respect-workspace-trust false to Orca's Devin automatic-permissions arguments.
  • Updated shared and renderer startup-plan tests to assert the complete command.
  • Migrate the exact previous Devin default for existing profiles and schedule the corrected settings for saving. Manual and custom arguments are preserved.

Before, an Orca Devin launch in a new workspace could stop at Trust <workspace>?. After, it starts directly and remains available for the prompt Orca sends.

Why

Devin's official CLI reference documents --respect-workspace-trust [true|false] and specifically recommends --respect-workspace-trust false to skip the check in scripts and CI. A per-launch argument keeps this behavior scoped to Orca; changing Devin's global config would also change standalone Devin sessions.

Reference: https://docs.devin.ai/cli/reference/commands.md

Linked Issue

Fixes #15859

Visual Proof

Devin trust prompt suppression verification

The proof uses fresh temporary directories. Raw observations from the live CLI:

before: devin --permission-mode bypass
output: ✗ Trust /private/tmp/devin-verify-before.sjcC?

fixed:  devin --permission-mode bypass --respect-workspace-trust false
pty run: timeout 5s (exit 124), with no Trust prompt in the captured transcript

The attached image is a generated summary of CLI observations, not an Orca screenshot. This was not an end-to-end rendered Orca test: the PTY capture contains terminal initialization sequences, so surviving the timeout alone does not establish interactive readiness or successful prompt delivery. Windows, Linux, and SSH were not manually exercised.

Testing

  • Manually tested on macOS with Devin 2026.8.18 (16737566) in fresh temporary directories.
  • ORCA_BACKGROUND_LAUNCH=1 pnpm test src/shared/tui-agent-permissions.test.ts src/shared/tui-agent-startup.test.ts (59 tests passed)
  • ORCA_BACKGROUND_LAUNCH=1 pnpm tc:web
  • pnpm run check:code-quality:changed (0 new findings)
  • pnpm exec oxfmt --write src/shared/tui-agent-permissions.ts src/shared/tui-agent-startup.test.ts

Review

The change is limited to Devin's automatic-permissions launch arguments. It applies equally to local, SSH, and other execution hosts because the flag is part of the command sent to Devin; no platform-specific path or UI behavior changes.

Agent skill upstream boundary

  • Not applicable.

Notes

Includes one generated English catalog entry ("Stop generating") required by the current base branch; the missing entry caused the static-analysis gate to fail. The superseded WeChat README edits were removed from this PR.

No changes are needed for related Claude continuation issues; those were handled separately by the --prefill PR.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Before/after visual proof attached
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path impact considered
  • Typecheck, focused tests, and changed-code quality checks pass

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: ebaab4bb-f46b-4ded-b4b2-7b1a9a783ffa

📥 Commits

Reviewing files that changed from the base of the PR and between ac6baab and 4fe5c5f.

📒 Files selected for processing (1)
  • src/main/persistence/loading-store/prepare-loaded-profile-settings.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

Devin launch defaults now include --respect-workspace-trust false with --permission-mode bypass. Migration logic replaces the previous Devin default and detects when persisted settings differ from the migrated value. Startup and migration tests now verify the updated command arguments and migration behavior.

Priority: ➖ Normal

Severity of issue fixed: Medium

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue [#15859] requires Orca-launched Devin sessions to skip the workspace-trust prompt. YOLO_TUI_AGENT_ARGS.devin now includes --respect-workspace-trust false with --permission-mode bypass. Sta…
Out of Scope Changes check ✅ Passed The whole pull request changes Devin launch arguments, startup expectations, and persistence migration. These changes directly support issue [#15859]. The reviewed diff contains no unrelated README or…
Title check ✅ Passed The title clearly and concisely describes the primary change: disabling Devin workspace-trust prompts for Orca launches.
Description check ✅ Passed The description is mostly complete. It covers the user-facing change, mechanism, reason, linked issue, visual proof, testing, scope, and checklist items. The AI Disclosure section is omitted, and full…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

One test this change invalidates was not updated, so pnpm test (CI) is red on this head. Please update it before merging.

Reviewed changes

  • Devin automatic-permissions args — YOLO_TUI_AGENT_ARGS.devin gains --respect-workspace-trust false alongside --permission-mode bypass, so Orca-launched Devin skips its keystroke-eating workspace-trust menu (fixes #15859). The flag is real and documented for exactly this use.
  • Shared startup tests — src/shared/tui-agent-startup.test.ts assertions updated to the new full command.

⚠️ Renderer startup test still pins the old Devin command

The shared test was updated, but src/renderer/src/lib/tui-agent-startup.test.ts builds the same Devin plan through resolveTuiAgentLaunchArgs('devin', null) and still asserts the old command. It fails on this head (I ran it: 1 failed / 25 passed), and config/vitest.config.ts includes src/**/*.test.ts, so the full pnpm test run is red.

Technical details
# Update the renderer Devin startup assertion

## Affected sites
- `src/renderer/src/lib/tui-agent-startup.test.ts:244-264` — `launches Devin first and injects the prompt after startup` passes `agentArgs: resolveTuiAgentLaunchArgs('devin', null)` and expects `launchCommand`/`agentCommand` = `"devin '--permission-mode' 'bypass'"` and `agentArgs` = `'--permission-mode bypass'`.

## Evidence
- `ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/lib/tui-agent-startup.test.ts` → 1 failed / 25 passed; received `devin '--permission-mode' 'bypass' '--respect-workspace-trust' 'false'`.
- `config/vitest.config.ts:31-38` `include` covers `src/**/*.test.ts`, so this runs in CI.

## Required outcome
- Assert the same command the shared test does: `devin '--permission-mode' 'bypass' '--respect-workspace-trust' 'false'` with `agentArgs: '--permission-mode bypass --respect-workspace-trust false'`.

ℹ️ The new default does not reach already-migrated profiles

Changing an existing agent's value in YOLO_TUI_AGENT_ARGS only affects fresh installs and profiles that predate the yolo-defaults migration. migrateAgentYoloDefaults preserves any already-stored agentDefaultArgs.devin verbatim, and resolveTuiAgentLaunchArgs returns configured args whenever the key exists — so users whose profile stores the old --permission-mode bypass keep it and still hit the trust menu (the issue reporter's command was exactly devin '--permission-mode' 'bypass').

Technical details
# Decide whether existing profiles should receive the new Devin flag

## Affected sites
- `src/shared/tui-agent-permissions.ts:29` — the value changed here is only a default.
- `src/main/persistence/applying-settings/terminal-settings-migrations.ts:129-146` — `migrateAgentYoloDefaults` keeps every present `agentDefaultArgs` entry as-is and only fills absent keys (with `''`).
- `src/shared/tui-agent-launch-defaults.ts:114-126` — `resolveTuiAgentLaunchArgs` returns the configured value verbatim when the key exists, so a stored `'--permission-mode bypass'` beats the new default.

## Required outcome
- Establish whether #15859 must be fixed for users whose profile already stores `agentDefaultArgs.devin`. If so, this needs a value-level migration (analogous to the `UNSUPPORTED_TUI_AGENT_ARGS` sanitation) or a stored-default version stamp.

## Open questions for the human
- Is fresh-install-only scope intended for a default-args change, or is a one-time migration for existing yolo profiles expected?

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker

Copy link
Copy Markdown
Contributor Author

Follow-up verification (raw CLI evidence):

before: devin --permission-mode bypass
output: ✗ Trust /private/tmp/devin-verify-before.sjcC?

fixed:  devin --permission-mode bypass --respect-workspace-trust false
pty run: timeout 5s (exit 124), with no Trust prompt in the captured transcript

The fixed command was run in a fresh temporary directory under a PTY; timeout 124 means the process remained running until the verification timeout.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: de27b806-524c-4c72-b3c6-3a9a0baaf672

📥 Commits

Reviewing files that changed from the base of the PR and between dce7ee93e23fb9ff5e6831fcde2d688f303a64ca and 441cfd9a0a83005ca3b249d2edb3028ccc1b641c.

📒 Files selected for processing (3)
  • docs/readme/README.fr.md
  • docs/readme/README.ko.md
  • docs/readme/README.zh-CN.md

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Comment thread docs/readme/README.fr.md Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — one persistence gap inline.

Reviewed changes

  • Value-level Devin migration — migrateAgentYoloDefaults now rewrites a stored agentDefaultArgs.devin of --permission-mode bypass to the new default including --respect-workspace-trust false, closing the prior review's fresh-install-only gap.
  • Renderer startup test — src/renderer/src/lib/tui-agent-startup.test.ts now asserts the full command, resolving the prior review's failing-test finding.
  • Migration unit test — added coverage for the already-migrated profile rewrite.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker

Copy link
Copy Markdown
Contributor Author

Addressed the review findings in commit dce7ee93e23: updated the renderer startup expectation and added a value-level migration for existing profiles storing Devin’s old default args. Also fixed the repository’s three stale README links so the required root-directory guard can pass (441cfd9a0a). Focused verification: 87 tests passed, web typecheck passed, and changed-code quality passed.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

This PR now carries an unrelated docs commit that duplicates a fix already merged to main, so it will conflict on rebase and currently leaves the translated READMEs self-contradictory. Suggest dropping it from the branch; details inline.

Reviewed changes

  • Unrelated WeChat QR docs commit — 441cfd9 repoints the first WeChat QR <img> in docs/readme/README.{fr,ko,zh-CN}.md from wechat-qr-group8.jpg to wechat-qr-group9.jpg while leaving the group-8 alt text and copy in place.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread docs/readme/README.fr.md Resolved
@nwparker
nwparker force-pushed the nwparker/devin-workspace-trust branch 2 times, most recently from 1bb8866 to ac6baab Compare September 21, 2026 06:59
@nwparker
nwparker force-pushed the nwparker/devin-workspace-trust branch from 4fe5c5f to 53e76a5 Compare September 21, 2026 07:32

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — one test-coverage suggestion inline.

Reviewed changes

  • Persisted the Devin trust-flag correction — prepareLoadedProfileSettings now marks state dirty whenever the stored agentDefaultArgs.devin differs from the migrated value, so an already-migrated profile's corrected args reach disk instead of the migration re-running on every load (4fe5c5f).

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker merged commit ac4d6b4 into main Sep 21, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Devin exits on first-run workspace trust prompt when creating an agent in Orca

1 participant