The post has been translated automatically. Original language: Russian
In three days, Anthropic released three versions of the AI agent for Claude Code programmers: 2.1.333 was released on November 30, 2.1.334 on December 1, and 2.1.335 on December 3. Most of the changes are fixes. For those who run the agent in scripts, CI, and via the SDK, several behavior changes are important: a new format for the list of allowed tools, a different context compression logic, and timeouts where the agent used to hang for minutes.
What can break scripts?
In version 2.1.333, the --allowedTools and --tools flags stopped accepting some lists passed by several separate values: the startup now simply stops. The list must be passed with a single value separated by commas, for example --allowedTools "Read,Edit,Write". If the agent is called from a pipeline or wrapper, check the launch string before updating.
The context compression has also changed. After that, the agent no longer attaches newly uploaded files, downloaded and saved tool results — if necessary, it will read them again. The context becomes easier after compression, but a long session reads files more often.
SDK sessions now automatically complete background commands, monitors, and deferred wakes when the host process has disappeared and no subagents are running. This is disabled by the variable CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS with the value 0, and the lines keep_alive appeared in the stream-json stream.
Less freezes
A large block of fixes 2.1.333 concerns unanswered expectations:
- with a very slow git status, the first request, subagents, and -p mode waited up to 10 minutes — now the agent continues working after 30 seconds.;
- reading large files and large MCP results could hang for 10 minutes or longer if the token count request remained unanswered.;
- HTTP MCP server calls hung for up to 5 minutes if the server or proxy closed the stream without response.;
- on Linux, memory grew by gigabytes, and CPU usage remained at 100% while the build created and deleted many files in the repository.;
- the asyncRewake hook, which ended time after time with code 2, woke the agent up indefinitely — now there are no more than 8 awakenings in a row, the threshold is set by CLAUDE_CODE_STOP_HOOK_BLOCK_CAP.
Another correction concerns the data: the Edit tool silently lost the last byte of the UTF-16LE encoded file with an odd number of bytes. Now Edit and NotebookEdit do not edit such files.
New in 2.1.335
- The claude mcp add --web command connects a remote MCP server as a connector for the Claude web version directly from the terminal, at paid rates.
- A new Interrupt hook event is triggered when a move is interrupted and tells you who stopped it: a person, another session, or a system.
- MCP servers with OAuth tokens no longer update the token for five minutes before each request.: The short token is used for half of its lifetime.
- Computer use approval now expires after 2 hours without use, for clipboard and system shortcuts after 30 minutes, and in any case after 24 hours.
- In organizations where local MCP servers are disabled in the admin console, the agent stops them if they are not in the allowed list.
What does this mean in practice?
First, find all the places where Claude Code runs non—interactively: CI, cron, wrappers, Makefile. If the list of tools is passed with multiple arguments, the launch will crash after the update. The edit is in one line, but it's better to make it in advance.
Secondly, for environments where the agent runs through the SDK under a supervisor, the new behavior with background tasks means that "orphaned" processes no longer live after the host. If the pipeline expected the background command to finalize itself, check it or explicitly disable the new logic.
Third, the Interrupt hook is convenient for logging: it shows whether the person or the system stopped the move. And those who have files in UTF-16 in the repository should know that the agent will begin to refuse to edit them — it is better to translate them to UTF-8 in advance.
The draft text was prepared with the participation of AI, the facts are checked against the original source — official release notes Claude Code versions 2.1.333 and 2.1.335 on GitHub
Anthropic за три дня выпустила три версии ИИ-агента для программистов Claude Code: 2.1.333 вышла 30 ноября, 2.1.334 — 1 декабря, 2.1.335 — 3 декабря. Большая часть изменений — исправления. Для тех, кто запускает агента в скриптах, CI и через SDK, важны несколько изменений поведения: новый формат списка разрешённых инструментов, другая логика сжатия контекста и таймауты там, где агент раньше зависал на минуты.
Что может сломать скрипты
В версии 2.1.333 флаги --allowedTools и --tools перестали принимать некоторые списки, переданные несколькими отдельными значениями: запуск теперь просто останавливается. Список нужно передавать одним значением через запятую, например --allowedTools "Read,Edit,Write". Если агент вызывается из пайплайна или обёртки, проверьте строку запуска до обновления.
Изменилось и сжатие контекста (compaction). После него агент больше не прикрепляет заново загруженные файлы, скачанное и сохранённые результаты инструментов — при необходимости он прочитает их снова. Контекст после сжатия становится легче, зато длинная сессия чаще повторно читает файлы.
Сессии через SDK теперь сами завершают фоновые команды, мониторы и отложенные пробуждения, когда хост-процесс исчез и ни один субагент не работает. Отключается это переменной CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS со значением 0, а в потоке stream-json появились строки keep_alive.
Меньше зависаний
Большой блок исправлений 2.1.333 касается ожиданий без ответа:
- при очень медленном git status первый запрос, субагенты и режим -p ждали до 10 минут — теперь агент продолжает работу через 30 секунд;
- чтение больших файлов и крупных результатов MCP могло висеть 10 минут и дольше, если запрос подсчёта токенов оставался без ответа;
- вызовы HTTP MCP-серверов зависали до 5 минут, если сервер или прокси закрывал поток без ответа;
- на Linux память росла на гигабайты, а загрузка CPU держалась на 100%, пока сборка создавала и удаляла много файлов в репозитории;
- хук asyncRewake, раз за разом завершавшийся с кодом 2, будил агента бесконечно — теперь не больше 8 пробуждений подряд, порог задаёт CLAUDE_CODE_STOP_HOOK_BLOCK_CAP.
Ещё одно исправление касается данных: инструмент Edit молча терял последний байт файла в кодировке UTF-16LE с нечётным числом байтов. Теперь Edit и NotebookEdit такие файлы не правят.
Новое в 2.1.335
- Команда claude mcp add --web подключает удалённый MCP-сервер как коннектор веб-версии Claude прямо из терминала, на платных тарифах.
- Новое событие хуков Interrupt срабатывает при прерывании хода и сообщает, кто его остановил: человек, другая сессия или система.
- MCP-серверы с OAuth-токенами на пять минут больше не обновляют токен перед каждым запросом: короткий токен используется половину срока жизни.
- Одобрение computer use теперь истекает через 2 часа без использования, для буфера обмена и системных сочетаний — через 30 минут, и в любом случае через 24 часа.
- В организациях, где в консоли администратора выключены локальные MCP-серверы, агент их останавливает, если их нет в списке разрешённых.
Что это значит на практике
Первое — найдите все места, где Claude Code запускается неинтерактивно: CI, cron, обёртки, Makefile. Если список инструментов передаётся несколькими аргументами, после обновления запуск упадёт. Правка в одну строку, но лучше сделать её заранее.
Второе — для сред, где агент работает через SDK под супервизором, новое поведение с фоновыми задачами означает, что «осиротевшие» процессы больше не живут после хоста. Если пайплайн рассчитывал, что фоновая команда доработает сама, проверьте его или явно отключите новую логику.
Третье — хук Interrupt удобен для журналирования: по нему видно, остановил ли ход человек или система. А тем, у кого в репозитории есть файлы в UTF-16, стоит знать, что агент начнёт отказываться их редактировать — лучше перевести их в UTF-8 заранее.
Черновик текста подготовлен с участием ИИ, факты сверены с первоисточником — официальные release notes Claude Code версий 2.1.333 и 2.1.335 на GitHub
Comments 1
Newest Popular