zed-industries/zed · error · anyhow::Error
Permission denied: user sent a follow-up message instead of…
Error message
Permission denied: user sent a follow-up message instead of approving the tool call.
What it means
ensure_tool_call_authorization_not_interrupted detects the user replied with a follow-up message instead of choosing an authorization option for a pending tool call; the tool call is treated as permission-denied with this explicit error.
Solutions
- The user replied with a follow-up message instead of approving the pending tool call; re-send the tool call so a fresh authorization prompt is shown
- Instruct the user to approve or reject the tool call explicitly rather than typing a new message
- Treat the pending tool call as cancelled and continue handling the user's message
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/agent/src/thread.rs:1164 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20).
Data as JSON: /api/errors/3cca32e909290c66.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent/src/thread.rs:1169
button_text,
format!("always_allow:{}", tool_name),
format!("always_deny:{}", tool_name),
acp::PermissionOptionKind::AllowAlways,
acp::PermissionOptionKind::RejectAlways,
vec![pattern],
);
}
}
push_choice(
"Only this time".to_string(),
"allow".to_string(),
"deny".to_string(),
acp::PermissionOptionKind::AllowOnce,
acp::PermissionOptionKind::RejectOnce,
vec![],
);
acp_thread::PermissionOptions::Dropdown(choices)
}
}
#[derive(Debug)]
pub struct ToolCallAuthorization {
pub tool_call: acp::ToolCallUpdate,
pub options: acp_thread::PermissionOptions,
pub response: oneshot::Sender<acp_thread::SelectedPermissionOutcome>,
pub context: Option<ToolPermissionContext>,
pub kind: acp_thread::AuthorizationKind,
}
fn ensure_tool_call_authorization_not_interrupted(
outcome: &acp_thread::SelectedPermissionOutcome,
) -> Result<()> {
if outcome.option_id.0.as_ref() == FOLLOW_UP_PERMISSION_DENIED_OPTION_ID {
Err(anyhow!(TOOL_CALL_INTERRUPTED_BY_FOLLOW_UP_MESSAGE))View on GitHub (pinned to 916fc2b8cb)