Skip to main content

park_tool_permission_request

Function park_tool_permission_request 

Source
fn park_tool_permission_request(
    inner: &Arc<Mutex<PersistentInner>>,
    tool_use_id: String,
    request_id: String,
    tool_name: String,
    input: Value,
)
Expand description

Park an ordinary (non-AskUserQuestion) tool-permission can_use_tool control_request into PersistentInner::pending_permissions, mirroring how AskUserQuestion is parked into pending_questions two branches up in handle_control_frame — same in-memory-only, per-controller-instance lifetime, and the same “process respawned” failure mode on decide (PersistentSubprocessController::decide_tool_permission’s error text explains it the same way answer_question’s does).

Currently unreachable in production: should_route_to_decision_panel always returns false, so handle_control_frame never calls this. Kept as its own function (rather than inlined, unlike the AskUserQuestion branch) specifically so it can be unit tested directly, independent of that gate.