Remove cli-proxy-writable feature flag and add read-only gh CLI prompt for cli-proxy#25013
Remove cli-proxy-writable feature flag and add read-only gh CLI prompt for cli-proxy#25013
cli-proxy-writable feature flag and add read-only gh CLI prompt for cli-proxy#25013Conversation
…only Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1dd22cfc-aa5d-4843-9516-c881f8818dfe Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
cli-proxy-writable feature flag — agent gh CLI is read-only
|
@copilot when cli-proxy is enabled the agent will need a special prompt telling it to use the gh cli for github read operations and safeoutputs for github write operations. the github mcp server should also not be configured/registered with the gateway, and the agent prompt should not mention the github mcp server. |
There was a problem hiding this comment.
Pull request overview
Removes the deprecated cli-proxy-writable feature flag to ensure the agent’s gh CLI proxy remains read-only, with write operations routed through the safe-outputs / GitHub MCP path.
Changes:
- Removed the
CliProxyWritableFeatureFlagconstant and all remaining references. - Stopped injecting
--cli-proxy-writableinto the AWF firewall command args. - Updated tests and the changeset to reflect the read-only
cli-proxybehavior.
Show a summary per file
| File | Description |
|---|---|
pkg/constants/feature_constants.go |
Drops the CliProxyWritableFeatureFlag identifier and its documentation block. |
pkg/workflow/awf_helpers.go |
Removes --cli-proxy-writable injection logic from BuildAWFArgs. |
pkg/workflow/awf_helpers_test.go |
Removes writable-flag test cases and related assertions. |
.changeset/minor-add-cli-proxy-feature-flag.md |
Updates release note text to describe read-only cli-proxy behavior. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 0
…bled Agent-Logs-Url: https://github.com/github/gh-aw/sessions/8f40a5c6-a9d3-4271-bd96-a06d5ed34614 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Done in commit fde73c3. When
|
cli-proxy-writable feature flag — agent gh CLI is read-onlycli-proxy-writable feature flag and add read-only gh CLI prompt for cli-proxy
The
cli-proxy-writablefeature flag (introduced alongsidecli-proxy) enabled write operations via the gh CLI proxy sidecar. Decision: the agent's gh CLI should be read-only; write operations must go through the safe-outputs / GitHub MCP path which has proper guard policies and audit logging.Additionally, when
cli-proxyis enabled the compiler now injects a special prompt directing the agent to useghCLI for GitHub reads (and safeoutputs for writes when safe-outputs is also configured), and the GitHub MCP server is not registered with the gateway.Changes
pkg/constants/feature_constants.go— RemoveCliProxyWritableFeatureFlagconstantpkg/workflow/awf_helpers.go— Remove--cli-proxy-writableinjection blockpkg/workflow/awf_helpers_test.go— Remove two test cases (cli-proxy-writableenabled,cli-proxy-writablewithoutcli-proxy) and clean up remaining--cli-proxy-writableassertions.changeset/minor-add-cli-proxy-feature-flag.md— Update description to reflect read-only-onlycli-proxyflagactions/setup/md/cli_proxy_prompt.md— New prompt instructing the agent to use pre-authenticatedghCLI for GitHub reads; no GitHub MCP server availableactions/setup/md/cli_proxy_with_safeoutputs_prompt.md— Same as above, plus directs the agent to use safeoutputs for GitHub writespkg/workflow/prompt_constants.go— Add constants for the two new prompt filespkg/workflow/unified_prompt_step.go— Whencli-proxyis enabled, inject the cli-proxy prompt instead of the GitHub MCP tools prompt (always injected when the flag is set, regardless of whethertools.githubis configured)pkg/workflow/mcp_setup_generator.go— Skip registering the GitHub MCP server with the gateway whencli-proxyis enabledpkg/workflow/unified_prompt_step_test.go— AddTestCollectPromptSections_CliProxycovering all four prompt-selection scenarios