diff --git a/packages/pi-agent-core/src/agent.ts b/packages/pi-agent-core/src/agent.ts index c6b998b6a..519311c54 100644 --- a/packages/pi-agent-core/src/agent.ts +++ b/packages/pi-agent-core/src/agent.ts @@ -438,7 +438,7 @@ export class Agent { ) { if (this._state.isStreaming) { throw new Error( - "Agent is already processing a prompt. Use steer() or followUp() to queue messages, or wait for completion.", + "Agent is already processing a prompt. Please wait for it to finish before sending another message.", ); } diff --git a/packages/pi-coding-agent/src/core/agent-session-custom-message-queue.test.ts b/packages/pi-coding-agent/src/core/agent-session-custom-message-queue.test.ts index 77a7e2ccc..cac943f51 100644 --- a/packages/pi-coding-agent/src/core/agent-session-custom-message-queue.test.ts +++ b/packages/pi-coding-agent/src/core/agent-session-custom-message-queue.test.ts @@ -59,7 +59,7 @@ describe("AgentSession custom message queueing", () => { const steered: AgentMessage[] = []; agent.prompt = async () => { throw new Error( - "Agent is already processing a prompt. Use steer() or followUp() to queue messages, or wait for completion.", + "Agent is already processing a prompt. Please wait for it to finish before sending another message.", ); }; agent.steer = (message) => { @@ -89,7 +89,7 @@ describe("AgentSession custom message queueing", () => { const followUps: AgentMessage[] = []; agent.prompt = async () => { throw new Error( - "Agent is already processing a prompt. Use steer() or followUp() to queue messages, or wait for completion.", + "Agent is already processing a prompt. Please wait for it to finish before sending another message.", ); }; agent.followUp = (message) => { diff --git a/packages/pi-coding-agent/src/core/agent-session.ts b/packages/pi-coding-agent/src/core/agent-session.ts index 63300ca9c..6e0910971 100644 --- a/packages/pi-coding-agent/src/core/agent-session.ts +++ b/packages/pi-coding-agent/src/core/agent-session.ts @@ -1218,7 +1218,7 @@ export class AgentSession { if (this.isStreaming) { if (!options?.streamingBehavior) { throw new Error( - "Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.", + "Agent is already processing. Please wait for it to finish before sending another message.", ); } if (options.streamingBehavior === "followUp") {