See your GitHub Copilot plan, quotas, reset window, and AI credit usage trends directly inside VS Code.
Copilot Insights gives you a fast, local view of the quota and entitlement data already associated with your GitHub Copilot account.
It focuses on operational visibility, not team analytics. The extension helps answer practical questions such as:
- How many AI credits do I have left?
- What did I spend them on?
- When does it reset?
- Am I burning through quota faster than expected?
- Is this month heavier than the last one?
- Do I have overage enabled?
- Which organizations are providing my Copilot access?
- Sidebar view with plan details, quota cards, pacing guidance, overage messaging, and organization access.
- Sprint burn-down chart that plots your actual AI credit usage against an ideal pace line for the current billing period.
- Billing period comparison: this period's total, daily average, and busiest day, measured against the period before it.
- Per-project credit attribution: which projects and branches this period's usage went to, estimated locally.
- Durable local usage history — one rollup per day, kept for months — so charts and forecasts cover the whole billing period.
- Weighted prediction and burn-rate analysis for AI credits.
- Status bar indicator with configurable placement, style, and content.
- One-click export to clipboard as Markdown or raw JSON.
- Configurable background polling, plus auto-refresh when the Insights view becomes visible.
- Fractional precision for AI credit usage values and percentages so displayed numbers better match Copilot reporting.
The Recent usage timeline records balance drops between successful observations, not individual requests or models. Each entry shows both interval timestamps and credits. Project/branch labels are estimates only when the window stayed focused and its workspace context stayed stable throughout the interval; other drops remain unattributed. No past attribution is reconstructed from aggregate project buckets. GitHub may account for usage late, so even a freshly fetched balance is not a real-time activity log.
copilotInsights.timeline.retentionDays defaults to 7 (0–30). Storage is local,
account/host-scoped, and capped at 5,000 intervals, including idle observations.
The sidebar shows the newest 100 drops. Set retention to 0 to disable and delete
this observation history for all stored accounts (also disables spike detection).
Clear Usage History clears the active account's timeline along with existing history.
Attribution off deletes stored project/branch metadata; project removes branches.
These privacy changes also apply to previously stored accounts.
Optional spike alerts are separate from monthly percentage alerts:
| Setting | Default | Meaning |
|---|---|---|
copilotInsights.spikeAlerts.enabled |
false |
Enable observed-consumption notifications |
copilotInsights.spikeAlerts.credits |
50 |
Minimum credits in the observation window |
copilotInsights.spikeAlerts.windowMinutes |
5 |
Minimum complete window; actual poll boundaries are shown |
copilotInsights.spikeAlerts.cooldownMinutes |
30 |
Account-scoped cooldown, retained across resets/restarts |
Windows include idle polls and must be contiguous. Failed refreshes, restarts, account transitions, and gaps longer than five minutes break detection; a long gap is never presented as a real-time spike. First observations, resets and entitlement changes establish a new baseline. Alerts open the sidebar and explicitly warn about delayed accounting; they do not impose hard caps or shut down Copilot.
Data confidence separates last successful fetch from last observed balance change, shows tracking gaps and partial coverage, and reports attribution coverage of retained observed credits. Failed refreshes keep cached data and confidence details visible.
The Budget and billing panel separates included plan allowance, an optional
copilotInsights.personalBudget (0 disables), and GitHub-reported overage permission.
Personal targets can be below the allowance without changing usage, billable overage,
history, forecasts, or existing customCreditLimit semantics and monthly alerts.
No local target changes or enforces GitHub billing; use GitHub's billing controls.
Work-calendar capacity divides remaining advisory capacity, less
copilotInsights.workCalendar.reserveCredits (default 0), by remaining workdays:
copilotInsights.workCalendar.weekdays: defaults to Monday–Friday ([1,2,3,4,5]; Sunday is 0). An empty list gives zero workdays.copilotInsights.workCalendar.daysOff: localYYYY-MM-DDdates to exclude.- Today's date counts if it is a workday; days are counted in local time up to the reset instant, using calendar arithmetic across daylight-saving transitions.
Capacity respects a personal target when set, otherwise the allowance or existing above-allowance custom limit. Zero remaining workdays yields zero credits per workday. This is advisory pacing, not a prediction of request counts.
The Copilot Insights activity bar view shows:
- Plan summary, chat availability, and organization count.
- Quotas for Copilot features, including correct handling for unlimited quotas.
- Remaining, used, total, and percentage information for limited quotas.
- Health badges or mood indicators based on remaining AI credits.
- Reset timing and pacing guidance to help spread usage across the billing window.
- Overage state, over-quota summary, and estimated overage cost when applicable.
- Local usage history with trend chart and delta comparisons.
- Billing period totals compared against the previous period, plus an archive of completed periods.
- A per-project breakdown of where this period's credits went, with the part that could not be attributed shown rather than hidden.
- Weighted prediction and burn-rate analysis for AI credits.
- Troubleshooting context when the endpoint fails or returns stale data.
The status bar provides a compact AI credit summary that can be shown on the left, right, or both sides.
Available styles:
- detailed-original
- progress-capsule
- circular-ring
- solid-bar
- shaded-bar
- minimalist
- adaptive-emoji
You can independently control whether the label, numeric quota, and visual indicator are shown.
From the webview you can copy:
- A Markdown summary for sharing in docs, issues, or chat.
- The raw Copilot payload as formatted JSON.
Install from the Visual Studio Marketplace:
You can also package and install locally from a VSIX during development.
- Install the extension.
- Open the Copilot Insights icon in the VS Code activity bar.
- Sign in with GitHub if VS Code prompts for authentication.
- Review your plan details, quotas, and reset timing.
- Leave background polling enabled for automatic updates, or use the refresh button whenever you want an immediate snapshot.
- Copilot Insights: Refresh
- Copilot Insights: Open Settings
- Copilot Insights: Reset to Defaults
- Copilot Insights: Choose Status Bar Style (with live preview)
- Copilot Insights: Show Organization Metrics (opt-in, requires
copilotInsights.organization) - Copilot Insights: Export Usage History (daily usage, project attribution, billing periods, or raw snapshots — JSON or CSV)
- Copilot Insights: Clear Usage History
- Copilot Insights: Show Logs
Ask Copilot Chat about your quota — reference the #copilotQuota tool in your prompt (or just ask "how many AI credits do I have left?" in agent mode) and it will answer using your live quota data.
Use Copilot Insights: Open Model Costs, the sidebar link, or the table icon in the view toolbar. No sign-in is required. The editor tab includes searchable model rates, plan references, editorial task guidance, official sources, and a token-cost estimator. Switch rate units between USD and AI credits.
Estimates are separate from your account usage. Total input includes cached reads and cache writes; the estimator avoids counting them twice and selects long-context rates above the published input threshold. Auto is a hypothetical eligible-routing scenario, not a guarantee that Auto will select that model. Legacy annual request billing is not estimated. Expired promotional model rates cannot be used for estimates.
The bundled catalog works offline. Refresh catalog explicitly downloads the
public JSON from https://www.emanuelebartolesi.com/resources/github-copilot.json,
without sending account, workspace, or token inputs. A validated update is cached
locally; download or validation failures keep the current snapshot. Review dates,
source links, and a warning after 30 days make reference freshness visible.
For maintainers: npm run sync-model-catalog refreshes the bundled snapshot from
the published endpoint. Before website deployment, use
npm run sync-model-catalog -- --website ../website to generate it from the website's
source endpoint. Commit the generated snapshot with the extension changes. Normal
extension builds do not need network access or the website checkout.
Search for "Copilot Insights" in VS Code Settings or use the settings button in the view title bar.
Key settings:
copilotInsights.showMood: Show a mood indicator instead of the standard health status.copilotInsights.progressBarMode: Chooseremainingorusedfor quota bars.copilotInsights.pollingIntervalSeconds: Refresh Copilot quota data automatically everyNseconds. Set to0to disable polling.copilotInsights.statusBarLocation: Chooseleft,right, orboth.copilotInsights.statusBarStyle: Select the status bar visual style.copilotInsights.statusBar.showName: Toggle theCopilot:label.copilotInsights.statusBar.showNumericalQuota: Toggleremaining/totaldisplay.copilotInsights.statusBar.showVisualIndicator: Toggle the bar, ring, emoji, or similar style element.copilotInsights.statusBar.enableColoredBackground: Turn the status bar red when over quota / yellow below 20% remaining.copilotInsights.customCreditLimit: Budget against a custom AI credit limit above your plan entitlement.copilotInsights.alertThresholds: Usage percentages that trigger a warning notification (default[85]), each once per billing period.copilotInsights.dailyBudget: Optional daily AI credit budget shown against today's usage.copilotInsights.notifyOnReset: Show a notification when your billing period rolls over and the quota resets.copilotInsights.autoExport.enabled/copilotInsights.autoExport.folder/copilotInsights.autoExport.format: Automatically export the local usage history once per day, ascopilot-insights-history.*(raw snapshots) andcopilot-insights-daily.*(daily usage).copilotInsights.attribution.mode: Record which project your credits are spent on —project-and-branch(default),projectto skip branch names, oroff(which also deletes what was already recorded).copilotInsights.organization: GitHub organization slug for the opt-in organization Copilot metrics command.
Example:
{
"copilotInsights.pollingIntervalSeconds": 60,
"copilotInsights.progressBarMode": "remaining",
"copilotInsights.statusBarLocation": "right",
"copilotInsights.statusBarStyle": "detailed-original"
}GitHub reports how many AI credits are left, never what spent them. Attribution is therefore inferred locally from timing: when the balance drops while one project has been in the foreground of this window for the whole interval, that project is credited.
Two rules keep the estimate honest:
- A drop is only attributed when the window stayed focused across the entire interval. Anything else — another VS Code window, VS Code in the background, the Copilot CLI, github.com — is left out rather than guessed at. It appears as Unattributed.
- Only attributed credits are stored. The unattributed remainder is derived from the period total at display time, so a second VS Code window observing the same usage cannot inflate the totals, and the parts always add up to the whole.
The project is the workspace folder holding the active editor (or the first folder open); the branch comes from the built-in Git extension, and is omitted when that extension is unavailable.
It is an estimate, not an audit trail:
- A background agent working on one project while you have another in the foreground is credited to the wrong one.
- Usage outside the editor lands in Unattributed, which is honest but not informative.
- A short session that starts and ends between two polls may be attributed to whatever was in the foreground at the next poll.
Set copilotInsights.attribution.mode to project to skip branch names, or off to stop recording and delete what was already recorded. Nothing is ever sent off your machine.
The extension records which billing period each refresh belongs to, using the quota reset date reported by GitHub. When that date rolls over, the period that just ended is summarized (total used, busiest day, days tracked, overage) and archived locally, and a new period starts.
Archived periods never overlap: a period closes at the end of the previous local day and the new one starts on the rollover day, so usage recorded earlier on the rollover day counts toward the new period.
Pacing guidance is based on the latest quota snapshot and the time remaining until the quota reset date.
The extension calculates:
- Daily average to stay within quota until reset.
- Weekly average.
- Approximate workday and work-hour averages.
- Daily capacity estimates for common AI model cost multipliers:
0.33x,1x, and3x.
These values are intentionally conservative and designed for quick decision-making rather than formal forecasting.
Copilot Insights uses VS Code's built-in GitHub authentication provider and requests Copilot account data from:
https://api.github.com/copilot_internal/user
The extension stores usage history in VS Code global state, in two tiers:
- Raw snapshots — one per observed balance change, kept for about 48 hours (with a floor so light users keep a usable series). These drive short-range views like "since last refresh".
- Daily rollups — one aggregated record per calendar day, kept for roughly 13 months, plus a summary of each completed billing period. These drive the burn-down, heatmap, forecasts, and the period comparison.
- Attribution buckets — credits per project and branch for the current billing period, with project totals carried onto each archived period summary. Only workspace folder names and branch names are recorded, never file paths or contents.
Everything is keyed per GitHub account and stays on your machine. No external service is used by this extension to store your quota history.
Raw snapshots accumulate at the polling rate, so a heavy Copilot day can produce hundreds of them. Capping them by count alone meant the people who use Copilot most retained the least history — and the forecasting code, which needs observations spaced hours apart, was left with almost nothing to work with. Rollups keep the whole billing period at a bounded size regardless of how hard Copilot is used.
- Make sure you are signed into the correct GitHub account in VS Code.
- Confirm your account has GitHub Copilot access.
- Trigger a manual refresh from the view title bar or command palette.
- The account, org, or tenant may not expose this Copilot endpoint.
- The endpoint is internal and may change over time.
- Recent versions preserve fractional precision for AI credit values and percentages instead of rounding everything to whole numbers.
- Attribution only credits a project when this window stayed focused for the whole interval between two refreshes. Usage from another VS Code window, from the Copilot CLI, or from github.com is deliberately not guessed at.
- It also starts empty after every quota reset and after an upgrade, since past usage cannot be attributed retroactively.
- The comparison needs a completed period to measure against, and the Copilot API only ever reports the period in progress. It appears after the extension observes your first quota reset.
- The current period is labeled "partial" when tracking began after it had already started.
Requirements:
- VS Code 1.107 or newer
- Node.js compatible with the repo's toolchain
Run locally:
npm install npm run watch
Then press F5 in VS Code to launch an Extension Development Host.
Useful scripts:
npm run compile— typecheck, lint, and bundle (esbuild →dist/)npm run watch— rebuild the bundle on changenpm test— run the test suite in a VS Code test hostnpm run package— production bundlenpm run test-vsix— package and install the VSIX locally
MIT. See LICENSE.



