Skip to content

Copilot harness: degrade gracefully on Task subagent No model available policy failures - #51095

Closed
pelikhan with Copilot wants to merge 5 commits into
mainfrom
copilot/aw-failures-fix-copilot-cli-task-tool-calls
Closed

pelikhan with Copilot wants to merge 5 commits into
mainfrom
copilot/aw-failures-fix-copilot-cli-task-tool-calls

Conversation

Copilot AI commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer was failing 4/4 retries when Copilot Task-tool subagent spawn hit No model available. Check policy enablement..., causing whole runs to fail despite a non-recoverable policy gate. This change makes that signature non-fatal and non-retriable, so workflows continue instead of burning retry budget.

  • Failure classification + retry behavior

    • Add a dedicated harness classification: task_subagent_model_unavailable.
    • Detect this only when both are present:
      • No model available. Check policy enablement under GitHub Settings > Copilot
      • Task-subagent context markers (subagent.started / toolName="task").
    • Short-circuit retries for this class and treat the run as successful continuation (delegation skipped).
  • Signal propagation for downstream handling

    • Emit report_incomplete via safe-outputs when this policy gate occurs.
    • Keep the run green while preserving machine-readable evidence that delegation was skipped.
  • Error detection alignment

    • Extend shared inference-access detection patterns in both harness and post-run error detector to include the No model available policy signature.
    • Ensures consistent classification/reporting across runtime and post-processing paths.
  • Targeted test coverage

    • Add focused tests for:
      • new failure class precedence,
      • task-subagent-specific detection (with and without subagent markers),
      • non-retry + graceful success path for the harness.
if (isTaskSubagentModelUnavailable) {
  emitInfrastructureIncomplete(
    "Copilot Task-tool subagent delegation was skipped because no model is available under current Copilot policy settings. Continue without subagent delegation."
  );
  log(`attempt ${attempt + 1}: task-tool subagent model unavailable by policy — treating as success (delegation skipped)`);
  lastExitCode = 0;
  break;
}

Copilot AI changed the title [WIP] Fix Copilot CLI Task-tool subagent calls Copilot harness: degrade gracefully on Task subagent No model available policy failures Aug 7, 2026
Copilot AI requested a review from pelikhan August 7, 2026 15:00
@pelikhan

pelikhan commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

@copilot revert changes and switch to enable the copilot-sdk: true on this AW

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot revert changes and switch to enable the copilot-sdk: true on this AW

Done in b5f42fe. I reverted the harness/error-detector changes and restored the prior behavior. copilot-sdk: true is enabled for this AW in .github/workflows/pr-code-quality-reviewer.md.

@pelikhan pelikhan closed this Aug 7, 2026
@github-actions
github-actions Bot deleted the copilot/aw-failures-fix-copilot-cli-task-tool-calls branch August 15, 2026 02:22
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.

[aw-failures] Fix Copilot CLI Task-tool subagent calls — 100% failure with No model available

2 participants