Workflows/Jobs/etc… are stateful processes that can have any number of open resources.
These resources need to be closed whenever the job/workflow that contains it is closed, no matter what the circumstances, and especially on cancellation. There are a number of open tickets on this.
https://discuss.circleci.com/t/cancelled-build-post-hook-commands/5995
https://discuss.circleci.com/t/support-scriptable-teardown-section-in-circle-yml/1703
https://discuss.circleci.com/t/create-value-cancelled-for-run-s-when/12231
None of which has any response. What’s the status?