Skip to content

fix(runtime): deliver Devin launch prompts via argv instead of stdin-after-start - #33349

Merged
nwparker merged 2 commits into
mainfrom
nwparker/agint-devin-argv-prompt
Oct 25, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/agint-devin-argv-prompt

Conversation

@nwparker

@nwparker nwparker commented Oct 25, 2026 •

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

ELI5

When Orca launched Devin with a prompt, it typed the prompt into the terminal about 30ms after Devin started. Devin wasn't reading input yet, so the prompt was lost even though the launch said it worked. Now the prompt goes on Devin's command line (devin … -- '<prompt>'), which Devin documents as "starts an interactive session" with that prompt, the same way Orca launches Trae, Grok, and Prime Agent.

Root cause

Devin used promptInjectionMode: 'stdin-after-start'. The readiness poll waits for the foreground process to be named devin, and that is true right away, before Devin's REPL is reading input. So the follow-up write got there first and was dropped.

Upstream contract (installed devin 3000.10.31, devin --help):

  • Usage: devin [OPTIONS] [PATH]... [-- <PROMPT>...] [COMMAND]
  • [PROMPT]... Your prompt (use -- before the prompt). Starts an interactive session. Use -p/--print for non-interactive mode.

Devin has no --prompt flag. The positional prompt after -- is the documented interactive form, and --prompt-file is the only other way to seed one.

What changed

  • src/shared/tui-agent-config.ts: Devin now uses promptInjectionMode: 'argv' with argvPromptSeparator: '--'.
  • The startup-plan tests (shared and renderer) now expect the prompt in argv and followupPrompt: null.
  • Contributor commit from fix(runtime): deliver Devin launch prompts via argv instead of stdin-after-start #26387 by ggbdpq, rebased onto current main. I resolved the conflict where the shared startup test moved into tui-agent-startup.spec.ts, and dropped its 81-line runtime spec. That spec duplicated the plan pin, because followupPrompt: null already rules out a PTY write.
  • No-prompt launches don't change. Draft launches (buildAgentDraftLaunchPlan) don't change either: Devin has no draft flag or env var, so drafts still use the paste path and do not auto-submit.

How verified

Ran the real Devin CLI (logged in) in a Python PTY harness, 120x40 TERM=xterm-256color, with the prompt "Compute 17*23 and reply with only the number, no tools.":

Scenario Prompt delivered? REPL still interactive?
Main behavior: devin, then prompt+CR written at 30ms (trusted dir) No: no turn ran and the composer was empty. A second prompt typed later was answered (399), so the harness itself works yes
This PR: devin --permission-mode bypass --respect-workspace-trust false -- '<prompt>' (exact Orca default args, fresh untrusted dir) Yes: "Thinking", answer 391, OSC Devin finished yes: a follow-up prompt typed afterwards was submitted and finished
devin -- '<prompt>' without Orca's default args, fresh dir Yes, after the trust prompt yes

Checks:

  • pnpm test src/shared/tui-agent-startup.test.ts src/renderer/src/lib/tui-agent-startup.test.ts src/shared/tui-agent-prompt-transport.test.ts: pass.
  • src/main/runtime/orca-runtime.test.ts: 2 failures in existing-folder import, and the same 2 fail on main db8fc6d0cc9b without this change.
  • pnpm tc: pass.
  • pnpm run check:code-quality:changed: pass.

Cross-platform / remote / mobile

  • Quoting uses the shared quoteStartupArg (POSIX, PowerShell literal, cmd caret-escaping), the same path as the other agents that use the -- separator (trae, grok, prime-agent). On cmd.exe, multi-line prompts have the same limitation as every other argv agent.
  • Remote: the plan is built by whichever runtime spawns the PTY. An older host keeps its old behavior, and there is no wire change.
  • Mobile and folder workspaces are not affected; this is launch-command shape only.

Risk

Low. The change is a single config line. If a Windows PowerShell shim ever stripped --, Devin would read the prompt as [PATH] and open Desktop. I haven't verified this on Windows; trae, grok, and prime-agent already use the same separator.

Fixes #26302
Supersedes #26387

Co-authored-by: ggbdpq 67929842+ggbdpq@users.noreply.github.com

ggbdpq and others added 2 commits October 24, 2026 18:48
…after-start

The stdin-after-start follow-up polls for the foreground process name,
and the devin wrapper execs into `devin acp` almost instantly — so the
prompt was written ~30ms after launch, while Devin was still printing
its banner and its REPL input loop did not exist yet. The write was
dropped (or stranded as an unsubmitted draft) while the launch reported
success.

Switch Devin to argv delivery with the documented `--` separator: the
prompt rides the launch command itself, which the reporter verified
end-to-end (3/3 runs, ~3s to submission) against the measured
acceptance windows — a stability heuristic cannot hit the ~1s early
window without sliding into the discard zone. No-prompt launches are
unaffected (both modes take the same early exit), and the reviewer-facing
draft semantics stay on the draft path where they belong.

Fixes #26302

Generated-by: GLM-5.3-Flash (ZCode)
…an pin

followupPrompt: null already guarantees no PTY write; the shared startup-plan
test pins Devin's argv shape.

Co-authored-by: ggbdpq <67929842+ggbdpq@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1b545868-0a18-4ce6-9f93-a7571cccc9b5
Commits

Reviewing files that changed from the base of the PR and between c415f0c and fcbe38b.

Files selected for processing: 3
  • src/renderer/src/lib/tui-agent-startup.test.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-startup.spec.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants