fix(coding-agent): disable PTY bash in rpc-ui mode

rpc-ui sets hasUI=true which causes the bash tool to take the
runInteractiveBashPty path when pty=true. RpcExtensionUIContext.custom()
is a stub returning undefined, so result.cancelled dereferences undefined
and throws. PTY bash requires a live TUI overlay; rpc-ui only provides
dialog-style UI. Set PI_NO_PTY for rpc-ui so the usePty guard in
bash.ts stays false.
This commit is contained in:
Miroslav Drbal
2026-05-10 15:56:33 +02:00
committed by can1357
parent 68627b0857
commit 11dbfafd44
+1 -1
View File
@@ -659,7 +659,7 @@ export async function runRootCommand(parsed: Args, rawArgs: string[]): Promise<v
if (parsedArgs.mode === "rpc" || parsedArgs.mode === "rpc-ui") {
applyRpcDefaultSettingOverrides();
}
if (parsedArgs.noPty) {
if (parsedArgs.noPty || parsedArgs.mode === "rpc-ui") {
Bun.env.PI_NO_PTY = "1";
}
if (parsedArgs.noTitle || parsedArgs.mode === "rpc" || parsedArgs.mode === "rpc-ui") {