feat: add --no-ask-user flag to copilot agentic engine for fully autonomous runs#25772
feat: add --no-ask-user flag to copilot agentic engine for fully autonomous runs#25772
Conversation
…nomous runs Agent-Logs-Url: https://github.com/github/gh-aw/sessions/106f8690-2e66-433a-a5a4-86d59f435e08 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| // Only emit for agent jobs (not detection jobs) and only when the Copilot CLI version | ||
| // supports it (v1.0.19+). Latest and unspecified versions always include the flag. | ||
| isDetectionJob := workflowData.SafeOutputs == nil | ||
| if !isDetectionJob && copilotSupportsNoAskUser(workflowData.EngineConfig) { |
There was a problem hiding this comment.
Pull request overview
Adds support for running Copilot agent jobs fully autonomously by passing --no-ask-user to the Copilot CLI, gated to Copilot CLI versions that support the flag (>= 1.0.19) and excluded from detection jobs.
Changes:
- Introduce
CopilotNoAskUserMinVersion = "1.0.19"and acopilotSupportsNoAskUser()version-gate helper. - Emit
--no-ask-userfor Copilot agent jobs (not detection jobs) when supported by the configured/effective Copilot CLI version. - Regenerate workflow lock files so compiled commands include
--no-ask-userwhere applicable.
Show a summary per file
| File | Description |
|---|---|
| pkg/constants/version_constants.go | Adds the minimum Copilot CLI version constant for --no-ask-user support. |
| pkg/workflow/copilot_engine_execution.go | Adds version-gate helper and conditionally appends --no-ask-user for agent jobs only. |
| .changeset/patch-add-copilot-no-ask-user-flag.md | Changeset documenting the new behavior and version gating. |
| .github/workflows/agent-performance-analyzer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/agent-persona-explorer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/agentic-observability-kit.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/archie.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/architecture-guardian.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/artifacts-summary.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/auto-triage-issues.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/bot-detection.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/brave.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/breaking-change-checker.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/ci-coach.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/cli-consistency-checker.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/code-scanning-fixer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/code-simplifier.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/constraint-solving-potd.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/contribution-check.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/copilot-cli-deep-research.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/copilot-token-audit.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/copilot-token-optimizer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/craft.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-architecture-diagram.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-cli-performance.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-firewall-report.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-integrity-analysis.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-issues-report.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-news.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-performance-summary.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-regulatory.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-repo-chronicle.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-secrets-analysis.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-semgrep-scan.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-team-status.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/daily-workflow-updater.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/dead-code-remover.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/delight.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/dependabot-burner.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/dependabot-go-checker.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/dev-hawk.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/dev.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/dictation-prompt.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/discussion-task-miner.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/docs-noob-tester.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/draft-pr-cleanup.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/firewall-escape.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/functional-pragmatist.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/glossary-maintainer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/gpclean.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/issue-monster.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/issue-triage-agent.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/jsweep.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/mcp-inspector.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/notion-issue-summary.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/org-health-report.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/pdf-summary.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/plan.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/poem-bot.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/portfolio-analyst.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/pr-triage-agent.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/python-data-charts.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/q.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/refactoring-cadence.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/refiner.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/release.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/repo-audit-analyzer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/repo-tree-map.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/repository-quality-improver.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/research.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/security-compliance.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/security-review.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/smoke-copilot-arm.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/smoke-copilot.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation (and keeps detection job free of the flag). |
| .github/workflows/smoke-create-cross-repo-pr.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/smoke-project.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/smoke-service-ports.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/smoke-temporary-id.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/smoke-test-tools.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/smoke-update-cross-repo-pr.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/smoke-workflow-call-with-inputs.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/smoke-workflow-call.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/stale-repo-identifier.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/sub-issue-closer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/super-linter.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/technical-doc-writer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/terminal-stylist.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/test-dispatcher.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/test-project-url-default.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/test-quality-sentinel.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/tidy.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/update-astro.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/video-analyzer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/weekly-blog-post-writer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/weekly-editors-health-check.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/weekly-issue-summary.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/workflow-generator.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/workflow-health-manager.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/workflow-normalizer.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
| .github/workflows/workflow-skill-extractor.lock.yml | Regenerated lock file to include --no-ask-user in the Copilot agent invocation. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 122/122 changed files
- Comments generated: 0
🧪 Test Quality Sentinel ReportTest Quality Score: 90/100✅ Excellent test quality
Test Classification DetailsAll 3 tests analyzed
Flagged Tests — Requires Review
|
Generated by Design Decision Gate workflow for PR #25772. Captures the architectural decision to version-gate the --no-ask-user Copilot CLI flag using the established copilotSupports* helper pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Commit pushed:
|
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (212 new lines in AI has analyzed the PR diff and generated a draft ADR to help you get started: 📄 Draft ADR: The draft captures the core design decision: using a version-gate helper ( What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
There was a problem hiding this comment.
This PR requires an Architecture Decision Record (ADR) before it can merge. The PR adds 212 new lines to pkg/ (core business logic) without a linked ADR documenting the design rationale.
A draft ADR has been generated and committed to your branch at docs/adr/0001-version-gated-no-ask-user-flag-for-autonomous-copilot-runs.md. Please review, complete, and link it in the PR body. See the comment above for instructions.
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/51f217ee-f000-40ee-b45e-b2c05021be2c Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot merge main, recompile |
…from-pr-25686 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Merged main and recompiled all 187 lock files in b408d96. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Reapplies the
--no-ask-userchanges from #25686 onto current HEAD (bare mode changes were already merged separately).Emits
--no-ask-userwhen invoking the Copilot CLI to suppress interactive prompts during both agent and detection jobs, version-gated to CLI ≥ 1.0.19.Changes
pkg/constants/version_constants.go: AddCopilotNoAskUserMinVersion = "1.0.19"pkg/workflow/copilot_engine_execution.go:copilotSupportsNoAskUser()— version-gate helper following the same pattern asawfSupportsExcludeEnv/awfSupportsCliProxy--no-ask-userfor both agent and detection jobs when version supports itisDetectionJobdeclaration earlier to share with both--no-ask-userand--autopilotguardspkg/workflow/copilot_engine_test.go:TestCopilotEngineNoAskUser(8 cases) andTestCopilotSupportsNoAskUser(10 cases)Version-gate logic
--no-ask-useremitted?1.0.21)latest>= 1.0.19< 1.0.19