Skip to content

Rate-limit backoff not applied to code-mode composite's partial-start subset retry (follow-up to #4060) #4067

Closed

Description

@aheritier

Context

When code_mode is enabled, codemode.Wrap() collapses all toolsets into one composite (pkg/teamloader/teamloader.go:932). That composite returns PartialStartError while at least one inner toolset is healthy. PR #4062 deliberately exempts partial starts from the backoff gate so the healthy subset stays listed, but this means the composite's per-turn retry of the degraded subset (e.g. a RAG toolset hitting 429 rate limits) is not paced by the gate — the same burst behaviour described in #4060 can still occur for code-mode agents.

Known path

codeModeTool.Start → partial failure → StartableToolSet.startLocked → s.resetStartBackoff() → next turn: full burst again.

Proposed fix

Arm the gate when a PartialStartError's aggregated cause is retryable (the gate already supports s.started = true, so the healthy subset keeps listing). This requires a focused test that a partial-start with a retryable inner cause paces the next TryStart while a non-retryable partial does not.

Activity

  1. added theissue type on Aug 27, 2026
  2. added
    area/agent
    area/tools
    area/rag
    area/runtime
    on Aug 27, 2026
  3. self-assigned this
    on Aug 28, 2026
  4. added a commit that references this issue on Sep 3, 2026
    646efe1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/agentarea/ragarea/runtimearea/tools

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions