feat: add --no-ask-user flag to copilot agentic engine for fully autonomous runs#25686
feat: add --no-ask-user flag to copilot agentic engine for fully autonomous runs#25686
Conversation
…nomous runs (#25637) Agent-Logs-Url: https://github.com/github/gh-aw/sessions/ee6055c0-4615-4f4a-b2b9-3833c51eb8b2 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main, fix conflicts recompile |
There was a problem hiding this comment.
Pull request overview
Adds version-gated support for running Copilot CLI fully autonomously by emitting --no-ask-user for agent runs (when supported), and propagates the new flag through recompiled workflow lock files.
Changes:
- Add
CopilotNoAskUserMinVersionconstant to document the minimum Copilot CLI version supporting--no-ask-user. - Update Copilot engine execution step generation to append
--no-ask-userfor agent jobs when the configured Copilot CLI version supports it. - Recompile workflow lock files to include
--no-ask-userin the generated Copilot invocation.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/copilot_engine_execution.go | Adds --no-ask-user emission and a version-gate helper for Copilot CLI support. |
| pkg/constants/version_constants.go | Introduces CopilotNoAskUserMinVersion for version gating documentation. |
| .github/workflows/workflow-skill-extractor.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/workflow-normalizer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/workflow-health-manager.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/workflow-generator.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/weekly-safe-outputs-spec-review.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/weekly-issue-summary.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/weekly-editors-health-check.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/weekly-blog-post-writer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/video-analyzer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/update-astro.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/tidy.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/test-quality-sentinel.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/test-project-url-default.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/test-dispatcher.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/terminal-stylist.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/technical-doc-writer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/super-linter.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/sub-issue-closer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/stale-repo-identifier.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-workflow-call.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-workflow-call-with-inputs.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-update-cross-repo-pr.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-test-tools.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-temporary-id.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-service-ports.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-project.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-create-cross-repo-pr.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-copilot.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/smoke-copilot-arm.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/security-review.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/security-compliance.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/research.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/repository-quality-improver.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/repo-tree-map.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/repo-audit-analyzer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/release.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/refiner.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/refactoring-cadence.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/q.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/python-data-charts.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/pr-triage-agent.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/pr-nitpick-reviewer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/portfolio-analyst.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/poem-bot.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/plan.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/pdf-summary.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/org-health-report.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/notion-issue-summary.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/mcp-inspector.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/jsweep.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/issue-triage-agent.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/issue-monster.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/gpclean.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/glossary-maintainer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/functional-pragmatist.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/firewall-escape.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/draft-pr-cleanup.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/docs-noob-tester.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/discussion-task-miner.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/dictation-prompt.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/dev.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/dev-hawk.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/dependabot-go-checker.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/dependabot-burner.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/dead-code-remover.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-workflow-updater.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-team-status.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-semgrep-scan.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-secrets-analysis.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-repo-chronicle.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-regulatory.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-performance-summary.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-news.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-issues-report.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-integrity-analysis.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-firewall-report.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-cli-performance.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-assign-issue-to-user.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/daily-architecture-diagram.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/craft.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/copilot-token-optimizer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/copilot-token-audit.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/copilot-pr-merged-report.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/copilot-cli-deep-research.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/contribution-check.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/constraint-solving-potd.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/code-simplifier.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/code-scanning-fixer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/cli-consistency-checker.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/ci-coach.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/breaking-change-checker.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/brave.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/bot-detection.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/auto-triage-issues.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/artifacts-summary.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/architecture-guardian.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/archie.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/agentic-observability-kit.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/agent-persona-explorer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .github/workflows/agent-performance-analyzer.lock.yml | Regenerated lock workflow to include --no-ask-user in Copilot CLI args. |
| .changeset/patch-add-copilot-no-ask-user-flag.md | Adds a patch changeset describing the new --no-ask-user behavior and version gate. |
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: 1
| // Add --no-ask-user to enable fully autonomous agentic runs (suppresses interactive prompts). | ||
| // 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) { | ||
| copilotExecLog.Print("Adding --no-ask-user for fully autonomous agentic run") | ||
| copilotArgs = append(copilotArgs, "--no-ask-user") | ||
| } |
There was a problem hiding this comment.
isDetectionJob is currently inferred from workflowData.SafeOutputs == nil, but SafeOutputs can be nil simply when the workflow has no safe-outputs configuration (i.e., a normal agent run). That would incorrectly suppress --no-ask-user (and also affects other logic in this function that branches on isDetectionJob, like model env var selection and autopilot flags).
Consider keying detection behavior off the explicit WorkflowData.IsDetectionRun flag instead (or otherwise distinguishing detection runs from “no safe-outputs configured”).
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b8dc1fa1-d30a-400c-ae24-ba4b11108310 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 518f03b. Merged origin/main, resolved the one conflict in 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:
|
Summary
Reapplies #25637.
Updates the Copilot agentic engine to emit
--no-ask-userwhen invoking the Copilot CLI, enabling fully autonomous agentic runs by suppressing interactive user prompts.Changes
pkg/constants/version_constants.go: AddedCopilotNoAskUserMinVersion = "1.0.19"constant documenting the minimum Copilot CLI version that supports the flag.pkg/workflow/copilot_engine_execution.go:copilotSupportsNoAskUser(engineConfig *EngineConfig) boolhelper following the same version-gate pattern asawfSupportsExcludeEnvandawfSupportsCliProxyGetExecutionSteps, emits--no-ask-userfor agent jobs when the Copilot CLI version supports itpkg/workflow/copilot_engine_test.go: AddedTestCopilotEngineNoAskUserandTestCopilotSupportsNoAskUserwith comprehensive coverage187 lock files recompiled to include the new flag
Version-gate logic
--no-ask-useremitted?1.0.20)latest>= 1.0.19< 1.0.19Changeset
--no-ask-userfor Copilot agent jobs when the configured Copilot CLI version supports it (>= 1.0.19), keeping conservative behavior for unsupported or non-semver versions.