Keep the cache out of the per-step records: capture_state(internal=False) capture_state() stays the save state; internal=False leaves ChipState.internal empty and is what DebugSession records (step before/after, run's stop state). Trace schema 4: states carry no internal, and compare_step_records compares the fields the file carries. internal() is called once per module. MEASURED (PyPy 7.3.23, one core, cache on): full capture 31-36 us -> 18.5 us, per-step capture 2.9 us; trace state JSON 10,819 -> 1,264 bytes. Fast tests 623 on CPython and PyPy. Co-Authored-By: Claude Opus 5.5