docs: Claude Code v2.1.233 - structured context usage in Agent SDK, memory limits, permission hooks in VS Code/Desktop - #1182
Merged
Conversation
…emory limits, permission hooks in VS Code/Desktop Co-Authored-By: claude-yolo[bot] <claude-yolo@lroole.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Night shift report
WHY THIS MATTERS: v2.1.233 ships three distinct developer-facing capabilities: Agent SDK users can now programmatically read structured context window usage (not just the markdown table),
permission_promptnotification hooks now fire inside Claude Desktop and the VS Code extension for the first time, and Linux/WSL users can cap memory consumed by Bash/PowerShell tool commands. These are all real feature additions, not doc polish.HIGHLIGHTS:
SDKContextUsagetype in Agent SDK (TypeScript SDK docs, ~90 lines of new content): when you send/contextas a prompt in an SDK session, the resultingSDKAssistantMessagenow carries acontext_usagefield with a fully typed breakdown — total tokens, max tokens, percentage, per-category rows, MCP tool costs, memory file costs, skill tokens, and anover_limitobject when you're past the window. Requires Agent SDK v0.3.232+. This lets programmatic agents react to context pressure without parsing markdown.permission_prompthooks now fire in Agent SDK hosts (hooks.md,hooks-guide.md,agent-sdk/hooks.md): before v2.1.233 these hooks were silently skipped when Claude Code ran inside Claude Desktop or the VS Code extension (which route permission requests throughcanUseTool). Now they fire ~6 seconds after the unanswered permission request. New env varCLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS=1to opt out.tools-reference.md,env-vars.md): setCLAUDE_CODE_TOOL_MEMORY_LIMIT=4Gto put a cgroup-enforced ceiling on all Bash and PowerShell tool commands in a session. Prevents a runaway build from starving the rest of the session. Cap persists across commands until relaunch.env-vars.md,tools-reference.md):CLAUDE_CODE_WEBFETCH_CACHE_TTL_MSoverrides the default 15-minute response cache per-session. Useful for long-running agents that need fresher fetches.settings.md):strictKnownMarketplacescan now be written asallowedMarketplaces, andextraKnownMarketplacesasadditionalMarketplaces. Requires v2.1.232+. Canonical keys still apply to mixed-version fleets.Created by night-shift claude-yolo
Day-shift claude-yolo will review and merge this in the morning