Skip to content
AI Productivity Insights
Hands-On Tutorial · October 2026

Long-Horizon Work with Gemini 4 Argon: A Hands-On First Look

A one-million-token shared window, a continuation protocol that keeps long answers going, and a practical plan for the big migration you've been putting off.

Hero: blue background with stacked code documents on a glowing orbit, title One million tokens. One long, unbroken job., a bar labelled Unified 1,048,576-token window split into input, thinking and output, and five hops ending in STOP.

Introduction

Most AI work happens in short bursts. The jobs that eat our weeks, like migrating a codebase or reconciling a 600-page policy library, need the whole picture in view and room to think.

That’s the pitch for Gemini 4 Argon. Google announced it on September 30 for a small group of cyber defenders and made it generally available on October 13. Google’s launch post says long, hard work is “enabled by an industry-leading 1M unified input-output token limit via the Gemini API,” and points developers to “the new continuation protocol.” In the API docs, that protocol is called long decode, and it runs on a continuation_token.

In this edition, we look at what changed, what’s confirmed as of November 17, 2026, and how to plan a long-horizon code migration around the shared window and the continuation loop. The code is labelled as examples. I use only parameter names that appear in Google’s docs, and this is a first look based on documentation, not a report of my own runs.

A bigger window doesn’t do the work.
A better plan for the window does.

1. What Gemini 4 Argon Is (Verified Facts)

Key Features

  • Model ID: gemini-4-argon, generally available in the Gemini API since October 13 (API changelog).
  • Unified 1M window: input, thinking, function calls and output share 1,048,576 tokens. Earlier Gemini 3 and 2.5 models used separate 1M input and 64K output budgets.
  • Long decode: one generation can run past the per-request cap, up to 1M tokens minus your input, across several request-and-response “hops.”
  • Thinking levels: low, medium (the default) and high. minimal isn’t supported.
  • Pricing: $2.00 per 1M input tokens and $10.00 per 1M output tokens (thinking included) through November 30, 2026, then $4.00 and $20.00 starting December 1 (calendar dates as published; no hour or timezone). The What’s new page calls this introductory pricing; the pricing table publishes the same rates and dates without that word. Cached input is 95% off: $0.10 per 1M now, $0.20 later. The pricing page says Argon is not available on the Free tier.
  • Knowledge cutoff: March 2026, per the model card, which also warns of “occasional slowness or timeout issues.”

Google’s launch post and the October 13 developer guide date general availability to October 13, 2026, after a September 30 announcement to trusted cyber defenders in the Fairwind Program. The 1,048,576-token window is a single shared input-output budget, not 1M of input plus a separate output budget. The $2.00 / $10.00 rates still apply through November 30, 2026. Dates are as published; no hour or timezone.

Where You Can Use It

SurfaceWho gets it (as documented)
Gemini API / AI StudioPaid Gemini API tier only. The pricing page says Argon is “not available on the Free tier.”
Gemini app & AI Mode in SearchGoogle AI Pro and Ultra can select Argon in Gemini app chats and Tasks (Gemini Apps Help). The Oct 13 launch post also names Pro and Ultra for AI Mode in Search. Not on Plus or a no-plan account.
Google AntigravityPaid Google AI Pro (or a trial on eligible premium devices), Google AI Ultra, and Enterprise, per Antigravity’s models page. Not on Free or Google AI Plus.
Google CloudGemini for business, and the API on Gemini Enterprise Agent Platform (regions global, us, eu)
GitHub CopilotCopilot Pro+, Max, Business and Enterprise, including Copilot CLI, since Oct 13 (GitHub changelog). GitHub will deprecate Argon across Copilot experiences on December 14, 2026, and suggests Gemini 4 Carbon as the alternative.
Diagram comparing token budgets: earlier Gemini models show a separate 1M input bar and a small 64K output bar; Gemini 4 Argon shows one shared bar split into input, thinking and final output, with a note that output can use at most 1,048,576 minus input. Below, three cards: streaming or SDK hops up to 65,536 tokens, non-streaming REST hops up to 32,768 tokens, and long decode when max_output_tokens is above 65,536.
Figure 1: One shared token budget, with per-hop caps underneath

