Skip to content

feat(prompt): add GitHub Copilot CLI agent support#16

Open
anxkhn wants to merge 1 commit into
devflowinc:mainfrom
anxkhn:feat/copilot-agent
Open

feat(prompt): add GitHub Copilot CLI agent support#16
anxkhn wants to merge 1 commit into
devflowinc:mainfrom
anxkhn:feat/copilot-agent

Conversation

@anxkhn

@anxkhn anxkhn commented Jun 29, 2026

Copy link
Copy Markdown

What

Adds first-class support for the GitHub Copilot CLI (copilot) as an agent, alongside the existing claude, codex, and aider agents.

Run it like any other agent:

uzi prompt --agents=copilot:3 "Add input validation to the signup form"
COPILOT_MODEL=claude-sonnet-4.5 uzi prompt --agents=copilot:1 "Fix the failing tests"

Why

Plain copilot "<prompt>" opens an interactive session and stops on tool and folder-trust prompts, which hangs in an unattended worktree. Copilot ships a print mode designed for exactly this, so the agent should be wired to use it.

How

  • cmd/prompt/prompt.go: new buildAgentCommand helper. For copilot it builds copilot -s --allow-all-tools --no-ask-user -p (the prompt is still appended by the existing send-keys template), so it runs one prompt, auto-approves tools, never calls ask_user, and exits. Optional model passthrough via COPILOT_MODEL. All other agents pass through unchanged.
  • cmd/watch/auto.go: Copilot's folder-trust dialog uses the same "Do you trust the files in this folder?" wording already handled, plus its panel title "Confirm folder trust" as a safeguard, so uzi auto keeps it hands-free.
  • cmd/prompt/prompt_test.go: tests for the command builder, model passthrough, and agent parsing.
  • README.md: documents the new agent and COPILOT_MODEL.

Verification

  • go build ./..., go vet ./..., go test ./... all pass.
  • Smoke tested end to end: uzi prompt --agents=copilot:1 spawned a worktree, ran real copilot, auto-approved, and produced the requested file.

Launch the copilot agent non-interactively with
'copilot -s --allow-all-tools --no-ask-user -p "<prompt>"' so it runs
autonomously without stopping for tool or trust prompts. Optional model
selection is passed through via the COPILOT_MODEL env var. The auto
watcher also recognizes Copilot's folder-trust panel. Adds tests for the
command builder and documents usage.
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.

1 participant