diff --git a/packages/coding-agent/src/launch/broker.ts b/packages/coding-agent/src/launch/broker.ts index e8212b8a8..e28f9b661 100644 --- a/packages/coding-agent/src/launch/broker.ts +++ b/packages/coding-agent/src/launch/broker.ts @@ -431,7 +431,7 @@ class DaemonBroker { if (spec.detached && spec.pty) { throw new Error("A detached daemon cannot allocate a PTY"); } - if (process.platform === "win32" && [".bat", ".cmd"].includes(path.extname(spec.application).toLowerCase())) { + if (spec.pty && process.platform === "win32" && [".bat", ".cmd"].includes(path.extname(spec.application).toLowerCase())) { throw new Error('Windows batch files require application "cmd.exe" with the batch path after "/c"'); } const existing = this.#records.get(spec.name); diff --git a/packages/natives/native/index.d.ts b/packages/natives/native/index.d.ts index 1e8df42e4..e3232c5b6 100644 --- a/packages/natives/native/index.d.ts +++ b/packages/natives/native/index.d.ts @@ -86,7 +86,10 @@ export declare class PtySession { constructor() /** Start a shell command and stream output chunks via callback. */ start(options: PtyStartOptions, onChunk?: ((error: Error | null, chunk: string) => void) | undefined | null): Promise - /** Start an executable with separate arguments and stream output chunks via callback. */ + /** + * Start an executable with separate arguments and stream output chunks via + * callback. + */ startArgv(options: PtyArgvStartOptions, onChunk?: ((error: Error | null, chunk: string) => void) | undefined | null): Promise /** Write raw input bytes to PTY stdin. */ write(data: string): void