Skip to content

Graduate idle provider session reaping - #2090

Draft
ScaleLeanChris wants to merge 1 commit into
get-bb:mainfrom
ScaleLeanChris:fix/provider-session-reaping-default
Draft

Graduate idle provider session reaping#2090
ScaleLeanChris wants to merge 1 commit into
get-bb:mainfrom
ScaleLeanChris:fix/provider-session-reaping-default

Conversation

@ScaleLeanChris

@ScaleLeanChris ScaleLeanChris commented Aug 20, 2026

Copy link
Copy Markdown

What was wrong

Idle release for restorable non-Codex providers remained behind the default-off providerSessionReaping experiment added after #1604. Existing installations could also retain a persisted false value. As a result, the host daemon skipped otherwise safe release for idle Claude Code, Pi, and ACP sessions under normal settings. The reproduced root cause and alternatives are documented in issue #1604.

What changed

  • Graduate idle release into standard behavior for every provider session that reports restore support.
  • Preserve the legacy thread-scoped Codex fallback and apply open-turn, command, agent, workflow, and monitor protections to every provider.
  • Remove the experiment setting and the server-owned /internal/runtime-policy endpoint that existed only to distribute it.
  • Bump HOST_DAEMON_PROTOCOL_VERSION from 146 to 147 because older daemons still request that removed endpoint and skip non-Codex release when it is unavailable.
  • Update web, mobile, desktop, database, contract, documentation, and generated-guide source fixtures that referenced the graduated experiment.

How you verified

  • Added a lifecycle regression that failed before the runtime change because a restorable Claude Code session remained loaded, then passed after the change.
  • pnpm exec turbo run typecheck for the nine affected packages: 12 tasks passed.
  • Agent runtime lifecycle: 36 tests passed.
  • Host daemon focused suite: 85 tests passed.
  • Host-daemon contract: 38 tests passed.
  • Web settings/layout: 9 tests passed. Server experiments: 4 tests passed. Database experiments: 1 test passed.
  • Mobile full suite: 123 files and 830 tests passed.
  • Templates: 41 tests passed across the local and packed external scaffold suites after building the Plugin SDK prerequisite.
  • git diff --check passed and no removed experiment or runtime-policy symbols remain.
  • Mobile typecheck is not included because the current package script invokes tsc, while its TypeScript 6 alias exposes tsc6; this is unchanged by this PR.

Controlling BAC work order: BAC-117

Fixes #1604

AGENT GENERATED: by GPT-5.6

@ScaleLeanChris
ScaleLeanChris force-pushed the fix/provider-session-reaping-default branch from 6007991 to d736457 Compare August 21, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idle agent processes are never reclaimed for non-Codex providers

1 participant