2. Latest Updates (as of Nov 17, 2026)

  • Sep 30: Google announces Argon and rolls it out to trusted cyber defenders in its Fairwind Program (launch post).
  • Oct 13: General availability across the Gemini API, AI Studio, the Gemini app, AI Mode, Antigravity, Gemini for business and Google Cloud. The model card is published the same day, and Argon arrives in GitHub Copilot, including Copilot CLI (GitHub changelog). Google’s Argon developer guide lists LiteLLM among tools with day-one support. The launch post offers scientists a chance at six months of Antigravity’s highest usage tier free, subject to eligibility, capacity and selection, and names Google AI Pro and Ultra for the Gemini app and AI Mode in Search.
  • Since this first look was drafted: Google has launched Gemini 4 Carbon (gemini-4-carbon) and Gemini 4 Hydrogen (gemini-4-hydrogen). Argon and Carbon still share the same per-token rates and the same November 30 / December 1 clock. Hydrogen is priced at $1.50 / $7.50 per 1M tokens and is available on the Free API tier; Argon is not. Those rates are from the current Gemini API pricing page.
  • Antigravity: The current models page lists Argon on paid Google AI Pro (or a trial on eligible premium devices), Google AI Ultra and Enterprise. It is not on Free or Google AI Plus.
  • Nov 13: GitHub says it will deprecate Gemini 4 Argon across Copilot experiences on December 14, 2026, and suggests Gemini 4 Carbon as the alternative. The Gemini API deprecations page lists no shutdown date for gemini-4-argon.

Benchmarks: Where the Numbers Come From

Google’s model card reports 68.9% on the Vals Index, and the launch post says Argon ranks #1 on the Vals Index. The card’s results are mixed, which is useful in itself. Argon leads on DeepSWE v1.1 (77.9%), but GPT-6 Astra (65.5%) and Claude Opus 5.5 (62.3%) beat it on FrontierSWE v2 (55.0%), and Opus 5.5 leads Terminal-bench 4.0 (66.4% vs 57.4%). For this post, the most relevant row is long context. On GraphWalks BFS, Argon scores 99.7% F1 up to 128K tokens and 84.2% from 256K to 1M, ahead of the three other models in the table, but clearly lower at full length.

The independent picture is still forming. Third-party harnesses should be read as one tester’s results, not as official scores.

84% at a million tokens is impressive.
It also means checking what it missed.

3. The Continuation Protocol, Explained

Every hop has a cap. A streaming or SDK request returns at most 65,536 output tokens, and a direct non-streaming REST call returns at most 32,768, half of Gemini 3.x’s limit. Thinking counts against that cap too. When the model hits the cap with budget left, the response ends with finish_reason: CONTINUATION and an encrypted continuation_token. You send the same request again with that token, and the model picks up where it stopped. max_output_tokens sets the total for all hops combined.

Two points are easy to miss. First, changing the model ID doesn’t turn long decode on. For automatic continuation on GenerateContent, you need a recent SDK (Python google-genai 2.30.1+, JavaScript @google/genai 2.29.1+) and a max_output_tokens above 65,536. The Interactions API needs higher floors: Python 2.34.0+ and JavaScript 2.32.0+. Second, a hop can spend its whole budget thinking and return empty text. The docs say that’s normal.

Flow diagram of the continuation loop: step 1 sends the request with the same contents, system instruction, tools and generation config each hop; step 2 reads the hop and checks finish_reason. CONTINUATION loops back with the latest token, STOP joins the parts into one model turn, and MAX_TOKENS means resume with a higher max_output_tokens or start again. Rules listed below: don't paste partial output into contents, empty-text hops are normal, the SDK continues automatically from version 2.30.1, and on Agent Platform long decode on GenerateContent is v1beta1-only.
Figure 2: The continuation loop, with the rules from the docs

