diff --git a/src/process/tau-rpc.ts b/src/process/tau-rpc.ts index 0c14cdbb3..09c4a1f32 100644 --- a/src/process/tau-rpc.ts +++ b/src/process/tau-rpc.ts @@ -121,10 +121,12 @@ class TauRpcClient { const child = this.child; if (!child) throw new Error("tau rpc child not initialized"); await new Promise((resolve, reject) => { + // Pi-agent-core's Agent.prompt() expects a plain string, not a structured message. + // The RPC handler in pi-coding-agent passes input.message directly to agent.prompt(). const ok = child.stdin.write( `${JSON.stringify({ type: "prompt", - message: { role: "user", content: [{ type: "text", text: prompt }] }, + message: prompt, })}\n`, (err) => (err ? reject(err) : resolve()), );