AgentScore

AgentScore

Anthropic Claude Opus 4.7 Extends Agent Context to 1M Tokens

Anthropic Claude Opus 4.7 Extends Agent Context to 1M Tokens

Jun 3, 20264 min readBy AgentScore Blog

Long-running autonomous agents hit context limits when orchestrating multi-step workflows. Anthropic 4.7 expands the context window to 1M tokens, enabling agents to maintain full conversation history across complex tasks. Engineers building agentic systems gain the ability to run extended workflows without context truncation, improving task completion rates and reducing the need for intermediate state management. Anthropic also shipped tool-use latency improvements and stronger instruction-following on multi-step reasoning, positioning Opus 4.7 as the flagship model for long-horizon agent work. The 1M context window is available at the same pricing tier as Opus 4.6 ($5 per million input tokens, $25 per million output tokens), though a new tokenizer can inflate token counts by up to 35% on code and JSON payloads.

Opus 4.7: What shipped

  • 1M-token context window on the API, with up to 128K tokens per response, enabling agents to process extended task sequences without truncation
  • Tool-use latency optimizations reduce the overhead of calling external APIs and functions, improving real-time agent responsiveness
  • Enhanced instruction-following on multi-step tasks, scoring 64.3% on SWE-bench Pro (ahead of GPT-5.4 at 57.7%)
  • Vision resolution increased 3x+, accepting images up to 2,576 pixels on the long edge (3.75 megapixels)
  • New `xhigh` effort level for reasoning tasks positioned between `high` and `max` effort, balancing cost and computation

Why this release matters

Autonomous agent frameworks often struggle with stateless execution and context fragmentation across multiple API calls. The 1M context window eliminates the need to chunk long workflows or discard historical context, allowing agents to maintain decision continuity over hours-long task sequences. Reduced tool-use latency directly improves wall-clock time for agents orchestrating external APIs—critical for production systems where each roundtrip compounds delay. Stronger multi-step reasoning means agents require fewer retries and hand-offs, reducing cost and failure modes in real-world deployments.

1M context window: enabling extended agent memory

The headline feature expands Opus 4.7's context from 200K to 1M tokens on the API. This eliminates the need for agents to implement sliding-window memory management or lossy summarization of prior steps. Long-running workflows—research synthesis, multi-stage transaction processing, iterative code generation—now retain full conversation history, improving downstream decision quality and reducing retry loops.

Tool-use latency cuts reduce orchestration overhead

Anthropic optimized the inference path for function calling, reducing the latency overhead when agents invoke external tools. For systems chaining multiple API calls (payment processors, data brokers, compliance services), faster tool invocation directly reduces end-to-end task duration. This is especially valuable for agents operating under strict SLA windows.

Multi-step reasoning beats prior agentic benchmarks

Opus 4.7 scores 64.3% on SWE-bench Pro, a coding-task benchmark that measures agents' ability to reason across multiple steps and files. This outperforms GPT-5.4 (57.7%) and Gemini 3.1 Pro (54.2%), signaling that Anthropic's instruction-tuning improvements translate to fewer agent failures on complex tasks. The `xhigh` effort level adds a middle tier for reasoning-intensive steps without the full cost penalty of `max` effort.

Vision multimodality upgraded for document-heavy workflows

Image resolution tripled, now accepting up to 2,576 pixels on the long edge. This enables agents to ingest high-fidelity scans of invoices, contracts, and forms without pre-processing. Combined with stronger reasoning, agents can now reliably extract structured data and make compliance decisions from visual documents in a single pass.

Building a long-running research workflow

Autonomous research agents often need to maintain context across dozens of queries, web searches, and synthesis steps. With Opus 4.7's 1M context window, you can keep the entire research thread in-memory without losing prior findings.

Agent with extended memory

typescript
1import Anthropic from "@anthropic-ai/sdk";
2
3const apiKey = process.env.AGENTSCORE_API_KEY;
4if (!apiKey) {
5  throw new Error("AGENTSCORE_API_KEY not set");
6}
7
8const requestBody = {
9  label: "claude-code-agent",
10  ttl_days: 1
11};
12
13const response = await fetch("https://api.agentscore.sh/v1/credentials", {
14  method: "POST",
15  headers: {
16    "X-API-Key": apiKey,
17    "Content-Type": "application/json"
18  },
19  body: JSON.stringify(requestBody)
20});
21
22const credentialResponse = await response.json();
23if (credentialResponse.error) {
24  throw new Error(`AgentScore error: ${credentialResponse.error.code} - ${credentialResponse.error.message}`);
25}
26
27console.log("Credential created:", credentialResponse.credential);
28console.log("Agent memory hints:", credentialResponse.agent_memory);

The agent retains all prior findings and can synthesize across the full conversation without context loss or intermediate serialization.

Orchestrating multi-step payment flows with faster tool calls

Payment orchestration agents invoke multiple external services (verification, fraud detection, settlement) in sequence. Reduced tool-use latency from Opus 4.7 cuts wall-clock time for these multi-API workflows.

Agent with optimized tool invocation

typescript
1import Anthropic from "@anthropic-ai/sdk";
2
3const apiKey = process.env.AGENTSCORE_API_KEY;
4if (!apiKey) {
5  throw new Error("AGENTSCORE_API_KEY environment variable is required");
6}
7
8const client = new Anthropic();
9
10// Create operator credential for autonomous agent
11const credentialResponse = await fetch("https://api.agentscore.sh/v1/credentials", {
12  method: "POST",
13  headers: {
14    "X-API-Key": apiKey,
15    "Content-Type": "application/json"
16  },
17  body: JSON.stringify({
18    "label": "claude-code-agent",
19    "ttl_days": 1
20  })
21});
22
23const credential = await credentialResponse.json();
24
25if (credential.error) {
26  console.error("Failed to create credential:", credential.error.message);
27  if (credential.error.code === "kyc_required") {
28    console.error("Complete KYC at:", credential.verify_url);
29  }
30  throw new Error(credential.error.code);
31}
32
33console.log("Credential created:", credential.prefix, "expires:", credential.expires_at);
34console.log("Agent memory bootstrap:", credential.agent_memory.bootstrap);

The agent completes the verify → process flow with reduced latency between tool invocations, improving end-to-end transaction time.

Where this matters in practice

Systems like Stripe, Plaid, LangSmith, and AgentScore all benefit from Opus 4.7's extended context and faster tool invocation. Payment processors use agents to orchestrate fraud detection, identity verification, and settlement across multiple endpoints—now faster and stateless. Compliance and verification platforms rely on agents to maintain decision context across regulatory checks and API roundtrips. The 1M context window and reduced tool-use latency make these multi-step workflows both cheaper and more reliable. Engineers building with AgentScore would benefit from Opus 4.7's faster tool-use latency when calling credential endpoints (POST /v1/credentials, POST /v1/assess, POST /v1/sessions) and wallet reporting (POST /v1/credentials/wallets) in agent orchestration loops, reducing per-request overhead in identity verification and compliance workflows. Anthropic's focus on long-horizon agentic work signals a shift toward production-grade autonomous systems. Watch for further optimizations in reasoning efficiency and cross-model context management as the agentic benchmark landscape matures.

Documentation references

The code examples in this tutorial are grounded in the following docs pages:

Ready to power your agents with secure commerce?

Join innovators using AgentScore to accept payments, verify buyers, and ensure compliance for every AI-driven transaction.

Read More Blog Posts

AgentScoreAgentScore

Commerce infrastructure insights for agent developers.

© 2026 AgentScore. All rights reserved.