4. Hands-On: Plan a Long-Horizon Code Migration

The scenario: a mid-size Python service that has to move from an old internal client library to its v2 API. The work touches dozens of files and depends on a style guide and a changelog that no one remembers in full. It’s the kind of migration Google uses as its showcase case, and it fits the shared window well, as long as you budget for it. The steps below are a plan, not a log of my own runs.

Step 1: Confirm access and put a ceiling on spend

You need the paid tier of the Gemini API, because Argon isn’t on the free tier. AI Studio has offered project-level spend caps since March 2026, so set one before your first long run. A long decode bills every hop, including hops that only think.

Step 2: Upgrade the SDK and raise your timeout

Google’s long-decode guide tells you to set HTTP read timeouts to 15 to 20 minutes. The same guide says the server closes non-streaming hops after 10 minutes and streaming hops after 20, so a 3- or 5-minute client timeout will cut long requests off.

# Example (from the documented setup)
pip install -U "google-genai>=2.30.1"

from google import genai
from google.genai import types

client = genai.Client(
    http_options=types.HttpOptions(timeout=1_200_000)  # 20 min, in ms
)

Step 3: Pack the context, static material first

Put the style guide, the v1→v2 API map and the source files in one prompt, with the parts that never change at the front. Implicit caching discounts a repeated prefix by 95%, and every continuation hop re-sends your prompt. Leave headroom too: output can only use 1,048,576 minus your input, so a 700K-token prompt leaves about 340K for thinking and code.

# Example: build one packed prompt (your own helper, not an SDK feature)
from pathlib import Path

static = Path("docs/style-guide.md").read_text() + Path("docs/v2-api-map.md").read_text()
files = sorted(Path("src").rglob("*.py"))
repo = "\n\n".join(f"=== FILE: {p} ===\n{p.read_text()}" for p in files)
PACKED = static + "\n\n" + repo   # static prefix first, for implicit caching

Implicit caching starts at 4,096 tokens in both the Gemini API caching guide and the Agent Platform Argon guide. The Agent Platform guide says the 95% discount applies when hops run back-to-back within a 15 to 20 minute cache TTL. The Gemini API caching page does not publish a TTL; it only says to send similar prefixes in a short amount of time. A packed repo is far above the 4,096-token minimum either way.

Step 4: Run a cheap planning pass first

Don’t start with a million-token generation. Ask for an inventory and a migration order at the default medium level, within a single 64K hop. It also reports your true prompt size (initial_prompt_token_count).

# Example: planning pass
plan = client.models.generate_content(
    model="gemini-4-argon",
    contents=PACKED,
    config=types.GenerateContentConfig(
        system_instruction="You are migrating this repo from client v1 to v2. "
            "List every call site, group files into migration batches, "
            "and flag anything the API map does not cover. No code yet.",
        max_output_tokens=65_536,
        thinking_config=types.ThinkingConfig(thinking_level="medium"),
    ),
)
print(plan.text)
print("Prompt size:", plan.usage_metadata.initial_prompt_token_count)

Step 5: Run the migration batch with long decode

For each batch, switch to high and give it room. Google’s guide suggests 131,072 or 262,144 for complex reasoning and coding, and the SDK continues across hops automatically. Ask for complete files or unified diffs, so the output is something your tools can check.

# Example: one migration batch, automatic continuation (SDK default)
batch = client.models.generate_content(
    model="gemini-4-argon",
    contents=PACKED + "\n\nMIGRATION PLAN:\n" + plan.text +
             "\n\nMigrate batch 1 only. Return unified diffs per file.",
    config=types.GenerateContentConfig(
        max_output_tokens=262_144,  # total for all hops
        thinking_config=types.ThinkingConfig(thinking_level="high"),
        automatic_continuation=True,  # default, shown for clarity
    ),
)
print(batch.candidates[0].finish_reason)

