Skip to content

refactor(runtime): remove the legacy child provider-retry path #3035

Closed

Description

@Astro-Han

Problem

Child provider retries currently retain two admission modes:

  • durable_continuation
  • legacy_provider_retry

Production Runtime Hosts provide both a SQLite continuation authority and a continuation safety inspector. SessionManager therefore always selects durable_continuation in the supported product composition.

The legacy branch remains reachable only when SessionManager is constructed without either capability. It maintains a second retry planner, replay rules, admission semantics, and tests despite having no production caller.

This parallel path weakens the Runtime Host authority boundary and makes provider-retry changes require reasoning about two implementations.

Proposed change

  • Remove legacy_provider_retry from ChildAgentRetryInput.
  • Remove planLegacyChildProviderRetry() and fallback-only logic.
  • Require continuation authority and safety inspection for child provider retries.
  • Fail closed before provider dispatch when the continuation composition is incomplete.
  • Preserve provider rate-limit retries through the durable continuation path.

Acceptance criteria

  • Child provider retries use only durable continuation admission.
  • legacy_provider_retry and its dedicated tests are removed.
  • Missing or incomplete continuation authority is rejected before claim or provider dispatch.
  • Provider rate-limit retry, continuation recovery, and linked-child behavior remain covered.
  • Runtime Host behavior remains unchanged.
  • Focused Runtime and Runtime Host tests, type checking, and formatting pass.

Compatibility

Directly constructed SessionManager instances without continuation authority will no longer retry child provider failures. Such compositions are not a supported product execution surface; Runtime Host is the execution authority.

Non-goals

  • Changing retry limits or backoff policy.
  • Changing root-turn continuation semantics.
  • Reworking provider-specific transports.
  • Removing fail-closed continuation safety checks.

Context

Verified on main at 1a71db5c0fa85771330354360388ecf47ba95c2e.

Relevant code:

  • packages/runtime/src/session-manager.ts
  • packages/runtime/src/runtime-kernel.ts
  • packages/runtime-host/src/server/execution-composition.ts
  • packages/storage/src/sqlite-runtime-store.ts

This issue was identified and prepared with AI assistance (Codex). A human contributor reviewed the analysis and owns the submission.

Activity

  1. chinawch007 commented on Aug 15, 2026

    @chinawch007
    Contributor

    I'd like to take this one. Plan:
    make the incomplete-composition guard in retryChildAgentWithExecution fail closed (no legacy fallback), delete planLegacyChildProviderRetry / runLegacyProviderRetry and the legacy_provider_retry admission mode, add a fail-closed regression test, and sync the two architecture docs. I've verified no existing test exercises the legacy lane. PR incoming shortly — happy to be assigned.


    drafted by glm5.3, reviewed by human.

  2. Astro-Han commented on Aug 15, 2026

    @Astro-Han
    ContributorAuthor

    Assigned! @chinawch007

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions