{"version":"2.1.286","anchor":"print-resume-now-runs-cleanup-in-a-finally-block-and-pass","canonical_anchor":"print-resume-now-runs-cleanup-in-a-finally-block-and-pass","heading":"Resuming in --print mode always runs its cleanup step","tier":"notice","area":"Sessions","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.286\/e\/print-resume-now-runs-cleanup-in-a-finally-block-and-pass","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.286","markdown":"### Resuming in --print mode always runs its cleanup step\n\nWhen a session is resumed in `--print` mode with an SDK connection, Claude Code now runs its cleanup step at the end even if something fails\n\n**Unclear.** What the cleanup step actually releases is not identified.\n\n**What**\n\n`--print` runs Claude Code without the interactive screen, printing the response and exiting. When such a run resumes an earlier session while connected through an SDK address, Claude Code now runs a cleanup step at the end whether the run succeeds or fails. The resume also passes along an identifier for a restored card tied to a particular tool call.\n\n**Why**\n\nIn practice, resuming through the SDK or a remote connection tidies up after itself even when the run ends in an error.\n\n- Area: Sessions\n- Names: `--print`\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 2\/5"}