logoalt Hacker News

ahurmazdayesterday at 7:04 PM3 repliesview on HN

What’s the point of running /clear vs starting a brand new session. At least with the latter I have session history, no? Pardon my ignorance since Claude isn’t my primary driver


Replies

g4cg54g54yesterday at 8:58 PM

Its all lies anyhow:

- https://github.com/anthropics/claude-code/issues/47756 > [BUG] /clear bleeds into the next session (what also breaks cache)

- https://github.com/anthropics/claude-code/issues/47098 > [BUG] new sessions will *never* hit a (full)cache

mikeocoolyesterday at 7:13 PM

As far as I've seen /clear is the same thing as starting a new session.

If you type /resume right after clear, the first thing in the list is the session you just cleared.

andaiyesterday at 8:04 PM

Not 100% sure what clear does, but starting a new session invalidates the cache*, whereas I assume clear only removes part of the context, so it should be cheaper and faster.

* In theory the system prompt is always the same and should therefore be cached, but in practice there's some dynamic strings in there so it doesn't work that way. (Unless they changed this recently.)