Claude Code v2.1.277 Adds AGENTS.md Support and Fixes Crash Bugs
Claude Code v2.1.277 landed with a small set of feature additions and a long list of bug fixes across sessions, tools, and gateway handling. Here's what actually changed.
AGENTS.md support
In a project with no CLAUDE.md, Claude Code now reads AGENTS.md instead. You can switch it under "Project instructions" in /config. Not yet available on Bedrock, Vertex, or Foundry.
Gateway and proxy changes
CLAUDE_GATEWAY_PROXY_IS_EGRESS_BOUNDARY=1for Claude apps gateways whose only egress is a forward proxy: every outbound request hands the proxy the hostname instead of resolving it locally.- Optional
headers:map on Claude apps gateway upstreams to send static headers to a proxy you run in front of a provider. - A line now notes that a background task's update is waiting when it finishes while a panel such as
/tasksis open.
Session and CLI fixes
claude -pand Agent SDK sessions that could hang with no result after an internal error now report the error and exit with code 1.- Conversations failing every request with "text content blocks must be non-empty" when an earlier assistant turn held an empty text block beside other content, including after
--resume. - Unexpected logout when an older Claude Code build (e.g., an IDE extension's bundled CLI) runs on the same machine as the current one.
- Interactive start-up hanging or erroring for
ANTHROPIC_API_KEYusers when~/.claude.jsonholds a malformedcustomApiKeyResponsesvalue. - Update checks erroring every 30 minutes, and
claude updatehanging when a min/max version is set, if a proxy returns an invalid version. A malformedminimumVersionis now ignored. claude updateon winget- or apk-managed installs reporting "up to date" when the version lookup failed.claude plugin installsometimes failing and breaking the installed copy when reinstalling a plugin version in use; an unchanged copy is now left alone.
Tool fixes (Grep, Glob, Write, Edit)
- Grep and Glob now return an error when the search could not start due to out of processes, memory, or file handles, instead of reporting no matches.
- Write no longer silently ends the turn as a declined permission when the target path is an existing directory.
- Edit no longer treats an escaped backslash followed by
uXXXXas a\uXXXXescape, which could rewrite an escaped backslash sequence when editing non-ASCII characters. - Edit reports "String not found in file" instead of "Invalid regular expression: regular expression too large" for very large non-ASCII edits that don't match.
- Turns no longer end early with "Path contains null bytes" when a tool call's file path contains
\u0000written as an escape sequence.
Stability fixes
- Background sessions (
claude --bg) no longer exit when a plugin's LSP server exits or closes stdin. - Crashes from malformed
claudeAiMcpEverConnected,theme, or a plain-string assistant message in saved history. - Crash ("unrecoverable interface error") when the prompt contained terminal color codes.
- Sessions on slow machines exiting when the first spinner appeared.
- Rare screen freeze after an internal rendering error.
- Windows turns stopping with "Out of memory" right after a reply, leaving tool calls unrun.
- Sessions continued after
/clear(restart,--continue,--resume) missing part of the first message when a SessionStart hook printed output, causing a full prompt-cache miss.
If you run Claude Code behind a proxy or use plugins with LSP servers, this release is worth pulling.
📖 Read the full source: GitHub Claude-Code
👀 See Also

Nine Common AI Coding Agent Failure Patterns and Pre-Execution Validation
A Reddit post identifies nine specific failure patterns that commonly cause AI coding agents to fail, including incomplete enum handling, silent null paths, and hallucinated imports. The author reports implementing a validation pass before execution catches about 70% of these failures.

ETH Zurich Study Questions Value of AGENTS.md Files for AI Coding Agents
New research from ETH Zurich finds LLM-generated AGENTS.md files reduce AI agent task success by 3% and increase inference costs by over 20%, while human-written files offer only marginal 4% gains with similar cost increases.
The Atlantic Reports Rising Anti-AI Violence and Political Backlash
Bernie Sanders and Steve Bannon both decry AI as a threat to workers. A Molotov cocktail attack on Sam Altman's home and an Indianapolis councilman's shooting show anti-data-center violence is rising.

OpenClaw Empowers Developers with AI Agents While GethCity Innovates with Thinking Networks
OpenClaw launches an AI agent service, making coding faster and more efficient, while GethCity introduces a network that mimics human thought processes. Discover the innovations driving automation.