I'm not entirely sure what your circumstances are. 'Trapped' dwarves can be compelled to actions that
you know are not untrapping ones (e.g. digging ramps under themselves, for further and even more 'inescapable' pits) and they will do that just as willingly - whether or not
you know that it will lead them to a pre-dug 'escape' tunnel you've already dug down and across, to which their shaft will intercept, or alternately that they'll find themselves falling into cavern or even magma sea by continuing.
A dwarf might be sleeping for some of the time (if you've kept them from their/any bed for long enough) and possibly some with a workshy psychology element may procrastinate at awkward times with no apparent reason, but imminent self-rescue wouldn't stop that either. I don't think there's any 'awareness' beyond "can currently route to a job/neex location" and "
cannot currently route...", even if you've set up one 'obvious' digging designation that (when dug) leads to safety/fulfilment amongst others that do the opposite.
I think you just found yourself trying to herd a cat, figuratively speaking. Once you get a bit more personal experience, you'll doubtless understand more about how to herd all your cats (i.e. dwarves) without triggering such a stalemate position. Unless that's your immediately intended outcome, of course.
Something that occured to me, after the last reply: while trying to get your miner 'unstuck' from what turns out to be a trivially non-unstickable position, did you try to recruit them to a military squad to then 'station' them where you wanted them to go (but they couldn't reach, as you later found)? It's possible you did so and clashed the 'uniform' with the pick, so forcing them to drop it, which could make them behave (even more) uselessly while all those conditions persist.
Now rescued, and perhaps having rushed off to eat/drink and properly bed-sleep after the enforced isolation she had, I don't yet know if you have her back at the coalface (or any other -face, for that matter) or if she's just acting like a Little Lost Dwarfbot and refusing to dig (though maybe more analogous to
twiddling its fingers, in certain ways) only you can't see itvas obviously now she isn't clearly held within a cell of her own making).
But any more info you have
might help us to help you more quickly understand where your expectations and 'reality' diverges. Dwarves can be seen as just semi-autonomous enough to surprise, but not quite so in order to be 'rational' about how they do that.
. I still get caught out, occasionally, even though I
think I know most of the little things I need to look out for and many of the workarounds to avoid even getting into such a situation!