Step 6: Want checkpoints? Run the loop yourself

On a long job, you may want to save each continuation_token to disk so a crash doesn’t cost you everything. Turn off automatic continuation and follow Google’s rules: same request on every hop, only the latest token, keep going while the finish reason is CONTINUATION.

# Example: manual loop, adapted from Google's long-decode guide
parts, token = [], None
while True:
    r = client.models.generate_content(
        model="gemini-4-argon",
        contents=BATCH_PROMPT,           # identical every hop
        config=types.GenerateContentConfig(
            max_output_tokens=262_144,   # identical every hop
            thinking_config=types.ThinkingConfig(thinking_level="high"),
            automatic_continuation=False,
            continuation_token=token,
        ),
    )
    c = r.candidates[0]
    if c.content and c.content.parts:
        parts.extend(c.content.parts)
    token = c.continuation_token
    Path("checkpoint.token").write_text(token or "")  # your own checkpoint
    if c.finish_reason != types.FinishReason.CONTINUATION or not token:
        break
diffs = "".join(p.text for p in parts if p.text and not p.thought)

If a run ends in MAX_TOKENS, you can resume with the same token and a higher max_output_tokens. Resuming without raising it returns 400 INVALID_ARGUMENT.

The docs describe resuming from the latest token, but they do not say how long a token stays valid, so treat saving a token to disk and resuming in a later session as untested. On Agent Platform, a late resume can also miss the 15 to 20 minute implicit-cache TTL and pay the full input price again.

Step 7: Verify with your tools, then batch the review

Apply the diffs on a branch, run the test suite and linters, and feed the failures into the next pass. The model’s confidence isn’t evidence. Your CI is.

Five-stage workflow: Pack (static context first: style guide, API map, repo), Plan (thinking level medium, 64K cap, inventory and order), Migrate (thinking level high, long decode 131K to 262K), Verify (your tests and linters), Review (human diff review, merge in batches), with a dashed arrow sending failing tests back to the migrate stage. Notes below cover the 95% implicit-cache discount starting at 4,096 tokens in both the Gemini API and Agent Platform docs, the Agent Platform 15 to 20 minute cache TTL, and using initial_prompt_token_count for context size.
Figure 3: A long-horizon code-migration plan, from packing to review

↑ All steps

What Might a Run Cost?

A back-of-the-envelope estimate, using the current prices through November 30, 2026. Take a 300K-token packed prompt and a batch that uses 200K tokens of thinking and output across four 64K hops. The first hop’s 300K input costs about $0.60. The 200K output costs $2.00. The three repeated hop inputs total roughly 1.3M tokens, and at the cached $0.10 rate they add about $0.13. That’s around $2.75 per batch, or about twice that from December 1. Treat these as illustrative figures, not quotes. The pricing page still shows one rate for Argon, with no separate tier for long prompts.

5. Known Issues and Gotchas

  • v1beta1 only for long decode on Agent Platform. Google Cloud lists this as a known issue. The SDK uses v1beta1 by default unless you force api_version='v1'.
  • No long decode through the OpenAI-compatible endpoint, and none on older SDKs. Output stops at the per-request cap.
  • Explicit caching is gone. cachedContents calls return an error. Only implicit caching works.
  • Sampling parameters are ignored. temperature, top_p and top_k do nothing. On Agent Platform, candidate_count, frequency_penalty and presence_penalty return a 400 error.
  • thinking_budget behaves differently by platform. The Gemini API thinking guide says that on Gemini 4 models, thinking_budget is deprecated: if passed alone, it maps to the nearest thinking_level and returns a warning; sending both returns a 400 error. The Agent Platform Argon guide says thinking_budget or thinking_level="MINIMAL" returns HTTP 400. Use thinking_level (low, medium or high) either way.
  • Token counts mislead harnesses. prompt_token_count adds up every hop. If your agent compacts context at a token threshold, read initial_prompt_token_count instead.
  • Tool loops need thought signatures. A LiteLLM user reported a 400 error, “Function call is missing a thought_signature.” Pass the full history back on every turn.
  • Interactions API. Google recommends it for new projects and runs long decode server-side with background: true. On Agent Platform, long decode is supported on both the Interactions API and GenerateContent, but only on v1beta1 (a documented known issue). Automatic continuation on the Interactions API requires Python google-genai 2.34.0+ or JavaScript @google/genai 2.32.0+.
  • Consumer quotas. Google hasn’t published Argon-specific Gemini app limits.

