settings.json

disableDesktopLocalSessions

boolean記述場所管理者設定のみ

デスクトップ アプリケーションで実行されるデバイス上の Code セッションを無効にします。SSH 経由でリモート マシンで作業するデプロイメント向けです。

既定値: unset, so local sessions are available

記述例

{
  "disableDesktopLocalSessions": true
}

使い方・用途

  • デフォルト値は未設定(ローカル セッションが利用可能)
  • true に設定すると、"Local" 環境はグレーアウトして選択できなくなります
  • 新しいセッションは、設定されている場合は最初の SSH 接続にデフォルト設定されます
  • Claude Desktop v1.37937.0 以降で利用可能
英語原文(公式ドキュメントより)

Turn off Code sessions that run on the device in the [desktop app](/docs/en/desktop#local-sessions-on-managed-devices), for deployments where developers should work on remote machines over SSH. In the Code tab, the **Local** environment stays in the environment dropdown but is grayed out and can't be selected, with a tooltip saying your organization turned it off; on Windows the WSL entry is grayed out the same way, though whether WSL sessions run on a managed device at all is [governed separately](/docs/en/admin-setup#wsl-sessions-in-claude-code-desktop). New sessions default to the first [SSH connection](/docs/en/desktop#ssh-sessions) if one is configured, and the app refuses to start or resume a session on the device, including an SSH connection back to the same machine. SSH sessions to other hosts and cloud sessions are unaffected. The desktop app reads this key; the terminal CLI ignores it. Requires Claude Desktop v1.37937.0 or later.

関連ドキュメント