{"record":{"id":"3cca32e909290c66","repo":"zed-industries/zed","slug":"permission-denied-user-sent-a-follow-up-message-i","errorCode":null,"errorMessage":"Permission denied: user sent a follow-up message instead of approving the tool call.","messagePattern":"Permission denied: user sent a follow-up message instead of approving the tool call\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/agent/src/thread.rs","lineNumber":1169,"sourceCode":"                    button_text,\n                    format!(\"always_allow:{}\", tool_name),\n                    format!(\"always_deny:{}\", tool_name),\n                    acp::PermissionOptionKind::AllowAlways,\n                    acp::PermissionOptionKind::RejectAlways,\n                    vec![pattern],\n                );\n            }\n        }\n\n        push_choice(\n            \"Only this time\".to_string(),\n            \"allow\".to_string(),\n            \"deny\".to_string(),\n            acp::PermissionOptionKind::AllowOnce,\n            acp::PermissionOptionKind::RejectOnce,\n            vec![],\n        );\n\n        acp_thread::PermissionOptions::Dropdown(choices)\n    }\n}\n\n#[derive(Debug)]\npub struct ToolCallAuthorization {\n    pub tool_call: acp::ToolCallUpdate,\n    pub options: acp_thread::PermissionOptions,\n    pub response: oneshot::Sender<acp_thread::SelectedPermissionOutcome>,\n    pub context: Option<ToolPermissionContext>,\n    pub kind: acp_thread::AuthorizationKind,\n}\n\nfn ensure_tool_call_authorization_not_interrupted(\n    outcome: &acp_thread::SelectedPermissionOutcome,\n) -> Result<()> {\n    if outcome.option_id.0.as_ref() == FOLLOW_UP_PERMISSION_DENIED_OPTION_ID {\n        Err(anyhow!(TOOL_CALL_INTERRUPTED_BY_FOLLOW_UP_MESSAGE))","sourceCodeStart":1151,"sourceCodeEnd":1187,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent/src/thread.rs#L1151-L1187","documentation":"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.","triggerScenarios":"Thrown at crates/agent/src/thread.rs:1164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}