diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7f448c4dbbd0..f1186dccf38c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ # Update ARG and FROM together from the Node devcontainer image tags: # https://mcr.microsoft.com/en-us/product/devcontainers/javascript-node/tags ARG VARIANT=dev-24-bookworm -FROM mcr.microsoft.com/devcontainers/javascript-node:dev-24-bookworm@sha256:d0445b9546f96869b509aa70b8593bdc0054aca6689bc1dd0324083d0fd2bcc3 +FROM mcr.microsoft.com/devcontainers/javascript-node:dev-24-bookworm@sha256:42a1a7629b5a2c22c759a1de4fbb277c9e600b6fecd66b89583fc36e9453e698 diff --git a/.github/workflows/check-for-spammy-issues.yml b/.github/workflows/check-for-spammy-issues.yml index f5590ce80841..28783db289b8 100644 --- a/.github/workflows/check-for-spammy-issues.yml +++ b/.github/workflows/check-for-spammy-issues.yml @@ -1,10 +1,12 @@ name: Check for Spammy Issues -# Closes low-value public issues so spam does not stay open in github/docs. +# Closes low-value public issues and issues with emoji titles in github/docs. +# GitHub employees, docs-bot, and the skip-spammy-check label are exempt. +# Add skip-spammy-check before reopening an issue whose title still contains emoji. on: issues: - types: [opened] + types: [opened, edited, reopened] permissions: contents: read @@ -13,58 +15,78 @@ jobs: spammy-title-check: name: Remove issues with spammy titles if: github.repository == 'github/docs' + concurrency: + group: ${{ github.workflow }}-spammy-title-${{ github.event.issue.number }} + cancel-in-progress: false runs-on: ubuntu-latest steps: - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 with: github-token: ${{ secrets.DOCS_BOT_PAT_BASE }} script: | + const params = { ...context.repo, issue_number: context.payload.issue.number } - const issue = context.payload.issue - const owner = 'github' - const repo = 'docs' + // Events can predate title edits or an exemption label, so read the current issue. + const { data: issue } = await github.rest.issues.get(params) + if (issue.state !== 'open' || issue.user.login === 'docs-bot') { + return + } + if (issue.labels.some(label => label.name.toLowerCase() === 'skip-spammy-check')) { + core.info('Skipping because the issue has the skip-spammy-check label.') + return + } const titleWordCount = issue.title.trim().split(' ').length const titleWordCountMin = 3 const urlRegex = /https?:\/\/\S+/i const titleHasUrl = urlRegex.test(issue.title) const titleHasDollarSign = issue.title.includes('$') + // Text-default symbols need an emoji selector; plain digits, #, and * need a keycap. + const titleHasEmoji = /\p{Emoji_Presentation}(?!\uFE0E)|\p{Extended_Pictographic}\uFE0F|[#*0-9]\uFE0F?\u20E3/u.test(issue.title) + // Keep the existing non-emoji heuristics limited to newly opened issues. + const hasOtherSpam = context.payload.action === 'opened' && + (titleWordCount < titleWordCountMin || titleHasUrl || titleHasDollarSign) + if (!titleHasEmoji && !hasOtherSpam) { + return + } try { await github.rest.teams.getMembershipForUserInOrg({ org: 'github', team_slug: 'employees', - username: context.payload.sender.login, - }); + username: issue.user.login, + }) // Skip GitHub employees so legitimate internal reports stay open. return } catch (err) { - // The membership lookup throws for non-employees, so fall through to title checks. - if (titleWordCount >= titleWordCountMin && !titleHasUrl && !titleHasDollarSign) { - return + // Only a missing membership means non-employee; other failures must stop moderation. + if (err.status !== 404) { + throw err } } - await github.rest.issues.update({ - owner: owner, - repo: repo, - issue_number: issue.number, + await github.rest.issues.addLabels({ + ...params, labels: ['invalid'], - state: 'closed' - }); + }) + + await github.rest.issues.update({ + ...params, + state: 'closed', + }) await github.rest.issues.createComment({ - owner: owner, - repo: repo, - issue_number: issue.number, - body: `This issue may have been opened accidentally. I'm going to close it now, but feel free to open a new issue with a more descriptive title! Make sure not to include full URLs in your issue titles, and use paths instead.` - }); + ...params, + body: titleHasEmoji + ? 'Closing because the title contains emoji. Please remove the emoji and open a new issue.' + : `This issue may have been opened accidentally. I'm going to close it now, but feel free to open a new issue with a more descriptive title! Make sure not to include full URLs in your issue titles, and use paths instead.`, + }) try { await github.rest.projects.createCard({ column_id: 11167427, - content_id: context.payload.issue.id, + content_id: issue.id, content_type: "Issue" }); } catch (error) { diff --git a/.github/workflows/check-for-spammy-prs.yml b/.github/workflows/check-for-spammy-prs.yml index 7010c30effa1..783fc8dea185 100644 --- a/.github/workflows/check-for-spammy-prs.yml +++ b/.github/workflows/check-for-spammy-prs.yml @@ -1,6 +1,6 @@ name: Check for Spammy PRs -# Flags low-value public PRs and closes PRs that target branches other than main. +# Flags low-value public PRs and closes PRs with non-main targets or emoji titles. # Maintainers add the skip-spammy-check label to exempt a PR. on: @@ -10,9 +10,57 @@ on: permissions: contents: read issues: read - pull-requests: write jobs: + emoji-title-check: + name: Close PRs with emoji titles + if: github.repository == 'github/docs' + concurrency: + group: ${{ github.workflow }}-emoji-title-${{ github.event.pull_request.number }} + cancel-in-progress: false + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 + with: + github-token: ${{ secrets.DOCS_BOT_PAT_BASE }} + script: | + const item = context.payload.pull_request + const params = { ...context.repo, issue_number: item.number } + + // Events can predate title edits or an exemption label, so read the current PR. + const { data: current } = await github.rest.issues.get(params) + if (current.state !== 'open' || current.user.login === 'docs-bot') { + return + } + + // Text-default symbols need an emoji selector; plain digits, #, and * need a keycap. + const hasEmoji = /\p{Emoji_Presentation}(?!\uFE0E)|\p{Extended_Pictographic}\uFE0F|[#*0-9]\uFE0F?\u20E3/u.test(current.title) + if (!hasEmoji) { + return + } + + if (current.labels.some(label => label.name.toLowerCase() === 'skip-spammy-check')) { + core.info('Skipping because the pull request has the skip-spammy-check label.') + return + } + + // Mark automated closures so the skip label can trigger the existing recovery workflow. + await github.rest.issues.addLabels({ + ...params, + labels: ['invalid'], + }) + + await github.rest.pulls.update({ + ...context.repo, + pull_number: item.number, + state: 'closed', + }) + + await github.rest.issues.createComment({ + ...params, + body: 'Closing because the title contains emoji. Please remove the emoji and open a new PR.', + }) + spammy-pr-check: name: Label spammy PRs and reject non-main targets if: > @@ -50,6 +98,21 @@ jobs: return changedLines.length > 0 && changedLines.every(line => line.slice(1).trim() === '') }) + const onlyBreaksOpeningFrontmatter = files.length > 0 && files.every(file => { + if ( + file.status !== 'modified' || + !file.filename.startsWith('content/') || + !file.filename.endsWith('.md') || + file.additions !== 1 || + file.deletions !== 1 + ) return false + + const lines = (file.patch || '').split('\n') + return /^@@ -1(?:,\d+)? \+1(?:,\d+)? @@/.test(lines[0]) && + lines[1] === '----' && // Diff prefix "-" followed by the original "---". + lines[2]?.startsWith('+') && + !/^---(?:\s*yaml)?\s*$/i.test(lines[2].slice(1)) + }) const onlyRenames = files.length > 0 && files.every( f => f.status === 'renamed' && f.additions === 0 && f.deletions === 0 ) @@ -101,6 +164,7 @@ jobs: isEmptyCommit || touchesTooMany || isBlankLineEdit || + onlyBreaksOpeningFrontmatter || onlyRenames || onlyIndexMd ) { diff --git a/content/account-and-profile/how-tos/contribution-settings/troubleshooting-missing-contributions.md b/content/account-and-profile/how-tos/contribution-settings/troubleshooting-missing-contributions.md index 5ae54487820a..8d36ea7fac9b 100644 --- a/content/account-and-profile/how-tos/contribution-settings/troubleshooting-missing-contributions.md +++ b/content/account-and-profile/how-tos/contribution-settings/troubleshooting-missing-contributions.md @@ -23,6 +23,21 @@ category: After making a commit that meets the requirements to count as a contribution, you may need to wait for up to 24 hours to see the contribution appear on your contributions graph. For more information, see [AUTOTITLE](/account-and-profile/how-tos/contribution-settings/viewing-commit-details-from-your-timeline). +## Contribution counts are stale after rewriting history + +If you own an account and squash commits or force-push rewritten history, your profile may continue to count commits that are no longer in the repository's visible history. This can include contributions to private repositories. This is a stale-count issue, not a missing-contribution issue, so the other troubleshooting steps in this article do not apply. + +{% ifversion ghes %} +If you use {% data variables.product.prodname_ghe_server %}, ask your site administrator to rebuild your contribution data. For more information, see [AUTOTITLE](/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/rebuilding-contributions-data). +{% else %} +If the counts remain incorrect, {% data variables.contact.github_support %} may be able to rebuild your contribution data, depending on the support options available to your account. For more information, see [AUTOTITLE](/support/learning-about-github-support/about-github-support). +{% endif %} + +After a rebuild, allow up to 24 hours for your profile's contributions graph and activity summary to refresh. Then: + +1. Recheck the affected dates. +1. If the counts are still incorrect, {% ifversion ghes %}contact your site administrator{% else %}follow up through the support options available to your account{% endif %}. + ## Your local Git commit email isn't connected to your account Commits must be made with an email address that is connected to your account on {% data variables.product.prodname_dotcom %}{% ifversion fpt or ghec %}, or the {% data variables.product.prodname_dotcom %}-provided `noreply` email address provided to you in your email settings,{% endif %} in order to appear on your contributions graph.{% ifversion fpt or ghec %} For more information about `noreply` email addresses, see [AUTOTITLE](/account-and-profile/reference/email-addresses-reference#your-noreply-email-address).{% endif %} diff --git a/content/admin/troubleshooting-your-instance/index.md b/content/admin/troubleshooting-your-instance/index.md index d4bc69a30093..47db7fa84b55 100644 --- a/content/admin/troubleshooting-your-instance/index.md +++ b/content/admin/troubleshooting-your-instance/index.md @@ -4,6 +4,8 @@ intro: 'Diagnose and resolve common problems with {% data variables.location.pro versions: ghes: '*' children: + - /troubleshooting-instance-configuration + - /troubleshooting-tls-and-certificates - /troubleshooting-upgrades-and-migrations - /troubleshooting-storage-and-disks - /troubleshooting-github-actions-data-and-database-health diff --git a/content/admin/troubleshooting-your-instance/troubleshooting-instance-configuration/clock-drift-from-unreachable-ntp-servers.md b/content/admin/troubleshooting-your-instance/troubleshooting-instance-configuration/clock-drift-from-unreachable-ntp-servers.md new file mode 100644 index 000000000000..09bc489c9547 --- /dev/null +++ b/content/admin/troubleshooting-your-instance/troubleshooting-instance-configuration/clock-drift-from-unreachable-ntp-servers.md @@ -0,0 +1,148 @@ +--- +title: Clock drift from unreachable NTP servers +intro: "When {% data variables.location.product_location %} cannot reach the time servers it is configured against, its clock drifts away from real time. Sign-in, integrations, and {% data variables.product.prodname_actions %} can then fail for reasons that never mention the clock." +versions: + ghes: '*' +shortTitle: Clock drift +contentType: how-tos +category: + - Troubleshoot your instance +--- + +## Symptoms + +The clock is rarely mentioned in what you actually see. The symptoms instead land on whatever depends on two systems agreeing about the time. + +* Users cannot sign in, or sessions end sooner than expected. +* {% data variables.product.prodname_github_connect %} fails to connect, or the license page returns a server error. +* {% data variables.product.prodname_actions %} jobs fail to start, or tokens are rejected as invalid. +* `/var/log/github/exceptions.log` contains errors about a token expiry claim being too far in the future, such as `'Expiration time' claim ('exp') is too far in the future`. +* Timestamps in the web interface, in logs, or in commits do not match the time you expect. + +A token signed by an instance whose clock is wrong looks invalid to the system receiving it, even though nothing is wrong with the token itself. That is why these failures point at authentication rather than at the time. + +## Causes + +{% data variables.product.prodname_ghe_server %} keeps its clock accurate by synchronizing with Network Time Protocol (NTP) servers over UDP port 123. It needs to reach at least one of them, continuously. + +A configured server stops being reachable for ordinary reasons. + +* A firewall or security group blocks outbound UDP port 123, which is easy to miss because the rest of the instance works. +* An internal time server is decommissioned or renamed, and the instance is still pointed at the old address. +* The hostname no longer resolves. +* Only one server is configured, so there is nothing to fall back to when it goes away. + +When no configured server can be reached, chrony keeps running the local system clock with no external correction, reporting the fallback stratum of 10 that {% data variables.product.prodname_ghe_server %} configures. This is not the hardware clock, which is a separate device managed outside chrony. + +Nothing fails at that moment, and no error is raised. The clock just stops being corrected and drifts, slowly at first, until something that depends on accurate time breaks. The further the drift, the broader the failures. + +A hypervisor that also tries to set the virtual machine's clock can produce the same result, by fighting the instance's own synchronization. + +## Confirming the problem + +1. SSH into the administrative shell. For more information, see [AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/accessing-the-administrative-shell-ssh). +1. List the time sources and their state. + + ```shell + sudo chronyc sources -v + ``` + + Read the `MS` column on the left of each source. A `?` means chrony is not using that source. On its own that is not proof of a network problem, because the same marker appears for a server that is itself unsynchronized, and for a source that has not yet supplied enough measurements. + + What identifies an unreachable source is the supporting evidence on the same line. In the output below, `Reach` is `0`, meaning none of the recent polls got a reply, and `LastRx` is `-`, meaning no sample has ever arrived. Neither server has ever answered. + + ```text + MS Name/IP address Stratum Poll Reach LastRx Last sample + =============================================================================== + ^? ntp1.example.com 0 10 0 - +0ns[ +0ns] +/- 0ns + ^? ntp2.example.com 0 10 0 - +0ns[ +0ns] +/- 0ns + ``` + + If a source is marked `*`, chrony has selected it, which rules out the reachability problem. It does not confirm the clock is accurate, because chrony corrects a large offset gradually and the instance can be well off real time while it does. Continue with the remaining checks either way. + +1. Check what the instance is actually synchronized to. + + ```shell + sudo chronyc tracking + ``` + + A reference ID with an empty name in brackets, together with a stratum of `10`, means the instance has given up on its configured servers and is using its own clock. + + ```text + Reference ID : 7F7F0101 () + Stratum : 10 + System time : 0.000000000 seconds fast of NTP time + ``` + + Stratum counts how many steps the instance is from a reference clock, and an instance always reports one more than the server it follows. The value of `10` is specific: it is the fallback {% data variables.product.prodname_ghe_server %} configures for when no source is available, so seeing it alongside an unnamed reference ID is the signal. + + A healthy instance names the server it is following instead, and reports a stratum one above that server's. + + ```text + Reference ID : D9723B03 (ntp1.example.com) + Stratum : 3 + System time : 0.000079420 seconds fast of NTP time + ``` + + `System time` is measured against the servers the instance is following, so when it is following its own clock the value is meaningless. It reads as near zero no matter how far the clock has drifted. + +1. Measure the drift for yourself by comparing the instance clock against a source you trust. + + ```shell + date -u + ``` + + Note how far off it is. A large difference confirms the clock has been drifting unchecked. + +1. If you want the supporting detail on each source, such as how far it is skewed and how many samples were kept, use the following command. + + ```shell + sudo chronyc sourcestats -v + ``` + +## Resolving the problem + +Restore synchronization first, then correct the drift that built up while it was lost. Correcting the drift without fixing reachability only buys you time before it returns. + +1. Check which servers the instance is configured against, in the "Time" section of the Management Console. For more information, see [AUTOTITLE](/admin/configuring-settings/configuring-network-settings/configuring-time-synchronization#changing-the-default-ntp-servers). +1. Confirm the instance can reach them. Outbound UDP port 123 must be open to each server, in every firewall and security group between the instance and the server. For more information, see [AUTOTITLE](/admin/configuring-settings/configuring-network-settings/network-ports#administrative-ports). +1. If a server is gone, or you cannot open the path to it, configure servers the instance can reach. Configure at least two, so that one going away does not leave the instance with nothing. +1. Confirm chrony has selected a source again. One of them should now be marked `*`, with a non-zero `Reach`. + + ```shell + sudo chronyc sources -v + ``` + +1. Correct the drift that built up while the instance was unsynchronized. NTP corrects small discrepancies on its own, but a large difference needs the following command. For more information, see [AUTOTITLE](/admin/configuring-settings/configuring-network-settings/configuring-time-synchronization#correcting-a-large-time-drift). + + ```shell + sudo chronyc -a makestep + ``` + +1. Confirm the clock now agrees with a source you trust. This is the check that tells you the drift is actually gone, rather than still being corrected. + + ```shell + date -u + ``` + +1. Retry whatever was failing. + +## Preventing recurrence + +* Configure at least two time servers, so losing one does not stop synchronization. +* After you change the servers, check that the instance can actually reach them. A configured server is not necessarily a working one, and nothing warns you when it stops answering. +* Keep outbound UDP port 123 open to your time servers when firewall rules change. +* Stop your hypervisor from setting the virtual machine's clock, so it does not compete with the instance's own synchronization. For more information, see the documentation provided by your virtualization provider. +* Check the time source as part of your routine health checks. Drift is harmless until it is not, and catching it while it is small saves you working out which of several unrelated failures came from the clock. + +## Contacting {% data variables.contact.github_support %} + +If the instance still cannot reach a time server after you have checked the configuration and the network path, or if the original symptoms continue once the clock is accurate, contact {% data variables.contact.github_support %} rather than continuing. For more information, see [AUTOTITLE](/support/contacting-github-support/creating-a-support-ticket). + +If you have already opened a ticket, attaching a support bundle helps {% data variables.contact.github_support %} diagnose the problem faster. For more information, see [AUTOTITLE](/support/contacting-github-support/providing-data-to-github-support). + +## Further reading + +* [AUTOTITLE](/admin/configuring-settings/configuring-network-settings/configuring-dns-nameservers) +* [AUTOTITLE](/admin/configuring-settings/configuring-github-connect/about-github-connect) +* [AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities) diff --git a/content/admin/troubleshooting-your-instance/troubleshooting-instance-configuration/index.md b/content/admin/troubleshooting-your-instance/troubleshooting-instance-configuration/index.md new file mode 100644 index 000000000000..1d2983810fff --- /dev/null +++ b/content/admin/troubleshooting-your-instance/troubleshooting-instance-configuration/index.md @@ -0,0 +1,9 @@ +--- +title: Troubleshooting instance configuration +intro: 'Resolve problems caused by the settings applied to {% data variables.location.product_location %}, or by the network it depends on.' +versions: + ghes: '*' +children: + - /clock-drift-from-unreachable-ntp-servers +shortTitle: Instance configuration +--- diff --git a/content/admin/troubleshooting-your-instance/troubleshooting-tls-and-certificates/expired-tls-certificate.md b/content/admin/troubleshooting-your-instance/troubleshooting-tls-and-certificates/expired-tls-certificate.md new file mode 100644 index 000000000000..81976df497aa --- /dev/null +++ b/content/admin/troubleshooting-your-instance/troubleshooting-tls-and-certificates/expired-tls-certificate.md @@ -0,0 +1,70 @@ +--- +title: Expired TLS certificate +intro: 'When a certificate used by {% data variables.location.product_location %} expires, services can no longer validate TLS connections. Users may be unable to access the instance, and features that depend on internal connections stop working.' +versions: + ghes: '*' +shortTitle: Expired TLS certificate +contentType: how-tos +category: + - Troubleshoot your instance +--- + +## Symptoms + +* Users cannot access the instance. +* Pull requests do not update with new pushes. +* Webhooks are not delivered, and {% data variables.product.prodname_actions %} workflows are not triggered. +* `/var/log/github/exceptions.log` contains `certificate verify failed` errors. + +## Causes + +Every certificate is only valid between its `notBefore` and `notAfter` dates. If the certificate for your instance, or any intermediate or root certificate in its chain, has expired, validation fails. + +Custom certificate authority (CA) certificates installed on the instance can expire in the same way. + +## Confirming the problem + +1. SSH into the administrative shell. For more information, see [AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/accessing-the-administrative-shell-ssh). +1. Check the validity dates of the certificate the instance is using. + + ```shell + openssl x509 -in /etc/haproxy/ssl.crt -noout -subject -dates + ``` + + If the `notAfter` date has passed, the certificate has expired. + +1. If you have installed custom CA certificates, list them. + + ```shell + ghe-ssl-ca-certificate-install -l + ``` + +1. Check the validity dates of each one, replacing CERTIFICATE with a file name from the list. + + ```shell + openssl x509 -in /usr/local/share/ca-certificates/CERTIFICATE -noout -subject -dates + ``` + +## Resolving the problem + +> [!WARNING] +> Replacing a certificate starts a configuration run, which restarts services. Enable maintenance mode first to reduce the impact on users. For more information, see [AUTOTITLE](/admin/administering-your-instance/configuring-maintenance-mode/enabling-and-scheduling-maintenance-mode). + +1. Upload a valid certificate, or enable Let's Encrypt to manage the certificate for you. For more information, see [AUTOTITLE](/admin/configuring-settings/hardening-security-for-your-enterprise/configuring-tls). + + Include the full certificate chain in the file you upload. For more information, see [AUTOTITLE](/admin/configuring-settings/hardening-security-for-your-enterprise/troubleshooting-tls-errors#certificate-validity-errors). + +1. For each expired custom CA certificate, remove it with `ghe-ssl-ca-certificate-install -r` if it is no longer needed. If the instance still needs to trust that CA, install a valid replacement with `ghe-ssl-ca-certificate-install -c` instead. Then apply the configuration. For more information, see [AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities#ghe-ssl-ca-certificate-install). +1. If you enabled maintenance mode, disable it once the configuration run has finished. + +## Contacting {% data variables.contact.github_support %} + +If your certificate is in date but you see the symptoms above, an intermediate or root certificate in the chain may have expired. If you cannot confirm this, or the problems continue after you replace the certificate, contact {% data variables.contact.github_support %}. For more information, see [AUTOTITLE](/support/contacting-github-support/creating-a-support-ticket). + +Do not send your private key to {% data variables.contact.github_support %}. + +If you have already opened a ticket, attaching a support bundle helps {% data variables.contact.github_support %} diagnose the problem faster. For more information, see [AUTOTITLE](/support/contacting-github-support/providing-data-to-github-support). + +## Further reading + +* [AUTOTITLE](/admin/monitoring-and-managing-your-instance/monitoring-your-instance/about-system-logs) diff --git a/content/admin/troubleshooting-your-instance/troubleshooting-tls-and-certificates/index.md b/content/admin/troubleshooting-your-instance/troubleshooting-tls-and-certificates/index.md new file mode 100644 index 000000000000..ed63d1890c22 --- /dev/null +++ b/content/admin/troubleshooting-your-instance/troubleshooting-tls-and-certificates/index.md @@ -0,0 +1,9 @@ +--- +title: Troubleshooting TLS and certificates +intro: 'Resolve problems with the certificates {% data variables.location.product_location %} serves to clients, or relies on to trust other systems.' +versions: + ghes: '*' +children: + - /expired-tls-certificate +shortTitle: TLS and certificates +--- diff --git a/content/billing/how-tos/set-up-payment/manage-payment-info.md b/content/billing/how-tos/set-up-payment/manage-payment-info.md index 2db5d355894a..90616463f99f 100644 --- a/content/billing/how-tos/set-up-payment/manage-payment-info.md +++ b/content/billing/how-tos/set-up-payment/manage-payment-info.md @@ -17,6 +17,23 @@ redirect_from: - /billing/managing-your-github-billing-settings/setting-your-billing-email - /billing/managing-your-github-billing-settings/viewing-your-payment-history-and-receipts - /billing/managing-your-billing/managing-your-payment-and-billing-information + - /github/setting-up-and-managing-billing-and-payments-on-github/viewing-your-payment-history-and-receipts + - /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/viewing-your-payment-history-and-receipts + - /articles/downloading-receipts + - /articles/downloading-receipts-for-personal-accounts + - /articles/downloading-receipts-for-organizations + - /articles/viewing-your-payment-history-and-receipts + - /github/setting-up-and-managing-billing-and-payments-on-github/adding-information-to-your-receipts + - /github/setting-up-and-managing-billing-and-payments-on-github/managing-your-github-billing-settings/adding-information-to-your-receipts + - /articles/can-i-add-my-credit-card-number-to-my-receipts + - /articles/can-i-add-extra-information-to-my-receipts--2 + - /articles/how-can-i-add-extra-information-to-my-receipts + - /articles/could-you-add-my-card-number-to-my-receipts + - /articles/how-can-i-add-extra-information-to-my-personal-account-s-receipts + - /articles/adding-information-to-your-personal-account-s-receipts + - /articles/how-can-i-add-extra-information-to-my-organization-s-receipts + - /articles/adding-information-to-your-organization-s-receipts + - /articles/adding-information-to-your-receipts permissions: '{% data reusables.permissions.enhanced-billing-platform %}' shortTitle: Manage payment info contentType: how-tos @@ -38,6 +55,27 @@ If you encounter issues when adding or updating a payment method, you can try th 1. Try adding a new payment method. 1. Contact {% data variables.contact.github_support %} or your customer representative for additional assistance. +## Adding information to your receipts + +You can add contact or tax information to your personal account's or organization's receipts, such as your full business name, VAT/GST identification number, or address of record. This information is included on every receipt, regardless of the paid product purchased. + +For security reasons, do not include confidential financial information, such as credit card numbers. + +### Personal account receipts + +{% data reusables.user-settings.access_settings %} +1. In the "Access" section of the sidebar, click **{% octicon "credit-card" aria-hidden="true" aria-label="credit-card" %} Billing & Licensing**. +1. From the list of "Billing & licensing" pages, click **Payment information**. +1. To the right of "Additional information", click **Add information** and add your contact or tax information. + +### Organization receipts + +1. In the upper-right corner of any page on {% data variables.product.prodname_dotcom %}, click your profile picture. +1. Click **Your organizations**, then next to the organization, click **Settings**. +1. In the organization sidebar, click **{% octicon "credit-card" aria-hidden="true" aria-label="credit-card" %} Billing & Licensing**. +1. From the list of "Billing & licensing" pages, click **Payment information**. +1. To the right of "Additional information", click **Add information** and add your contact or tax information. + ## Viewing payment history You can view your payment history, including the date, amount, and payment method. You can also download past payments. @@ -47,6 +85,10 @@ You can view your payment history, including the date, amount, and payment metho 1. To view the receipt for a payment, click {% octicon "eye" aria-label="View receipt" %}. 1. To download a receipt or invoice, click {% octicon "download" aria-label="Download" %} under "Receipt" or "Invoice". +If an issued receipt or invoice has an incorrect or missing recipient name, company name, or address, contact {% data variables.contact.contact_support_page %} for review and possible correction. This applies even when your saved billing information is correct. + +Follow Support's instructions to obtain any corrected copy. If a regenerated receipt or invoice is available in **Payment history**, download it using the steps above. + ## Managing billing contacts Organizations and enterprises can add contacts to receive emails with billing notifications for payments, budget threshold alerts, and included usage alerts. One of the contacts is defined as the primary contact. diff --git a/content/billing/reference/supported-payment-methods.md b/content/billing/reference/supported-payment-methods.md index 22bc1f50cd9c..82018113d014 100644 --- a/content/billing/reference/supported-payment-methods.md +++ b/content/billing/reference/supported-payment-methods.md @@ -43,7 +43,7 @@ The following Azure subscription types cannot be used as a payment method for {% | `AzureForStudents_2018-01-01` | MS-AZR-0170P | | `DreamSpark_2015-02-01` | MS-AZR-0144P | | `AzurePass_2014-09-01` | MS-AZR-0120P, MS-AZR-0122P–MS-AZR-0125P, MS-AZR-0128P–MS-AZR-0130P | -| `PayAsYouGo_2014-09-01` | MS-AZR-0001P, MS-AZR-0002P, MS-AZR-0003P, MS-AZR-0006P, MS-AZR-0008P, MS-AZR-0010P, MS-AZR-0011P, MS-AZR-0018P, MS-AZR-0019P, MS-AZR-0030P, MS-AZR-0044P, MS-AZR-0046P, MS-AZR-0048P, MS-AZR-0050P | +| `PayAsYouGo_2014-09-01` | MS-AZR-0001P, MS-AZR-0002P, MS-AZR-0003P, MS-AZR-0006P, MS-AZR-0008P, MS-AZR-0010P, MS-AZR-0011P, MS-AZR-0017G, MS-AZR-0018P, MS-AZR-0019P, MS-AZR-0030P, MS-AZR-0044P, MS-AZR-0046P, MS-AZR-0048P, MS-AZR-0050P | | `MSDN_2014-09-01` | MS-AZR-0029P, MS-AZR-0059P, MS-AZR-0062P, MS-AZR-0063P | {% ifversion fpt or ghec %} diff --git a/content/code-security/concepts/supply-chain-security/dependabot-alerts.md b/content/code-security/concepts/supply-chain-security/dependabot-alerts.md index f95709bb69ac..14254e1000e1 100644 --- a/content/code-security/concepts/supply-chain-security/dependabot-alerts.md +++ b/content/code-security/concepts/supply-chain-security/dependabot-alerts.md @@ -58,7 +58,7 @@ See [AUTOTITLE](/code-security/how-tos/secure-your-supply-chain/secure-your-depe ## Alert ownership and assignments -Users with write access or higher can assign {% data variables.product.prodname_dependabot_alerts %} to repository collaborators, teams, or AI agents to establish clear ownership for vulnerability remediation. Assignments help track who's responsible for each alert and prevent vulnerabilities from being overlooked. +Users with write access or higher can assign {% data variables.product.prodname_dependabot_alerts %} to repository collaborators, teams, or AI agents to establish clear ownership for vulnerability remediation. Assignments help track who's responsible for each alert and prevent vulnerabilities from being overlooked. Assigning alerts requires a license for {% data variables.product.prodname_GHAS_or_code_security %}, including for public repositories. You can assign alerts to the following types of agents: diff --git a/content/copilot/concepts/billing-and-usage/copilot-usage-metrics/copilot-metrics.md b/content/copilot/concepts/billing-and-usage/copilot-usage-metrics/copilot-metrics.md index 0aa0050f1209..ef0820a13750 100644 --- a/content/copilot/concepts/billing-and-usage/copilot-usage-metrics/copilot-metrics.md +++ b/content/copilot/concepts/billing-and-usage/copilot-usage-metrics/copilot-metrics.md @@ -270,3 +270,7 @@ These metrics can be used together to answer key questions about your teams' usa | How do I act on the insights from the dashboard? | See [AUTOTITLE](/copilot/reference/copilot-usage-metrics/interpret-copilot-metrics#reviewing-adoption-cohorts) | Look for patterns across these signals rather than focusing on any single number. For example, a steady DAU paired with a rising acceptance rate indicates growing trust and value. + +## Analyze your metrics in more detail + +When you need to explain or validate your findings, use the reference articles to help you understand all the data available, how it compares across surfaces, and how it should be interpreted. See [AUTOTITLE](/copilot/reference/copilot-usage-metrics). diff --git a/content/copilot/concepts/billing-and-usage/copilot-usage-metrics/index.md b/content/copilot/concepts/billing-and-usage/copilot-usage-metrics/index.md index c240e2c203b0..cf23b13eb53a 100644 --- a/content/copilot/concepts/billing-and-usage/copilot-usage-metrics/index.md +++ b/content/copilot/concepts/billing-and-usage/copilot-usage-metrics/index.md @@ -18,6 +18,7 @@ children: - /content/copilot/reference/copilot-usage-metrics/interpret-copilot-metrics - /content/copilot/reference/copilot-usage-metrics/reconciling-usage-metrics - /content/copilot/reference/copilot-usage-metrics/lines-of-code-metrics + - /content/copilot/reference/copilot-usage-metrics/team-level-metrics - /content/copilot/tutorials/roll-out-at-scale/measure-success - /content/copilot/tutorials/roll-out-at-scale/assign-licenses/track-usage-and-adoption - /content/copilot/reference/copilot-usage-metrics/example-schema diff --git a/content/copilot/concepts/copilot-surfaces/copilot-cli.md b/content/copilot/concepts/copilot-surfaces/copilot-cli.md index 0cccedc98e11..0f57211d619b 100644 --- a/content/copilot/concepts/copilot-surfaces/copilot-cli.md +++ b/content/copilot/concepts/copilot-surfaces/copilot-cli.md @@ -227,7 +227,7 @@ When you start a {% data variables.copilot.copilot_cli %} session, you'll be ask ### Allowed tools -The first time that {% data variables.product.prodname_copilot_short %} needs to use a tool that could be used to modify or execute a file—{% data reusables.cli.tools-needing-approval %}—it will ask you whether you want to allow it to use that tool. +In manual approval mode, {% data variables.product.prodname_copilot_short %} asks for your approval when a tool request isn't already allowed. This can include tools that modify or execute files—{% data reusables.cli.tools-needing-approval %}. Typically, you can choose from three options: @@ -317,7 +317,9 @@ copilot --allow-tool='My-MCP-Server' --deny-tool='My-MCP-Server(tool_name)' It's important to be aware of the security implications of using the approval command-line options. These options allow {% data variables.product.prodname_copilot_short %} to execute commands needed to complete your request, without giving you the opportunity to review and approve those commands before they are run. While this streamlines workflows, and allows headless operation of the CLI, it increases the risk of unintended actions being taken that might result in data loss or corruption, or other security issues. -You can control which tools {% data variables.copilot.copilot_cli_short %} can use by responding to approval prompts when {% data variables.product.prodname_copilot_short %} attempts to use a tool, by specifying permissions with command-line flags, or (in an interactive session) by using slash commands (such as `/allow-all` and `/yolo`. See [AUTOTITLE](/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli#setting-allowed-tools). +You can control which tools {% data variables.copilot.copilot_cli_short %} can use by responding to approval prompts when {% data variables.product.prodname_copilot_short %} attempts to use a tool, by specifying permissions with command-line flags, or (in an interactive session) by using slash commands, such as `/permissions allow-all` and `/yolo`. See [AUTOTITLE](/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli#setting-allowed-tools). + +To reduce how often you're prompted for an approval decision, without granting blanket permissions, you can use {% data variables.copilot.assisted_permissions %} by entering the `/permissions assisted` slash command in an interactive session. A large language model assesses eligible permission requests and automatically approves those it judges to be safe. Existing permissions and enterprise rules still apply, and requests that still need your approval are put to you. For more information, see [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). ### Risk mitigation diff --git a/content/copilot/concepts/customizations/allowing-safe-commands.md b/content/copilot/concepts/customizations/allowing-safe-commands.md new file mode 100644 index 000000000000..36a42149f590 --- /dev/null +++ b/content/copilot/concepts/customizations/allowing-safe-commands.md @@ -0,0 +1,138 @@ +--- +title: Allowing safe commands to run without manual approval +shortTitle: '{% data variables.copilot.assisted_permissions_caps %}' +allowTitleToDifferFromFilename: true +intro: 'The {% data variables.copilot.assisted_permissions %} option reduces manual approval prompts by using a large language model to assess permission requests.' +versions: + feature: copilot +redirect_from: + - /copilot/concepts/agents/allowing-safe-commands +contentType: concepts +category: + - Learn about Copilot +--- + +## Introduction + +When {% data variables.product.prodname_copilot_short %} works on a task, it often needs to take actions that could change your system, such as running shell commands, editing files, or accessing URLs. You can choose how permission requests for these actions are handled. + +Answering approval prompts keeps you in control, but it can slow you down, especially at the start of a session when {% data variables.product.prodname_copilot_short %} needs to establish which actions it's allowed to take. To reduce the number of prompts, you can grant {% data variables.product.prodname_copilot_short %} unconditional permissions—but doing so removes your oversight of individual actions. + +{% data variables.copilot.assisted_permissions_caps %} is a middle ground between manual approval and granting broad permissions with an allow-all option. It uses a large language model to review permission requests and automatically approve actions it judges to be safe in the context of your task. In a standard interactive session, requests that still require approval are put to you. + +> [!NOTE] +> {% data variables.copilot.assisted_permissions_caps %} is available in {% data variables.copilot.copilot_cli %}, {% data variables.product.prodname_vscode %}, and the {% data variables.copilot.github_copilot_app %}. + +## Approval options + +You can choose between three options that determine how much you want to be involved in approving the actions {% data variables.product.prodname_copilot_short %} takes. Existing deny rules and enterprise restrictions still apply. Requests that are already allowed by your permissions can run without a prompt or a model review. + +* **Manual approval:** {% data variables.product.prodname_copilot_short %} asks for your approval when an action isn't already allowed, such as running a command that isn't read-only, editing a file, or accessing a URL. You can approve an action once, or for the rest of the session. This gives you the most oversight, but requires you to respond to the most prompts. + +* **{% data variables.copilot.assisted_permissions_caps %}:** {% data variables.product.prodname_copilot_short %} uses a model to assess eligible permission requests and automatically approves those it judges to be safe. You are prompted when a request still needs your approval. This reduces prompts without granting blanket permission to run commands. + +* **Unconditional approval:** {% data variables.product.prodname_copilot_short %} has broad permission to use tools, paths, and URLs without a model safety review or individual approval prompts. This is the most permissive option and removes your oversight of individual actions. This is the behavior you get in {% data variables.copilot.copilot_cli_short %} when you use the `--allow-all` (or `--yolo`) command line option, or the `/permissions allow-all` (or `/yolo`) slash command. + +Your administrator can disable unconditional approval with `permissions.disableBypassPermissionsMode: "disable"` without disabling {% data variables.copilot.assisted_permissions %}. The separate `permissions.disableAssistedPermissionsMode: true` setting disables {% data variables.copilot.assisted_permissions %}. For more information, see [AUTOTITLE](/copilot/reference/enterprise-administrators/enterprise-managed-settings#permissions). + +## How {% data variables.copilot.assisted_permissions %} works + +When you enable {% data variables.copilot.assisted_permissions %}, existing rules and human approvals are evaluated before a model review. For eligible requests that aren't already resolved—whether to run a command, access a path, or fetch a URL—the model assesses whether the action is safe and within the authority you gave for the task. + +In {% data variables.copilot.copilot_cli_short %}, enterprise `ask` rules for shell commands, file reads, file writes, and URLs can be satisfied by model approval when the request is eligible for review. This means those rules do not always result in a prompt for your confirmation. Enterprise deny rules still apply. + +{% data variables.copilot.assisted_permissions_caps %} does not review other tool calls that enterprise rules require you to approve, or requests to bypass local sandboxing. Those requests remain subject to the session's normal permission handling. + +For requests it can review, the model makes a recommendation: + +* If the model is confident that the request is safe, {% data variables.product.prodname_copilot_short %} approves it automatically and continues, without prompting you. +* If the model is not confident that the request is safe, {% data variables.product.prodname_copilot_short %} asks for your approval, as it would with manual approval. + +If a safety review is unavailable or cannot evaluate a request, the request follows the session's normal permission handling. + +> [!NOTE] +> In autopilot mode and non-interactive runs, requests that still require your approval are denied instead. When the safety review requires approval, its explanation is passed back to {% data variables.product.prodname_copilot_short %} so it can try a different approach. See [AUTOTITLE](/copilot/concepts/agent-capabilities/agent-powered-workflows-and-operations/autopilot). + +{% data variables.product.prodname_copilot_short %} selects the model used for the safety review, which can differ from the model you selected for your conversation. If the selected review model is unavailable, the review can use your session's active model instead. If you use your own model provider, the review uses your session's active model. + +> [!IMPORTANT] +> {% data variables.copilot.assisted_permissions_caps %} reduces how often you're prompted, but it doesn't remove your responsibility for what {% data variables.product.prodname_copilot_short %} does. The model can make mistakes and approve dangerous or unintended actions. This feature is not a substitute for sandboxing or access restrictions. As with any automatic approval option, you should review the actions {% data variables.product.prodname_copilot_short %} takes, and consider running it in a sandbox or other isolated environment. For more information, see [AUTOTITLE](/copilot/concepts/copilot-surfaces/copilot-cli#risk-mitigation). + +## Using {% data variables.copilot.assisted_permissions %} in the {% data variables.copilot.github_copilot_app %} + +To turn on {% data variables.copilot.assisted_permissions %} for a local session: + +1. In the prompt box, open the mode menu, which shows the current mode, such as **Interactive**, **Plan**, or **Autopilot**. +1. Click **Tool permissions**, then select **Assisted**. + +Your selection applies to the current session and is also saved as the default for new local sessions. It does not change other existing sessions. To change the default without changing the current session, open **Settings**, select **Sessions**, and choose **Assisted** under **Tool permissions**. + +To turn on {% data variables.copilot.assisted_permissions %} for only the current active session, without changing the default, enter `/permissions assisted` in the prompt box. Enter `/permissions manual` to return that session to manual approval, or `/permissions show` to check its permission mode. + +Tool permission controls are not available for cloud sessions. For sessions on a remote host, the available permission modes depend on what that host supports. Administrator restrictions still apply, even if you select **Assisted** as your default. + +## Using {% data variables.copilot.assisted_permissions %} in {% data variables.copilot.copilot_cli %} + +There are three ways to turn on {% data variables.copilot.assisted_permissions %}, depending on whether you want it for the session you're in, for every new session, or for a single automated run. + +### Turning it on during an interactive session + +Enter the following slash command: + +```copilot copy +/permissions assisted +``` + +To return to manual approval, enter `/permissions manual`. To check which permission mode you're currently in, enter `/permissions show`. You can also enter `/permissions`, with no argument, to choose a mode from a list. + +### Making it the default for new sessions + +To make {% data variables.copilot.assisted_permissions %} your preferred mode for new interactive sessions, set `defaultPermissionMode` to `"assisted"` in your user configuration file (`~/.copilot/settings.json`). You can edit the file directly, or use the `/settings` slash command during a session. For more information, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#user-settings-copilotsettingsjson). + +The setting applies to new interactive sessions only. If your administrator sets `permissions.defaultMode`, that managed default takes precedence over your preference. You can still choose a different mode for a session, such as with `/permissions manual`, if policy permits it. + +Resumed sessions keep their saved permission mode, subject to current policy restrictions. The `--allow-all` or `--yolo` option takes precedence over either default if policy permits it. If the selected default is unavailable or blocked by policy, the CLI starts with manual approval. + +To make manual approval your preferred default, set `defaultPermissionMode` to `"manual"`. If neither you nor your administrator has configured a default, new sessions can start in manual or assisted mode. Use `/permissions show` to check. + +### Using it for a non-interactive run + +When you run {% data variables.copilot.copilot_cli_short %} non-interactively—with the `-p` or `--prompt` option, or in an environment with no terminal attached, such as a CI/CD workflow—use the `--assisted-approval` command line option: + +```shell copy +copilot -p "Fix the failing tests" --assisted-approval +``` + +You can also set the `COPILOT_ASSISTED_APPROVAL` environment variable to `true`, which is useful in automated environments where you can't easily change the command that's run. + +This option is only for non-interactive runs. If you use it when starting an interactive session, the CLI exits with an error. To use {% data variables.copilot.assisted_permissions %} in an interactive session, use `/permissions assisted` or the `defaultPermissionMode` setting instead. + +#### When to use the command line option + +In a non-interactive run there is nobody available to answer approval prompts, so you would otherwise have to choose between two unappealing options. Without any permission options, {% data variables.product.prodname_copilot_short %} is denied anything that needs approval, and often can't finish the task. With `--allow-all-tools`, you grant blanket tool permissions without a model safety review. + +`--assisted-approval` is the middle ground. Requests the safety review judges to be safe are approved automatically. If the review requires your approval, the request is denied and its explanation is passed back to {% data variables.product.prodname_copilot_short %} so it can try a different approach. Other requests that still require approval are also denied. + +Consider using it when you want an unattended run—in a CI/CD workflow, a scheduled job, or a batch script—to complete real work without giving {% data variables.product.prodname_copilot_short %} unconditional permission to run any command. + +For more information about running {% data variables.copilot.copilot_cli_short %} programmatically, see [AUTOTITLE](/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically). + +> [!WARNING] +> When successfully enabled, `--assisted-approval` takes precedence over `--allow-all-tools`, but it does not change `--allow-all-paths` or `--allow-all-urls`. If you combine it with `--allow-all` (or `--yolo`), path and URL access can still be unrestricted even though {% data variables.copilot.assisted_permissions %} is enabled for tool requests. +> +> If {% data variables.copilot.assisted_permissions %} can't be turned on—because your enterprise settings block it, for example—the CLI writes a warning to standard error. It does not cancel a separate `--allow-all-tools` option that you supplied, so tool requests may still be approved without a safety review. Check for this warning in the output of automated runs. + +### How {% data variables.copilot.assisted_permissions %} behaves in {% data variables.copilot.copilot_cli_short %} + +* **Turning it on in a session affects only that session.** When you enter `/permissions assisted`, {% data variables.copilot.assisted_permissions %} stays on for the rest of that session, unless you turn it off. It doesn't affect any other sessions you currently have open. To apply it to future sessions, use the `defaultPermissionMode` setting described above. + +* **You can switch to {% data variables.copilot.assisted_permissions %} at any time.** If you started a session with the most permissive setting (`--allow-all` or its alias `--yolo`), entering `/permissions assisted` switches you from unconditional approval to {% data variables.copilot.assisted_permissions %}. + +* **You can turn on {% data variables.copilot.assisted_permissions %} while {% data variables.product.prodname_copilot_short %} is working.** You don't have to wait for a task to finish. Subsequent eligible permission requests use {% data variables.copilot.assisted_permissions %}. Depending on your previous setting, this may increase or reduce the number of approval requests you see during the task. + +## Further reading + +* [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools) +* [AUTOTITLE](/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically) +* [AUTOTITLE](/copilot/concepts/copilot-surfaces/copilot-cli#security-implications-of-automatic-tool-approval) +* [AUTOTITLE](/copilot/concepts/agent-capabilities/agent-powered-workflows-and-operations/autopilot) diff --git a/content/copilot/concepts/customizations/index.md b/content/copilot/concepts/customizations/index.md index b45bf9dd7a01..e6a08fd29e81 100644 --- a/content/copilot/concepts/customizations/index.md +++ b/content/copilot/concepts/customizations/index.md @@ -7,6 +7,7 @@ versions: children: - /comparing-customizations - /agent-skills + - /allowing-safe-commands - /custom-agents - /mcp - /hooks diff --git a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically.md b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically.md index 1d13aff4285c..40f1c827284b 100644 --- a/content/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically.md +++ b/content/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically.md @@ -39,6 +39,7 @@ To use {% data variables.copilot.copilot_cli_short %} programmatically you can d * **Provide precise prompts** — clear, unambiguous instructions produce better results than vague requests. The more context you give—file names, function names, the exact change—the less guesswork {% data variables.product.prodname_copilot_short %} has to do. * **Quote prompts carefully** — use single quotes around your prompt if you want to avoid shell interpretation of special characters. * **Always give minimal permissions** — use the `--allow-tool=[TOOLS...]` and `--allow-url=[URLs...]` command-line options to give {% data variables.product.prodname_copilot_short %} permission to use only the tools and access that are necessary to complete the task. Avoid using overly permissive options (such as `--allow-all`) unless you are working in a sandbox environment. For more information, see [AUTOTITLE](/copilot/concepts/about-cloud-and-local-sandboxes). +* **Consider `--assisted-approval`** when you can't predict in advance which tools a task will need. A model-based safety review can approve eligible permission requests without you granting blanket permissions. Existing permission rules still apply, and requests that still require your approval are denied in unattended runs. For more information, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-programmatic-reference#using-assisted-permissions). * **Use `-s` (silent)** when capturing output. This suppresses session metadata so you get clean text. * **Use `--no-ask-user`** to prevent the agent from attempting to ask clarifying questions. * **Set a model explicitly** with `--model` for consistent behavior across environments. diff --git a/content/copilot/how-tos/copilot-cli/cli-best-practices.md b/content/copilot/how-tos/copilot-cli/cli-best-practices.md index 42f15f2f69e5..7e1932b33462 100644 --- a/content/copilot/how-tos/copilot-cli/cli-best-practices.md +++ b/content/copilot/how-tos/copilot-cli/cli-best-practices.md @@ -59,7 +59,7 @@ For more information, see [AUTOTITLE](/copilot/concepts/prompting-and-context/cu ### Configure allowed tools -Manage which tools {% data variables.product.prodname_copilot_short %} can run without asking for permission. When {% data variables.product.prodname_copilot_short %} requests permission for an action, you can typically choose either to allow it just this time, or allow the tool to be used for the rest of the CLI session. +Manage which tools {% data variables.product.prodname_copilot_short %} can use without asking for your permission. In manual approval mode, requests that aren't already allowed prompt you for approval. These can include running commands, editing files, or accessing URLs. When prompted, you can typically choose to allow the action just this once, or to allow that tool for the rest of the session. Use `/permissions show` to check your mode or `/permissions manual` to choose manual approval. To reset previously approved tools, use: @@ -80,6 +80,8 @@ copilot --allow-tool='shell(git:*)' --deny-tool='shell(git push)' * `shell(npm run test:*)` — Allow npm test commands * `write` — Allow file writes +For more information about allowing and denying permission for specific tools, see [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools#allowing-or-denying-permission-for-specific-tools). + ### Select your preferred model Use `/model` to choose from available models based on your task complexity: @@ -455,7 +457,7 @@ Optionally, you can usually speed up large tasks by using the `/fleet` slash com ### Security considerations -* {% data variables.copilot.copilot_cli_short %} requires explicit approval for potentially destructive operations. +* Review your permission mode and tool permissions before starting work. Automatic approval can allow potentially destructive operations without individual prompts. * Review all proposed changes before accepting. * Use permission allowlists judiciously. * Never commit secrets. {% data variables.product.prodname_copilot_short %} is designed to avoid this, but always verify. diff --git a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md index 67f3c1d14ebc..7f30fefd7db5 100644 --- a/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md +++ b/content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md @@ -66,15 +66,16 @@ In this section, you can learn how to: ### Allowing a tool for the first time -The first time that {% data variables.product.prodname_copilot_short %} needs to use a tool that may require approval—{% data reusables.cli.tools-needing-approval %}—it will ask you whether you want to allow it to run. Whether you’re prompted can depend on the tool and how it’s being used (such as the arguments provided or whether the tool has been previously approved). +In manual approval mode, {% data variables.product.prodname_copilot_short %} asks you to approve tool requests that aren't already allowed—{% data reusables.cli.tools-needing-approval %}. Whether you're prompted depends on the permissions in effect and how the tool is being used, such as its arguments or previous approvals. +1. Start an interactive session by running `copilot`, then enter `/permissions manual`. 1. Prompt {% data variables.product.prodname_copilot_short %} to perform a task that requires a tool. For example: - ```shell - copilot -p "Create a new file called README.md with a project description" + ```copilot + Create a new file called README.md with a project description ``` -1. Choose from one of the three options: +1. If the tool is not already allowed, choose from the approval options: * `1. Yes` @@ -94,6 +95,8 @@ The first time that {% data variables.product.prodname_copilot_short %} needs to You can use command-line options to designate tools that {% data variables.product.prodname_copilot_short %} can use without asking for your approval. +Alternatively, to reduce approval prompts without granting blanket permissions, enter `/permissions assisted` in an interactive session. With {% data variables.copilot.assisted_permissions %}, a large language model assesses eligible permission requests and automatically approves those it judges to be safe. Existing permissions and enterprise rules still apply, and requests that still need your approval are put to you. For more information, see [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). + #### Allowing all tools Use the `--allow-all-tools` to allow {% data variables.product.prodname_copilot_short %} to use any tool without asking for your approval. @@ -267,7 +270,7 @@ This option combines: * `--allow-all-paths` (disable path verification). * `--allow-all-urls` (disables URL verification). -During an interactive session, you can also enable all permissions with the `/allow-all` or `/yolo` slash commands. +During an interactive session, you can also enable all permissions with the `/permissions allow-all` slash command, or its aliases `/allow-all` and `/yolo`. > [!NOTE] {% data reusables.copilot.disable-bypass %} diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools.md index 3a8306fb296f..a0432a49c15a 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools.md @@ -18,9 +18,9 @@ docsTeamMetrics: {% data variables.copilot.copilot_cli_short %} uses a variety of tools to complete tasks for you. It can execute shell commands, read and write files, search your codebase, fetch web content, and delegate tasks to specialized sub-agents. -While read-only operations like searching, reading files, and running read-only shell commands are allowed automatically, tools that can modify your system—such as running destructive shell commands, editing files, or accessing URLs—require your explicit approval before {% data variables.product.prodname_copilot_short %} can use them. This helps avoid your use of the CLI resulting in changes you didn't intend because, for example, a shell command can do anything your user account can do: install packages, delete files, push code, or make network requests. +Read-only operations like searching, reading files, and running read-only shell commands are generally allowed automatically, subject to applicable policy. Other operations—such as running destructive shell commands, editing files, or accessing URLs—need permission before {% data variables.product.prodname_copilot_short %} can use them. Whether you're prompted depends on your existing permissions and permission mode. These controls help avoid unintended changes because, for example, a shell command can do anything your user account can do: install packages, delete files, push code, or make network requests. -You can allow or deny permissions for tools either when you start the CLI or during your interactive session. If you haven't granted permission prior to starting a session, {% data variables.copilot.copilot_cli_short %} will prompt you for permission each time it needs to perform a potentially destructive action. You can choose to allow the tool this one time, or for the remainder of the session. +You can allow or deny permissions for tools either when you start the CLI or during your interactive session. In manual approval mode, {% data variables.copilot.copilot_cli_short %} prompts you for requests that aren't already allowed. You can choose to allow the tool this one time, or for the remainder of the session. ## Persisted permissions @@ -99,16 +99,28 @@ Before you grant {% data variables.product.prodname_copilot_short %} wide-rangin * `--allow-all` or `--yolo` — Equivalent to using all of the `--allow-all-tools`, `--allow-all-paths`, and `--allow-all-urls` options when starting the CLI. - Within an interactive session, you can use the `/allow-all` or `/yolo` slash commands to allow all tools without needing to restart the session. + Within an interactive session, you can use the `/permissions allow-all` or `/yolo` slash commands to allow all tools without needing to restart the session. > [!CAUTION] > It is strongly recommended that you only use these options in an isolated environment. You should never use an alias to apply one of these options every time you start {% data variables.copilot.copilot_cli_short %}, as doing so would allow {% data variables.product.prodname_copilot_short %} to use any tool without your explicit permission every time you use the CLI, which could lead to unintended consequences. +### Reducing prompts with {% data variables.copilot.assisted_permissions %} + +The allow-all permissions options grant broad permissions without reviewing individual actions. To reduce approval prompts without granting blanket permissions, use the {% data variables.copilot.assisted_permissions %} option instead. + +To turn on {% data variables.copilot.assisted_permissions %}, enter the `/permissions assisted` slash command in an interactive session. A large language model assesses eligible permission requests and automatically approves those it judges to be safe. Existing permissions and enterprise rules still apply, and requests that still need your approval are put to you. Enter `/permissions manual` to return to manual approval, or `/permissions show` to check the current setting. You can also enter `/permissions`, with no argument, to choose a mode from a list. + +To use {% data variables.copilot.assisted_permissions %} by default in new interactive sessions when no managed default is configured, set `defaultPermissionMode` to `"assisted"` in your user configuration file. To use it for a non-interactive run, such as in a CI/CD workflow, use the `--assisted-approval` command line option. For more information, see [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). + ## Resetting permissions -The `/reset-allowed-tools` slash command revokes all permissions you granted during the current interactive session. This applies equally to permissions you gave by responding to prompts, and to the use of the `/allow-all` or `/yolo` slash commands. +The `/reset-allowed-tools` slash command revokes the permissions you granted during the current interactive session. This applies equally to permissions you gave by responding to prompts, and to the use of the `/permissions`, `/allow-all` or `/yolo` slash commands. It also returns the permission mode to manual, turning off allow-all permissions or {% data variables.copilot.assisted_permissions %} if either is on. + +Using `/reset-allowed-tools` returns permissions to the default, or to the baseline defined by the rule-based and URL command-line options you used when you started {% data variables.copilot.copilot_cli_short %}, such as `--allow-tool`, `--deny-tool`, `--allow-url`, and `--deny-url`. + +The command also clears all saved approvals for the current location from `permissions-config.json`, including both saved tool approvals and any saved directory permissions. In addition, it re-arms the autopilot permission dialog, so {% data variables.product.prodname_copilot_short %} will prompt you for autopilot permissions again if needed. -Using `/reset-allowed-tools` resets the permissions to the default, or to the state defined by any command-line options you used when you started {% data variables.copilot.copilot_cli_short %}. It also clears saved tool approvals for the current location from `permissions-config.json`. For example, if you start a {% data variables.copilot.copilot_cli_short %} interactive session with the option `--allow-tool='shell(git:*)'`, and then you allow and deny further permissions during the session by responding to prompts, when you then use the `/reset-allowed-tools` command, the CLI's permissions return to the original `--allow-tool='shell(git:*)'` state, with no other permissions allowed or denied. As you continue to work in the session, you will be prompted again if {% data variables.product.prodname_copilot_short %} needs additional permissions. +For example, if you start a {% data variables.copilot.copilot_cli_short %} interactive session with the option `--allow-tool='shell(git:*)'`, and then you allow and deny further permissions during the session by responding to prompts, when you then use the `/reset-allowed-tools` command, the CLI's permissions return to the original `--allow-tool='shell(git:*)'` state, with no other permissions allowed or denied. As you continue to work in the session, you will be prompted again if {% data variables.product.prodname_copilot_short %} needs additional permissions. To remove saved approvals for a different location, edit or delete the relevant location entry in `permissions-config.json`. For more information, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#permissions-configjson). diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli/connecting-vs-code.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli/connecting-vs-code.md index 58b200e337e4..0a59eb436a2d 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli/connecting-vs-code.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli/connecting-vs-code.md @@ -75,7 +75,7 @@ Explain this file When you ask {% data variables.product.prodname_copilot_short %} to make changes to a file in the workspace, {% data variables.product.prodname_vscode_shortname %} displays the proposed changes as a diff in a new editor tab. This makes it easy to see exactly what {% data variables.product.prodname_copilot_short %} is proposing. Use the accept (✓) or reject (✗) buttons in the top-right of the diff view to apply or discard the changes. Once you accept or reject the diff, the pending file-edit permission is resolved and the CLI continues its workflow. > [!NOTE] -> * The diff view is not shown if you have allowed {% data variables.product.prodname_copilot_short %} to edit files without your approval—for example, using the `--allow-all` or `--yolo` command-line options, or the `/allow-all` or `/yolo` slash commands. Instead, the proposed changes are applied directly to the file in the workspace without showing a diff, and the CLI continues immediately with the updated file content. +> * The diff view is not shown if you have allowed {% data variables.product.prodname_copilot_short %} to edit files without your approval—for example, using the `--allow-all` or `--yolo` command-line options, or the `/permissions allow-all` or `/yolo` slash commands. Instead, the proposed changes are applied directly to the file in the workspace without showing a diff, and the CLI continues immediately with the updated file content. > * If you prefer not to use the diff view in {% data variables.product.prodname_vscode_shortname %} you can turn this feature off in the `/ide` menu. When you turn this off, the proposed file changes are displayed in the CLI. ## Viewing and resuming CLI sessions in {% data variables.product.prodname_vscode_shortname %} diff --git a/content/copilot/how-tos/copilot-cli/use-copilot-cli/overview.md b/content/copilot/how-tos/copilot-cli/use-copilot-cli/overview.md index 1234ffd32a49..baf17075a6da 100644 --- a/content/copilot/how-tos/copilot-cli/use-copilot-cli/overview.md +++ b/content/copilot/how-tos/copilot-cli/use-copilot-cli/overview.md @@ -55,7 +55,7 @@ Install {% data variables.copilot.copilot_cli_short %}. See [AUTOTITLE](/copilot For some examples of prompts, see [AUTOTITLE](/copilot/concepts/copilot-surfaces/copilot-cli). -1. When {% data variables.product.prodname_copilot_short %} wants to use a tool that could modify or execute files—{% data reusables.cli.tools-needing-approval %}—it will ask you to approve the use of the tool. +1. Review any permission prompts that {% data variables.product.prodname_copilot_short %} displays. Tools that modify or execute files—{% data reusables.cli.tools-needing-approval %}—can require approval, depending on your existing permissions and permission mode. Choose one of the options: @@ -307,9 +307,12 @@ Details of your configured MCP servers are stored in the `mcp-config.json` file, {% data variables.copilot.copilot_cli %} automatically starts compressing your history in the background when your conversation approaches 80% of the token limit. This starting point is dynamic: when static context—your system messages and tool definitions—already uses a large share of the limit (roughly 75% or more), {% data variables.product.prodname_copilot_short %} waits until usage is closer to 90% before compacting, because compressing the conversation reclaims less space in that situation. If usage reaches approximately 95% before background compaction has finished, the CLI waits for it to complete before continuing. -### Enable all permissions +### Enable {% data variables.copilot.assisted_permissions %} -For situations where you trust {% data variables.product.prodname_copilot_short %} to run freely, you can use the `--allow-all` or `--yolo` flags to enable all permissions at once. +{% data variables.copilot.assisted_permissions_caps %} reduces approval prompts without granting blanket permissions. A large language model assesses eligible permission requests and automatically approves those it judges to be safe. Existing permissions and enterprise rules still apply, and requests that still need your approval are put to you. To turn it on during an interactive session, enter `/permissions assisted`. For more information, see [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). + +> [!NOTE] +> To grant broad permissions without a model safety review, use the `--allow-all` or `--yolo` command line options (or the `/permissions allow-all` or `/yolo` slash commands within an interactive session). These options can allow destructive commands to run without individual approval, so only use them in a sandboxed or otherwise isolated environment. Deny rules and enterprise restrictions still apply. ### Use sandboxing @@ -317,9 +320,9 @@ You can use sandboxing to restrict what {% data variables.product.prodname_copil Alternatively, with cloud sandboxing, the entire {% data variables.copilot.copilot_cli_short %} session runs remotely in an isolated environment. To start a {% data variables.copilot.copilot_cli_short %} session in the cloud, run `copilot --cloud`. For more information, see [AUTOTITLE](/copilot/concepts/about-cloud-and-local-sandboxes). -### Toggle reasoning visibility +### Toggle model thinking visibility -Press Ctrl+T to show or hide the model's reasoning process while it generates a response. This setting persists across sessions, allowing you to observe how {% data variables.product.prodname_copilot_short %} works through complex problems. +Press Ctrl+T to show or hide the model's thoughts as it works on a task. This expands/collapses text in the model output in the conversation in your interactive session. This setting persists across sessions, allowing you to observe how {% data variables.product.prodname_copilot_short %} works through complex problems. ### Configure settings diff --git a/content/copilot/how-tos/github-copilot-app/agent-sessions.md b/content/copilot/how-tos/github-copilot-app/agent-sessions.md index 5b147537de15..ab0671a658d6 100644 --- a/content/copilot/how-tos/github-copilot-app/agent-sessions.md +++ b/content/copilot/how-tos/github-copilot-app/agent-sessions.md @@ -29,12 +29,36 @@ For a list of commands you can use in the prompt box, see [AUTOTITLE](/copilot/r ## Choosing a session mode -The session mode controls how much autonomy the agent has. You can set the mode from the dropdown below the prompt field and change it at any time. +The session mode controls how the agent works with you. It is separate from tool permissions, which control when the agent asks before running a tool. You can set the mode from the dropdown below the prompt field and change it at any time. * **Interactive**: You and the agent work together. The agent suggests changes and waits for your input before proceeding. * **Plan**: The agent creates a plan first. You review and approve the plan before the agent executes it. * **Autopilot**: The agent works fully autonomously—writing code, running tests, and iterating without waiting for input. +## Choosing tool permissions + +In an app session, {% data variables.product.prodname_copilot_short %} uses tools to complete tasks, such as running terminal commands, reading and editing files, searching your codebase, fetching web content, and delegating work to specialized agents. Some tools can modify your system or access external resources, so tool permissions control when {% data variables.product.prodname_copilot_short %} asks for your approval before using them. + +You can choose between three options that determine how much you want to be involved in approving the tools {% data variables.product.prodname_copilot_short %} uses. + +* **Manual approval (Ask every time)**: Ask for your approval before running tools. This gives you the most oversight but requires you to respond to the most prompts. +* **Assisted**: Use a model to assess each request, automatically approving requests it judges to be safe and prompting you to approve potentially unsafe requests. {% data variables.copilot.assisted_permissions_caps %} reduces prompts while maintaining oversight of potentially risky actions. +* **Unconditional approval (Approve all)**: Run tools without asking for your approval. This is the most convenient option but removes your oversight of individual actions. + +For more information about using {% data variables.copilot.assisted_permissions %}, see [AUTOTITLE](/copilot/concepts/agents/allowing-safe-commands). + +To choose the permission level for an individual session: + +1. In the session, click the mode below the prompt field. +1. Hover over **Tool permissions**. +1. Select **Ask every time**, **Assisted**, or **Approve all**. + +To set the default permission level for future local sessions: + +1. Open the app settings. +1. Click **Sessions**. +1. Under **Tool permissions**, select **Ask every time**, **Assisted**, or **Approve all**. + ## Choosing a model You can select a model and reasoning effort from the dropdowns below the prompt field. Higher reasoning effort gives the agent more time to think through complex problems but may take longer. You can change both settings at any time during a session. diff --git a/content/copilot/reference/copilot-cli-reference/cli-command-reference.md b/content/copilot/reference/copilot-cli-reference/cli-command-reference.md index 23fb2ab4f674..c08d2dec7cc4 100644 --- a/content/copilot/reference/copilot-cli-reference/cli-command-reference.md +++ b/content/copilot/reference/copilot-cli-reference/cli-command-reference.md @@ -542,7 +542,7 @@ These are the slash commands you can use from within an interactive CLI session. | `/agent` | Browse and select from available agents (if any). See [AUTOTITLE](/copilot/concepts/customizations/custom-agents). | | `/app` | Open the current session in the {% data variables.copilot.github_copilot_app %} (requires version 1.1.3 or later), or show the download URL if the app is not installed. | | `/ask [QUESTION]`, `/btw [QUESTION]` | Ask a quick side question without adding to the conversation history. The response renders as Markdown. In the answer dialog, press Ctrl+E to expand it and Ctrl+Y to copy the full answer. Enter the command without a question to reopen the last side question answer in the current session. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/ask-a-side-question). | -| `/allow-all [off\|auto\|show]`, `/yolo [off\|auto\|show]` | Enable all permissions (tools, paths, and URLs). This is an alias for `/permissions allow-all`; see the `/permissions` row for the canonical command and its subcommands. | +| `/allow-all [on\|off\|show]`, `/yolo [on\|off\|show]` | Enable all permissions (tools, paths, and URLs). This is an alias for `/permissions allow-all`; see the `/permissions` row for the canonical command and its subcommands. | | `/autopilot [OBJECTIVE]`, `/goal [OBJECTIVE]` | Start or refocus autopilot mode, optionally with an explicit objective (for example, `/goal Refactor the auth module`). Without an objective, autopilot infers intent from context, and the status panel shows your last prompt as the inferred objective. You can cap AI-credit spend for the objective by using `--max-ai-credits N` (for example, `/goal Refactor the auth module --max-ai-credits 5`). When the cap is reached, autopilot pauses and opens a panel reporting credits used against the cap. Enter a new amount to resume with a fresh credit window, or dismiss the panel to stay paused. You can also resume a paused objective yourself, without the panel, by running the option on its own with no objective text—for example, `/goal --max-ai-credits 5`. This is the same action the panel performs: it opens a fresh window of the credits you specify (the full new cap, not an increment) and continues the objective. `/goal on` and `/goal off` toggle autopilot mode without setting an objective and don't accept `--max-ai-credits`. An active goal renders as a pinned panel above the prompt box, showing the objective, credits used, and todo progress. The panel auto-collapses to a single identity row on short terminals (below 30 rows) and expands above that threshold; press Ctrl+X then `g` to override the automatic sizing by hand. | | `/changelog [summarize] [VERSION\|last N\|since VERSION]`, `/release-notes [summarize] [VERSION\|last N\|since VERSION]` | Display the CLI changelog. Optionally specify a version, a count of recent releases, or a starting version. Add the keyword `summarize` for an AI-generated summary. | | `/chronicle ` | Session history tools and insights. The `skills` subcommands draft, review, and track the status of repository skill proposals generated from observed usage. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/chronicle#using-the-chronicle-slash-command). | @@ -578,7 +578,7 @@ These are the slash commands you can use from within an interactive CLI session. | `/lsp [show\|test\|reload\|logs\|help] [SERVER-NAME]` | Manage the language server configuration. The `logs` subcommand opens the live LSP services log panel. | | `/mcp [config\|list\|show\|add\|edit\|delete\|disable\|enable\|auth\|reload\|search] [SERVER-NAME]` | Manage the MCP server configuration. With no subcommand, or with `config`, the plugins dashboard opens pinned to the MCP server list; the add, edit, and authenticate forms open inside that dashboard too, so closing a form returns you to the server list. Use `show` or `show SERVER-NAME` to display all configured servers or open one server's details directly, including its available tools, and to enable or disable it. For a plugin-provided server, `show SERVER-NAME` also displays the source attribution (for example, `Source: Plugin my-plugin (1.2.0)`). `list` (alias `ls`) prints a plain-text list of configured servers with connection status and live state. Bare `/mcp`, `config`, `show`, and `list` (alias `ls`) are read-only or open the dashboard, so they can run while the agent is busy processing a turn. The mutating subcommands (`add`, `edit`, `delete`, `disable`, `enable`, `auth`, `reload`, and `search`) are blocked until the turn finishes. `edit ` rejects a workspace-sourced server (one defined in a repository's `.mcp.json`) instead of opening the user-tier wizard, since saving would silently create a same-name user entry that the workspace one still shadows. The error names the file to edit directly. `delete ` reports the same file when asked to remove a workspace-sourced server. Sandboxed local servers show a `connected (sandboxed)` status. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers#managing-mcp-servers). | | `/model [--session\|--global\|--repo\|--local] [MODEL\|auto TIER]`, `/models` | Select the AI model you want to use, or choose **Auto**. Model IDs are case-insensitive, and the canonical ID is saved. By default (or with `--session`, alias `-s`), changes the model, reasoning effort, or context window for the current session only, without touching saved settings. `--repo`/`--local` pins the default model in repository settings instead; `--global` (or `/config model`) sets the default for future sessions. Press Tab on a model with a long-context variant to toggle its Context column between the default and long-context window. The picker groups models into sections—press Shift+Tab to cycle grouping between recommended (Recent, Recommended, New, and other models), vendor, and category. The picker marks your effective managed default model with the default badge when it is selectable. A model with vendor-specific data retention terms shows a data retention warning banner with a link to the vendor's policy. Usable mid-turn: a change requested while the agent is running is queued as a cancellable (Ctrl+C) command and applied once the current turn finishes, instead of switching the live model mid-request. Use `/model auto TIER` (`efficiency`, `balance`, or `intelligence`) to select a specific Auto routing tier directly, including from the "switch" action on an Auto tier recommendation hint. When Auto picks a model, the timeline shows the reason for that choice whenever the API provides one. See [AUTOTITLE](/copilot/concepts/models/auto-model-selection). | -| `/permissions [default\|assisted\|allow-all\|show]` | Switch between permission modes (`default`, `assisted`, `allow-all`), or show the current mode (`show`). This is the canonical command for permission mode changes; `/allow-all` and `/yolo` remain supported as aliases. | +| `/permissions [default\|assisted\|allow-all\|show]` | Switch between permission modes (`default`, `assisted`, `allow-all`), or show the current mode (`show`). This is the canonical command for permission mode changes; `/allow-all` and `/yolo` remain supported as aliases. For information about assisted permissions, see [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). | | `/permissions reset` | Reset all in-memory tool and path approvals for the current session (re-prompt on next use). | | `/plan [PROMPT]` | Create an implementation plan before coding. | | `/plugin` | Open the plugins dashboard showing your installed plugins. Select a plugin and press Enter for its details and for actions such as enabling, disabling, updating, or uninstalling it. Use the ← and → keys to switch between the **Installed**, **Online**, and **Marketplace** views. The dashboard shows only plugins—use `/mcp` for MCP servers and `/skills` for skills. See [AUTOTITLE](/copilot/concepts/agents/about-plugins). | @@ -596,7 +596,7 @@ These are the slash commands you can use from within an interactive CLI session. | `/remote [on\|off]` | Show the remote control status (if no argument provided), enable remote steering (`on`), or end the remote connection (`off`). See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/steer-remotely). | | `/rename [NAME]` | Rename the current session (auto-generates a name if omitted; alias for `/session rename`). | | `/research TOPIC` | Run a deep research investigation using {% data variables.product.github %} search and web sources. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/research-with-copilot-cli). | -| `/reset-allowed-tools` | Reset the list of allowed tools. | +| `/reset-allowed-tools` | Reset permissions for the current session. This clears session tool approvals, returns the permission mode to manual (turning off allow-all or {% data variables.copilot.assisted_permissions %} if either is on), and clears the approvals saved for the current location. Explicit startup rules, such as `--allow-tool`, `--deny-tool`, `--allow-url`, and `--deny-url`, remain part of the session's baseline. | | `/restart` | Restart the CLI, restoring all of the current process's live sessions, not only the foreground one. If the target CLI version can't restore multiple sessions, you're prompted to continue with only the foreground session or cancel. | | `/resume [SESSION-ID]`, `/continue [SESSION-ID]` | Switch to a different session by choosing from a list (optionally specify a session ID). | | `/review [PROMPT]` | Run the code review agent to analyze changes. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/agentic-code-review). | @@ -670,11 +670,12 @@ Use `/collect-debug-logs [file|gist|share] [PATH]` to gather debug logs for trou | `--allow-all` | Enable all permissions (equivalent to `--allow-all-tools --allow-all-paths --allow-all-urls`). | | `--allow-all-mcp-server-instructions` | Include initialization instructions from all MCP servers in the system prompt. By default, only allowlisted server instructions are included up front; other servers' instructions are retrieved on demand. | | `--allow-all-paths` | Disable file path verification and allow access to any path. | -| `--allow-all-tools` | Allow all tools to run automatically without confirmation. Required when using the CLI programmatically (env: `COPILOT_ALLOW_ALL`). | +| `--allow-all-tools` | Grant blanket tool permissions without a model safety review or individual approval prompts. Deny rules and enterprise restrictions still apply (env: `COPILOT_ALLOW_ALL`). | | `--allow-all-urls` | Allow access to all URLs without confirmation. | | `--allow-tool=TOOL ...` | Tools the CLI has permission to use. Will not prompt for permission. For multiple tools, use a quoted, comma-separated list. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools#allowing-or-denying-permission-for-specific-tools). | | `--allow-url=URL ...` | Allow access to specific URLs or domains. For multiple URLs, use a quoted, comma-separated list. | | `--acp` | Start as Agent Client Protocol server. | +| `--assisted-approval` | Turn on {% data variables.copilot.assisted_permissions %} for the run, so that a safety review can approve eligible permission requests. Only valid for non-interactive runs—that is, runs that use `-p` or `--prompt`, and runs in an environment with no terminal attached. When successfully enabled, takes precedence over `--allow-all-tools`, but does not affect `--allow-all-paths` or `--allow-all-urls` (env: `COPILOT_ASSISTED_APPROVAL`). See [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). | | `--attachment PATH` | Attach a file to the initial prompt (can be used multiple times). Image files are accepted, but sending them successfully requires the selected model and organization policy to allow vision input. | | `--autopilot` | Enable autopilot continuation—the agent keeps working until `task_complete` is called, then returns to interactive mode. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/use-autopilot-mode). | | `--available-tools=TOOL ...` | Only these tools will be available to the model. For multiple tools, use a quoted, comma-separated list. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools). | @@ -745,9 +746,9 @@ Use `/collect-debug-logs [file|gist|share] [PATH]` to gather debug logs for trou For a complete list of commands and options, run `copilot help`. > [!NOTE] -> Remote session features require availability on your account. The legacy `--remote` flag is not an interactive-session control, and `--no-remote` is no longer supported. - -To enable remote control during an interactive session, use `/remote on`. To end the remote connection, use `/remote off`. +> Remote session features require availability on your account. The legacy `--remote` option is not an interactive-session control, and `--no-remote` is no longer supported. +> +> To enable remote control during an interactive session, use `/remote on`. To end the remote connection, use `/remote off`. If a session was still open when its CLI process went away, for example due to a crash or a machine restart, the next time you start `copilot` you're offered the option to restore it. You can review the sessions available to restore or start a fresh session instead. A restored session whose agent was mid-turn automatically resumes that work. @@ -769,23 +770,47 @@ The CLI also warns when a managed policy enables sandboxing in a session that yo If a device has a managed policy that could not be read, the CLI fails closed and enforces sandboxing at its most restrictive level. The notice explains that the policy couldn't be determined and tells you to wait for it to resolve. The startup warning for an unsupported host uses the same wording. -### Restricting the --allow-all options +### Restricting the allow-all options When `permissions.disableBypassPermissionsMode` is set to `"disable"`, all of the command line options that allow all permissions (`--allow-all-tools`, `--allow-all-paths`, `--allow-all-urls`, `--allow-all`, `--yolo`) are suppressed at startup and cannot be used to grant elevated permissions. The CLI shows a policy warning when it suppresses these options. The `/permissions allow-all` slash command, and its aliases `/allow-all` and `/yolo`, are also suppressed. +This setting does not turn off {% data variables.copilot.assisted_permissions %}, which are controlled separately. + +#### What `disable` turns off + +When the value of `permissions.disableBypassPermissionsMode` is `disable`, the command line options that grant all permissions have no effect. These options are: `--allow-all-tools`, `--allow-all-paths`, `--allow-all-urls`, `--allow-all`, and `--yolo`. + +The restriction also applies during an interactive session. Slash commands that would turn on the allow-all mode are still available but are refused with an explanatory message. + +| Command | Result with `disable` | +|---------|------------------------| +| `/permissions allow-all` | Refused | +| `/allow-all` (and its alias `/yolo`) with no arguments, or `on` | Refused | +| `/permissions assisted` | Allowed | +| `/allow-all off`, `/allow-all show`, `/permissions default`, `/permissions show` | Allowed | -Set `permissions.disableBypassPermissionsMode` to `"allow-auto-only"` to block full allow-all permissions but permit `/permissions assisted` (LLM-assisted permission approval). Assisted approval still prompts for each request, but attaches an LLM safety recommendation so the CLI can auto-approve requests the model evaluates as acceptable. +When an allow-all command is refused, the message depends on where the restriction comes from. A restriction from your own settings reports "Bypass permissions mode has been disabled in your settings." A restriction from managed or MDM policy reports "Bypass permissions mode has been disabled by policy. Contact your administrator for more information." -If `permissions.disableBypassPermissionsMode` is set to an unrecognized value, the CLI no longer rejects it outright. Instead, the CLI logs the issue and enforces `"disable"` as a fail-closed default, so a malformed managed policy still restricts the allow-all options instead of silently allowing them. +#### Unrecognized values -Three sources can set this restriction, in increasing order of permanence: +If `permissions.disableBypassPermissionsMode` is set to a value this version does not recognize, the CLI does not reject it. Instead it logs the value and enforces `disable` as a safe default. A malformed policy still restricts the allow-all options rather than silently allowing them. + +#### Where the setting can come from + +Three sources can set `permissions.disableBypassPermissionsMode`. They are listed in increasing order of permanence. | Source | Scope | Cleared by account switch? | |--------|-------|---------------------------| -| User settings (`~/.copilot/settings.json`) | Machine | No — applies to all accounts | -| Managed settings (server-fetched per account) | Account | Yes — cleared when switching to a different account that does not disable the allow-all options | -| MDM policy (plist/registry/file) | Device | Never — device-level policy that cannot be overridden by account switches | +| User settings (`~/.copilot/settings.json`) | Machine | No. It applies to all accounts. | +| Managed settings (server-fetched per account) | Account | Yes. The CLI loads the policy for the newly active account. | +| MDM policy (plist/registry/file) | Device | Never. Device-level policy is not overridden by account switches. | + +### How the restriction behaves when the policy cannot be confirmed + +A failed policy check does not necessarily leave the session unrestricted. The CLI distinguishes an unmanaged account or device from one whose applicable managed policy cannot be confirmed. -For MDM configuration details, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#mdm-managed-settings). +* **Unconfirmed managed policy can restrict permissions.** While policy checks are pending, or when policy cannot be confirmed for a managed account or device, the CLI can block permission escalation and require explicit approval for actions. This can apply even if no earlier policy disabled the allow-all options. +* **Server policy is account-specific.** If a refresh fails, previously retrieved policy for the same account can remain in effect. Switching accounts loads the new account's policy rather than carrying over the previous account's server policy. +* **Device restrictions persist across accounts.** Switching accounts does not remove MDM restrictions or user settings that block permission modes. A server response that omits the setting does not override those restrictions. ## Supported models @@ -885,6 +910,7 @@ copilot --deny-tool='write(secret.txt)' | Variable | Description | |----------|-------------| | `COPILOT_ALLOW_ALL` | Allow all permissions automatically (equivalent to `--allow-all`). Accepts `true`, `1`, `yes`, `on`, or `y` (case-insensitive, surrounding whitespace ignored) to turn it on; `false`, `0`, `no`, `off`, `n`, or an empty value to turn it off. Setting it to exactly `true` also trusts the working directory without prompting, loading that directory's skills, plugins, MCP servers, and hooks (including hooks that run shell commands). The other truthy spellings only auto-approve tools. | +| `COPILOT_ASSISTED_APPROVAL` | Set to `true` to turn on {% data variables.copilot.assisted_permissions %} for a non-interactive run (equivalent to `--assisted-approval`). | | `COPILOT_AUTO_UPDATE` | Set to `false` to disable automatic updates of the CLI and first-party plugins. | | `COPILOT_CACHE_HOME` | Override the cache directory (used for marketplace caches, auto-update packages, and other ephemeral data). See [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#changing-the-location-of-the-configuration-directory) for platform defaults. | | `COPILOT_CHILD_OOM_SCORE_ADJ` | Linux only. Overrides the `oom_score_adj` bias applied to shell command process trees spawned by the CLI, so the kernel's out-of-memory (OOM) killer reclaims a runaway child process tree (for example, a build) before the CLI itself. Default: `300`. Range: `-1000`–`1000`. Set to `off` to disable the bias. | @@ -1209,7 +1235,7 @@ MCP servers are loaded from multiple sources, each with a different trust level. | User config (`~/.copilot/mcp-config.json`) | User-defined | User responsibility | | Remote servers | Low | Always | -All MCP tool invocations require explicit permission. This applies even to read-only operations on external services. +MCP tool invocations are subject to the session's permission rules, including existing approvals and {% data variables.copilot.assisted_permissions %} when enabled. Even read-only operations on external services can require approval. ### MCP server loading priority @@ -1607,7 +1633,7 @@ When the full dialog is shown, you can also choose from these options: The **This location** option appears when the CLI can determine a location key (Git root or current directory). It persists the approval to disk so the same permission is automatically granted the next time you work in that directory without prompting again. -Use `/permissions reset` to clear in-memory approvals for the current session. +Use `/reset-allowed-tools` to clear session approvals for the current session. ## Security @@ -1632,7 +1658,7 @@ Shell commands are analyzed before execution to identify potentially dangerous p * Credential access (reading `.env`, SSH keys) * Inline environment variable assignments that override dangerous variables (for example, `PATH=...`, `LD_PRELOAD=...`) -High-risk commands display additional warnings and require explicit confirmation. +High-risk commands can trigger additional warnings and approval prompts. Whether a request needs your approval depends on the permissions in effect. When sandboxing is enabled and the **Allow sandbox bypass** setting is on (the default), a synchronous shell command that's blocked by the sandbox's filesystem or network policy prompts you to re-run it outside the sandbox—no model round-trip is required. Approving the prompt re-runs the command and returns its output. Declining keeps the sandboxed (blocked) result. @@ -1808,7 +1834,7 @@ Wraps the entire agent invocation: all LLM calls and tool executions for one use | `gen_ai.agent.description` | Agent description (when available) | Both | | `gen_ai.agent.version` | Agent definition version when known; otherwise runtime version | Both | | `gen_ai.conversation.id` | Session identifier | Both | -| `enduser.pseudo.id` | Pseudonymous Copilot user identifier from `analytics_tracking_id` when available | Both | +| `enduser.pseudo.id` | Pseudonymous {% data variables.product.prodname_copilot_short %} user identifier from `analytics_tracking_id` when available | Both | | `gen_ai.request.model` | Requested model | Both | | `gen_ai.response.finish_reasons` | `["stop"]` or `["error"]` | Both | | `gen_ai.usage.input_tokens` | Total input tokens (all turns) | Both | diff --git a/content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md b/content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md index 0796a6d5a073..fd39b53c7ccf 100644 --- a/content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md +++ b/content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md @@ -463,6 +463,8 @@ These settings apply across all your sessions and repositories. You can use the | `continueOnAutoMode` | `boolean` | `false` | Automatically switch to auto mode when rate-limited. When `true`, eligible rate limit errors trigger an automatic switch to auto mode and retry. Does not apply to global rate limits or BYOK providers. | | `copyOnSelect` | `boolean` | `true` (macOS), `false` (other) | Automatically copy mouse-selected text to the system clipboard. | | `customAgents.defaultLocalOnly` | `boolean` | `false` | Only use local custom agents (no remote organization or enterprise agents). | +| `defaultMode` | `"interactive"` \| `"plan"` \| `"autopilot"` | `"interactive"` | The agent mode that new interactive sessions start in. The `--mode`, `--autopilot`, and `--plan` options take precedence. Resumed sessions keep their own mode, and the setting is ignored for `-p`/`--prompt`, `--server`, and `--acp` runs. | +| `defaultPermissionMode` | `"manual"` \| `"assisted"` \| `"allow-all"` | Varies | Your preferred permission mode for new interactive sessions. A managed `permissions.defaultMode` takes precedence over this preference. If neither default is set, sessions can start in manual or assisted mode. Set `"manual"` to prompt for requests that aren't already allowed, `"assisted"` to use model review for eligible requests, or `"allow-all"` to grant broad permissions equivalent to `--allow-all`. Deny rules and enterprise restrictions still apply. See [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). Resumed sessions keep their own mode. The setting does not apply to non-interactive runs, and `--allow-all` or `--yolo` takes precedence. An assisted startup default does not apply to remote sessions. If a configured mode is unavailable or blocked by enterprise policy, the CLI starts with manual approval and tells you why. Pair `"assisted"` or `"allow-all"` with `defaultMode: "autopilot"` to skip the autopilot permission confirmation when the configured permission mode can be applied. | | `deniedUrls` | `string[]` | `[]` | URLs or domains that are always denied. Denial rules take precedence over allow rules. | | `disableAllHooks` | `boolean` | `false` | Disable all hooks (both repository-level and user-level). | | `disabledMcpServers` | `string[]` | `[]` | MCP server names to disable. Listed servers are configured but not started. | @@ -486,7 +488,7 @@ These settings apply across all your sessions and repositories. You can use the | `mergeStrategy` | `"rebase"` \| `"merge"` | — | Conflict resolution strategy for `/pr fix conflicts`. When set to `"rebase"`, conflicts are resolved by rebasing onto the base branch. When set to `"merge"`, the base branch is merged into the feature branch. If not configured, a picker dialog is shown. | | `model` | `string` | varies | AI model to use. Set to `"auto"` to let {% data variables.product.prodname_copilot_short %} pick the best available model automatically. Managed by the `/model` slash command. | | `mouse` | `boolean` | `true` | Enable mouse support. Can also be set with `--mouse` or `--no-mouse`. | -| `permissions.disableBypassPermissionsMode` | `string` | — | Set to `"disable"` to suppress all allow-all flags (`--allow-all-tools`, `--allow-all-paths`, `--allow-all-urls`, `--allow-all`, `--yolo`) at startup so they cannot be used to grant elevated permissions. Set to `"allow-auto-only"` to keep blocking full allow-all while still permitting `/allow-all auto` (LLM-assisted auto-approval). See [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#restricting-the---allow-all-options). | +| `permissions.disableBypassPermissionsMode` | `string` | — | Set to `"disable"` to block all allow-all options (`--allow-all-tools`, `--allow-all-paths`, `--allow-all-urls`, `--allow-all`, `--yolo`). This setting does not block {% data variables.copilot.assisted_permissions %}, which are controlled separately. Other values are treated as an alias of `"disable"` and a warning is written to the log. See [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#restricting-the-allow-all-options). | | `pinnedPrompts` | `boolean` | `true` | Pin the current section's user prompt just below the top bar while scrolling the timeline, so it stays clear which request the visible output belongs to. CLI UI only—has no effect on prompts sent to the model. | | `powershellFlags` | `string[]` | `["-NoProfile", "-NoLogo"]` | Flags passed to PowerShell on startup. On Windows, the CLI prefers PowerShell 7+ (`pwsh`) and falls back to Windows PowerShell (`powershell.exe`) when `pwsh` is unavailable. Windows only. | | `proxyKerberosServicePrincipal` | `string` | unset | Service principal name (SPN) for Kerberos/Negotiate proxy authentication, overriding the derived `HTTP/`. | @@ -684,7 +686,7 @@ Only the following keys are supported in MDM managed settings. > [!NOTE] > * `policyHelper.path` accepts an absolute path, a home-relative path (`~/...`), or a bare program name resolved from `PATH`. Other relative forms are rejected. The registration is accepted and validated, but the runtime doesn't yet invoke the helper—helper execution ships in a future release. > * When `remoteControl.mode` is `"requireSSO"`, list the allowed organizations in `remoteControl.githubDotComOrganizations`. The client must be SSO-authorized for at least one listed {% data variables.product.prodname_dotcom_the_website %} organization—it no longer needs to be authorized for all of them. -> * Set `permissions.disableBypassPermissionsMode` to `"disable"` in MDM managed settings to enforce the restriction at the device level. Account switches cannot override this policy. Set it to `"allow-auto-only"` to block full allow-all escalation while still permitting `/permissions assisted` (LLM-assisted permission approval). If an unrecognized value is set, the CLI logs the issue and enforces `"disable"` as a fail-closed default, so a malformed managed policy still restricts the allow-all options instead of silently allowing them. See [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#restricting-the---allow-all-options). +> * Set `permissions.disableBypassPermissionsMode` to `"disable"` in MDM managed settings to block allow-all options at the device level. Account switches cannot override this policy. If an unrecognized value is set, the CLI logs the issue and enforces `"disable"` as a fail-closed default. See [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#restricting-the-allow-all-options). > * Most managed keys lock the entire row: a local edit is silently overridden by the managed value on the next load. `enabledPlugins` and `extraKnownMarketplaces` are the exception—the managed layer merges these maps with your own entries field-by-field instead of replacing them outright. This means the lock applies **per entry**, not to the whole key: a plugin or marketplace pinned by a managed policy can't be re-enabled, disabled, or repointed locally, but other entries in the same map remain fully user-controlled. > * `sandbox.learningMode` is Windows-only and can only be set through native MDM (for example, through Intune or the registry)—a `managed-settings.json` file value is ignored. On a host with denial capture, set it to `"allow"` to start sandboxed shell commands in record-and-allow mode instead of the default record-and-deny mode, recording each filesystem or process access and allowing it rather than refusing it (network policy is still enforced). This lets an administrator observe what a cohort's commands need before locking them down; it is not a containment mode. The status line shows `sandbox relaxed` and shell calls show `(sandbox relaxed)` while it applies. A `deny` value (the default), or removing the key, returns the cohort to the ordinary enforced sandbox, and `deny` from any managed channel always wins over `allow`. User settings and SDK hosts cannot set this key. diff --git a/content/copilot/reference/copilot-cli-reference/cli-programmatic-reference.md b/content/copilot/reference/copilot-cli-reference/cli-programmatic-reference.md index 7b39ecb9b18f..d543f34181e8 100644 --- a/content/copilot/reference/copilot-cli-reference/cli-programmatic-reference.md +++ b/content/copilot/reference/copilot-cli-reference/cli-programmatic-reference.md @@ -38,6 +38,7 @@ There are a number of command-line options that are particularly useful when run | `--allow-all-urls` | Allow access to all URLs without explicit permission for each URL. | | `--allow-tool=TOOL ...` | Selectively grant permission for a specific tool. For multiple tools, use a quoted, comma-separated list. | | `--allow-url=URL ...` | Allow the agent to fetch a specific URL or domain. Useful when a workflow needs web access to known endpoints. For multiple URLs, use a quoted, comma-separated list. | +| `--assisted-approval` | Turn on {% data variables.copilot.assisted_permissions %} for the run, so that a safety review can approve eligible permission requests. Only valid for non-interactive runs. See [Using {% data variables.copilot.assisted_permissions %}](#using-assisted-permissions) below. | | `--attachment=PATH ...` | Attach a file (image or native document) to the initial prompt. Only valid in non-interactive mode. Can be used multiple times to attach multiple files. | | `--available-tools=TOOL ...` | Restrict the model to only the tools you list; all other tools are unavailable. Useful for tightly scoping what the agent can do in an automated workflow. For multiple tools, use a quoted, comma-separated list. | | `--deny-tool=TOOL ...` | Deny a specific tool. Useful for restricting what the agent can do in a locked-down workflow. For multiple tools, use a quoted, comma-separated list. | @@ -140,6 +141,7 @@ You can use environment variables to configure various aspects of the CLI's beha | Variable | Description | | --------------------- | ------------- | | `COPILOT_ALLOW_ALL` | Set to `true` for full permissions | +| `COPILOT_ASSISTED_APPROVAL` | Set to `true` to turn on {% data variables.copilot.assisted_permissions %} for a non-interactive run | | `COPILOT_MODEL` | Set the model (for example, `gpt-6-astra`, `claude-haiku-4.5`) | | `COPILOT_HOME` | Set the directory for the CLI configuration file (`~/.copilot` by default) | | `COPILOT_AUTO_UPDATE` | Set to `false` to disable automatic updates. Useful in CI and other automated environments where you want to pin the CLI version. | @@ -150,6 +152,33 @@ You can use environment variables to configure various aspects of the CLI's beha For full details of environment variables for {% data variables.copilot.copilot_cli_short %}, use the command `copilot help environment` in your terminal. +## Using {% data variables.copilot.assisted_permissions %} + +In a non-interactive run there is nobody available to answer approval prompts. Without any permission options, requests that need approval are denied, and {% data variables.product.prodname_copilot_short %} often can't finish the task. With `--allow-all-tools`, you grant blanket tool permissions without a model safety review. + +The `--assisted-approval` option is the middle ground. A safety review can assess eligible requests that aren't already resolved by existing permissions: + +* If the review judges the request to be safe, it's approved automatically and {% data variables.product.prodname_copilot_short %} continues. +* If the review requires your approval, the request is denied and the reason is passed back to {% data variables.product.prodname_copilot_short %}, so that it can try a different approach to complete the task. + +Existing deny rules, mandatory approval requirements, and sandbox protections still apply. Requests that still require your approval are denied in non-interactive runs. + +For more information about how the safety review works, and which model is used, see [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). + +```shell copy +copilot -p "Fix the failing tests" --assisted-approval +``` + +You can set the `COPILOT_ASSISTED_APPROVAL` environment variable to `true` instead of using the option. This is useful in automated environments where you can't easily change the command that's run. + +### Things to be aware of + +* **The option is only valid for non-interactive runs.** These are runs that use `-p` or `--prompt`, and runs in an environment with no terminal attached, such as a CI/CD workflow. If you use `--assisted-approval` when starting an interactive session, the CLI exits with an error. + +* **It overrides `--allow-all-tools` when successfully enabled.** Tool requests use {% data variables.copilot.assisted_permissions %} instead of blanket tool approval. However, `--allow-all-paths` and `--allow-all-urls`—including when they're set by `--allow-all` or `--yolo`—are unaffected, so file and URL access can still be unrestricted. + +* **Check for a warning if the run must not proceed without a safety review.** If {% data variables.copilot.assisted_permissions %} can't be turned on, because your enterprise settings block it for example, the CLI writes a warning to standard error and continues. It does not cancel a separate `--allow-all-tools` option that you supplied, so tool requests may still be approved without a safety review. + ## Choosing a model When you send a prompt to {% data variables.copilot.copilot_cli_short %} in non-interactive mode, the model that the CLI uses to generate a response is shown in the response output (if the `-s`, or `--silent`, option is not used). diff --git a/content/copilot/reference/copilot-usage-metrics/copilot-usage-metrics.md b/content/copilot/reference/copilot-usage-metrics/copilot-usage-metrics.md index 0b613f239bec..9afa23afd495 100644 --- a/content/copilot/reference/copilot-usage-metrics/copilot-usage-metrics.md +++ b/content/copilot/reference/copilot-usage-metrics/copilot-usage-metrics.md @@ -126,19 +126,20 @@ Per-user reports contain one record per user for the reporting period. The 28-da | `used_copilot_code_review_passive` | `boolean` | Yes | Whether the user had {% data variables.product.prodname_copilot_short %} automatically assigned to review their pull request that day, without actively engaging with the review. Null when there is no {% data variables.copilot.copilot_code-review_short %} signal for the user that day. | | `used_vscode_agent` | `boolean` | Yes | Whether the user used the dedicated {% data variables.product.prodname_vscode_shortname %} Agents window during the reporting period. Omitted when no dedicated Agents-window data is available for the user. | | `ai_adoption_phase` | `object` | No | The user's AI adoption phase for the day. Always present; defaults to the "No Cohort" phase. See [AI adoption phase fields](#ai-adoption-phase-fields). | -| `distinct_skill_use_count` | `integer` | Yes | Number of different skill identifiers with recorded activity for the user. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `distinct_custom_agent_use_count` | `integer` | Yes | Number of different custom agent identifiers with recorded activity for the user. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `distinct_mcp_use_count` | `integer` | Yes | Number of different Model Context Protocol (MCP) server identifiers with recorded connection activity for the user. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `distinct_slash_cmd_use_count` | `integer` | Yes | Number of different slash command identifiers with recorded activity for the user. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `distinct_plugin_use_count` | `integer` | Yes | Number of different plugin identifiers with recorded activity for the user. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_skill` | `array` | Yes | Top skills by recorded interaction count across supported clients. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_custom_agent` | `array` | Yes | Top custom agents by recorded interaction count across supported clients. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_mcp` | `array` | Yes | MCP servers with the most recorded connection and reconnection attempts across supported clients. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_slash_cmd` | `array` | Yes | Top slash commands by recorded interaction count across supported clients. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_plugin` | `array` | Yes | Top plugins by recorded interaction count across supported clients. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | +| `distinct_skill_use_count` | `integer` | Yes | Number of different skill identifiers with recorded activity for the user. See [Customization fields](#customization-fields-api-only). | +| `distinct_custom_agent_use_count` | `integer` | Yes | Number of different custom agent identifiers with recorded activity for the user. See [Customization fields](#customization-fields-api-only). | +| `distinct_mcp_use_count` | `integer` | Yes | Number of different Model Context Protocol (MCP) server identifiers with recorded connection activity for the user. See [Customization fields](#customization-fields-api-only). | +| `distinct_slash_cmd_use_count` | `integer` | Yes | Number of different slash command identifiers with recorded activity for the user. See [Customization fields](#customization-fields-api-only). | +| `distinct_plugin_use_count` | `integer` | Yes | Number of different plugin identifiers with recorded activity for the user. See [Customization fields](#customization-fields-api-only). | +| `totals_by_skill` | `array` | Yes | Top skills by recorded interaction count across supported clients. See [Customization fields](#customization-fields-api-only). | +| `totals_by_custom_agent` | `array` | Yes | Top custom agents by recorded interaction count across supported clients. See [Customization fields](#customization-fields-api-only). | +| `totals_by_mcp` | `array` | Yes | MCP servers with the most recorded connection and reconnection attempts across supported clients. See [Customization fields](#customization-fields-api-only). | +| `totals_by_slash_cmd` | `array` | Yes | Top slash commands by recorded interaction count across supported clients. See [Customization fields](#customization-fields-api-only). | +| `totals_by_plugin` | `array` | Yes | Top plugins by recorded interaction count across supported clients. See [Customization fields](#customization-fields-api-only). | | `totals_by_cli` | `object` | Yes | CLI-specific metrics for the user. Omitted when the user had no {% data variables.copilot.copilot_cli_short %} usage that day. See [{% data variables.copilot.copilot_cli_short %} metrics fields](#copilot-cli-metrics-fields). | | `totals_by_copilot_app` | `object` | Yes | The {% data variables.copilot.github_copilot_app_short %} metrics for the user. Omitted when the user did not use the {% data variables.copilot.github_copilot_app_short %} that day. See [Metrics fields for the {% data variables.copilot.github_copilot_app_short %}](#copilot-app-metrics-fields). | | `totals_by_3rd_party_agent` | `array` | Yes | Per-agent usage metrics for recognized {% data variables.copilot.agent_apps %}. Omitted when the user had no recognized {% data variables.copilot.agent_app %} activity during the reporting period. See [{% data variables.copilot.agent_apps_caps %} metrics fields](#agent-apps-metrics-fields). | +| `totals_by_client` | `array` | No | Per-client breakdown of the user's successful model requests and token usage, counted server-side. The array is always present and is empty when there is no usage to report. See [Client metrics fields](#client-metrics-fields). | | `totals_by_vscode_agent` | `object` | Yes | Dedicated {% data variables.product.prodname_vscode_shortname %} Agents-window metrics for the user. Omitted when both required counts are not available. See [{% data variables.product.prodname_vscode_shortname %} Agents-window metrics fields](#vs-code-agents-window-metrics-fields). | | `totals_by_ide` | `array` | No | Per-IDE breakdown of the user's activity. See [Activity breakdown objects](#activity-breakdown-objects). | | `totals_by_feature` | `array` | No | Per-feature breakdown of the user's activity. See [Activity breakdown objects](#activity-breakdown-objects). | @@ -185,16 +186,16 @@ Activity totals and breakdowns: | `loc_suggested_to_delete_sum` | `integer` | No | Aggregated lines of code suggested to delete for the day. Same definition as the per-user field. | | `loc_added_sum` | `integer` | No | Aggregated lines of code added for the day. Same definition as the per-user field. | | `loc_deleted_sum` | `integer` | No | Aggregated lines of code deleted for the day. Same definition as the per-user field. | -| `distinct_skill_use_count` | `integer` | Yes | Number of different skill identifiers with recorded activity across the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `distinct_custom_agent_use_count` | `integer` | Yes | Number of different custom agent identifiers with recorded activity across the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `distinct_mcp_use_count` | `integer` | Yes | Number of different MCP server identifiers with recorded connection activity across the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `distinct_slash_cmd_use_count` | `integer` | Yes | Number of different slash command identifiers with recorded activity across the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `distinct_plugin_use_count` | `integer` | Yes | Number of different plugin identifiers with recorded activity across the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_skill` | `array` | Yes | Top skills by recorded interaction count across supported clients in the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_custom_agent` | `array` | Yes | Top custom agents by recorded interaction count across supported clients in the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_mcp` | `array` | Yes | MCP servers with the most recorded connection and reconnection attempts across supported clients in the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_slash_cmd` | `array` | Yes | Top slash commands by recorded interaction count across supported clients in the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | -| `totals_by_plugin` | `array` | Yes | Top plugins by recorded interaction count across supported clients in the enterprise or organization. See [{% data variables.copilot.copilot_cli_short %} customization fields](#copilot-cli-customization-fields-api-only). | +| `distinct_skill_use_count` | `integer` | Yes | Number of different skill identifiers with recorded activity across the enterprise or organization. See [Customization fields](#customization-fields-api-only). | +| `distinct_custom_agent_use_count` | `integer` | Yes | Number of different custom agent identifiers with recorded activity across the enterprise or organization. See [Customization fields](#customization-fields-api-only). | +| `distinct_mcp_use_count` | `integer` | Yes | Number of different MCP server identifiers with recorded connection activity across the enterprise or organization. See [Customization fields](#customization-fields-api-only). | +| `distinct_slash_cmd_use_count` | `integer` | Yes | Number of different slash command identifiers with recorded activity across the enterprise or organization. See [Customization fields](#customization-fields-api-only). | +| `distinct_plugin_use_count` | `integer` | Yes | Number of different plugin identifiers with recorded activity across the enterprise or organization. See [Customization fields](#customization-fields-api-only). | +| `totals_by_skill` | `array` | Yes | Top skills by recorded interaction count across supported clients in the enterprise or organization. See [Customization fields](#customization-fields-api-only). | +| `totals_by_custom_agent` | `array` | Yes | Top custom agents by recorded interaction count across supported clients in the enterprise or organization. See [Customization fields](#customization-fields-api-only). | +| `totals_by_mcp` | `array` | Yes | MCP servers with the most recorded connection and reconnection attempts across supported clients in the enterprise or organization. See [Customization fields](#customization-fields-api-only). | +| `totals_by_slash_cmd` | `array` | Yes | Top slash commands by recorded interaction count across supported clients in the enterprise or organization. See [Customization fields](#customization-fields-api-only). | +| `totals_by_plugin` | `array` | Yes | Top plugins by recorded interaction count across supported clients in the enterprise or organization. See [Customization fields](#customization-fields-api-only). | | `totals_by_ide` | `array` | No | Aggregated per-IDE activity breakdown. See [Activity breakdown objects](#activity-breakdown-objects). | | `totals_by_feature` | `array` | No | Aggregated per-feature activity breakdown. See [Activity breakdown objects](#activity-breakdown-objects). | | `totals_by_language_feature` | `array` | No | Aggregated language-and-feature activity breakdown. See [Activity breakdown objects](#activity-breakdown-objects). | @@ -203,6 +204,7 @@ Activity totals and breakdowns: | `totals_by_cli` | `object` | Yes | Aggregated {% data variables.copilot.copilot_cli_short %} metrics for the day. Omitted when there is no CLI usage that day. Unlike the per-user form, it does not include `last_known_cli_version`. See [{% data variables.copilot.copilot_cli_short %} metrics fields](#copilot-cli-metrics-fields). | | `totals_by_copilot_app` | `object` | Yes | Aggregated daily metrics for the {% data variables.copilot.github_copilot_app_short %}. Null when the enterprise or organization has no activity in the {% data variables.copilot.github_copilot_app_short %} that day. See [Metrics fields for the {% data variables.copilot.github_copilot_app_short %}](#copilot-app-metrics-fields). | | `totals_by_3rd_party_agent` | `array` | Yes | Aggregated per-agent usage metrics for recognized {% data variables.copilot.agent_apps %}. Omitted when the enterprise or organization had no recognized {% data variables.copilot.agent_app %} activity that day. See [{% data variables.copilot.agent_apps_caps %} metrics fields](#agent-apps-metrics-fields). | +| `totals_by_client` | `array` | No | Aggregated per-client breakdown of successful model requests and token usage for the day, counted server-side. The array is always present and is empty when there is no usage to report. In 28-day reports, this field appears within each `day_totals` entry. See [Client metrics fields](#client-metrics-fields). | | `totals_by_vscode_agent` | `object` | Yes | Aggregated dedicated {% data variables.product.prodname_vscode_shortname %} Agents-window metrics for the day. Omitted when both required counts are not available. See [{% data variables.product.prodname_vscode_shortname %} Agents-window metrics fields](#vs-code-agents-window-metrics-fields). | | `totals_by_ai_adoption_phase` | `array` | Yes | Per-phase aggregates of users and their average activity. Omitted when no adoption-phase data is available. See [AI adoption phase fields](#ai-adoption-phase-fields). | | `pull_requests` | `object` | No | Daily pull request activity for the enterprise or organization. See [Pull request activity fields](#pull-request-activity-fields). | @@ -308,9 +310,9 @@ The `totals_by_cli` object contains the following nested fields when {% data var | `totals_by_cli.last_known_cli_version.cli_version` | `string` | No | {% data variables.copilot.copilot_cli_short %} version string. Defaults to `unknown` if no version was detected. | | `totals_by_cli.last_known_cli_version.sampled_at` | `string` | Yes | Timestamp (ISO 8601) when the version was sampled. | -### {% data variables.copilot.copilot_cli_short %} customization fields (API only) +### Customization fields (API only) -These metrics give enterprise and organization administrators visibility into which customizations developers use across {% data variables.copilot.copilot_cli_short %} and other supported clients. Use them to understand adoption, identify enablement gaps, and prioritize the skills, Model Context Protocol (MCP) servers, custom agents, slash commands, and plugins that developers find valuable. +These metrics give enterprise and organization administrators visibility into which customizations developers use across {% data variables.copilot.copilot_cli_short %}, {% data variables.product.prodname_vscode_shortname %}, and other supported clients. Use them to understand adoption, identify enablement gaps, and prioritize the skills, Model Context Protocol (MCP) servers, custom agents, slash commands, and plugins that developers find valuable. To access the reports, the {% data variables.product.prodname_copilot_short %} usage metrics policy must be enabled. For policy configuration instructions, see: @@ -335,15 +337,15 @@ Names are reported from these clients when the enterprise's {% data variables.pr * {% data variables.copilot.copilot_cli_short %} interactive sessions and prompt mode (`-p`). * The {% data variables.copilot.github_copilot_app_short %}. -* Agent Client Protocol (ACP) integrations, such as {% data variables.product.prodname_copilot_short %} in JetBrains AI Assistant -* The {% data variables.copilot.copilot_sdk_short %}. +* Clients built on the {% data variables.copilot.copilot_sdk_short %}, such as {% data variables.product.prodname_vscode_shortname %} and {% data variables.product.prodname_jetbrains_ides %}. +* Agent Client Protocol (ACP) integrations. To report customization names: * Prompt mode, the app, and ACP integrations require {% data variables.copilot.copilot_cli_short %} 1.0.97 or later. -* The {% data variables.copilot.copilot_sdk_short %} requires version 1.0.21 or later. If an application overrides the CLI bundled with the SDK, that CLI must be version 1.0.97 or later. +* Clients built on the {% data variables.copilot.copilot_sdk_short %} require SDK version 1.0.21 or later. If an application overrides the CLI bundled with the SDK, that CLI must be version 1.0.97 or later. -IDEs' built-in {% data variables.product.prodname_copilot_short %} chat integrations do not report customization names. +IDE integrations that are not built on the {% data variables.copilot.copilot_sdk_short %} do not report customization names. Configured names are trimmed and limited to 128 characters. Names that look like file paths remain grouped under `other` or `custom`, as do customizations for which names are unavailable. Review configured names before sharing reports outside your organization. @@ -419,6 +421,34 @@ These metrics come from server-side job activity. The nested `user_initiated_int | `totals_by_3rd_party_agent[].user_initiated_interaction_count` | `integer` | No | Number of user-initiated jobs started for the {% data variables.copilot.agent_app %} during the reporting period. Each job start increments the count once. | | `totals_by_3rd_party_agent[].session_count` | `integer` | No | Sum of distinct, non-empty session counts for integrations mapped to the agent during the reporting period. Included only in aggregated enterprise and organization reports; omitted from per-user reports. | +### Client metrics fields + +The `totals_by_client` array breaks down successful model requests that went through the {% data variables.product.prodname_copilot_short %} API by the client that sent them. These metrics are counted server-side, so they include tools that use {% data variables.product.prodname_copilot_short %} as a model provider even when those tools send no editor telemetry, such as OpenCode. Activity from these tools doesn't appear in `totals_by_ide`, which relies on editor telemetry. + +`totals_by_client` is different from `totals_by_3rd_party_agent`. The `totals_by_3rd_party_agent` array counts job starts for recognized {% data variables.copilot.agent_apps %} and doesn't include token or model data. + +Clients are identified from the integration ID that each client sends with its requests. Treat `client` as a best-effort grouping, not a verified identity. + +Within `totals_by_client`, the `request_count` fields count successful model calls, not prompts. A single prompt can trigger several model calls. Don't compare these request counts with prompt or interaction counts, such as `user_initiated_interaction_count` or `totals_by_cli.prompt_count`. + +The `totals_by_client` array appears at the top level of each record in per-user 1-day and 28-day reports and in aggregated 1-day reports. In aggregated 28-day reports, it appears within each `day_totals` entry. The array is always present and is empty when there is no usage to report. + +| Field | Type | Nullable | Description | +|:--|:--|:--|:--| +| `totals_by_client[].client` | `string` | No | Normalized client name. Known values include `vscode`, `visualstudio`, `jetbrains`, `eclipse`, `xcode`, `zed`, `copilot_cli`, `github_app`, `copilot_sdk`, `cloud_agent`, `code_review`, `github_web`, `github_mobile`, `github_desktop`, `agentic_workflows`, `claude_code`, `codex`, `opencode`, `slack`, and `azure_devops`. Requests with an unrecognized or missing integration ID are grouped as `other`. Values may be added over time. | +| `totals_by_client[].request_count` | `integer` | No | Number of successful model requests from the client. Counts model calls, not prompts. | +| `totals_by_client[].session_count` | `integer` | No | Number of distinct sessions for the client. In aggregated enterprise and organization reports, sessions are de-duplicated across all users, so this value isn't the sum of per-user counts. Unlike `totals_by_3rd_party_agent[].session_count`, this field is also included in per-user reports. | +| `totals_by_client[].token_usage.prompt_tokens_sum` | `integer` | No | Total number of prompt tokens sent across the client's requests. | +| `totals_by_client[].token_usage.output_tokens_sum` | `integer` | No | Total number of output tokens generated across the client's requests. | +| `totals_by_client[].token_usage.avg_tokens_per_request` | `number` | No | Average number of **output** and **prompt** tokens per request, computed as `(output_tokens_sum + prompt_tokens_sum) ÷ request_count`. | +| `totals_by_client[].totals_by_model` | `array` | No | Per-model breakdown of the client's requests and token usage. Entries are keyed on `model` and `model_selection_mode`, so the same model can appear more than once with different selection modes. | +| `totals_by_client[].totals_by_model[].model` | `string` | No | Model used for the requests. For `code_review`, the model is always reported as `unknown`. | +| `totals_by_client[].totals_by_model[].model_selection_mode` | `string` | No | How the model was selected. Possible values are `user_selected` (a specific model was requested rather than Auto), `product_selected` (the product chose the model, used for all {% data variables.copilot.copilot_code-review_short %} and {% data variables.copilot.copilot_cloud_agent %} requests), `auto` (Auto chose the model), `other` (selection modes that are grouped together and not yet reported individually), and `unknown` (a selection mode sent by the client that couldn't be normalized). | +| `totals_by_client[].totals_by_model[].request_count` | `integer` | No | Number of successful model requests from the client that used this model and selection mode. | +| `totals_by_client[].totals_by_model[].token_usage.prompt_tokens_sum` | `integer` | No | Total number of prompt tokens sent across these requests. | +| `totals_by_client[].totals_by_model[].token_usage.output_tokens_sum` | `integer` | No | Total number of output tokens generated across these requests. | +| `totals_by_client[].totals_by_model[].token_usage.avg_tokens_per_request` | `number` | No | Average number of **output** and **prompt** tokens per request, computed as `(output_tokens_sum + prompt_tokens_sum) ÷ request_count`. | + ### Pull request activity fields > [!IMPORTANT] diff --git a/content/copilot/reference/copilot-usage-metrics/example-schema.md b/content/copilot/reference/copilot-usage-metrics/example-schema.md index af3a4ae57efa..b393edb74501 100644 --- a/content/copilot/reference/copilot-usage-metrics/example-schema.md +++ b/content/copilot/reference/copilot-usage-metrics/example-schema.md @@ -52,6 +52,54 @@ The following examples show schemas for user-, enterprise-, and repository-level "prompt_tokens_sum": 3800 } }, + "totals_by_client": [{ + "client": "opencode", + "request_count": 3, + "session_count": 2, + "token_usage": { + "avg_tokens_per_request": 1100.0, + "output_tokens_sum": 900, + "prompt_tokens_sum": 2400 + }, + "totals_by_model": [{ + "model": "claude-opus-5.5", + "model_selection_mode": "user_selected", + "request_count": 2, + "token_usage": { + "avg_tokens_per_request": 1200.0, + "output_tokens_sum": 600, + "prompt_tokens_sum": 1800 + } + }, { + "model": "claude-sonnet-5", + "model_selection_mode": "auto", + "request_count": 1, + "token_usage": { + "avg_tokens_per_request": 900.0, + "output_tokens_sum": 300, + "prompt_tokens_sum": 600 + } + }] + }, { + "client": "copilot_cli", + "request_count": 1, + "session_count": 1, + "token_usage": { + "avg_tokens_per_request": 600.0, + "output_tokens_sum": 100, + "prompt_tokens_sum": 500 + }, + "totals_by_model": [{ + "model": "gpt-5.6-sol", + "model_selection_mode": "user_selected", + "request_count": 1, + "token_usage": { + "avg_tokens_per_request": 600.0, + "output_tokens_sum": 100, + "prompt_tokens_sum": 500 + } + }] + }], "totals_by_copilot_app": { "prompt_count": 1, "request_count": 3, @@ -192,7 +240,9 @@ The customization fields shown in this example appear in both 1-day and 28-day p Customizations with unavailable names or names that look like file paths remain grouped under `other` or `custom`. In per-user 1-day reports, each of the five customization arrays retains up to 25 named entries per user. Additional entries are combined into a trailing `other` entry. An entry's absence from a capped array does not mean that it had zero usage. -For coverage and naming rules, see [AUTOTITLE](/copilot/reference/copilot-usage-metrics/copilot-usage-metrics#copilot-cli-customization-fields-api-only). +For coverage and naming rules, see [AUTOTITLE](/copilot/reference/copilot-usage-metrics/copilot-usage-metrics#customization-fields-api-only). + +The `totals_by_client` array appears at the top level of each user record in both 1-day and 28-day per-user reports, for both enterprise and organization scopes. It counts successful model requests server-side, so it can include clients, such as OpenCode, that don't appear in `totals_by_ide`. In this example, `used_copilot_code_review_active` and `used_copilot_code_review_passive` are `null` because there was no {% data variables.copilot.copilot_code-review_short %} signal for the user that day. `used_copilot_cloud_agent` and `used_copilot_coding_agent` always carry the same value. @@ -300,6 +350,54 @@ In this example, `used_copilot_code_review_active` and `used_copilot_code_review "prompt_tokens_sum" : 5300 } }, + "totals_by_client" : [ { + "client" : "opencode", + "request_count" : 3, + "session_count" : 2, + "token_usage" : { + "avg_tokens_per_request" : 1100.0, + "output_tokens_sum" : 900, + "prompt_tokens_sum" : 2400 + }, + "totals_by_model" : [ { + "model" : "claude-opus-5.5", + "model_selection_mode" : "user_selected", + "request_count" : 2, + "token_usage" : { + "avg_tokens_per_request" : 1200.0, + "output_tokens_sum" : 600, + "prompt_tokens_sum" : 1800 + } + }, { + "model" : "claude-sonnet-5", + "model_selection_mode" : "auto", + "request_count" : 1, + "token_usage" : { + "avg_tokens_per_request" : 900.0, + "output_tokens_sum" : 300, + "prompt_tokens_sum" : 600 + } + } ] + }, { + "client" : "copilot_cli", + "request_count" : 1, + "session_count" : 1, + "token_usage" : { + "avg_tokens_per_request" : 600.0, + "output_tokens_sum" : 100, + "prompt_tokens_sum" : 500 + }, + "totals_by_model" : [ { + "model" : "gpt-5.6-sol", + "model_selection_mode" : "user_selected", + "request_count" : 1, + "token_usage" : { + "avg_tokens_per_request" : 600.0, + "output_tokens_sum" : 100, + "prompt_tokens_sum" : 500 + } + } ] + } ], "totals_by_copilot_app" : { "prompt_count" : 2, "request_count" : 6, @@ -501,6 +599,45 @@ In this example, `used_copilot_code_review_active` and `used_copilot_code_review "users_in_phase_28d" : 1, "total_pull_requests_merged" : 0 } ], + "totals_by_client" : [ { + "client" : "github_app", + "request_count" : 2, + "session_count" : 1, + "token_usage" : { + "avg_tokens_per_request" : 1000.0, + "output_tokens_sum" : 500, + "prompt_tokens_sum" : 1500 + }, + "totals_by_model" : [ { + "model" : "gpt-5.6-sol", + "model_selection_mode" : "user_selected", + "request_count" : 2, + "token_usage" : { + "avg_tokens_per_request" : 1000.0, + "output_tokens_sum" : 500, + "prompt_tokens_sum" : 1500 + } + } ] + }, { + "client" : "code_review", + "request_count" : 2, + "session_count" : 1, + "token_usage" : { + "avg_tokens_per_request" : 800.0, + "output_tokens_sum" : 400, + "prompt_tokens_sum" : 1200 + }, + "totals_by_model" : [ { + "model" : "unknown", + "model_selection_mode" : "product_selected", + "request_count" : 2, + "token_usage" : { + "avg_tokens_per_request" : 800.0, + "output_tokens_sum" : 400, + "prompt_tokens_sum" : 1200 + } + } ] + } ], "totals_by_custom_agent" : [ ], "totals_by_feature" : [ { "code_acceptance_activity_count" : 1, @@ -599,6 +736,8 @@ Organization aggregated reports use the same top-level `copilot_feature_engageme The customization fields shown in `day_totals` apply to enterprise and organization aggregated 28-day reports. They also appear directly in enterprise and organization aggregated 1-day reports. Like per-user reports, these aggregated reports include configured names for customizations created by your organization. +Similarly, `totals_by_client` appears within each `day_totals` entry in enterprise and organization aggregated 28-day reports, and directly on the record in aggregated 1-day reports. In aggregated reports, each `totals_by_client` entry's `session_count` is de-duplicated across all users rather than summed from per-user counts. + The following user-teams report examples are returned by the `user-teams-1-day` endpoints and are intended to be joined with the per-user usage report on `user_id`, `day`, and the relevant entity id (`organization_id` for the organization scope, `enterprise_id` for the enterprise scope) to derive team-level metrics. For more guidance, see [AUTOTITLE](/copilot/reference/copilot-usage-metrics/team-level-metrics). > [!NOTE] diff --git a/content/copilot/reference/copilot-usage-metrics/index.md b/content/copilot/reference/copilot-usage-metrics/index.md index dc672cead3ed..f8af8dbd5000 100644 --- a/content/copilot/reference/copilot-usage-metrics/index.md +++ b/content/copilot/reference/copilot-usage-metrics/index.md @@ -1,7 +1,7 @@ --- title: GitHub Copilot usage metrics shortTitle: Copilot usage metrics -intro: Find information about usage metrics for {% data variables.product.prodname_copilot %}. +intro: Interpret and validate {% data variables.product.prodname_copilot %} usage metrics with guidance on data reconciliation, methodology, team-level analysis, metric definitions, and example schemas. versions: feature: copilot children: @@ -13,4 +13,3 @@ children: - /example-schema contentType: reference --- - diff --git a/content/copilot/reference/copilot-usage-metrics/interpret-copilot-metrics.md b/content/copilot/reference/copilot-usage-metrics/interpret-copilot-metrics.md index a89350c14245..c368d45cdda9 100644 --- a/content/copilot/reference/copilot-usage-metrics/interpret-copilot-metrics.md +++ b/content/copilot/reference/copilot-usage-metrics/interpret-copilot-metrics.md @@ -37,9 +37,9 @@ The "Requests per chat mode" and "Agent adoption" charts show how developers are | Requests per chat mode | Breakdown of chat interactions by mode—Ask, Edit, Plan, or Agent. | A balanced distribution suggests users are exploring multiple capabilities. Heavy use of one mode can highlight where enablement should focus. | | Agent adoption | Percentage of active users who used {% data variables.copilot.copilot_agent_short %}. | Growth over time shows that developers are progressing from basic completions to more advanced {% data variables.product.prodname_copilot_short %} features. | -## Reviewing {% data variables.copilot.copilot_cli_short %} customization adoption with the API +## Reviewing customization adoption with the API -To assess how developers adopt customizations across {% data variables.copilot.copilot_cli_short %} and other supported clients, use the usage metrics API. It reports skills, custom agents, Model Context Protocol (MCP) server connection activity, slash commands, and plugins for enterprises and organizations. The fields appear in per-user and aggregated 1-day reports, per-user 28-day reports, and aggregated 28-day `day_totals`. They are not available in the dashboard. For field definitions, supported clients, and minimum versions for reporting names, see [AUTOTITLE](/copilot/reference/copilot-usage-metrics/copilot-usage-metrics#copilot-cli-customization-fields-api-only). +To assess how developers adopt customizations across {% data variables.copilot.copilot_cli_short %}, {% data variables.product.prodname_vscode_shortname %}, and other supported clients, use the usage metrics API. It reports skills, custom agents, Model Context Protocol (MCP) server connection activity, slash commands, and plugins for enterprises and organizations. The fields appear in per-user and aggregated 1-day reports, per-user 28-day reports, and aggregated 28-day `day_totals`. They are not available in the dashboard. For field definitions, supported clients, and minimum versions for reporting names, see [AUTOTITLE](/copilot/reference/copilot-usage-metrics/copilot-usage-metrics#customization-fields-api-only). `interaction_count` represents a different event for each category: skill invocations, custom agent starts, MCP connection or reconnection attempts, slash command invocations, or plugin-associated skill invocations. These values count activity events, not users. MCP counts include both successful and failed connection attempts, but not tool calls through an already connected server or ongoing server use. Every plugin interaction is already included in skill interaction counts, while skill interactions that are not associated with a plugin appear only in skill totals. Do not add plugin and skill interaction counts together. diff --git a/content/copilot/reference/enterprise-administrators/enterprise-managed-settings.md b/content/copilot/reference/enterprise-administrators/enterprise-managed-settings.md index d1b552e4feae..125fb3a6c40d 100644 --- a/content/copilot/reference/enterprise-administrators/enterprise-managed-settings.md +++ b/content/copilot/reference/enterprise-administrators/enterprise-managed-settings.md @@ -273,14 +273,34 @@ Each subkey is overridable for enterprise teams. Set the enterprise value to `{ ### disableBypassPermissionsMode -Prevents users from enabling bypass mode (also known as "YOLO mode"). Bypass mode lets an agent run commands, access files, and fetch URLs without asking for approval. +Use this to prevent users from enabling bypass mode. Bypass mode lets an agent run commands, access files, and fetch URLs without asking for approval. + +Set this key to `"disable"` to turn off bypass mode. + +This setting does not prevent {% data variables.copilot.assisted_permissions %}. Read-only operations and requests allowed by applicable permission rules can still proceed without a prompt. Managed `deny` and `ask` rules continue to apply. For more information about {% data variables.copilot.assisted_permissions %}, see [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). When you set `disableBypassPermissionsMode` to `"disable"`, users cannot turn on bypass mode: -* In {% data variables.copilot.copilot_cli_short %}, all of the command line options for allowing all permissions (`--yolo`, `--allow-all`, and the individual `--allow-all-tools`, `--allow-all-paths`, and `--allow-all-urls` options) are suppressed at startup and cannot grant elevated permissions. The `/yolo` and `/allow-all` slash commands are also blocked. +* In {% data variables.copilot.copilot_cli_short %}, all of the command line options for allowing all permissions (`--yolo`, `--allow-all`, and the individual `--allow-all-tools`, `--allow-all-paths`, and `--allow-all-urls` options) have no effect at startup and cannot grant elevated permissions. The `/permissions allow-all` slash command, and its aliases `/allow-all` and `/yolo`, are also blocked. This setting does not block `/permissions assisted` or `/allow-all auto`. The `permissions.disableAssistedPermissionsMode` setting controls whether users can enable {% data variables.copilot.assisted_permissions %}. * In {% data variables.product.prodname_vscode_shortname %}, the global auto-approve setting (`chat.tools.global.autoApprove`) is turned off and cannot be re-enabled. -* In the {% data variables.copilot.github_copilot_app %}, the "Allow all" setting for "Tool Permissions" is blocked in the sessions settings. -* This key is overridable by enterprise team mapping. In your `{% data variables.copilot.managed_setting_file %}`, use the `{ "overridable": "disable" }` syntax to specialize the key's configuration on a per-team basis. You can then set `"disableBypassPermissionsMode": "unmanaged"` in a team settings file, providing a specialization that takes precedence over `{% data variables.copilot.managed_setting_file %}` for members of the subject team. +* In the {% data variables.copilot.github_copilot_app %}, sessions cannot use **Approve all** for **Tool permissions**, even if a user selects it as their default in **Settings** > **Sessions**. + +For this key, the most restrictive value across all policy layers wins. A `"disable"` set by any layer takes effect and cannot be relaxed. A lower-authority layer or a per-team override cannot set this key back to unmanaged once any layer disables bypass mode. + +> [!NOTE] +> If `disableBypassPermissionsMode` is set to a value that {% data variables.copilot.copilot_cli_short %} doesn't recognize, the CLI logs the problem and enforces `"disable"` as a fail-closed default. + +### disableAssistedPermissionsMode + +Set `permissions.disableAssistedPermissionsMode` to `true` to prevent users from enabling {% data variables.copilot.assisted_permissions %}. This setting does not disable bypass mode. + +### defaultMode + +Set `permissions.defaultMode` to `"manual"`, `"assisted"`, or `"allow-all"` to choose the default permission mode for new sessions. If the selected mode is unavailable or blocked by policy, the session starts with manual approval. + +This setting selects a default, not a locked mode. An explicit permitted choice for a session takes precedence over the managed default. Resumed sessions keep their saved mode, subject to current policy restrictions. + +In {% data variables.copilot.copilot_cli_short %}, this managed default takes precedence over the user's `defaultPermissionMode` setting. ## telemetry diff --git a/content/copilot/responsible-use/agents.md b/content/copilot/responsible-use/agents.md index fb8ab06565b0..4be46dc0d117 100644 --- a/content/copilot/responsible-use/agents.md +++ b/content/copilot/responsible-use/agents.md @@ -135,7 +135,7 @@ Copilot CLI works by using a combination of natural language processing and mach 1. **Input processing**: Your input is combined with relevant contextual information to form a prompt. That prompt is sent to a large language model for processing. Inputs can take the form of plain natural language, code snippets, or references to files in your terminal. 1. **Language model analysis**: The prompt is passed through a large language model, which is a neural network that has been trained on a large body of data. The language model analyzes the input prompt to help the agent reason about the task and use the necessary tools. 1. **Response generation**: The language model generates a response based on its analysis of the prompt. This response can take the form of natural language suggestions, code suggestions, file modifications, and command executions. -1. **Output formatting**: The response is formatted and presented using syntax highlighting, indentation, and other formatting features. The agent may also execute commands in your local environment and create, edit, or delete files in your file system in order to complete the task. All such actions require explicit permission prompts. +1. **Output formatting**: The response is formatted and presented using syntax highlighting, indentation, and other formatting features. The agent may also execute commands in your local environment and create, edit, or delete files in your file system in order to complete the task. These actions are subject to the session's permissions and applicable enterprise restrictions. You may provide feedback to the agent after it returns a response in the interactive chat window. The agent will resubmit that feedback to the language model for further analysis and return an additional response. @@ -211,10 +211,10 @@ Copilot agentic features have been subject to RAI red teaming to identify and ad ### Copilot CLI -* **Directory-scoped access**: By default, Copilot CLI only has access to files and folders in, and below, the directory from which it was invoked. If the agent wishes to access files outside the current directory, it will ask for permission. -* **Permission prompts for file modifications**: Copilot CLI asks for permission before modifying files. You should ensure it is modifying the correct files before granting permission. -* **Permission prompts for command execution**: Copilot CLI asks for permission before executing commands that may be dangerous. You should review these commands carefully before giving permission to run. -* **Configurable permissions**: You can grant Copilot CLI specific permissions, or all permissions, by using the various command line options: for example, `--allow-tool=[TOOLS...]`, `--allow-all-tools`, `--allow-all` (or its slash command equivalent `/allow-all` for use in an interactive session). For more information, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#command-line-options). Typically, when you use Copilot CLI in autopilot mode, you will grant it full permissions to allow it to complete a task autonomously, without requiring you to approve activity as it works on the task. For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/use-autopilot-mode) +* **Directory-scoped access**: {% data variables.copilot.copilot_cli_short %} limits file access according to the session's path permissions. Access outside allowed locations requires additional permission. +* **Permissions for file modifications**: {% data variables.copilot.copilot_cli_short %} checks permissions before modifying files. When prompted for approval, ensure it is modifying the correct files before granting permission. +* **Permissions for command execution**: {% data variables.copilot.copilot_cli_short %} checks permissions before executing commands. Review commands carefully when prompted for approval. +* **Configurable permissions**: You can grant {% data variables.copilot.copilot_cli_short %} specific permissions, or broad permissions, by using command line options such as `--allow-tool=[TOOLS...]`, `--allow-all-tools`, and `--allow-all` (or its slash command equivalent `/permissions allow-all` for an interactive session). For more information, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#command-line-options). As an alternative to granting broad permissions, you can use {% data variables.copilot.assisted_permissions %} by entering `/permissions assisted` in an interactive session, setting `defaultPermissionMode` to `"assisted"` in your user configuration file, or using `--assisted-approval` for a non-interactive run. A model assesses eligible permission requests and automatically approves those it judges to be safe. Existing permissions and enterprise rules still apply. Requests that still need your approval prompt you in a standard interactive session and are denied in autopilot mode and other unattended runs. Model review does not guarantee that an action is safe. For more information, see [AUTOTITLE](/copilot/concepts/customizations/allowing-safe-commands). Autopilot mode needs sufficient permissions to complete the task without asking for approval. For more information, see [AUTOTITLE](/copilot/concepts/agent-capabilities/agent-powered-workflows-and-operations/autopilot). * **Security considerations**: For more information about security practices while using Copilot CLI, see [AUTOTITLE](/copilot/concepts/copilot-surfaces/copilot-cli#security-considerations). ### Computer use in {% data variables.copilot.copilot_cli %} and the {% data variables.copilot.github_copilot_app %} diff --git a/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/achieve-company-goals.md b/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/achieve-company-goals.md index a01a1b2c74bd..ca28e9b6da64 100644 --- a/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/achieve-company-goals.md +++ b/content/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/achieve-company-goals.md @@ -23,10 +23,48 @@ When your company rolls out a new tool such as {% data variables.product.prodnam ## Define your goals -Based on the recommendations of the ESSP, the following guides show how {% data variables.product.prodname_copilot %} can help you achieve your company's goals in specific areas. They explain how {% data variables.product.prodname_copilot_short %} can help, provide advice and resources for an effective rollout, and recommend metrics for assessing {% data variables.product.prodname_copilot_short %}'s impact. +Choose an engineering outcome before deciding which {% data variables.product.prodname_copilot_short %} metrics to track. Usage and adoption signals show only whether people are **using** the tool. Outcome measures from your engineering systems and developer feedback help you assess whether the changes you want are actually occurring. -We recommend defining your goals and planning your rollout accordingly. You should communicate your goals to staff and organize training to enable everyone to contribute. +Start with one or two goals and communicate them to your teams. Record a baseline before changing your rollout. Use the existing guidance for each goal to plan training and select outcome measures. -* [AUTOTITLE](/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/increase-test-coverage) -* [AUTOTITLE](/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/accelerate-pull-requests) -* [AUTOTITLE](/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/reduce-security-debt) +Usage signals do not identify whether a particular interaction produced a test, fixed a vulnerability, or prevented an incident. Use them to understand adoption alongside your outcome measures, not as a substitute for those measures. For example, more generated code does not establish better test coverage, and a higher acceptance rate does not establish code quality or developer satisfaction. + +### Increase test coverage + +If gaps in testing are delaying releases or reducing confidence, track line and branch coverage from your continuous integration reports. Also track time spent writing tests and developer confidence. Compare these outcomes with chat and agent usage trends among participating teams. See [AUTOTITLE](/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/increase-test-coverage). + +### Accelerate pull requests + +If review delays are slowing delivery, track pull request lead time and review cycles, while checking for defects after deployment. Use adoption cohorts, pull requests merged per user, and time to merge in the impact dashboard to explore how adoption relates to delivery. See [AUTOTITLE](/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/accelerate-pull-requests). + +### Reduce security debt + +If unresolved vulnerabilities are accumulating, track the security alert backlog and time to remediate in security overview. Consider agent and code review usage trends among teams working on remediation alongside these outcomes. See [AUTOTITLE](/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/reduce-security-debt). + +### Improve code quality + +If maintainability or reliability problems are increasing, review organization-level code health and open findings over time in {% data variables.product.prodname_code_quality_short %}. Compare these with adoption and feature usage trends among the teams working on those problems. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/explore-code-quality). + +Keep the set of analyzed repositories consistent. Open finding counts can change when analysis is enabled on more repositories or findings are dismissed, not only when code is improved. + +### Reduce production incidents + +If refactoring and maintenance work aims to improve stability, track production incidents related to the refactored code using your incident records. Review those results alongside usage trends among teams using {% data variables.product.prodname_copilot_short %} for that work. See [AUTOTITLE](/copilot/tutorials/reduce-technical-debt#quality-metrics). + +### Improve developer experience + +If your goal is to reduce workflow friction, gather feedback on usefulness, trust, and satisfaction through surveys or retrospectives. Use sustained usage, feature adoption, and acceptance rate trends to identify questions to explore with developers, rather than inferring satisfaction from activity alone. See [AUTOTITLE](/copilot/tutorials/roll-out-at-scale/measure-success#step-4-incorporate-qualitative-feedback). + +## Compare results responsibly + +Use the same comparison approach each time you review progress: + +1. **Align the scope and period.** Compare usage and outcomes for the same teams and reporting dates. Record the repositories and tools included, and keep metric definitions consistent with your baseline. + + The impact dashboard compares users in different adoption cohorts, not the same users before and after adoption. Differences between cohorts can reflect their work or experience as well as their use of {% data variables.product.prodname_copilot_short %}. See [AUTOTITLE](/copilot/reference/copilot-usage-metrics/interpret-copilot-metrics#reviewing-the-adoption-multiplier). + +1. **Check what else changed.** Record changes in staffing, project complexity, release schedules, training, or engineering practices. These can affect outcomes independently of {% data variables.product.prodname_copilot_short %}. +1. **Check quality alongside speed.** If pull requests merge faster, also review defects, incidents, and developer feedback. Increased output alone does not establish an improvement in engineering outcomes. +1. **Investigate before attributing results.** Review trends over multiple periods and ask teams how they used {% data variables.product.prodname_copilot_short %}. Describe observed changes as associations unless you have additional evidence that supports a causal conclusion. + +Use the combined findings to choose a next action. For example, if test coverage is unchanged despite growing usage, ask teams whether they are using {% data variables.product.prodname_copilot_short %} to write tests. Address any training or workflow barriers before expanding that approach. diff --git a/content/copilot/tutorials/roll-out-at-scale/measure-copilot-impact.md b/content/copilot/tutorials/roll-out-at-scale/measure-copilot-impact.md index 736893446a2a..4e426c9d6284 100644 --- a/content/copilot/tutorials/roll-out-at-scale/measure-copilot-impact.md +++ b/content/copilot/tutorials/roll-out-at-scale/measure-copilot-impact.md @@ -17,7 +17,7 @@ journeyArticlesHeading: 'All Copilot usage metrics articles' journeyTracks: - id: 'get-started' title: 'Phase 1: Choose metrics to monitor Copilot adoption.' - description: 'Understand what Copilot usage metrics measure and where the data comes from before you start monitoring adoption. Review the concepts behind usage metrics and the data available through the dashboard and API.' + description: 'Understand what Copilot usage metrics measure and where the data comes from before you start monitoring adoption. Use the reference articles for metric definitions, methodology, and schemas.' guides: - href: '/copilot/concepts/billing-and-usage/copilot-usage-metrics/copilot-metrics' - href: '/copilot/reference/copilot-usage-metrics/copilot-usage-metrics' @@ -28,6 +28,8 @@ journeyTracks: - href: '/copilot/how-tos/administer-copilot/view-usage-and-adoption' - href: '/copilot/tutorials/roll-out-at-scale/assign-licenses/track-usage-and-adoption' - href: '/copilot/reference/copilot-usage-metrics/interpret-copilot-metrics' + - href: '/copilot/reference/copilot-usage-metrics/reconciling-usage-metrics' + - href: '/copilot/reference/copilot-usage-metrics/team-level-metrics' - id: 'code-generation' title: 'Phase 3: See how code is generated' description: 'Review code generation and Lines of Code metrics to understand how people and agents are using Copilot to produce code.' @@ -36,7 +38,7 @@ journeyTracks: - href: '/copilot/reference/copilot-usage-metrics/lines-of-code-metrics' - id: 'connect-impact' title: 'Phase 4: Connect adoption insights to engineering outcomes' - description: 'Define the engineering outcomes you want to improve and choose metrics that show progress. Compare adoption insights with metrics from your engineering systems to identify associations and evaluate results.' + description: 'Compare outcome measures with {% data variables.product.prodname_copilot_short %} usage and adoption trends to assess progress toward engineering goals such as improving test coverage or reducing security debt.' guides: - href: '/copilot/tutorials/roll-out-at-scale/drive-downstream-impact/achieve-company-goals' - href: '/copilot/how-tos/administer-copilot/view-impact-dashboard' diff --git a/content/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors.md b/content/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors.md index fce25a2c3ba0..085eda3f516f 100644 --- a/content/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors.md +++ b/content/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors.md @@ -52,4 +52,8 @@ If the email address you used to author the commits is not connected to your {% After force-pushing, rewriting history, or deleting commits, repository contributor displays and statistics can take about 24 hours to refresh. -If you're a repository owner and contributor data is still incorrect after waiting about 24 hours, contact {% data variables.contact.github_support %}. For more information about creating a support ticket, see [AUTOTITLE](/support/contacting-github-support/creating-a-support-ticket). +{% ifversion ghes %} +If you're a repository owner and contributor data is still incorrect after waiting about 24 hours, contact {% data variables.contact.contact_support %}. +{% else %} +If you're a repository owner and contributor data is still incorrect after waiting approximately 24 hours, you can contact {% data variables.contact.github_support %} depending on the support options available to your account. For more information, see [AUTOTITLE](/support/learning-about-github-support/about-github-support). +{% endif %} diff --git a/data/reusables/cli/remote-access-slash-commands.md b/data/reusables/cli/remote-access-slash-commands.md index e8bd98cb31fe..163ef8d1459e 100644 --- a/data/reusables/cli/remote-access-slash-commands.md +++ b/data/reusables/cli/remote-access-slash-commands.md @@ -1,2 +1,2 @@ > [!NOTE] -> Slash commands—such as `/allow-all`—are not currently available from the remote interface. +> Slash commands—such as `/permissions assisted`—are not currently available from the remote interface. diff --git a/data/variables/copilot.yml b/data/variables/copilot.yml index 4a6995d7068f..11dfa75f9cb9 100644 --- a/data/variables/copilot.yml +++ b/data/variables/copilot.yml @@ -106,6 +106,10 @@ copilot_old-cli_short: 'Copilot in the CLI' copilot_old-cli: 'GitHub Copilot in the CLI' copilot_cli_npm_version: 'Node.js 22 or later' +## Assisted permissions +assisted_permissions: 'assisted permissions' +assisted_permissions_caps: 'Assisted permissions' + ## Copilot custom agents copilot_custom_agent: 'Copilot custom agent' copilot_custom_agents: 'Copilot custom agents' @@ -252,6 +256,9 @@ raptor_mini: 'Raptor mini' # Open-weight models: kimi_k3: 'Kimi K3' +## Current model used by Copilot cloud agent and Copilot CLI +cca_current_model: '{% data variables.copilot.claude_opus_46 %}' + ## Next edit suggestions next_edit_suggestions: 'next edit suggestions' next_edit_suggestions_caps: 'Next edit suggestions'