Let Copilot use tools during a non-interactive run.

Section: Programmatic mode basics

Run a prompt with automatic tools

bash
bash
copilot --allow-all-tools -p "Run the test suite, inspect the failures, and propose the minimal patch."
Explanation

Programmatic mode often needs explicit tool permissions to be fully useful.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Programmatic mode basics
Capture output in a script
Store Copilot output in a shell variable.
OpenIn sheetbashsame section
Pipe prompt text and redirect the answer
Generate output for downstream steps.
OpenIn sheetbashsame section
Export a session transcript after a run
Save the output session to Markdown.
OpenIn sheetbashsame section
Share programmatic output to a secret gist
Publish the transcript as a gist.
OpenIn sheetbashsame section
Analyze a file from CI
Use a one-off prompt to inspect generated artifacts or source files.
OpenIn sheetbashsame section
Describe large files in a shell loop
Use Copilot inside a `while` loop.
OpenIn sheetbash2 tag match