Long Context

Antigravity 1M Context: What Fits, What It Costs

The 1M-token window was a 3.1-Pro-tier feature inside Antigravity. With 3.8 Flash it reached the Flash tier — which changes what fits in a single pass, what draws from quota, and which workloads get rethought.

Editorial illustration of the 1M-token context window in Antigravity: a vast token stream flowing through a window with an overflow warning.
1M tokens reaching the Flash tier changes what fits in one pass. Generated hero; not official artwork.

What Changed

The Antigravity blog post announcing Gemini 3.8 Flash carries the line that matters for this guide: the model ships with the 1M-token context window, previously the 3.1-Pro-tier feature inside the IDE. Before this launch, Antigravity developers choosing Flash pricing worked with a shorter window; choosing 1M meant choosing the Pro tier’s price structure.

The Antigravity account’s launch framing — workhorse model for long-horizon coding and autonomous agents — is the use case in one sentence: long-horizon means the agent holds enough of your codebase, docs, and conversation history in context to keep working without a compaction reset. The window is what makes that possible at Flash pricing.

Introducing Gemini 3.8 Flash in Antigravity! 3.8 Flash is our most intelligent workhorse model, built for long-horizon coding and autonomous agents. Try it out today.

— @antigravity September 2, 2026

What did not change: the Gemini API pricing page still lists 3.8 Flash at $0.75/$3.75 per 1M tokens. The 1M window at Flash pricing is the launch’s quiet value proposition — the previous Flash tier gave you less window for the same money.

What Actually Fits

“1M tokens” is an abstraction. The practical question is what it means for your repository, your docs, and your agent conversation. The table below is the realistic sizing — approximate, because token counts vary by language and content, but directionally right for source code:

WorkloadWhat fitsPractical readWorth 1M?
Small repo (<20K LOC)Entire codebase + docs + history in one passOverkill — smaller context is fasterRarely
Mid repo (20K-100K LOC)Full source + docs + key configsWell within budgetCross-file refactors, architecture passes
Large repo (100K-500K LOC)Core modules + docs + selected historyApproaching budget; curation mattersArchitecture docs, onboarding docs
Monorepo (500K+ LOC)Selected workspaces + docsCuration required — 1M is not infiniteWorkspace-scoped deep passes
Docs + transcriptsHundreds of pages of specs or meeting notesWithin budgetSpec synthesis, meeting-notes digests

The sizing intuition that survives contact with reality: source code tokenizes at roughly 3–4 characters per token for mainstream languages, documentation slightly denser. A 100K-line repository is not 100K tokens — it is closer to 1M after you include comments, configs, tests, and docs. That is why the table’s large-repo row says curation matters: the window is large, not infinite.

What It Costs

Filling the window is not free, and the cost structure has a trap. Input tokens at 3.8 Flash pricing are $0.75 per 1M — cheap. Output tokens are $3.75 per 1M — five times the input price, and the metered side of Antigravity plan quotas. A single pass that ingests 800K tokens of context and produces a large refactor is cheap on the input side and expensive on the output side.

The cost-per-task arithmetic that matters: a single 1M-window pass is usually cheaper than five 200K-window passes for the same task, because you pay the input once and the model reasons over the whole picture instead of re-deriving it. The exception is when the single pass produces a much larger output than the split passes would — output is where the cost concentrates.

Inside Antigravity, all of this runs through the plan quota rather than API billing, and the quota resets documented during launch week are the operational reminder that the meter is real.

Workloads Where It Changes Decisions

Three workload classes genuinely change when 1M reaches the Flash tier:

Codebase research and documentation. The official codebase-analysis demo is exactly this class: an agent explores a repository, documents it, and produces an interactive artifact — in one pass, because the whole codebase fits. At a shorter window, this task requires staged passes with explicit context handoffs between them.

Cross-file refactors. A refactor touching interfaces across twenty files needs those files and their call sites in context simultaneously. At shorter windows, the agent works file-by-file with a written plan; at 1M, it sees the whole dependency graph. The failure modes differ: staged refactors risk drift between passes, single-pass refactors risk output truncation on very large diffs.

Spec and transcript synthesis. Hundreds of pages of specifications, PRDs, or meeting notes fit comfortably. The agent-side work is no longer “which subset do I load” but “what do I ask for” — a genuinely different interaction pattern.

Official Demo

The design-system demo from the launch post is the 1M-window showcase in practice: minimal input producing implementations across 12 frameworks with an interactive theme editor — the artifact breadth only makes sense in a single pass over a large context:

Official Google Antigravity demo: the single-pass, large-context workload class.

Caveats

The window is the ceiling, not the promise. Filling 1M tokens does not guarantee the model attends to all of it equally — long-context recall degrades toward the middle of very long inputs across the industry. For retrieval-critical work, place the most important material early or verify it made it into the output.

Vendor demos are ideal conditions. The launch demos run on Google-chosen inputs. Your monorepo with generated files, vendored dependencies, and binary assets is not that input — curate before you fill.

Quota is the real constraint. The window defines what is possible; your plan quota defines what is repeatable. Deep passes at 1M draw output tokens fast, and launch-week quota resets do not establish a stable cadence.

Use It If

Use the full window when the task is genuinely cross-file or cross-document — research passes, architecture documentation, cross-file refactors, spec synthesis. Those are the workloads where staged passes produce drift and the single pass produces coherence.

Curate instead when the repository is large enough that curation beats capacity — monorepos, generated code, vendored dependencies. The window is a budget, not an instruction to use all of it.

Watch output, not input: the cost concentrates on what the model writes, not what it reads. The cheapest 1M-token run is the one where you load exactly what the task needs and ask for a scoped output.

FAQ

What is the 1M context window in Antigravity?

The Gemini 3.8 Flash model inside Antigravity ships with a 1M-token context window — previously a Gemini 3.1-Pro-tier feature in the IDE. It defines how much code, documentation, and conversation history fits in a single agent pass.

How much code fits in 1M tokens?

Source code tokenizes at roughly 3–4 characters per token. Practically: a mid-sized repository (20K–100K lines) with docs and configs fits comfortably; a monorepo needs curation. The window is large, not infinite.

Is 1M context available on the 3.7 Flash model?

The 1M window reaching the Flash tier is part of the 3.8 launch. The 3.7 Flash model remains available for efficiency-first workflows; check the Antigravity models documentation for the current per-model window table.

Does filling the 1M window cost more?

Input tokens are cheap ($0.75 per 1M at Flash pricing); output tokens are five times that. A single full-window pass is usually cheaper than multiple staged passes for the same task, but the output the model writes is where cost concentrates.

Does long-context recall degrade?

Toward the middle of very long inputs, recall degrades across the industry — the window is the ceiling, not a promise of equal attention. Place retrieval-critical material early in the context or verify it in the output.

Should I always use the full window?

No. Use the full window for genuinely cross-file or cross-document work; curate instead when the repository is large enough that curation beats capacity. The window is a budget, not an instruction.

Sources

Official sources first. All accessed September 2–9, 2026.

Related: Gemini 3.8 Flash integration guide, Thinking levels & quota, and Antigravity CLI deep dive.