Ability to use /compact from command line when using -c -p

Resolved 💬 3 comments Opened May 16, 2025 by Equalizer2000 Closed May 17, 2025

I've spent hours trying all combinations of sending "compact, tried escaping the /, tried putting it as <command>/compact</command>, single quotes, double quotes, after the -p flag, as piped input (echo "/compact" | claude -c -p) - none of them work. I have to assume that there just is no way to compact from command line usage? And I don't think it ever auto-compacts, as I've gotten "prompt is too long" after many turns. Assuming I'm right, it would be nice to be able to turn on auto-compact for -p / --print usage. (and/or allow manual compacting as well from command line)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