New check catches tools denied right before they would have been called, for headless and classifier flows
A new wrapper runs the normal permission check and then, for flows like headless mode or the auto mode classifier, checks whether a tool looks like it was "denied before call" against a decision that hasn't already been settled. When that's triggered, Claude Code logs "<tool name> denied before call:" as a warning, discards the previously recorded decision for that tool, and converts it into the correct denial.
This closes a gap where a tool could otherwise be called despite having effectively already been denied, making denial handling more consistent in headless and classifier-driven runs.