diff --git a/src/renderer/src/lib/tui-agent-startup.test.ts b/src/renderer/src/lib/tui-agent-startup.test.ts index 01dec6c9e850..a91b5b05e1db 100644 --- a/src/renderer/src/lib/tui-agent-startup.test.ts +++ b/src/renderer/src/lib/tui-agent-startup.test.ts @@ -279,7 +279,7 @@ describe('buildAgentStartupPlan', () => { }) }) - it('launches Devin first and injects the prompt after startup', () => { + it('launches Devin with the prompt on argv behind a -- separator', () => { expect( buildAgentStartupPlan({ agent: 'devin', @@ -290,9 +290,10 @@ describe('buildAgentStartupPlan', () => { }) ).toEqual({ agent: 'devin', - launchCommand: "devin '--permission-mode' 'bypass' '--respect-workspace-trust' 'false'", + launchCommand: + "devin '--permission-mode' 'bypass' '--respect-workspace-trust' 'false' -- 'Trace the failing test'", expectedProcess: 'devin', - followupPrompt: 'Trace the failing test', + followupPrompt: null, launchConfig: { agentCommand: "devin '--permission-mode' 'bypass' '--respect-workspace-trust' 'false'", agentArgs: '--permission-mode bypass --respect-workspace-trust false', diff --git a/src/shared/tui-agent-config.ts b/src/shared/tui-agent-config.ts index a809d350f76e..2498d3adc3b6 100644 --- a/src/shared/tui-agent-config.ts +++ b/src/shared/tui-agent-config.ts @@ -344,11 +344,9 @@ const TUI_AGENT_CONFIG_SOURCE: Record = { draftPasteReadySignal: 'zcode-composer-prompt', composerReadyCaptures: ['zcode-composer-ready'] }, - devin: { - detectCmd: 'devin', - // Why: `devin -- ` auto-submits immediately (docs.devin.ai/cli), so start the REPL with no argv prompt. - promptInjectionMode: 'stdin-after-start' - }, + // Why: stdin-after-start's follow-up wrote before Devin's input loop existed (#26302); `devin -- ` submits reliably. + // prettier-ignore + devin: { detectCmd: 'devin', promptInjectionMode: 'argv', argvPromptSeparator: '--' }, // prettier-ignore jcode: { detectCmd: 'jcode', launchCmd: 'jcode', expectedProcess: 'jcode', promptInjectionMode: 'stdin-after-start' } } diff --git a/src/shared/tui-agent-startup.spec.ts b/src/shared/tui-agent-startup.spec.ts index b1b7de942d54..fba38d588e4c 100644 --- a/src/shared/tui-agent-startup.spec.ts +++ b/src/shared/tui-agent-startup.spec.ts @@ -764,7 +764,7 @@ describe('tui agent startup plans', () => { }) }) - it('launches Devin with stdin-after-start prompt delivery', () => { + it('launches Devin with the prompt on argv behind a -- separator', () => { const plan = buildAgentStartupPlan({ agent: 'devin', prompt: 'fix the tests', @@ -774,9 +774,10 @@ describe('tui agent startup plans', () => { }) expect(plan).toEqual({ agent: 'devin', - launchCommand: "devin '--permission-mode' 'bypass' '--respect-workspace-trust' 'false'", + launchCommand: + "devin '--permission-mode' 'bypass' '--respect-workspace-trust' 'false' -- 'fix the tests'", expectedProcess: 'devin', - followupPrompt: 'fix the tests', + followupPrompt: null, launchConfig: { agentCommand: "devin '--permission-mode' 'bypass' '--respect-workspace-trust' 'false'", agentArgs: '--permission-mode bypass --respect-workspace-trust false',