feat(subagents): add per-role first fallback dispatch - #116
Open
thisisjun786 wants to merge 6 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and behavior
Subagent roles currently select one model, so an exhausted provider path cannot hand the task to a configured alternative. Add one optional fallback model and effort for explorer, reviewer and executor, preserving provider-qualified catalog IDs and global/project inheritance.
For a managed dispatch,
xai/grok-4.6can fall back once tocursor/grok-4.6. If both attempts fail with eligible errors, the dispatcher returnsmain-directfor the main agent to finish the remaining work. This does not spawn another child on the main model. Reviewer exhaustion still requires independent review evidence.Implementation
Verification
3f9d22e5).xai/grok-4.6/high thencursor/grok-4.6/low, with exact attempt-count and reviewer-independence assertions.Scope and remaining verification
This is a main-followed managed protocol, not transparent retry for arbitrary native spawn calls. Native testing scripts the main's protocol choices and uses the production hook commands as isolated trusted user hooks. It does not establish unscripted main-model compliance, code-mode/custom-native-role behavior, full plugin installation, live OCX/provider quota behavior, or the main's actual work after
main-direct. HTTP 403 prose conservatively returnsreconcile.Detailed before/after evidence summaries are in
devlog/_fin/260909_subagent_first_fallback/012_isolated_native_verification.mdand013_native_error_fix.md. Latest upstream integration and full-suite evidence are recorded in015_upstream_integration.md. Fallback source/runtime and UI are unchanged by that merge; hook inventory now contains 25 hooks. Publication commits use the author’s GitHub noreply address.