Skip to content

fix(agents): skip Devin first-run workspace trust prompt - #15860

Closed
dbachko wants to merge 1 commit into
stablyai:mainfrom
dbachko:dbachko/fix-devin-workspace-trust
Closed

dbachko wants to merge 1 commit into
stablyai:mainfrom
dbachko:dbachko/fix-devin-workspace-trust

Conversation

@dbachko

@dbachko dbachko commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Creating a Devin agent in Orca was dying immediately. Devin asks "do you trust this folder?" with a numbered menu, and Orca's first keystrokes into the terminal were answering No, exit. This change tells Devin not to show that menu when Orca launches it.

What Changed

Devin's launch command is now devin --respect-workspace-trust=false (still followed by --permission-mode bypass in YOLO mode). That is Devin's documented skip for the first-run workspace-trust prompt, the same pattern as command-code --trust.

The flag lives on launchCmd, not YOLO args, so manual permission mode and session resume also skip the menu. New Orca worktrees are not written into Devin's global trust store; the skip is per invocation.

Why

--permission-mode bypass only auto-approves tools. It does not skip workspace trust. Devin uses stdin-after-start, so as soon as devin is the foreground process — which it already is while the trust menu is up — Orca's follow-up prompt or draft paste is consumed as a menu choice. Option 2 is "No, exit".

Orca already pre-writes trust artifacts for Cursor, Copilot, and Codex (preflightTrust). Devin has a public CLI flag for this, so the launch command is the smaller, more reliable fix than reverse-engineering trusted_workspaces.json.

Linked Issue

Fixes #15859

Related: #11765 (Cursor trust auto-quit), #10666 (inject answers Codex trust prompt)

Visual Proof

N/A — launch-command change only. No UI, layout, or interaction surface.

Testing

  • Automated tests added/updated, or explained why not below
  • I manually tested these changes locally

Ran:

pnpm exec vitest run src/shared/tui-agent-startup.test.ts src/shared/tui-agent-startup-devin.test.ts src/renderer/src/lib/tui-agent-startup.test.ts

98 passed.

Verified on this machine that devin --respect-workspace-trust=false -p "…" runs in an untrusted directory instead of failing the trust check (Devin CLI 3000.5.20). Did not re-create a Devin agent inside a running Orca app.

Platforms: macOS unit tests. The flag is Devin CLI argv, so Linux, Windows, WSL, and SSH hosts pick it up as long as that host's Devin supports --respect-workspace-trust (current docs / 3000.x). Older Devin without the flag would fail at clap parse; Devin auto-updates by default.

Review

  • Cross-platform: launchCmd is the same string on macOS/Linux/Windows; =false is one token so false cannot be parsed as a PATH.
  • SSH/remote: the flag is sent with the remote spawn command. Trust skip is evaluated by the Devin binary on the execution host.
  • Folder workspaces: applies to any cwd Orca launches Devin in, git worktree or not.
  • Permission mode: YOLO remains --permission-mode bypass; the trust skip is independent so toggling manual/yolo cannot reintroduce the menu.
  • Security: scoped to Orca-launched Devin only. Does not set skip_workspace_trust in ~/.config/devin/config.json, so a Devin run outside Orca still prompts.
  • Performance: none.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Custom command overrides that replace the whole launch with bare devin will drop the flag, same as command-code --trust today.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Devin's "Do you trust the authors of this directory?" menu is a numbered
select. Orca PTY input (stdin-after-start follow-up, draft paste) lands
on that menu and answers "No, exit", so creating a Devin agent dies
immediately. --permission-mode bypass only auto-approves tools.

Pass --respect-workspace-trust=false on the launch command, the same
pattern as command-code --trust, including manual-permission and resume
launches. New Orca worktrees stay untrusted in Devin's store; the flag
is per-invocation.

Fixes stablyai#15859
@coderabbitai

coderabbitai Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f5160041-1138-4b3e-96d9-2ccf81ebd03f

📥 Commits

Reviewing files that changed from the base of the PR and between 2b1254d and e8e2f89.

📒 Files selected for processing (4)
  • src/renderer/src/lib/tui-agent-startup.test.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-startup-devin.test.ts
  • src/shared/tui-agent-startup.test.ts

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


📝 Walkthrough

Walkthrough

The Devin launch command now includes --respect-workspace-trust=false. Existing permission arguments, prompt delivery, process detection, and session identifiers remain unchanged. Startup and resume tests now verify the updated launch configuration across shared and renderer startup-plan expectations.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change directly addresses issue #15859 by adding Devin's workspace-trust bypass flag without changing global trust configuration.
Out of Scope Changes check ✅ Passed The code and test changes are limited to Devin launch arguments and validation of the workspace-trust behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4 files.
Description check ✅ Passed The description covers all required sections, explains the change and rationale, links issue #15859, documents testing, and addresses cross-platform and security considerations.
Title check ✅ Passed The title clearly and concisely identifies the Devin fix and the skipped first-run workspace trust prompt.

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.

@AmethystLiang

Copy link
Copy Markdown
Contributor

thanks for reporting. looking into it

@nwparker

Copy link
Copy Markdown
Contributor

Thanks @dbachko for the clear root-cause analysis in #15859! This is now fixed on main by #21925 (ac4d6b4), which adds Devin's documented --respect-workspace-trust false to Orca's default Devin automatic-permissions args (existing profiles on the old default are migrated). #33349 (456c7bf) also moved Devin prompt delivery from stdin-after-start to argv (devin … -- '<prompt>'), so Orca no longer types anything into the PTY that could be read as "No, exit" while the trust menu is up. If Devin still exits on the trust prompt for you on the latest build, please comment or reopen and we'll take another look.

@nwparker nwparker closed this Oct 26, 2026
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

4 participants