vercel/ai · error · Error
Tool approval was requested, but the renderer does not suppo
Error message
Tool approval was requested, but the renderer does not support tool approval input.
What it means
During run(), if the agent's response message contains pending tool approval requests, the runner requires a renderer that implements readToolApproval to ask the user. If the renderer lacks that capability, it throws this error instead of silently approving or denying a tool.
Source
Thrown at packages/tui/src/agent-tui-runner.ts:177
try {
const responseMessage = await this.renderer.renderStream(result, {
title,
submittedPrompt: prompt,
continueSession: Boolean(this.renderer.readPrompt),
tools: this.tools,
reasoning: this.reasoning,
responseStatistics: this.responseStatistics,
contextSize: this.contextSize,
waitForExit: false,
});
if (responseMessage && responseMessage.parts.length > 0) {
const approvalRequests =
findPendingToolApprovalRequests(responseMessage);
if (approvalRequests.length > 0) {
if (!this.renderer.readToolApproval) {
throw new Error(
'Tool approval was requested, but the renderer does not support tool approval input.',
);
}
for (const request of approvalRequests) {
const response = await this.renderer.readToolApproval(request, {
title,
});
applyToolApprovalResponse(responseMessage, request, response);
}
upsertResponseMessage(
messages,
responseMessage,
streamWithoutPrompt,
);
streamWithoutPrompt = true;
prompt = undefined;View on GitHub (pinned to 69428b1f8b)
Solutions
- Use a renderer that implements readToolApproval.
- Provide an approval handler, or configure tools to not require approval.
- Pre-check renderer.readToolApproval before running tools with approval requirements.
- Auto-approve explicitly if running unattended (accepting the risk).
Example fix
// before
const renderer = { readPrompt: async () => 'hi' };
// after
const renderer = {
readPrompt: async () => 'hi',
readToolApproval: async request => ({
approvalId: request.approvalId,
approved: true,
}),
}; Defensive patterns
Strategy: validation
Validate before calling
if (!renderer.readToolApproval) {
throw new Error('Renderer must implement readToolApproval for approval-required tools.');
} Type guard
null
Try / catch
try {
await runner.run();
} catch (error) {
if (error.message.includes('does not support tool approval')) {
// switch renderer or disable approval-required tools
} else throw error;
} Prevention
- Implement readToolApproval in any renderer used with approval tools.
- Document renderer capability requirements.
- Disable needApproval on tools when running unattended.
- Test approval flows with the target renderer.
When it happens
Trigger: An agent turn requests tool approval (e.g. a tool with needApproval) while the active TUI renderer does not implement readToolApproval.
Common situations: Using a headless/non-interactive renderer with tools that require approval; forgetting to wire an approval handler in a custom renderer; adding approval-required tools after choosing a minimal renderer.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- No prompt was provided and the renderer does not support pro
- Could not find tool approval request ${request.approvalId}.
- Tool approval response references unknown approvalId: "${app
- Tool call "${toolCallId}" not found for approval request "${
- Tool call "${toolCallId}" not found for approval request "${
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/d5eee43fcc9340f8.
Report an issue: GitHub.