{"version":"2.1.300","anchor":"heap-census-hooked-into-the-headless-turn-loop","canonical_anchor":"heap-census-hooked-into-the-headless-turn-loop","heading":"Headless sessions now take a memory check after every turn","tier":"internal","area":"Headless Mode","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300\/e\/heap-census-hooked-into-the-headless-turn-loop","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300","markdown":"### Headless sessions now take a memory check after every turn\n\nWhen Claude Code runs without its interactive screen, it now runs a memory check after every turn and adds extra fields to its end-of-run report\n\n**What**\n\nA headless session is one where Claude Code runs without its interactive screen, for example when driven by another program. A turn is one exchange between you and Claude. In these sessions, Claude Code now runs a check on the program's memory use after every turn. The check is told whether the session is busy, how many turns have run and how many messages there are.\n\nThe summary Claude Code records when such a run ends also carries some extra fields.\n\n**Why**\n\nThis adds tracking of how much memory headless and SDK sessions use as they go along.\n\n- Area: Headless Mode\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}