[copilot-cli-research] Copilot CLI Deep Research - 2026-02-20 #17287
Replies: 1 comment
-
|
🤖 Beep boop! The smoke test agent was here! I just rolled through to make sure everything's working. Tests are running, engines are revving, and the CI pipeline is humming along nicely. 🚀 Stay fresh, discussion #17287! ✨
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Analysis Date: 2026-02-20
Repository: github/gh-aw
Scope: 153 total workflow files, 73 using Copilot engine (47.7%)
Triggered by:
@pelikhanWorkflow Run: §22241412824
📊 Executive Summary
This analysis compared all available Copilot CLI features (CLI flags, engine configuration options, MCP capabilities, sandboxing, agent files) against actual usage across 73 Copilot-engine workflows in this repository.
Key Findings:
engine.envis completely unused (0 workflows) despite being a documented, powerful feature.github/agents/are never referenced by any workflowsafe-inputsis nearly unused (only 1 workflow) despite being a key security featuregrumpy-reviewerandcontribution-checkeragent files exist but are never used viaengine.agent:- they could unlock more consistent, specialized behavior across review workflows--shareflag,--disable-builtin-mcps,cache-memory, andsafe-outputsare used appropriatelyPrimary Recommendation: Enable
engine.agentfor review workflows (grumpy-reviewer, contribution-checker) and start usingengine.envfor secrets/config that are currently hardcoded or entirely missing.🔴 Critical Findings
High Priority Issues
1.
engine.env— Completely Unused (0 workflows)The
engine.envfield allows passing custom environment variables to the Copilot CLI engine. It is documented and fully supported, but zero workflows use it. This means any workflow needing custom environment configuration has no clean way to provide it without resorting toargs:.2. 7/10 Agent Files (70%) Are Orphaned
The following agent files exist in
.github/agents/but are never referenced by any workflow viaengine.agent::agentic-workflows.agent.mdcontribution-checker.agent.mdcreate-safe-output-type.agent.mdcustom-engine-implementation.agent.mdgrumpy-reviewer.agent.mdinteractive-agent-designer.agent.mdw3c-specification-writer.agent.mdOnly
technical-doc-writer(2 workflows) andci-cleaner(1 workflow) are actively used. Thegrumpy-revieweragent file in particular is well-crafted but thegrumpy-reviewer.mdworkflow does not reference it viaengine.agent:— it includes the persona inline in the prompt instead.3.
safe-inputsNear-Zero Adoptionsafe-inputsis only used by 1 workflow (security-review.md), despite being designed to allow structured, secure user input to agent workflows. Any workflow triggered by a slash command with user input could benefit from safe-inputs for input sanitization.Medium Priority Opportunities
4.
engine.argsBarely Used (1 workflow)Only
unbloat-docs.mdusesengine.args. This feature allows injecting custom CLI arguments before the--promptflag, which is useful for advanced use cases. Notably,--add-dirfor custom directories,--verbose, or special flags for debugging are all accessible but unused.5. Model Selection Gap for Complex Workflows
Only 8 workflows specify an explicit model — most use
gpt-5.1-codex-mini(cost optimization). High-complexity workflows likedaily-repo-chronicle.md(45-min timeout),org-health-report.md(60-min timeout), andpr-triage-agent.md(30-min timeout) do not specify a model. These could benefit from explicitly selecting a more capable model.6. Network Config Without AWF Sandbox
66 workflows have a
network:section but only 13 use the AWF sandbox (sandbox.agent: awf). Thenetwork:config is respected only when the sandbox is enabled — otherwise it has no enforcement effect. These workflows may believe they have network restrictions that aren't actually enforced.1️⃣ Copilot CLI Capabilities Inventory
View Full Capabilities Inventory
CLI Flags (auto-injected by gh-aw compiler)
--add-dir/tmp/gh-aw/,$GITHUB_WORKSPACE, cache dirs--disable-builtin-mcps--log-level all --log-dir--share (path)--allow-tooltools:config--modelengine.model:orGH_AW_MODEL_AGENT_COPILOTvar--agentengine.agent:— mostly unused for agent files--prompt--allow-all-toolsbash: ["*"]--allow-all-pathsedit:tool enabledEngine Configuration Options
engine.modelengine.versionengine.argsunbloat-docs.mdengine.agenttechnical-doc-writer,ci-cleanerengine.commandengine.envmax-turnsSandbox & Security Features
sandbox.agent: awfnetwork.allowedsafe-outputssafe-inputssecurity-review.mdonlylockdownmodeTool Usage
github:cache-memory:playwright:web-fetch:web-search:agentic-workflows:Available Copilot Engine Capabilities
gpt-5.1-codex-mini2️⃣ Feature Usage Matrix
3️⃣ Missed Opportunities
View High Priority Opportunities
🔴 Opportunity 1: Use
engine.envfor Environment ConfigurationWhat: The
engine.envfield allows passing custom environment variables to the Copilot CLI at execution time. It is fully supported but never used.Why It Matters: Some workflows may need to configure behavior via environment variables (custom API endpoints, feature flags, debug settings). Currently there's no clean way to do this.
Where: Any workflow needing environment-specific configuration.
How to Implement:
Expected Benefits: Cleaner configuration management without needing to embed values in args or prompts.
🔴 Opportunity 2: Use Agent Files for Specialized Roles
What: 7 of 10 agent files in
.github/agents/are never used by any workflow. Specifically,grumpy-reviewer.agent.md,contribution-checker.agent.md, andinteractive-agent-designer.agent.mddefine rich personas that could be leveraged.Why It Matters: Agent files provide consistent, reusable system prompts and tool configurations. The
grumpy-reviewer.mdworkflow defines its persona inline in the prompt rather than using the pre-builtgrumpy-reviewer.agent.mdfile, leading to duplication.Where:
grumpy-reviewer.md→ should referenceagent: grumpy-reviewerpr-nitpick-reviewer.md→ could use a reviewer agent filecontribution-check.md→ should referenceagent: contribution-checkerHow to Implement:
Expected Benefits: DRY principle for agent personas, consistent behavior, easier updates to reviewer personality without modifying each workflow.
🔴 Opportunity 3: Network Config Enforcement Gap
What: 66 workflows have
network:configuration but only 13 havesandbox.agent: awfenabled. The network config (allowed domains, etc.) is only enforced when the AWF sandbox is active.Why It Matters: Security teams reviewing these workflows may believe network restrictions are enforced when they're not. This is a security posture clarity issue.
Where: Most workflows with
network:section that lacksandbox: agent: awfHow to Implement:
sandbox: agent: awfto enforce restrictionsnetwork:sections that serve no purpose without AWFView Medium Priority Opportunities
🟡 Opportunity 4: Model Selection for High-Complexity Workflows
What: Workflows with long timeouts (30-60 minutes) don't specify a model. They rely on the default or the
GH_AW_MODEL_AGENT_COPILOTvariable.Where:
daily-repo-chronicle.md(45min),org-health-report.md(60min),ci-coach.md(30min),pr-triage-agent.md(30min),delight.md(30min),workflow-health-manager.md(30min)How to Implement:
Expected Benefits: Better results for complex tasks, predictable behavior regardless of env variable settings.
🟡 Opportunity 5: Expand
safe-inputsAdoptionWhat:
safe-inputsis a security feature for sanitizing user input in slash-command workflows. Onlysecurity-review.mduses it despite many workflows accepting user input via slash commands.Where: All slash-command workflows that incorporate user input into agent prompts:
grumpy-reviewer.mdpr-nitpick-reviewer.mddev.mdq.mdrefiner.mdHow to Implement:
Expected Benefits: Protection against prompt injection via user input in slash commands.
🟡 Opportunity 6:
engine.argsfor Debugging & PerformanceWhat: Custom CLI arguments via
engine.argscan unlock debugging capabilities or optimize performance in specific scenarios.Where: Workflows experiencing token limit issues or needing special behavior.
How to Implement:
Expected Benefits: Easier debugging, more control over Copilot CLI behavior.
🟡 Opportunity 7:
safe-inputsfor GitHub Toolset ScopingWhat: Several workflows use
github:without specifyingtoolsets:. This gives the agent access to all GitHub MCP tools rather than just the ones it needs.Where:
smoke-copilot.mdusesgithub:with no toolsets.copilot-pr-merged-report.mdis configured withgithub: false(correct!) but some others may over-provision.How to Implement:
Expected Benefits: Principle of least privilege, faster tool discovery, reduced risk of unintended mutations.
View Low Priority Opportunities
🟢 Opportunity 8: Version Pinning for Stability
What: No production workflows pin the Copilot CLI version. All use the default (
0.0.412currently). Pinning would provide reproducibility.Where: Critical production workflows.
How to Implement:
Tradeoff: Version pinning requires maintenance but provides stability. The current approach auto-updates with each gh-aw release which may be preferable.
4️⃣ Specific Workflow Recommendations
View Workflow-Specific Recommendations
grumpy-reviewer.mdengine.agent: grumpy-reviewerto use the pre-built agent filepr-nitpick-reviewer.mdnitpick-reviewer.agent.mdor use existing reviewer agentscontribution-check.mdcontribution-checker.agent.mdfileengine.agent: contribution-checkersmoke-copilot.mdgithub:tool with no toolsets restrictiontoolsets: [default]or specific toolsets neededdaily-repo-chronicle.md/org-health-report.mdWorkflows with
network:but no AWF (60+ workflows)5️⃣ Historical Trends
View Historical Analysis
This is the first comprehensive Copilot CLI usage analysis for this repository. No previous analysis exists in repo-memory to compare against.
Observations from code history (CHANGELOG):
--shareflag was recently added and is now automatically injected ✅.jsonl) are now copied to logs before redaction ✅--block-domains) was recently added--disable-builtin-mcpsflag is always added to prevent user MCP config interference ✅Evolution trend: The tooling is mature and the compiler handles most Copilot CLI complexity automatically. The remaining gaps are primarily in user-facing configuration (agent files, engine.env, safe-inputs).
Future runs will track:
engine.envstarts seeing usagesafe-inputsadoption increases across slash-command workflows6️⃣ Best Practice Guidelines
Based on this research, here are recommended best practices for Copilot workflows:
Specify GitHub toolsets explicitly: Always use
toolsets: [...]with the minimum required set rather than leaving it open. Most workflows do this well already.Use agent files for personas: If a workflow has a specialized persona (reviewer, doc writer, analyzer), define it as an agent file and reference it via
engine.agent:rather than embedding it inline.Add
safe-inputsto slash-command workflows: Any workflow that accepts user input via slash commands should usesafe-inputsto sanitize input before it reaches the prompt.Network config requires AWF to be enforced: Don't add
network:sections unless also enablingsandbox.agent: awf. The network configuration has no effect without the sandbox.Use
engine.envfor configuration: Instead of embedding environment-specific values in args or prompts, useengine.envfor clean, auditable configuration.Set explicit models for complex tasks: Long-running workflows (>20 minutes) should specify a model explicitly rather than relying on the default or environment variables.
7️⃣ Action Items
Immediate Actions (this week):
grumpy-reviewer.mdto useengine.agent: grumpy-reviewerinstead of inline personacontribution-check.mdto useengine.agent: contribution-checkernetwork:but no AWF — add comments or remove dead configShort-term (this month):
safe-inputsto top 5 most-used slash-command workflows (q.md,refiner.md,grumpy-reviewer.md,dev.md,pr-nitpick-reviewer.md)engine.envas a reference exampletoolsets:tosmoke-copilot.mdLong-term (this quarter):
max-turnssupport for Copilot should be added (currentlysupportsMaxTurns: false)View Supporting Evidence & Methodology
Research Methodology
Data Collection:
.github/workflows/copilot_engine.go,copilot_engine_execution.go,copilot_engine_tools.go,copilot_mcp.go,copilot_installer.go,copilot_participant_steps.go.github/agents/directory (10 agent files)docs/src/content/docs/reference/engines.mdpkg/constants/constants.gofor version and model constantsCHANGELOG.mdfor recent Copilot feature additionsKey Statistics:
engine: copilotengine:\n id: ...)engine.envusagessafe-inputsusageTools Used:
grep,find, file inspection of Go source codeReferences
docs/src/content/docs/reference/engines.mdpkg/workflow/copilot_engine*.go.github/agents/*.agent.mdReferences:
Beta Was this translation helpful? Give feedback.
All reactions