Tools #Coding agents#Anthropic Oct 28, 2026 · Originally published Oct 27

Claude Code 2.1.311 and 2.1.312: standard-context sessions over 200K tokens now compact and continue, and hooks are capped at 24 concurrent per session

Two releases on consecutive days fix long sessions stopping and add limits and options for hooks and enterprise gateways.

Primary source GitHub · anthropics/claude-code · github.com Read the original ↗

// Key points

  • 2.1.311 (October 26) fixes standard-context sessions stopping with "Usage credits required for 1M context" when a request ran over 200K tokens; Claude Code now compacts the conversation and continues.
  • 2.1.311 fixes SubagentStop hooks running about twice a minute for each running subagent instead of once when it finishes.
  • 2.1.312 (October 27) caps prompt and agent hooks at 24 running at a time per session, subagents included, plus at most 12 that have waited past their event timeout; a timeout under 1 second counts as 1 second.
  • 2.1.312 adds oidc.user_id_claim to the Claude apps gateway, to identify people by an id_token claim other than sub, such as Microsoft Entra ID's oid.

Builder's takeTeams using hooks for audit or blocking should note two things: SubagentStop used to fire repeatedly, so any counts based on it need correcting; and under the new concurrency cap slow hooks will queue, so give each hook a sensible timeout and check queuing under load. Companies on Entra ID single sign-on can switch user identity to oid.

// Background · from #Coding agents

Full timeline →
  1. Oct 28 GitHub Copilot adds server-to-server authentication: call the Copilot SDK with a GitHub App installation token, no signed-in user required
  2. Oct 28 GitHub Copilot assisted permissions are generally available: an LLM classifies command, path and URL requests and auto-approves the clearly safe ones
  3. Oct 27 GPT-6.1 Terra arrives in GitHub Copilot at provider list pricing, enabled automatically under the default model policy

Every Monday, the week in AI in one email

Every Monday morning: the 6 AI stories that mattered most in the past seven days, with my take, in your inbox.

Your email is only used to send the weekly and is never shared. Every email has a one-click unsubscribe link. See the latest issue →