Skip to main content

Claude Code v2.1.277: AGENTS.md Support, Gateway Egress Proxy Options, and TaskOutput Removal

Claude Code v2.1.277 reads AGENTS.md when a project has no CLAUDE.md, adds forward-proxy and upstream header options to the Claude apps gateway, removes the TaskOutput tool, and fixes headless hangs.

Claude Code v2.1.277 is a large release with 87 changelog entries. It adds AGENTS.md support for projects without a CLAUDE.md, new forward-proxy options for the Claude apps gateway, and clearer framing of subagent output, and it removes the deprecated TaskOutput tool. Fixes focus on headless reliability, crashes caused by malformed saved data, tool error reporting, plugins and prompt caching.

What’s New

AGENTS.md support

In a project with no CLAUDE.md, Claude Code now reads AGENTS.md instead. You can change this under “Project instructions” in /config.

Claude apps gateway proxy options

CLAUDE_GATEWAY_PROXY_IS_EGRESS_BOUNDARY=1 is for Claude apps gateways whose only egress is a forward proxy: every outbound request hands the proxy the hostname instead of resolving it locally. Gateway upstreams also accept an optional headers: map to send static headers to a proxy you run in front of a provider, and the gateway’s loopback error messages now name CLAUDE_GATEWAY_ALLOW_LOOPBACK.

TaskOutput tool removed

The deprecated TaskOutput tool has been removed. Claude now reads a background task’s output file with Read instead, and the taskOutputMaxChars setting and TASK_MAX_OUTPUT_LENGTH no longer have any effect.

Fable always listed in /model

On the Anthropic API, Fable now always appears in /model; it is greyed out only when your organization’s settings disable it.

Subagent output and prompt handling

  • Subagent results now reach the main agent under a header marking them as subagent output, with the result indented, so text in a subagent’s result cannot pass as the session’s own instructions.
  • On Bedrock, Vertex and Foundry, workflow scripts’ computed agent() prompts reach the subagent framed as script-authored text, so the safety classifier does not read them as the user, and the Bash sandbox instructions now use the first-party wording.
  • Invisible Unicode formatting and tag characters in a prompt are removed, and the cleaned prompt is shown for review before it is sent.

Headless and SDK reliability

claude -p and Agent SDK sessions that could hang with no result after an internal error now report the error and exit with code 1. Session start-up for SDK and headless (-p) use no longer waits on the per-directory CLAUDE.md lookup for the first turn, and claude -p runs launched outside an SDK or IDE no longer make the background Haiku auto-title request.

VS Code additions

The extension adds a Sign out row to the panel menu (with /logout), background shells and other running tasks on the agent map with a Stop for each (opened by a typed /tasks), a Copy response button plus a typed /copy, and the session’s cost and token usage in the Account & usage dialog and session manager where plan limits do not apply (Vertex, Bedrock, Foundry, API key).

