run /clear with a script?
retained text
I have a setup with multiple sessions acting as agents and being token-conscious. They often suggest to clear their context and prompt them to check their handoff notes. Can I script this somehow? I don’t want to spin up processes I can’t interact with. I want a script that runs /clear and prompts the session. Seems straightforward enough, right?
document fetched 2026-11-19 00:42 · canonical https://reddit.com/r/ClaudeCode/comments/1xz35tj/run_clear_with_a_script