6. Lessons Learned

1. “1M Context” Now Means a Shared Budget

Every token you spend on input is a token the model can’t spend thinking or writing.

2. Continuation Is a Protocol, Not a Prompt

The old habit of typing “continue” is exactly what the docs tell you not to do. Resend the same request with the token, and let the state travel inside it.

3. Plan Cheap, Execute Expensive

A medium planning pass costs little and gives the expensive high passes a map. It also tells you your real prompt size before you commit.

4. Long Context Still Fades

Google’s own GraphWalks numbers fall from 99.7% to 84.2% past 256K. Split very large jobs into batches, and let tests catch what the model misses.

Recap and Key Takeaways

  • Gemini 4 Argon was announced Sep 30 and went GA Oct 13 as gemini-4-argon, at $2.00/$10.00 per 1M tokens through Nov 30, 2026 and $4.00/$20.00 starting Dec 1. It is not on the Free API tier. GitHub will remove it from Copilot on December 14, 2026.
  • Input, thinking and output share 1,048,576 tokens. Per-hop caps are 64K (streaming/SDK) and 32K (non-streaming REST).
  • The continuation protocol is long decode: same request, latest continuation_token, loop while the finish reason is CONTINUATION. The SDK automates it.
  • For migrations: pack static context first → plan at medium → migrate at high with long decode → verify with your own tests.
  • Watch the gotchas: v1beta1, no explicit caching, ignored sampling parameters, summed token counts, and consumer quota limits.

More Long-Horizon Use Case Ideas Across Business Functions

  • Legal: compare a contract library against a new clause standard and list deviations with file references.
  • Compliance: map a 500-page policy manual to a new regulation and draft the gap list.
  • Engineering: SDK upgrades, framework migrations, or deprecations that touch many files at once.
  • Research: synthesize a folder of papers and patents into a claims-and-evidence table. Isomorphic Labs describes cutting weeks to hours this way.

Conclusion

Argon’s headline is the benchmarks, but the useful change for everyday work is quieter: a single shared window and a documented way to keep one answer going far past the old cap. That turns a full migration or document review into one coherent run, with new things to manage: budgets, timeouts, token math and quotas. Start with one batch, measure it, and only then point the full million tokens at the job.

Where to Go Next

  • Gemini 4 Argon is now available for everyone: Google’s Oct 13 launch post. → blog.google
  • What’s new in Gemini 4 Argon: API changes, pricing and the migration checklist. → aistudio.google.com
  • Long decode: the continuation protocol, token counting and billing. → aistudio.google.com
  • Gemini API pricing: current Argon rates and the Free-tier exclusion. → aistudio.google.com
  • Developer’s guide to Gemini 4 Argon: Agent Platform rules and known issues. → docs.cloud.google.com
  • Gemini 4 Argon model card: benchmarks, limitations and safety. → deepmind.google
  • Choose a model in Google Antigravity: current plan availability for Argon. → antigravity.google
  • Gemini 4 Argon in GitHub Copilot: plans and supported IDEs. → github.blog
  • Upcoming deprecation of selected GitHub Copilot models: Argon is scheduled to leave Copilot on December 14, 2026. → github.blog

If you found this guide valuable, consider sharing it with the teammate who keeps postponing “the big migration.” It might fit in one window now.

Newsletter

Get AI productivity insights delivered

Practical AI guides, tutorials, and fresh insights in your inbox.