Claude Code now reads AGENTS.md if there is no Claude.md
https://code.claude.com/docs/en/changelog📌 【Anthropic】Claude Code 沒有 CLAUDE.md 時,改讀 AGENTS.md 了
TL;DR:Claude Code 新版在專案缺少 CLAUDE.md 時會自動改讀 AGENTS.md,同一週也悄悄調整了 auto mode 的分類器計費方式。
每次啟動 AI coding agent,它得先搞清楚這個專案的規矩:用什麼框架、怎麼測試、哪些檔案碰不得。這份「專案說明書」過去在 Claude Code 裡只認 CLAUDE.md 一種格式,9 月中的兩次更新,替這件事開了一道備援。這則消息在 Hacker News 拿下 709 分、262 則留言,討論熱度不小。
🤔 從單一格式到有備援的專案指示
Claude Code 官方 changelog 顯示,2.1.277 版(9 月 18 日)新增了 AGENTS.md 支援:當專案目錄裡沒有 CLAUDE.md 時,Claude Code 會改讀 AGENTS.md 作為專案指示來源,判斷邏輯可以理解為「CLAUDE.md 不存在 → 讀取 AGENTS.md」。這項行為可以在 /config 的「Project instructions」底下調整,但目前 Bedrock、Vertex、Foundry 這三個平臺還不支援。
隔天的 2.1.278 版則調整了 auto mode 的計費方式:針對 Claude API、Enterprise 用戶,以及跑在 Bedrock、Vertex、Foundry 和各種 gateway 上的部署,auto mode 預設改用 server-side classifier,且不再針對這個分類器本身的運算收費。想退出這個預設行為的 Bedrock/Vertex/Foundry/gateway 用戶,可以設定 CLAUDE_CODE_AUTO_MODE_SERVER=0;如果最終還是退回計費的 fallback 路徑,系統會跳出警告。/status 面板也新增一列,顯示當前 session 的 auto mode 分類器究竟跑在 server 端還是本機。
💡 一長串穩定性修復,比新功能更值得留意
這兩版加起來還修了相當多穩定性問題,例如:claude -p 與 Agent SDK 在內部錯誤後可能卡住不回應的狀況、--resume 後某些對話會因為空的文字區塊而整段請求失敗、Edit 工具在處理非 ASCII 字元時誤判跳脫字元、以及 Grep/Glob 在系統資源不足時直接回報「找不到結果」而非明確錯誤。對長時間在終端機裡跑 agent 的工程師來說,這類修復雖然不起眼,但直接影響日常使用的穩定度。
⚠️ 這是例行更新,不是架構級突破
整體來看,這兩版沒有帶來新的模型能力或架構變化,本質上是相容性與計費機制的微調,加上一批 bug 修復。AGENTS.md 支援也還沒覆蓋所有雲端平臺。
🎯 實務啟示
如果團隊本來就已經為其他 agent 工具維護 AGENTS.md,現在可以不用重複寫一份 CLAUDE.md;若使用 API/Enterprise 或雲端閘道部署,建議留意 /status 裡新增的 auto mode 欄位,確認自己是否吃到 server-side classifier 的免費分類額度。
🔗 來源
- 標題:Claude Code now reads AGENTS.md if there is no Claude.md
- 作者/機構:datadrivenangel(Hacker News)
- 連結:https://code.claude.com/docs/en/changelog
#ClaudeCode #Anthropic #AIAgents #DeveloperTools #AGENTSmd #LLMTooling #CodingAssistant #DevOps #SoftwareEngineering #AIProductivity
原始資料 Hacker News · 收集於 2026-09-19
摘要原文
This page is generated from the CHANGELOG.md on GitHub . Run claude --version to check your installed version. 2.1.278 September 19, 2026 Changed auto mode for Claude API and Enterprise users, and on Bedrock, Vertex, Foundry and gateways, to default to the server-side classifier, which does not charge for classifier overhead ( CLAUDE_CODE_AUTO_MODE_SERVER=0 opts out on Bedrock, Vertex, Foundry and gateways); warns on billed fallback. See https://code.claude.com/docs/en/auto-mode-classifier-billing Added an Auto mode server row to /status showing whether this session’s auto mode classifier runs on the server 2.1.277 September 18, 2026 Added AGENTS.md support: in a project with no CLAUDE.md, Claude Code reads AGENTS.md instead; change it under “Project instructions” in /config (not yet on Bedrock, Vertex or Foundry) Added CLAUDE_GATEWAY_PROXY_IS_EGRESS_BOUNDARY=1 for Claude apps gateways whose only egress is a forward proxy: every outbound request hands the proxy the hostname instead of resolving it locally Added an optional headers: map on Claude apps gateway upstreams, to send static headers to a proxy you run in front of a provider Added a line saying a background task’s update is waiting when it finishes while a panel such as /tasks is open Fixed claude -p and Agent SDK sessions that could hang with no result after an internal error; they now report the error and exit with code 1 Fixed 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 Fixed being unexpectedly logged out when an older Claude Code build (for example an IDE extension’s bundled CLI) runs on the same machine as the current one Fixed interactive start-up hanging or showing an error for ANTHROPIC_API_KEY users when ~/.claude.json holds a malformed customApiKeyResponses value Fixed update checks erroring every 30 minutes, and claude update hanging when a minimum or maximum version is set, if a proxy returns an invalid version; a malformed minimumVersion is now ignored Fixed claude update on winget- or apk-managed installs reporting “up to date” when the version lookup failed Fixed claude plugin install sometimes failing and breaking the installed copy when reinstalling a plugin version that a session or another program was using; an unchanged copy is now left alone Fixed Grep and Glob reporting no matches when the search could not start because the system was out of processes, memory or file handles; they now return an error saying so Fixed the Write tool silently ending the turn as a declined permission when the target path is an existing directory; it now reports a clear error Fixed the Edit tool treating an escaped backslash followed by uXXXX text as a \uXXXX escape, which could make an edit of a non-ASCII character rewrite an escaped backslash sequence instead Fixed the Edit tool reporting “Invalid regular expression: regular expression too large” instead of “String not found in file” when a very large edit containing non-ASCII text did not match the file Fixed a turn ending early with “Path contains null bytes” when a tool call’s file path contained \u0000 written as an escape sequence; escaped control characters now stay as literal text Fixed background sessions ( claude --bg ) exiting when a plugin’s LSP server exited or closed its stdin Fixed a crash (“Type error”) when opening /mcp or /plugin manage with a malformed claudeAiMcpEverConnected value in ~/.claude.json Fixed a crash at launch when ~/.claude.json holds a malformed theme value Fixed a crash (“unrecoverable interface error”) when the prompt held text containing terminal color codes, for example a prompt recalled from history or text loaded from the external editor Fixed a crash when resuming a session whose saved history holds an assistant message stored as a plain string Fixed sessions on slow or heavily loaded machines sometimes exiting with “Claude Code exited after an unrecoverable interface error” when the first spinner appeared Fixed a rare case where the screen could stop updating for the rest of the session after an internal rendering error Fixed a rare case on Windows where a turn could stop with an error such as “Out of memory” right after Claude replied, so that reply’s tool calls never ran Fixed sessions continued after /clear (restart, --continue , --resume ) missing part of their first message when a SessionStart hook printed output, causing a full prompt-cache miss Fixed messages from other agents (such as a subagent’s SendMessage) that arrived mid-turn showing up below the “Ran N shell commands” row instead of where they arrived Fixed the “copied” notice not appearing after drag-selecting text in the fullscreen /resume picker and other panels that cover the prompt area Fixed $TMPDIR expanding empty in Bash commands that run outside the sandbox while sandboxing is enabled Fixed WebFetch and WebSearch in Cowork cloud sessions not telling Claude why a request was refused, such as a used-up fetch budget or an admin policy Fixed the Claude apps gateway’s telemetry relay ignoring a collector hostname or domain listed in NO_PROXY when a proxy is set Fixed one malformed strictKnownMarketplaces or blockedMarketplaces entry silently disabling the whole enterprise marketplace policy Fixed failed auto-updates leaving large staged downloads behind in ~/.cache/claude/staging Fixed /plugin not stripping terminal control characters from messages on the Installed tab, such as the error of a failed plugin update Fixed /plugin → Installed and /skills crashing when a skill or legacy command is named like a built-in Object property such as constructor or toString Fixed /plugin closing with no message when every install in a multi-select failed Fixed uninstalled plugins reappearing as “failed to load” rows in /plugin Installed, and Remove not clearing such a row Fixed plugins from the official marketplace being recorded without their commit in installed_plugins.json , and installed_plugins.json keeping the old commit after updating a pinned-commit plugin Fixed plugin reload previews keeping every previewed copy of a plugin archive unpacked until exit, and overwriting the cached --plugin-url archive a reload falls back to when its download fails Fixed Remote Control session bookkeeping failing when ~/.claude.json holds a malformed placeholder record Fixed the error after a revoked claude.ai login blaming an expired Anthropic profile; it now leads with /login Fixed typed or pasted text occasionally coming out scrambled in the claude agents dispatch input during key repeat or very fast input Fixed a crash (“unrecoverable interface error”) when resuming a session whose saved transcript contains a stop hook summary without a well-formed hook list Fixed Enter on a selected agent panel row doing nothing when keybindings.json rebinds Enter in the Chat context, for example to chat:queueSubmit Fixed PDF page reads on Windows failing when the working folder’s path is long (about 120 characters or more) Fixed a headless resume ( claude -p --resume , the SDK, a VS Code extension window reload) starting the session’s cost and usage totals at zero; headless sessions now save their totals at exit Fixed project skills from the main repository not loading in --worktree sessions when .claude/skills is untracked Fixed a sandbox. (709 points, 262 comments on Hacker News)
由 claude-code/sonnet 自動生成