Is this true of combat resolution in D&D?
That's not a simple question to answer.
Generally speaking when a mechanical process for combat is outlined in the book that is the process followed. So when a player attacks an enemy, they roll an attack roll, the DM (or sometimes players) compare the AC to the resulting roll with modifiers and on a success they hit and damage is rolled. As we have noted here there is some difference in opinion about whether the normal part of the D&D playloop of determining success, failure or uncertainty actually can ever apply by rule to combat situations. I would say it technically does, but I'm sure others have rather strong opinions that it doesn't. But in practice that's mostly a distinction without a difference as a dang good reason would be needed to alter that part of combat resolutoin, as whether or not the rules might allow such things, it's generally an expectation of the players that combat will be resolved by the mechanics in the rules (or potentially houserules given out ahead of time).
That said, not all potential actions in combat in D&D are codified - just the most common. When a player attempts to do something creative in combat then the DM does lean back into the general purpose playloop of determining success, failure or uncertainty and will proceed to some kind of check to resolve the uncertainty in the event that's what he has determined.
Is it true of a declaration I try and climb the wall? Eg is the GM just allowed to say, Sorry, you can't find any handholds?
Yes.
This is exactly what I have described upthread as the GM relying on unilateral decisions about the fiction to make the determination that a player's action declaration fails.
I disagree. I think the example about climbing a wall with no handholds is more akin to framing the scene, which I think we all agree is okay for the DM to do unilaterally.
When this is happening, I don't see how it can be said that the player is exercising agency over the content of the shared fiction. It's inherent to the very situation that the GM is deciding unilaterally!
The PC's and their actions are part of the shared fiction. So long as the player has agency over their PC's actions then they have agency over the shared fiction. Maybe what you mean is that the players don't have agency over all the shared fiction? But I don't think that really correctly summarizes your position either.
This can very easily bleed into the sort of circumstance that
@Campbell has described not far upthread - where so little of the relevant fiction is known to the players that the GM's unilateral control over it turns into flat-out decision-making about the trajectory of play.
In D&D, I sign up to play a game where I control a PC and nothing more. Controlling that PC gives me agency over the fiction via that PC's actions. The DM is responsible for the setting, the NPC's, and the framing of scenes. He has agency over all those things. That said, I've never played in a D&D game where I felt like I had no say over the trajectory of play. My characters actions have always been the very mechanism that have allowed me to affect the trajectory of play (and sometimes some out of game input).