Ask GitHub Copilot (new session)
copilot_askSubmit a coding question or task to GitHub Copilot CLI in a new session. Returns the agent's final response, using workspace context for relevant answers.
Instructions
Ask the GitHub Copilot CLI (copilot -p) a question or task in a NEW session.
Uses your existing Copilot login (OS credential store, or a
COPILOT_GITHUB_TOKEN/GH_TOKEN/GITHUB_TOKEN env var — see copilot_status).
Returns the agent's final message, read straight from stdout (the CLI's -s
silent mode; no scraping). Copilot is a capable agentic coder — good for real
code/repo work; point workspace at a project dir for context-aware answers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model override (`--model`). Use "auto" to let Copilot pick. Which ids work is ACCOUNT-DEPENDENT and copilot exposes no non-interactive list, so the bridge cannot validate this the way the agy/cursor tools do — an unavailable id errors immediately with copilot's own message, costing a call. Prefer omitting it (your account default) or "auto" unless you know your plan's ids. | |
| watch | No | If true, open a live "watch" view streaming copilot's steps from its `--output-format json` event stream. Same final text is returned. Best-effort. Default false. | |
| prompt | Yes | Question or instruction for Copilot. | |
| sandbox | No | Permission policy (maps to copilot's tool/path flags): "read-only" (default — best-effort: denies the local write/shell tools; NOT an OS sandbox, so unlike codex it is not a hard boundary), "workspace-write" (may edit files, confined to the workspace), or "danger-full-access" (--allow-all — avoid). | read-only |
| timeout_s | No | Max seconds to wait for copilot to complete. Default 180. (Copilot's reasoning models can be slow; raise this if needed.) | |
| workspace | No | Working root for the session (`-C`). Defaults to the server cwd. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |