Answer: Agents secrets and variables are automatically available to Copilot cloud agent and exposed as environment variables in its development environment, except secrets and variables prefixed with COPILOT_MCP_, which are only available to MCP servers. Agents variables are available only when Copilot runs on GitHub Actions. Status: Confirmed Entry: tool/github-copilot/agents-and-automation/use-secrets-variables Revision: 3 Digest: sha256:51da6e8b6c046387 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:26:41Z Last changed: 2026-11-18T13:01:14Z (Inaccessible secret types: — → GitHub Actions, Codespaces, or Dependabot secrets and variables) Last verified: 2026-11-20T13:06:23Z Next check: 2026-11-21T13:06:23Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Availability | automatically available to Copilot cloud agent | [1] | 2026-11-20 Exposure method | environment variables | [1] | 2026-11-20 MCP prefix exception | COPILOT_MCP_ | [1] | 2026-11-20 Variables availability | only when Copilot runs on GitHub Actions | [1] | 2026-11-20 Secret masking | masked in Copilot cloud agent session logs | [1] | 2026-11-20 Inaccessible secret types | GitHub Actions, Codespaces, or Dependabot secrets and variables | [1] | 2026-11-20 Sources: [1] GitHub. "Configure secrets and variables for Copilot cloud agent - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/configure-secrets-and-variables Role: primary. Accessed: 2026-11-20T13:06:23Z Quote: "Agents secrets and variables are automatically available to Copilot cloud agent when it works on a task in the repository." (Supports: Availability) Quote: "They are exposed to the agent as environment variables in its development environment" (Supports: Exposure method) Quote: "Secrets and variables prefixed with COPILOT_MCP_ are the exception: they're only available to MCP servers." (Supports: MCP prefix exception) Quote: "Agents variables are available only when Copilot runs on GitHub Actions." (Supports: Variables availability) Quote: "Secret values are masked in Copilot cloud agent session logs." (Supports: Secret masking) Quote: "Copilot cloud agent does not have access to GitHub Actions, Codespaces, or Dependabot secrets and variables." (Supports: Inaccessible secret types) Snapshot SHA-256: 463153db966c6aa7fd943b95202c8ef74173795b7158fb0ae5a86d1348613b5f (captured 2026-11-18T13:01:10Z) 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:01:14Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:06:23Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:06:23Z Last attempt: 2026-11-20T13:06:23Z Notes and limitations: Extracted automatically from a single official source (section "Using secrets and variables"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/use-skills-cli How do I use skills in GitHub Copilot CLI? https://latestn.com/tool/github-copilot/agents-and-automation/user-prompt-hook-best-practices What are the best practices for using the GitHub Copilot SDK user prompt submitted hook? https://latestn.com/tool/github-copilot/agents-and-automation/user-prompt-hook-signature What input and output does the GitHub Copilot SDK user prompt submitted hook receive and return? https://latestn.com/tool/github-copilot/agents-and-automation/use-implementation-planner-agent How do I use the Implementation planner custom agent in GitHub Copilot? https://latestn.com/tool/github-copilot/agents-and-automation/use-plan-mode-in-ide How do I use plan mode in GitHub Copilot in my IDE? https://latestn.com/tool/github-copilot/agents-and-automation/use-plan-mode-in-ide-2 How do I use plan mode with GitHub Copilot in my IDE? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:01:14Z | changed | Inaccessible secret types: — → GitHub Actions, Codespaces, or Dependabot secrets and variables | [1] 2026-11-18T13:01:14Z | changed | Excluded secret types: Copilot cloud agent does not have access to GitHub Actions, Codespaces, or Dependabot secrets and variables. → — | [1] 2026-11-18T13:01:14Z | changed | Secret masking: Secret values are masked in Copilot cloud agent session logs. → masked in Copilot cloud agent session logs | [1] 2026-11-18T13:01:14Z | changed | Variables availability: Agents variables are available only when Copilot runs on GitHub Actions. → only when Copilot runs on GitHub Actions | [1] 2026-11-18T13:01:14Z | changed | Availability: Agents secrets and variables are automatically available to Copilot cloud agent → automatically available to Copilot cloud agent | [1] 2026-11-16T12:50:10Z | changed | Excluded secret types: — → Copilot cloud agent does not have access to GitHub Actions, Codespaces, or Dependabot secrets and variables. | [1] 2026-11-16T12:50:10Z | changed | Variables availability: — → Agents variables are available only when Copilot runs on GitHub Actions. | [1] 2026-11-16T12:50:10Z | changed | Excluded sources: Copilot cloud agent does not have access to GitHub Actions, Codespaces, or Dependabot secrets and variables → — | [1] 2026-11-16T12:50:10Z | changed | Secret masking: Secret values are masked in Copilot cloud agent session logs → Secret values are masked in Copilot cloud agent session logs. | [1] 2026-11-16T12:50:10Z | changed | Variables condition: Agents variables are available only when Copilot runs on GitHub Actions → — | [1] 2026-11-16T12:50:10Z | changed | Exposure method: exposed to the agent as environment variables in its development environment → environment variables | [1] 2026-11-13T03:26:41Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/use-secrets-variables/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/agents-and-automation/use-secrets-variables POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/use-secrets-variables with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/use-secrets-variables?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I use secrets and variables in GitHub Copilot cloud agent? Revision 3, last verified 2026-11-20T13:06:23Z. https://latestn.com/tool/github-copilot/agents-and-automation/use-secrets-variables (accessed 2026-11-21T09:57:00Z). @misc{LatestN_tool_github_copilot_agents_and_automation_use_secrets_variables_r3, title = {How do I use secrets and variables in GitHub Copilot cloud agent?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/use-secrets-variables}}, note = {Revision 3; digest sha256:51da6e8b6c046387; last verified 2026-11-20T13:06:23Z; accessed 2026-11-21T09:57:00Z} } 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/agents-and-automation/use-secrets-variables