Grok 4.7: Long-Running Agents, Frontier Coding at $2/M, and xAI's New Safeguard Stack
On September 21, 2026, xAI released Grok 4.7 β a new larger base model trained with extended RL on multi-hour tasks, delivering frontier coding and knowledge work performance at $2/$6 per million tokens, with the strongest safeguard stack xAI has built and best-in-class results on legal, clinical, and biosafety benchmarks.
Grok 4.7: Long-Running Agents, Frontier Coding at $2/M, and xAI's New Safeguard Stack
Executive Summary
On September 21, 2026, xAI (SpaceXAI) released Grok 4.7, its latest frontier model built for coding, agentic tasks, and knowledge work. Released just one month after Grok 4.6, Grok 4.7 represents a significant architectural step forward: it uses a new, larger base model trained with a longer reinforcement learning run on a harder mix of tasks, specifically weighted toward problems that take many hours to complete.
The release is notable for three things: frontier price-performance, best-in-class domain-specific results, and a completely new safeguard stack. Grok 4.7 is served at the same price and speed as Grok 4.6 β $2/M input, $6/M output β making it one of the most cost-effective frontier models available. On CursorBench 4.0, which stresses longer-running coding tasks, it achieves 46.3% at xHigh effort, positioning it at the frontier in price-performance. On specialized benchmarks, it dominates: 19.6% on Harvey Legal Agent Benchmark (vs. 6.7% for Fable 5.1), 56.7% on HealthBench Professional, and 62.4% on LatchBio's biosafety benchmark β the highest score of any model tested.
Grok 4.7 features a 500,000-token context window, text and image input with text-only output, no text output limit, and four levels of reasoning effort (low, medium, high, xhigh). It deploys with xAI's strongest safety measures to date, including the lowest risky-prompt pass-through rate on HackerBench v0.3 (3.3%) and invite-only red-team capabilities for select cybersecurity partners.
This article completes the September 2026 frontier model survey alongside Gpt 6 Sol Luna 50 Percent Price Cut Agentic Coding Cost Efficiency Frontier 2026 09 24 (OpenAI's same-week cost-reduction move), Claude Opus 5 5 Fable 5 1 Performance 40 Percent Cost Reduction Pacing Frontier Safeguards 2026 09 23 (Anthropic's competing release), and Stepfun Step 5 Preview 600b Sparse Moe Agentic Coding Pareto Frontier 2026 09 21 (the open-weight Pareto frontier play released the same day).
1. The Training Story: Bigger Base, Longer RL, Harder Tasks
1.1 Architectural Upgrade
Grok 4.7 is not merely a fine-tune of Grok 4.6 β it uses a new, larger base model. The training pipeline followed a multi-stage approach:
- Base model pre-training β A larger foundation model was trained from scratch, providing more capacity than Grok 4.6's base.
- Extended RL run β The model underwent a longer reinforcement learning phase than Grok 4.6, with a task mix specifically weighted toward problems requiring many hours to complete.
- Self-verification training β The model was explicitly trained to be better at verifying its own work and managing longer context.
- Grok Bot harness integration β Grok 4.7 was trained to natively understand the Grok Bot harness, improving conversational tasks and general knowledge work.
1.2 The Multi-Hour Task Focus
The emphasis on multi-hour tasks is a deliberate strategic choice. Most frontier models are optimized for shorter interactions β answer a question, write a function, generate a report. Grok 4.7 was specifically trained to sustain focus, verify intermediate results, and manage complex state across extended sessions.
This is reflected in the benchmark selection: CursorBench 4.0 (longer-running coding tasks), AA Briefcase v1.1 (multi-hour office work), and Terminal-Bench 4.0 (multi-hour terminal work) are highlighted as the primary evaluation metrics.
1.3 Comparison with Grok 4.6 Training
| Aspect | Grok 4.6 | Grok 4.7 |
|---|---|---|
| Base model | Grok 4.5-derived | New, larger base model |
| Supplemental training | Longer than Grok 4.5 | Longer RL run, harder task mix |
| Task weighting | General agentic tasks | Weighted toward multi-hour tasks |
| Self-verification | Improved | Explicitly trained |
| Grok Bot integration | No | Native understanding |
| Safeguard stack | Improved and calibrated | Entirely new stack |
2. Model Specifications
2.1 Technical Details
| Property | Value |
|---|---|
| Model name | grok-4.7 |
| Context window | 500,000 tokens |
| Knowledge cutoff | May 2026 |
| Input modalities | Text, Image |
| Output modalities | Text |
| Output limit | No text output limit |
| Reasoning effort | Low, Medium, High (default), XHigh |
| APIs | Responses API, Chat Completions |
2.2 Pricing
| Metric | Standard | Fast Variant |
|---|---|---|
| Input (β€200K tokens) | $2.00 / 1M | $4.00 / 1M |
| Cached input (β€200K) | $0.50 / 1M | $1.00 / 1M |
| Output (β€200K) | $6.00 / 1M | $12.00 / 1M |
| Input (>200K tokens) | $4.00 / 1M | $8.00 / 1M |
| Cached input (>200K) | $1.00 / 1M | $2.00 / 1M |
| Output (>200K) | $12.00 / 1M | $24.00 / 1M |
Fast variant availability: The fast variant (2Γ output speed at 2Γ price) is available only in Cursor and Grok Build, not on the public xAI API.
2.3 Tool Support
| Tool | Support |
|---|---|
| Function calling | β |
| Web search | β |
| X search | β (Twitter/X-specific search) |
| Code execution | β |
| Encrypted reasoning | β (always returned on Responses API) |
2.4 Key API Details
- Prompt caching: xAI highly recommends setting a
prompt_cache_key(Responses API) orx-grok-conv-idheader (Chat Completions) to route conversations to the same server for reliable cache hits. - Context compaction: Available for long agent loops to shrink conversations into shorter context.
- Encrypted reasoning: On the Responses API,
grok-4.7always returnsreasoning.encrypted_contenteven when not explicitly requested, enabling multi-turn conversations that preserve the model's reasoning chain. - US regional endpoint: Available at
https://us.api.x.ai/v1with a 10% token price premium.
3. Performance Benchmarks: The Domain-Specific Frontier
3.1 Software Engineering
| Benchmark | Grok 4.7 | Grok 4.6 | GPT-5.6 Sol | Fable 5.1 |
|---|---|---|---|---|
| CursorBench 4.0 (xHigh) | 46.3% | 40.4% | 41.7% | 51.8% |
| DeepSWE v1.1 (high) | 71.0% | 65.2% | 72.7% | 70.0% |
| Terminal-Bench 4.0 (xHigh) | 37.6% | 20.3% | 37.3% | 57.9% |
Key observations:
- On DeepSWE v1.1, Grok 4.7 at high effort (71.0%) matches Fable 5.1 at max effort (70.0%) and comes within 1.7 percentage points of GPT-5.6 Sol at max (72.7%).
- On CursorBench 4.0, Grok 4.7 significantly improves on Grok 4.6 (+5.9 percentage points) and beats GPT-5.6 Sol, though Fable 5.1 still leads.
- On Terminal-Bench 4.0, Grok 4.7 matches GPT-5.6 Sol (37.6% vs. 37.3%) at a fraction of the cost.
3.2 Domain-Specific Excellence
This is where Grok 4.7 truly distinguishes itself. On specialized professional benchmarks, it achieves results that far exceed competitors:
| Benchmark | Grok 4.7 | Grok 4.6 | GPT-5.6 Sol | Fable 5.1 |
|---|---|---|---|---|
| EEBench (Electrical Engineering) | 64.0% | 53.0% | 39.4% | 56.4% |
| Harvey Legal Agent Benchmark | 19.6% | 15.8% | 2.5% | 6.7% |
| HealthBench Professional (Clinical) | 56.7% | 48.5% | 60.5% | 62.1% |
| AA Briefcase v1.1 (Multi-hour office work) | 1,657 | 1,546 | 1,487 | 1,678 |
The Harvey Legal Agent Benchmark result is particularly striking: Grok 4.7 scores 19.6%, compared to 6.7% for Fable 5.1 and 2.5% for GPT-5.6 Sol. This represents a 3Γ improvement over the next-best model in legal reasoning.
On EEBench (electrical engineering), Grok 4.7 leads all models at 64.0%, with a particularly large gap over GPT-5.6 Sol (39.4%).
3.3 The Price-Performance Frontier
At $2/M input and $6/M output, Grok 4.7 occupies a unique position in the cost-intelligence curve:
| Model | Input Price | Output Price | CursorBench 4.0 | DeepSWE v1.1 |
|---|---|---|---|---|
| Grok 4.7 | $2 | $6 | 46.3% | 71.0% |
| GPT-6 Sol | $2 | $10 | β | 68.8% |
| GPT-6 Luna | $0.10 | $0.50 | β | 66.6% |
| Claude Opus 5.5 | $4 | $20 | β | β |
| Claude Fable 5.1 | $10 | $50 | 51.8% | 70.0% |
| GPT-6 Astra | $10 | $50 | β | β |
Grok 4.7 matches Fable 5.1 on DeepSWE at 5Γ lower input cost and 8.3Γ lower output cost. On CursorBench, it's within 11% of Fable 5.1's score at the same dramatic cost advantage.
4. Safety & Cybersecurity: The New Safeguard Stack
4.1 Best-in-Class Safety
xAI describes Grok 4.7 as having been "built with an entirely new safeguard stack" and being "the strongest model we've tested on refusals and jailbreak resistance."
| Safety Metric | Grok 4.7 | Context |
|---|---|---|
| HackerBench v0.3 (risky prompt pass-through) | 3.3% | Lowest rate β allows only 3.3% of risky dual-use prompts through |
| LatchBio biosafety benchmark | 62.4% | Highest score of any model tested |
| Jailbreak resistance | Strongest tested | Per xAI's internal evaluation |
| Refusal calibration | Best-calibrated | Balances safety with utility for legitimate tasks |
4.2 Dual-Use Balance
The safety approach is designed to maximize both utility and security:
"In dual-use domains like cybersecurity and biological work, it leads on both utility for benign tasks and safe refusal on dangerous ones."
This is a difficult balance β many models either over-refuse (blocking legitimate security research) or under-refuse (allowing dangerous requests). Grok 4.7 appears to have found a stronger equilibrium.
4.3 Cybersecurity Partner Access
xAI has started providing invite-only access to Grok 4.7's red-team capabilities for select cybersecurity partners for defense research. This mirrors the verification program approaches seen in Claude Opus 5 5 Fable 5 1 Performance 40 Percent Cost Reduction Pacing Frontier Safeguards 2026 09 23 (Anthropic's Life Sciences and Cyber Verification Programs).
5. Deployment & Integration
5.1 Availability
| Platform | Grok 4.7 | Grok 4.7 Fast |
|---|---|---|
| xAI API | β
(grok-4.7) | β |
| US Regional Endpoint | β
(us.api.x.ai/v1) | β |
| Cursor | β (all plans) | β |
| Grok Build | β (default model) | β |
| GitHub Copilot | β (rolling out) | β |
| OpenRouter | β | β |
| Vercel | β | β |
| Cloudflare | β | β |
5.2 GitHub Copilot Integration
Grok 4.7 began rolling out to GitHub Copilot on September 21, 2026, the same day as the model release. This makes it available across:
- Visual Studio Code, Visual Studio, JetBrains IDEs
- GitHub Copilot CLI
- GitHub Copilot cloud agent
- github.com
5.3 Implementation Example
import os
from xai_sdk import Client
from xai_sdk.chat import user
client = Client(api_key=os.getenv("XAI_API_KEY"))
# Using Grok 4.7 for a complex multi-hour coding task
chat = client.chat.create(model="grok-4.7")
chat.append(user(
"Refactor this entire microservice to use async/await patterns. "
"Check all existing tests pass, then write new tests for edge cases."
))
# Set reasoning effort to xhigh for complex tasks
response = chat.sample(reasoning_effort="xhigh")
print(response.content)
# Encrypted reasoning is automatically included in Responses API
# Pass reasoning items back unchanged in the next request's input
5.4 Prompt Caching Best Practices
xAI's documentation emphasizes the importance of prompt caching for cost optimization:
# Responses API with prompt caching
response = client.responses.create(
model="grok-4.7",
input=[{"role": "user", "content": "Analyze this codebase..."}],
prompt_cache_key="my-conversation-id", # Essential for reliable cache hits
reasoning={"effort": "high"},
)
Without prompt_cache_key, conversations may route to different servers, resulting in cache-cold requests at full input price.
6. The September 2026 Cost-Efficiency Convergence
6.1 The Same-Week Release Pattern
Grok 4.7 was released on September 21, 2026 β the same day as StepFun's Step 5 Preview and one day before OpenAI's GPT-6 Sol/Luna and Anthropic's Claude Opus 5.5 (September 22). This creates an unprecedented week of frontier model releases, all emphasizing cost efficiency:
| Model | Release Date | Input Price | Output Price | Key Positioning |
|---|---|---|---|---|
| Grok 4.7 | Sep 21 | $2/M | $6/M | Long-running agents, domain expertise |
| Step 5 Preview | Sep 21 | ~$1/M | ~$2.70/M | Open-weight Pareto frontier |
| GPT-6 Sol | Sep 22 | $2/M | $10/M | Mid-tier agentic coding |
| GPT-6 Luna | Sep 22 | $0.10/M | $0.50/M | Budget workhorse |
| Claude Opus 5.5 | Sep 22 | $4/M | $20/M | Fable 5.1 performance at 40% less cost |
6.2 Grok 4.7's Unique Position
While all four releases emphasize cost efficiency, Grok 4.7 occupies a distinct niche:
- vs. GPT-6 Sol: Same input price ($2/M) but 40% cheaper output ($6 vs. $10/M), with superior legal and engineering benchmarks
- vs. Claude Opus 5.5: 50% cheaper input ($2 vs. $4/M) and 70% cheaper output ($6 vs. $20/M), trading some general knowledge work capability for domain-specific excellence
- vs. Step 5 Preview: Higher price but significantly higher capability on coding and professional benchmarks
7. Connection to Prior Research
7.1 The xAI Evolution
Grok 4.7 continues xAI's rapid iteration cycle:
| Model | Release | Key Improvement |
|---|---|---|
| Grok 4.5 | July 2026 | Foundation for agentic coding |
| Grok 4.6 | August 2026 | Long-running agents, visual work |
| Grok 4.7 | September 2026 | Larger base, domain expertise, new safety stack |
The progression shows xAI focusing on sustained performance (multi-hour tasks) and domain depth (legal, clinical, engineering) rather than just raw benchmark scores.
7.2 Integration with the Frontier Landscape
Grok 4.7's strengths complement the models covered in recent articles:
- Legal & clinical reasoning β Grok 4.7 leads where GPT-6 Sol and Claude Opus 5.5 are competitive but not dominant
- Long-running agents β The multi-hour task training addresses a gap in shorter-context models
- Cost efficiency β At $2/$6, it undercuts both GPT-6 Sol and Claude Opus 5.5 while matching or exceeding them on specific benchmarks
See Gpt 6 Sol Luna 50 Percent Price Cut Agentic Coding Cost Efficiency Frontier 2026 09 24 for the GPT-6 family analysis, Claude Opus 5 5 Fable 5 1 Performance 40 Percent Cost Reduction Pacing Frontier Safeguards 2026 09 23 for the Claude 5.5 family, and Stepfun Step 5 Preview 600b Sparse Moe Agentic Coding Pareto Frontier 2026 09 21 for the open-weight comparison.
8. Key Takeaways
-
Larger base, longer RL. Grok 4.7 isn't a marginal update β it uses a new, larger base model with an extended RL run specifically weighted toward multi-hour tasks.
-
Domain-specific dominance. On Harvey Legal Agent Benchmark (19.6% vs. 6.7% for Fable 5.1) and EEBench (64.0%, leading all models), Grok 4.7 achieves results that far exceed competitors in specialized domains.
-
Price-performance leader. At $2/M input and $6/M output, Grok 4.7 matches Fable 5.1 on DeepSWE at 5Γ lower input cost and 8.3Γ lower output cost.
-
New safeguard stack. The entirely new safety architecture achieves the lowest risky-prompt pass-through rate (3.3% on HackerBench) and highest biosafety score (62.4% on LatchBio) of any model tested.
-
Multi-hour agent optimization. The explicit training on long-running tasks positions Grok 4.7 for complex workflows that require sustained focus and self-verification.
-
Encrypted reasoning by default. The Responses API always returns encrypted reasoning content, enabling seamless multi-turn conversations without extra configuration.
-
Rapid iteration cycle. Three Grok releases in three months (4.5 β 4.6 β 4.7) demonstrates xAI's aggressive development cadence.
9. Future Directions
9.1 What to Watch
-
Grok Bot integration: The native understanding of the Grok Bot harness suggests deeper integration between Grok 4.7 and xAI's durable AI teammate platform.
-
Cybersecurity partner expansion: The invite-only red-team access program may expand, similar to Anthropic's verification programs.
-
EU availability: Grok 4.5 was made available in the EU in July 2026; Grok 4.7's EU rollout is expected.
-
Open-weight release: Unlike StepFun's Step 5 Preview (which released open weights), Grok 4.7 remains closed. An open-weight Grok release would significantly disrupt the market.
-
Fast variant API access: Currently limited to Cursor and Grok Build, the fast variant may become available on the public API.
-
Additional domain benchmarks: The legal and clinical results suggest xAI may be investing in domain-specific training data; watch for more specialized benchmarks.
-
Grok 4.8: Given the three-month release cadence, a Grok 4.8 release is possible by December 2026.
9.2 Strategic Implications
Grok 4.7's success in domain-specific benchmarks suggests a potential shift in the frontier model competition: rather than competing purely on general capability, models may increasingly differentiate on domain expertise. This could lead to a market where different models are preferred for different professional contexts β legal AI, clinical AI, engineering AI β rather than a single model dominating all use cases.
10. References & Resources
Official Sources
- Introducing Grok 4.7 β xAI official announcement (September 21, 2026)
- Grok 4.7 Developer Documentation β Official API docs and specifications
- xAI Release Notes β September 2026 release notes
- Grok 4.6 Announcement β Previous generation reference
- Grok 4.7 in GitHub Copilot β GitHub changelog
- xAI API Console β API key management and usage
Related Research in This Journal
- Gpt 6 Sol Luna 50 Percent Price Cut Agentic Coding Cost Efficiency Frontier 2026 09 24 β GPT-6 Sol and Luna analysis
- Claude Opus 5 5 Fable 5 1 Performance 40 Percent Cost Reduction Pacing Frontier Safeguards 2026 09 23 β Claude Opus 5.5 cost reduction
- Stepfun Step 5 Preview 600b Sparse Moe Agentic Coding Pareto Frontier 2026 09 21 β StepFun's Pareto frontier approach
- Qwen3 8 Max First Open Source Flagship Hybrid Deltanet Moe Coding Cowork 2026 09 18 β Qwen3.8-Max open-weight flagship
Benchmarks Referenced
- CursorBench 4.0 β Longer-running coding tasks
- DeepSWE v1.1 β Complex software engineering
- Terminal-Bench 4.0 β Multi-hour terminal work
- EEBench β Electrical engineering evaluation
- Harvey Legal Agent Benchmark β Legal reasoning
- HealthBench Professional β Clinical reasoning
- AA Briefcase v1.1 β Multi-hour office work
- HackerBench v0.3 β Cybersecurity safety benchmark
- LatchBio Biosafety Benchmark β Biological safety evaluation
Citation:
@misc{grok_4_7,
title = {{Introducing Grok 4.7}},
url = {https://x.ai/news/grok-4-7},
author = {{SpaceXAI}},
month = {September},
year = {2026}
}
@techreport{grok_4_7_docs,
title = {{Grok 4.7 Developer Documentation}},
url = {https://docs.x.ai/developers/grok-4-7},
author = {{SpaceXAI}},
month = {September},
year = {2026}
}
This article was researched using official xAI sources only: the Grok 4.7 announcement page, the developer documentation, the release notes, the Grok 4.6 announcement for comparison, and the GitHub Copilot changelog. All benchmark figures and safety metrics are from xAI's published evaluations.
π Referenced by
- π¬Gemini 4 Argon: Google's Frontier Comeback with 1M Output Tokens, Cyber Defense, and the Fairwind Rollout2026-09-30T00:00:00.000Z
- π¬Claude Sonnet 5.5: The 60-Point Coding Jump, 30% Speed Gain, and First Sonnet with Cyber Safeguards2026-09-29T00:00:00.000Z
- π¬OpenAI DevDay 2026: Dots Always-On Agents, GPT-6.1 Sol, Ultrafast, Decisions API, and the Astra Pull2026-09-29T00:00:00.000Z
- π¬MiniMax M3.1-Flash-Preview: The Quiet Launch, Stealth Benchmarking, and the New Speed Tier for Everyday Coding2026-09-28T00:00:00.000Z
- π September 25: Grok 4.7 β Domain-Specific Dominance, New Safeguard Stack, and the Four-Model Convergence Week2026-09-25T00:00:00.000Z
- πWiki Index2026-06-17T00:00:00.000Z
- πWiki Log2026-06-17T00:00:00.000Z
- πFrontier Models & Benchmarks