Ask GitHub Copilot (new session)
copilot_askGet coding assistance by submitting prompts to GitHub Copilot in a fresh session, with optional model and workspace settings.
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`, e.g. "gpt-5.3-codex"); omit to use your account's default. An unavailable model errors immediately. | |
| 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 |