earendil-works/pi · error · Error
Extension command "/${commandName}" cannot be queued. Use pr
Error message
Extension command "/${commandName}" cannot be queued. Use prompt() or execute the command when not streaming. What it means
Error "Extension command "/${commandName}" cannot be queued. Use prompt() or execute the command when not streaming." thrown in earendil-works/pi.
Source
Thrown at packages/coding-agent/src/core/agent-session.ts:1430
content.push(...images);
}
this.agent.followUp({
role: "user",
content,
timestamp: Date.now(),
});
}
/**
* Throw an error if the text is an extension command.
*/
private _throwIfExtensionCommand(text: string): void {
const spaceIndex = text.indexOf(" ");
const commandName = spaceIndex === -1 ? text.slice(1) : text.slice(1, spaceIndex);
const command = this._extensionRunner.getCommand(commandName);
if (command) {
throw new Error(
`Extension command "/${commandName}" cannot be queued. Use prompt() or execute the command when not streaming.`,
);
}
}
/**
* Send a custom message to the session. Creates a CustomMessageEntry.
*
* Handles three cases:
* - Streaming: queues message, processed when loop pulls from queue
* - Not streaming + triggerTurn: appends to state/session, starts new turn
* - Not streaming + no trigger: appends to state/session, no turn
*
* @param message Custom message with customType, content, display, details
* @param options.triggerTurn If true and not streaming, triggers a new LLM turn
* @param options.deliverAs Delivery mode: "steer", "followUp", or "nextTurn"
*/
async sendCustomMessage<T = unknown>(View on GitHub (pinned to 4af9d21d3b)
When it happens
Trigger: Thrown at packages/coding-agent/src/core/agent-session.ts:1430 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/8a28e862d854ffcd.
Report an issue: GitHub.