Clearing or compacting a session now explicitly resets a per-host 'declared tools' flag
When a session is cleared or compacted (compaction summarizes and trims history to save space), Claude Code now explicitly resets a piece of state that tracks whether a host has 'declared' its tools, using a new per-host state store. This store can be subscribed to for change notifications, and at least one place in the code uses that subscription to trigger a refresh shortly afterward.
This makes sure that after a session is cleared or compacted, Claude Code doesn't hold onto a stale record of which tools a host previously declared, so that state gets recomputed cleanly.