{"version":"2.1.265","anchor":"new-workspace-trust-recorded-field-in-initialize-response","canonical_anchor":"sdkhost-initialize-gains-a-workspacetrust-option-to-pro","heading":"SDK\/host can now programmatically grant workspace trust via a new workspaceTrust option","tier":"soon","area":"Workspace Trust","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.265\/e\/new-workspace-trust-recorded-field-in-initialize-response","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.265","markdown":"### SDK\/host can now programmatically grant workspace trust via a new workspaceTrust option\n\nA host like Claude Desktop can tell the CLI a directory's trust dialog was already shown, via a new workspaceTrust field on initialize\n\n**What**\n\n- The SDK\/CLI `initialize` request now accepts an optional `workspaceTrust` object (`{accepted, directory}`) so a host application (for example, Claude Desktop's Code tab over SSH\/WSL) can attest that it already showed its own trust dialog for the working directory, instead of the CLI needing to show its own.\n\n- A new handler validates that the directory is an absolute path, resolves to the same trust key as the session's working directory, and isn't a screened\/untrusted network path, then records the directory as trusted the same way the interactive terminal dialog does, and re-applies project settings afterward. The outcome is reported via telemetry.\n\n- The `initialize` response gains a `workspace_trust_recorded` boolean (marked internal) reporting whether the attestation was actually persisted as trust \u2014 it can be `false` for reasons like an obfuscated\/untrusted path, a wrong key, a write failure, or a home-directory session-only trust.\n\n- The same `workspace_trust_recorded` field is included in the system-init\/hello JSON payload sent out, alongside existing fields like `current_permission_mode` and `hooks_applied`.\n\n**Why** This lets a host that already handles its own trust UI (like Claude Desktop) skip showing a redundant trust prompt inside the CLI, while still letting the CLI confirm and record whether that trust was actually saved.\n\n- Area: Workspace Trust\n- Names: `workspace_trust_recorded`\n- Tier: Nothing to try yet\n- Useful: 4\/5\n- Signal: 4\/5"}