# Pi Coding Agent Gets Official Google AI Plan Sign-In for Gemini Quota

> Source: <https://explainx.ai/blog/pi-google-ai-plan-official-gemini-ultra-sign-in-november-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog>
> Published: 2026-11-28 00:00:00+00:00

**Key takeaway:** Pi's `google-ai-plan` provider signs in via loopback OAuth with PKCE and DPoP-bound refresh tokens and bills through the `createPerUserQuota` endpoint, but it stays excluded from `builtinProviders()` until integrators opt in and forks must register their own Google OAuth client.

**Pi is adding an official way to spend your Google AI plan subscription inside the terminal coding agent**, not only in the Gemini web app. Contributor **David Brai** opened [pull request 12614](https://github.com/earendil-works/pi/pull/12614?ref=explainx) on **earendil-works/pi** with a **`google-ai-plan` provider** that signs you in through **Google OAuth** and routes model calls through the **Gemini Interactions API** **`createPerUserQuota`** endpoint. The work is **Google-aware billing for harnesses**: the same subscription quota that buys you **Gemini 4 Hydrogen** on the web can power **tool loops in Pi**, if your plan tier includes the model and the provider ships on your install channel.

## What Pi added in pull request 12614

The November 26–28 commits on the branch describe a full provider, not a stub.

| Piece | What the PR says it does | 
|---|---|
| Sign-in | Loopback OAuth on `127.0.0.1` with**PKCE** ,**DPoP-bound refresh tokens** , and plan-specific scopes | 
| Billing route | **`google-interactions`** client targeting**`:createPerUserQuota`** so usage draws from**per-user plan quota** | 
| Models | Default **`gemini-4-hydrogen`** ; streaming, thinking with signed thought replay, tool calls, usage reporting | 
| Errors | **Daily limit** (no retry),**model not on plan** ,**sign-in** ,**eligibility** ,**kill switch** | 
| Packaging | **`builtinProviders()`** later excludes**` google-ai-plan`** until integrators opt in, per a November 28 commit | 

Pi keeps its design rule that **`pi-ai` ships no Google client**: the **coding agent** passes **Pi's own client** into `googleAiPlanProvider()`. Other apps must register theirs, which is why **forks cannot reuse Pi's OAuth client** without their own Google Cloud consent screen.

That architecture matches what **nanocode** and **Hermes** ports describe in cross-references on the same thread: third-party harnesses can target the **same quota endpoint**, but each needs **Google approval** for its OAuth client. **Contributor Ziphyrien** wrote that **Google approved the endpoint for Pi only**. Treat that as a **thread claim** until Google publishes harness-specific guidance; it still explains why forks were scrambling to open approval tickets on November 27–28.

## Why Google picked a minimal harness

Hacker News discussion on [item 50675069](https://news.ycombinator.com/item?id=50675069&ref=explainx) asked why **Pi** got the integration instead of a larger IDE.

**Commenter dannyw** ([reply 50675523](https://news.ycombinator.com/item?id=50675523&ref=explainx)) argued Pi is **popular, minimal, open source, and extensible**, but still backed by **Earendil**, which can **sign contracts**. That combination is rare: many tiny agents lack a company table for OAuth review, while big IDEs already bundle their own Google billing.

**Commenter mtford** ([50675347](https://news.ycombinator.com/item?id=50675347&ref=explainx)) read the code and thought only **Google AI Ultra** would work at first. **Andy8647** later challenged that reading: the model catalog mixes **Hydrogen** (every paid tier), **Neon** (Pro and Ultra), **Carbon** (Ultra-only), and **Flash-Lite**. If **`createPerUserQuota`** accepts Pro accounts but gates **Carbon**, Pi would surface the same **not-on-plan** errors the API already returns rather than blocking sign-in entirely.

For builders already on **Pi** because of its **small prompt and inspectable sessions** (see explainx.ai's [Pi 1.0 harness guide](https://explainx.ai/blog/earendil-pi-1-durable-minimal-harness-2026)), plan auth is the next cost lever after **local models** and **harness adapters** ([Hugging Face adapter news](https://explainx.ai/blog/hugging-face-harness-adapters-qwen38-27b-super-adapter-pi-hermes-opencode-2026)).

## How sign-in and quota differ from an API key

Loopback OAuth for Pi Google AI plan sign-in sits beside closed API billing, like a key in a capsule next to a folder

Most agent tutorials assume a **Gemini API key** on a **Google Cloud project**. That path meters **pay-as-you-go** spend and fits **server** deployments.

The **google-ai-plan** path meters **consumer subscription entitlements**. Google's **Interactions API** general availability post (covered on explainx.ai in [Gemini managed agents and sandboxes](https://explainx.ai/blog/google-gemini-managed-agents-self-hosted-sandboxes-november-2026)) positions interactions as the **primary agent surface**. **`createPerUserQuota`** is the consumer bridge: the model still runs on Google infrastructure, but **quota accounting** ties to **the signed-in user**, not a shared project key.

Practical consequences for Pi users:

1. **Daily caps feel like mobile data** — the provider maps**daily limit** errors to**non-retryable** failures, so agents should backoff instead of hammering the API.
2. **Model pickers must respect tier** — attempting**Gemini 4 Carbon** on**Google AI Pro** should fail fast with**upgrade messaging** , not silent fallback.
3. **Kill switch paths** — enterprise admins can cut third-party OAuth clients; Pi must surface**sign-in** and**eligibility** errors clearly (the PR lists both).

If your team standardizes on **Decision 1** or **tool retrieval** on Interactions ([Decision 1 coverage](https://explainx.ai/blog/google-gemini-decisions-api-decision-1-november-2026), [tool retrieval piece](https://explainx.ai/blog/gemini-api-tool-retrieval-defer-loading-tool-search-interactions-api-november-2026)), plan auth in Pi is the **terminal-side mirror** of the same API family.

## Terms, approval, and fork risk

The thread's sharpest disagreement was legal, not technical.

**HazAT** ([PR comment](https://github.com/earendil-works/pi/pull/12614?ref=explainx)) said Google's **terms** might forbid third-party harnesses even if the code works. **Ziphyrien** answered that Pi uses **Google's official per-user quota route** and **Google approved Pi**.

explainx.ai does not substitute GitHub comments for legal advice. From a **builder risk** lens:

- **Approved-client lists can be narrow** — if only**Pi's client ID** is blessed,**oh-my-pi** and corporate forks need their own review ([open oh-my-pi issue referenced from the PR](https://github.com/can1357/oh-my-pi/issues/20891?ref=explainx) ).
- **OAuth desktop clients leak easily** — loopback redirect URIs are standard, but**DPoP** and**refresh rotation** matter on shared laptops.
- **Quota is not confidentiality** — plan billing does not change**data handling** ; treat prompts like any cloud model call.

For MCP-heavy Pi setups ([MCP Codemode return](https://explainx.ai/blog/pi-adds-mcp-codemode-earendil-reversal-2026)), a plan-backed Gemini provider does not replace **tool sandboxing** or **secret scanning**.

## What developers are saying

Beyond HN, the GitHub thread shows **global demand** and **install confusion**.

| Voice | Claim (not verified by explainx.ai) | 
|---|---|
| **qiuhuiming** | Testing commit `628d2cc` ,**`pi auth login google-ai-plan`** returned**` Error 401: disabled_client`** before consent — asked whether OAuth is intentionally off while the PR is draft | 
| **s-smits** | Asked whether **December 2** is the rollout date (no maintainer confirmation in-thread) | 
| **PythonicNinja / ejpespa** | Celebrate **official Gemini in Pi** ; several note**Ultra** upsell | 

Treat **disabled_client** reports as **status signals**: either the client is not production-enabled yet, or testers need the **exact commit** that merged provider docs. After install, verify with **`pi auth login google-ai-plan`** (exact subcommand from the PR) and read stderr before wiring CI.

## How to try it safely

When the provider lands on your channel:

1. **Update Pi** from[pi.dev](https://pi.dev/?ref=explainx) or your fork's release notes; confirm**`google-ai-plan`** appears in provider docs.
2. **Run plan login** once on a machine you control; store tokens where your fork documents (never commit OAuth JSON).
3. **Pick a default model** matching your subscription — start with**`gemini-4-hydrogen`** unless you confirmed**Neon** or**Carbon** on your tier.
4. **Set fallbacks** — keep**Anthropic** or**local Qwen** providers configured; daily limits will bite long agent jobs ([Inkling on Pi adapter context](https://explainx.ai/blog/inkling-2-mini-pi-adapted-preview-harness-adapter-fewer-tokens-claimed-vs-verified-2026) ).
5. **Re-read Google AI plan perks** — explainx.ai's[Google AI Pro Colab claimed-vs-verified guide](https://explainx.ai/blog/google-ai-pro-colab-a100-h100-200-compute-units-claimed-vs-verified-2026) shows how easy it is to over-read GPU marketing; apply the same skepticism to**which Gemini models** each tier includes.

Teams rolling agents to dozens of laptops should pair this with **corporate AI training** on [explainx.ai workshops](https://explainx.ai/workshops) so engineers know when **subscription quota** beats **project API keys**.

### What to log before you switch billing paths

If you migrate a team from **shared API keys** to **per-user plan login**, capture a week of baseline metrics first: **tokens per task**, **tool-call failure rate**, and **how often daily limits fire**. Plan quota errors are **user-visible** by design; a single developer burning Ultra quota on a loop can block everyone else on a family plan. Pi session files help because the harness already exposes **usage** objects in-thread, but finance still needs a policy: **who pays when Ultra is required for Carbon**.

Document **fallback providers** in `agents.md` or your internal Pi config so CI and headless runners do not depend on OAuth flows that need a browser. Server jobs should stay on **API keys** or **Vertex** contracts until Pi documents a **service account** path, which this pull request does not claim.

## How Pi compares with other harness Google plan ports

Different API pipes meeting through one adapter mirrors how Pi and forks share the Google AI plan quota pattern

The PR became a **template** the same week:

- **fitchmultz/pi** merged a port of the provider.
- **nanocode** commit messages describe**`--google-auth google-ai-plan`** waiting on**its own approved client** .
- **Hermes Agent** and**Psi** issues reference upstream**12614** .

That ecosystem split matters: **Pi may ship first**, but your org might run **OpenCode**, **Claude Code**, or a **fork**. Each path needs **Google's OAuth approval**, not just copying Pi's source.

For a wider harness map, see the [June Pi minimal harness primer](https://explainx.ai/blog/pi-minimal-agent-harness-mario-zechner-guide-2026) and [GLM Coding Plan harness guide](https://explainx.ai/blog/how-to-run-glm-5-2-coding-plan-agent-harnesses-2026) — different vendors, same question of **who owns the billing relationship**.

## Bottom line

**Pull request 12614 is the first open, code-level proof that Google will let a third-party coding agent spend consumer Google AI plan quota through Interactions**, with **explicit error types** and **fork-level OAuth requirements**. Whether that is **Ultra-only**, **Pro-inclusive**, or **disabled until December** was still contested in comments on November 28.

Watch **pi.dev**, the **default branch on GitHub**, and **`disabled_client`** reports before you reorganize spend away from API keys. If you need **Gemini in production agents today**, the [Gemini API CLI agent shell piece](https://explainx.ai/blog/gemini-api-cli-gemini-api-command-google-agents-shell-image-video-deep-research-2026) remains the documented **API-key path** while plan auth rolls out.
