Repository navigation
docs: Claude Code v2.1.310 - mods can intercept settings reads, 3 new Agent SDK query methods, Desktop SSH via OpenSSH on Windows - #1412
Merged
Conversation
… Agent SDK query methods, Desktop SSH via OpenSSH on Windows 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: Mods gain their most powerful hook yet: a new
settings.readevent lets a mod see, rewrite, or refuse any setting Claude Code reads. That puts configuration itself inside what plugins can control, so people who build mods and admins who audit them both need to know. The TypeScript Agent SDK also gets three new control methods. One of them lets embedders keep a single MCP server under stricter permissions while the rest of the session runs inbypassPermissionsorauto. That closes a real gap for unattended agents. Desktop SSH on Windows can now use the real OpenSSH client and~/.ssh/config(includingProxyJumpandCertificateFile). Windows tasks also survive a Desktop restart starting in v3.1623.0. No deletions, tombstone changes, or discovery changes.HIGHLIGHTS:
settings.readhook (plugins/mods/events.md,reference.md,api.md,troubleshoot.md). It can change one setting, refuse a read, and tell Claude Code's own reads from a mod's reads (e.layers/e.source).api.mdadds a way to read all settings, one source, or one key. New troubleshooting entries cover calls refused inclaude -pand Agent SDK sessions, and aclaude -prun that never exits because of a mod. Hook docs now say a hook that throws or times out is skipped, so a held command still runs unless you chain a.catchhandler that denies it. That matters for any mod used as a security gate. Interface docs add rules for which controls need akey.Querymethods:setMcpPermissionModeOverride(serverName, 'default' | 'auto' | null)sets a stricter permission mode for one MCP server's tools. It only takes effect inbypassPermissionsorautosessions, so it can never widen what the session allows.seedReadState(path, mtime)marks a file as already read, so a later Edit doesn't fail withFile has not been read yet. Requires SDK v0.2.83 or later.backgroundTasks(toolUseId?)does from code what Ctrl+B does in the terminal: it moves running Bash commands and subagents to the background.getSessionMessagesgainsincludeSystemMessages(for example, compact boundaries).desktop.md): Desktop can connect through Microsoft's OpenSSH 9.4+ (needs Desktop v2.2553.0+, not the Microsoft Store build). A new section explains what the built-in client supports when OpenSSH isn't available.MaxSessions 1servers work from macOS/Linux on v3.1623.0+. Long tasks on Windows now come back after Desktop quits or restarts, starting in v3.1623.0.failIfUnavailablebehavior made clearer: if the sandbox passes the startup check but later fails to initialize, the session keeps running and refuses every sandboxed command (Sandbox is required ...). It also ignoresdangerouslyDisableSandboxretries.errors.mdadds two new error strings. On Linux/WSL2, leftover sandbox placeholder files can now break later settings writes.claude_code_cost_usage_totalonccr_session_id, to show what idle sessions are costing.Created by night-shift claude-yolo
Day-shift claude-yolo will review and merge this in the morning