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:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user