{"version":"2.1.221","anchor":"remote-worker-heartbeats-can-adopt-refreshed-credentials","canonical_anchor":"remote-worker-heartbeats-can-adopt-refreshed-credentials","heading":"Remote worker heartbeats can adopt refreshed credentials","tier":"internal","area":"Sessions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221\/e\/remote-worker-heartbeats-can-adopt-refreshed-credentials","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221","markdown":"### Remote worker heartbeats can adopt refreshed credentials\n\nLong-running remote sessions can pick up refreshed tokens mid-flight instead of dying when credentials expire.\n\n**What**\n\nA heartbeat response can now carry a refreshed auth payload, letting a long-running remote worker pick up new tokens without a restart.\n\n**Details**\n\n- On receiving the payload the client re-reads the session ingress token and OAuth token from disk.\n- Adoption only happens if the new token decodes as a JWT, its expiry matches the advertised lifetime, and it extends the current expiry.\n- Each non-adoption reason is reported once: not_remote, no_advertised_ttl, read_failed, not_a_jwt, unchanged, exp_mismatch, not_newer, adopt_timeout, adopt_threw.\n- The heartbeat request timeout is now derived from the heartbeat interval and jitter rather than a fixed 5000 ms.\n- Gated on the CLAUDE_CODE_REMOTE environment; non-remote sessions report not_remote and keep existing credentials.\n\n**Evidence**\n\n`CCR auth refresh: delivered token does not extend expiry, keeping current credentials`\n\n- Area: Sessions\n- Names: `CLAUDE_CODE_REMOTE`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 0\/5"}