@@ -229,30 +229,21 @@ export class TerminalProcess extends BaseTerminalProcess {
229229 } else {
230230 const inspectPreOutput = inspect ( preOutput , { colors : false , breakLength : Infinity } )
231231
232- // Empty stream (preOutput === '') is a first-run race: VS Code fires
233- // onDidStartTerminalShellExecution before the shell is fully initialized on
234- // a freshly-created terminal. The command was never submitted, so this is
235- // retryable (commandSubmitted: false triggers the execa fallback).
236- //
237- // Non-empty preOutput means the stream had data but ]633;C never arrived —
238- // a genuine shell integration failure after submission (not retryable).
239- const commandSubmitted = preOutput !== ""
240-
241- const errorMsg = commandSubmitted
242- ? "VSCE output start escape sequence (]633;C or ]133;C) not received, but the stream has started. Upstream VSCE Bug?"
243- : "VSCE shell integration stream completed with no output on first command (shell startup race). Command was not submitted."
232+ // executeCommand() has already been called, so an empty stream cannot prove
233+ // the command was never submitted. Treat the status as submitted/unknown to
234+ // avoid replaying a potentially side-effecting command through Execa.
235+ const errorMsg =
236+ "VSCE output start escape sequence (]633;C or ]133;C) not received after command submission. Command execution status is unknown."
244237
245238 console . error ( `[Terminal Process] ${ errorMsg } preOutput: ${ inspectPreOutput } ` )
246239
247- this . emit ( "no_shell_integration" , { message : errorMsg , commandSubmitted } )
240+ this . emit ( "no_shell_integration" , { message : errorMsg , commandSubmitted : true } )
248241
249242 this . emit (
250243 "completed" ,
251- commandSubmitted
252- ? "<VSCE shell integration markers not found: terminal output and command execution status is unknown>\n" +
253- `<preOutput>${ inspectPreOutput } </preOutput>\n` +
254- "AI MODEL: You MUST notify the user with the information above so they can open a bug report."
255- : "<shell integration stream was empty on first execution: command was not submitted>" ,
244+ "<VSCE shell integration markers not found: terminal output and command execution status is unknown>\n" +
245+ `<preOutput>${ inspectPreOutput } </preOutput>\n` +
246+ "AI MODEL: You MUST notify the user with the information above so they can open a bug report." ,
256247 )
257248
258249 this . continue ( )
0 commit comments