Answer: Scripts run with these app-provided environment variables: COPILOT_WORKSPACE_NAME, COPILOT_WORKSPACE_PATH, COPILOT_ROOT_PATH, COPILOT_DEFAULT_BRANCH, COPILOT_PORT, COPILOT_SCRIPT_TRIGGER, GH_TOKEN, GH_HOST, and COPILOT_GH_ACCOUNT_* (host- and account-specific tokens for every signed-in account). Status: Confirmed Entry: tool/github-copilot/settings/script-runtime-env-vars Revision: 3 Digest: sha256:3612f14e2d93fc16 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:32:34Z Last changed: 2026-11-18T13:10:37Z (GitHub token and host variables: — → GH_TOKEN) Last verified: 2026-11-20T13:14:18Z Next check: 2026-11-21T13:14:18Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Workspace name variable | COPILOT_WORKSPACE_ NAME | [1] | 2026-11-20 Workspace path variable | COPILOT_WORKSPACE_ PATH | [1] | 2026-11-20 Root path variable | COPILOT_ROOT_PATH | [1] | 2026-11-20 Default branch variable | COPILOT_DEFAULT_ BRANCH | [1] | 2026-11-20 Port variable | COPILOT_PORT | [1] | 2026-11-20 Script trigger variable | COPILOT_SCRIPT_ TRIGGER | [1] | 2026-11-20 GitHub token and host variables | GH_TOKEN | [1] | 2026-11-20 Account-specific token variable | COPILOT_GH_ACCOUNT_ * | [1] | 2026-11-20 Sources: [1] GitHub. "Repository configuration for the GitHub Copilot app - GitHub Docs". https://docs.github.com/en/copilot/reference/github-copilot-app-reference/repository-configuration Role: primary. Accessed: 2026-11-20T13:14:18Z Quote: "COPILOT_WORKSPACE_ NAME Current workspace name." (Supports: Workspace name variable) Quote: "COPILOT_WORKSPACE_ PATH Absolute path to the workspace." (Supports: Workspace path variable) Quote: "COPILOT_ROOT_PATH Absolute path to the repository root checkout." (Supports: Root path variable) Quote: "COPILOT_DEFAULT_ BRANCH Repository default branch." (Supports: Default branch variable) Quote: "COPILOT_PORT App WebSocket port for the current workspace context." (Supports: Port variable) Quote: "COPILOT_SCRIPT_ TRIGGER Trigger that launched the script (only set for triggered scripts)." (Supports: Script trigger variable) Quote: "GH_TOKEN Token for the selected GitHub account. GH_HOST Host for the selected GitHub account." (Supports: GitHub token and host variables) Quote: "COPILOT_GH_ACCOUNT_ * Host- and account-specific tokens for every signed-in account, including the selected account." (Supports: Account-specific token variable) Snapshot SHA-256: 96d656fbd9c9339896b2a810d1753504a00b5f117fc8fd911c1dde8d308de868 (captured 2026-11-18T13:10:35Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:10:37Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:14:18Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:14:18Z Last attempt: 2026-11-20T13:14:18Z Notes and limitations: Extracted automatically from a single official source (section "Runtime environment variables for scripts"). Related: https://latestn.com/tool/github-copilot/settings/sdk-configure-runtime-auth How do I configure the runtime for server-to-server authentication in the GitHub Copilot SDK? https://latestn.com/tool/github-copilot/settings/sdk-customization-file-formats-precedence What file formats does the GitHub Copilot SDK support for customizations and which takes precedence? https://latestn.com/tool/github-copilot/settings/sdk-customization-inputs How do I pass customization locations to the GitHub Copilot SDK? https://latestn.com/tool/github-copilot/settings/restart-and-unchangeable-settings Which GitHub Copilot CLI settings require a restart or can't be changed from the command line? https://latestn.com/tool/github-copilot/settings/reuse-existing-mcp-configs How do I reuse existing MCP configurations in GitHub Copilot Chat? https://latestn.com/tool/github-copilot/settings/safely-delete-config-files Which files in the GitHub Copilot CLI configuration directory can I safely delete? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:10:37Z | changed | GitHub token and host variables: — → GH_TOKEN | [1] 2026-11-18T13:10:37Z | changed | GitHub token variable: GH_TOKEN → — | [1] 2026-11-16T12:58:42Z | changed | Account-specific token variable: — → COPILOT_GH_ACCOUNT_ * | [1] 2026-11-16T12:58:42Z | changed | GitHub host variable: GH_HOST → — | [1] 2026-11-13T03:32:34Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/settings/script-runtime-env-vars/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/settings/script-runtime-env-vars POST: https://latestn.com/dispute/tool/github-copilot/settings/script-runtime-env-vars with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/settings/script-runtime-env-vars?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What runtime environment variables are available for scripts in the GitHub Copilot app? Revision 3, last verified 2026-11-20T13:14:18Z. https://latestn.com/tool/github-copilot/settings/script-runtime-env-vars (accessed 2026-11-21T09:50:36Z). @misc{LatestN_tool_github_copilot_settings_script_runtime_env_vars_r3, title = {What runtime environment variables are available for scripts in the GitHub Copilot app?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/settings/script-runtime-env-vars}}, note = {Revision 3; digest sha256:3612f14e2d93fc16; last verified 2026-11-20T13:14:18Z; accessed 2026-11-21T09:50:36Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/settings/script-runtime-env-vars