This can be used by Claude Code to create an iteration loop where the LLM can probe running process with various scripts and observe the output.
I recently used this to debug what would otherwise have been a nightmare concurrency deadlock situation that left my process frozen. It took me all of 3 minutes.
I wrapped this up as a Claude Skill which I'm sharing here - see README.md for installation instructions, and see also longer writeup in the blog post linked to in the readme file.
Enjoy, feedback and suggestions welcome.