Skip to content

fix(coding-agent): keep explicitly empty subagent fallback chains empty - #1

Closed
eggpeat wants to merge 2 commits into
mainfrom
fix/subagent-empty-fallback-chain
Closed

eggpeat wants to merge 2 commits into
mainfrom
fix/subagent-empty-fallback-chain

Conversation

@eggpeat

@eggpeat eggpeat commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

What

An implementer role whose retry.fallbackChains entry is explicitly empty ([]) now gets no fallback at all. Before this change it silently walked the default role's chain whenever the default role used the same model, so our Opus implementer kept finishing tasks on Sol, K3 or GLM-5.3 after a provider error.

  • session/retry-fallback-chains.ts, task/executor.ts: subagent chain resolution and installation treat an empty array as "no fallbacks" instead of "unset".
  • sdk.ts: deferred singleton model patterns install the empty chain too, and the session's initial model change records the role so cold revival restores it.
  • A role with no chain configured still inherits default, as before.

Why

Local subagent transcripts show implementer-11 (anthropic/claude-opus-5-5:xhigh, chain []) finishing runs on kimi-code/k3 (Oct 6 and Oct 8) and openai-codex/gpt-6.1-sol (Oct 18) after Opus errors. The default role is also Opus, and its chain is Sol → K3 → GLM-5.3.

Testing

  • New regression test subagent runtime model resolution > refuses default fallbacks for an explicitly empty subagent role chain but inherits when unset fails on the parent commit (0 pass, 1 fail) and passes with the fix.
  • bun test test/issue-2750-subagent-runtime-fallback.test.ts test/retry-fallback.test.ts test/task/persisted-revive.test.ts (packages/coding-agent): 78 pass, 0 fail.
  • bun check: passes.
  • Not exercised: a live Opus provider failure through an installed build containing this change.

  • bun check passes
  • Tested locally
  • CHANGELOG updated with the required attribution (if user-facing; internal issue fixes use issue links, external contributions add the PR link and contributor credit after creation)

Devin Review

A subagent whose role sets retry.fallbackChains to [] skipped installing its own chain, so a provider failure walked the default role's chain whenever the default role used the same model. Empty chains now install as 'no fallbacks' at spawn, for deferred singleton patterns, and on cold revival; unset chains still inherit the default.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@eggpeat eggpeat closed this Oct 20, 2026
@eggpeat
eggpeat deleted the fix/subagent-empty-fallback-chain branch October 20, 2026 19:26
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.

1 participant