Fixes and Improvements

  • Failing requests: Conversations no longer fail 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.
  • Login: You are no longer unexpectedly logged out when an older Claude Code build, such as an IDE extension’s bundled CLI, runs on the same machine. The error after a revoked claude.ai login now leads with /login, and Console sign-in shows the server’s message instead of only “Request failed with status code 400”.
  • Malformed saved data: Fixed hangs, errors or crashes when ~/.claude.json holds a malformed customApiKeyResponses, claudeAiMcpEverConnected or theme value, and crashes when resuming a session whose history holds an assistant message stored as a plain string or a stop hook summary without a well-formed hook list.
  • Updates: Update checks no longer error every 30 minutes, and claude update no longer hangs when a minimum or maximum version is set, if a proxy returns an invalid version; a malformed minimumVersion is now ignored. On winget- or apk-managed installs, claude update no longer reports “up to date” when the version lookup failed, and failed auto-updates no longer leave large staged downloads in ~/.cache/claude/staging.
  • Tool errors: Grep and Glob now return an error instead of reporting no matches when the search could not start because the system was out of processes, memory or file handles, and the Write tool reports a clear error instead of silently ending the turn when the target path is an existing directory.
  • Edit tool: An escaped backslash followed by uXXXX text is no longer treated as a \uXXXX escape, a very large non-matching edit containing non-ASCII text now reports “String not found in file”, and a file path containing \u0000 written as an escape sequence no longer ends the turn with “Path contains null bytes”.
  • Sandbox: A sandbox.excludedCommands glob no longer exempts an entire compound Bash command from the sandbox when only one part matched; every part must now match. $TMPDIR no longer expands empty in Bash commands that run outside the sandbox while sandboxing is enabled.
  • Permission prompts: The dangerous-rm permission prompt now names the flagged rm command and suggests a ${VAR:?} guard, so headless runs can recover.
  • Plugin policy: One malformed strictKnownMarketplaces or blockedMarketplaces entry no longer silently disables the whole enterprise marketplace policy.
  • Plugins: Reinstalling a plugin version that a session or another program is using no longer breaks the installed copy, uninstalled plugins no longer reappear as “failed to load” rows in /plugin Installed, and plugins from the official marketplace are now recorded with their commit in installed_plugins.json. Running claude plugin install on an already-installed plugin now says when a newer version is available and names the claude plugin update command.
  • Stability: Fixed a crash when the prompt held text containing terminal color codes, sessions on slow or heavily loaded machines sometimes exiting when the first spinner appeared, and a rare case where the screen stopped updating after an internal rendering error.
  • Windows: Fixed a rare case where a turn could stop with an error such as “Out of memory” right after Claude replied, so the reply’s tool calls never ran, and PDF page reads failing when the working folder’s path is about 120 characters or longer.
  • Prompt cache: Sessions continued after /clear no longer miss part of their first message when a SessionStart hook printed output, resumed subagents and teammates no longer re-render the MCP tool definitions they had loaded, and attachments recorded earlier in a conversation are no longer re-rendered after a resume or relaunch, which had dropped extended thinking.
  • Sessions: A headless resume (claude -p --resume, the SDK, a VS Code extension window reload) no longer starts cost and usage totals at zero, background sessions (claude --bg) no longer exit when a plugin’s LSP server exits, project skills from the main repository now load in --worktree sessions when .claude/skills is untracked, and messages typed while Claude is still working are no longer sometimes ignored by the model.
  • Cowork and gateway telemetry: WebFetch and WebSearch in Cowork cloud sessions now tell Claude why a request was refused, such as a used-up fetch budget or an admin policy, and the Claude apps gateway’s telemetry relay now honors a collector hostname or domain listed in NO_PROXY when a proxy is set.
  • /ultrareview: When there’s nothing to review, messages now say which case you’re in and offer a command that reviews your latest commit, and a new repository’s first commit is reviewed in full. In non-interactive sessions, /ultrareview now refuses when the repository has no base branch or shared history.
  • VS Code: The “General config” menu row now opens settings, typed /mcp, /hooks, /memory, /rewind and similar commands open their dialogs, the effort slider’s level now persists into later sessions, and /fast now saves fast mode as the default.
  • Claude Code on the web: The environment picker on Team and Enterprise plans gains Personal and Organization sections, and admins can share a personal environment with the organization. A cloud environment saved with Custom network access and no domains no longer silently reverts to Trusted.
  • Claude Tag: Routines created in a Slack channel on an Enterprise Grid org-wide install can now read other public channels in their workspace when they run, and the Pylon credential preset can now point at Pylon’s EU host.

This release contains 87 changes in total; see the full changelog for the complete list.

How to Update

  1. Check your installed version: claude --version
  2. Update in place: claude update
  3. The taskOutputMaxChars setting and TASK_MAX_OUTPUT_LENGTH no longer have any effect now that TaskOutput is removed. In projects without a CLAUDE.md, Claude Code now reads AGENTS.md (configurable under “Project instructions” in /config), and sandbox.excludedCommands globs must now match every part of a compound Bash command.