SpyBara
Go Premium Account
2026
11 Feb 2026, 21:10
12 May 2026, 16:02 12 May 2026, 14:59 12 May 2026, 01:59 12 May 2026, 00:01 11 May 2026, 23:00 11 May 2026, 21:57 11 May 2026, 20:02 11 May 2026, 18:59 11 May 2026, 18:00 11 May 2026, 15:00 10 May 2026, 23:03 10 May 2026, 17:00 10 May 2026, 04:02 9 May 2026, 04:57 9 May 2026, 04:01 9 May 2026, 03:01 8 May 2026, 22:00 8 May 2026, 19:00 8 May 2026, 18:00 8 May 2026, 16:57 8 May 2026, 07:02 8 May 2026, 06:02 8 May 2026, 03:01 8 May 2026, 02:03 8 May 2026, 01:02 8 May 2026, 00:02 7 May 2026, 22:59 7 May 2026, 21:57 7 May 2026, 17:08 5 May 2026, 23:00 5 May 2026, 21:00 5 May 2026, 17:00 5 May 2026, 15:59 5 May 2026, 14:57 5 May 2026, 00:02 4 May 2026, 22:58 4 May 2026, 22:01 4 May 2026, 18:58 4 May 2026, 15:35 4 May 2026, 06:55 4 May 2026, 04:18 2 May 2026, 18:14 2 May 2026, 04:05 2 May 2026, 00:19 1 May 2026, 18:19 1 May 2026, 04:22 1 May 2026, 00:20 29 Apr 2026, 21:21 29 Apr 2026, 15:36 29 Apr 2026, 09:39 29 Apr 2026, 04:11 29 Apr 2026, 00:20 28 Apr 2026, 21:21 28 Apr 2026, 18:28 28 Apr 2026, 15:45 28 Apr 2026, 06:49 27 Apr 2026, 21:20 27 Apr 2026, 18:23 26 Apr 2026, 04:08 25 Apr 2026, 21:10 24 Apr 2026, 18:11 24 Apr 2026, 06:34 24 Apr 2026, 00:17 23 Apr 2026, 18:19 23 Apr 2026, 04:04 23 Apr 2026, 00:17 22 Apr 2026, 21:15 22 Apr 2026, 04:00 22 Apr 2026, 00:13 21 Apr 2026, 21:14 21 Apr 2026, 09:30 21 Apr 2026, 04:01 20 Apr 2026, 21:14 20 Apr 2026, 18:16 18 Apr 2026, 18:09 18 Apr 2026, 00:13 17 Apr 2026, 21:13 17 Apr 2026, 18:14 17 Apr 2026, 00:15 16 Apr 2026, 21:13 16 Apr 2026, 18:21 16 Apr 2026, 15:30 16 Apr 2026, 04:02 16 Apr 2026, 00:16 15 Apr 2026, 18:20 15 Apr 2026, 15:24 15 Apr 2026, 09:29 15 Apr 2026, 04:00 14 Apr 2026, 21:14 14 Apr 2026, 18:21 14 Apr 2026, 06:32 14 Apr 2026, 04:00 14 Apr 2026, 00:16 13 Apr 2026, 21:14 13 Apr 2026, 18:21 11 Apr 2026, 00:11 10 Apr 2026, 21:09 10 Apr 2026, 18:13 10 Apr 2026, 06:32 10 Apr 2026, 00:12 9 Apr 2026, 21:14 9 Apr 2026, 18:17 9 Apr 2026, 15:29 9 Apr 2026, 03:55 9 Apr 2026, 00:09 8 Apr 2026, 21:13 8 Apr 2026, 18:21 8 Apr 2026, 15:27 8 Apr 2026, 00:12 7 Apr 2026, 21:14 4 Apr 2026, 18:05 4 Apr 2026, 03:46 4 Apr 2026, 00:09 3 Apr 2026, 21:07 3 Apr 2026, 18:08 3 Apr 2026, 03:54 3 Apr 2026, 00:11 2 Apr 2026, 21:08 2 Apr 2026, 18:12 2 Apr 2026, 09:19 2 Apr 2026, 06:21 2 Apr 2026, 03:53 1 Apr 2026, 21:12 1 Apr 2026, 18:13 1 Apr 2026, 04:00 1 Apr 2026, 00:11 31 Mar 2026, 21:09 31 Mar 2026, 06:24 31 Mar 2026, 03:56 31 Mar 2026, 00:11 30 Mar 2026, 21:13 30 Mar 2026, 18:15 28 Mar 2026, 18:04 28 Mar 2026, 15:06 27 Mar 2026, 21:09 27 Mar 2026, 18:14 27 Mar 2026, 15:15 27 Mar 2026, 06:21 27 Mar 2026, 03:56 27 Mar 2026, 00:10 26 Mar 2026, 21:07 26 Mar 2026, 18:16 26 Mar 2026, 15:25 26 Mar 2026, 06:21 26 Mar 2026, 03:55 26 Mar 2026, 00:10 25 Mar 2026, 21:08 25 Mar 2026, 18:15 25 Mar 2026, 06:18 25 Mar 2026, 03:47 25 Mar 2026, 00:08 24 Mar 2026, 18:15 24 Mar 2026, 00:07 23 Mar 2026, 21:08 23 Mar 2026, 18:13 23 Mar 2026, 00:09 22 Mar 2026, 18:04 22 Mar 2026, 00:07 21 Mar 2026, 18:03 21 Mar 2026, 00:07 20 Mar 2026, 21:05 20 Mar 2026, 18:08 20 Mar 2026, 15:13 20 Mar 2026, 03:45 20 Mar 2026, 00:08 19 Mar 2026, 06:17 19 Mar 2026, 00:08 18 Mar 2026, 18:16 18 Mar 2026, 12:11 18 Mar 2026, 09:15 18 Mar 2026, 03:50 18 Mar 2026, 00:09 17 Mar 2026, 21:10 17 Mar 2026, 18:15 17 Mar 2026, 03:46 17 Mar 2026, 00:08 16 Mar 2026, 21:10 16 Mar 2026, 18:15 14 Mar 2026, 03:44 14 Mar 2026, 00:08 13 Mar 2026, 21:07 13 Mar 2026, 18:07 13 Mar 2026, 06:12 12 Mar 2026, 21:07 12 Mar 2026, 18:12 12 Mar 2026, 00:07 11 Mar 2026, 03:43 11 Mar 2026, 00:05 10 Mar 2026, 03:43 10 Mar 2026, 00:05 9 Mar 2026, 21:06 7 Mar 2026, 03:37 7 Mar 2026, 00:07 6 Mar 2026, 06:10 6 Mar 2026, 03:44 6 Mar 2026, 00:12 5 Mar 2026, 06:12 5 Mar 2026, 03:45 5 Mar 2026, 00:07 4 Mar 2026, 21:06 4 Mar 2026, 18:09 4 Mar 2026, 09:09 1 Mar 2026, 06:10 1 Mar 2026, 03:49 28 Feb 2026, 21:01 28 Feb 2026, 00:05 27 Feb 2026, 21:05 27 Feb 2026, 18:07 27 Feb 2026, 09:11 27 Feb 2026, 06:13 27 Feb 2026, 00:08 26 Feb 2026, 21:08 26 Feb 2026, 18:12 26 Feb 2026, 09:14 26 Feb 2026, 06:17 26 Feb 2026, 00:07 25 Feb 2026, 03:47 25 Feb 2026, 00:09 24 Feb 2026, 21:08 24 Feb 2026, 18:15 23 Feb 2026, 21:13 21 Feb 2026, 18:03 21 Feb 2026, 06:08 20 Feb 2026, 21:03 20 Feb 2026, 06:14 20 Feb 2026, 00:07 19 Feb 2026, 21:06 19 Feb 2026, 03:48 19 Feb 2026, 00:08 18 Feb 2026, 03:48 17 Feb 2026, 21:08 17 Feb 2026, 00:08 16 Feb 2026, 21:05 14 Feb 2026, 03:44 13 Feb 2026, 21:09 12 Feb 2026, 00:06 11 Feb 2026, 21:10 11 Feb 2026, 00:11 10 Feb 2026, 21:13 10 Feb 2026, 03:56 10 Feb 2026, 00:11 9 Feb 2026, 15:17 9 Feb 2026, 00:08 7 Feb 2026, 21:05 7 Feb 2026, 18:03 7 Feb 2026, 03:43 6 Feb 2026, 21:06 6 Feb 2026, 00:05 5 Feb 2026, 21:06 5 Feb 2026, 18:13 5 Feb 2026, 03:46 5 Feb 2026, 00:07 4 Feb 2026, 21:07 4 Feb 2026, 18:11 4 Feb 2026, 03:45 4 Feb 2026, 00:06 3 Feb 2026, 21:08 3 Feb 2026, 18:14 3 Feb 2026, 09:10 3 Feb 2026, 03:46 1 Feb 2026, 21:03 1 Feb 2026, 18:02 31 Jan 2026, 03:42 31 Jan 2026, 00:06 30 Jan 2026, 18:07 30 Jan 2026, 00:06 29 Jan 2026, 21:03 28 Jan 2026, 15:06 28 Jan 2026, 03:30 28 Jan 2026, 00:05 27 Jan 2026, 21:01 27 Jan 2026, 18:03 27 Jan 2026, 06:02 26 Jan 2026, 21:03 25 Jan 2026, 03:34 24 Jan 2026, 03:29 23 Jan 2026, 21:01 23 Jan 2026, 18:02 23 Jan 2026, 00:05 22 Jan 2026, 21:03 22 Jan 2026, 15:05 22 Jan 2026, 03:31 22 Jan 2026, 00:05 21 Jan 2026, 21:05 21 Jan 2026, 06:02 21 Jan 2026, 03:30 21 Jan 2026, 00:05 20 Jan 2026, 21:03 20 Jan 2026, 18:03 20 Jan 2026, 15:05 20 Jan 2026, 03:30 19 Jan 2026, 21:01 19 Jan 2026, 00:05 16 Jan 2026, 21:01 16 Jan 2026, 18:02 16 Jan 2026, 15:02 16 Jan 2026, 00:05 14 Jan 2026, 06:02 14 Jan 2026, 00:05 12 Jan 2026, 21:02 12 Jan 2026, 18:02 12 Jan 2026, 00:05 11 Jan 2026, 18:02 11 Jan 2026, 03:31 11 Jan 2026, 00:06 10 Jan 2026, 21:01 10 Jan 2026, 03:29 10 Jan 2026, 00:04 9 Jan 2026, 21:01 9 Jan 2026, 00:04 8 Jan 2026, 21:02 8 Jan 2026, 06:02 8 Jan 2026, 03:29 8 Jan 2026, 00:05 7 Jan 2026, 21:01 7 Jan 2026, 18:02 7 Jan 2026, 09:05 7 Jan 2026, 06:02 7 Jan 2026, 03:30 7 Jan 2026, 00:04 6 Jan 2026, 21:01 6 Jan 2026, 03:29 6 Jan 2026, 00:05 3 Jan 2026, 18:02 27 Dec 2025, 06:02 27 Dec 2025, 03:28 23 Dec 2025, 18:02 20 Dec 2025, 00:04 19 Dec 2025, 21:01 19 Dec 2025, 18:02 19 Dec 2025, 00:05 18 Dec 2025, 21:01 18 Dec 2025, 18:02 18 Dec 2025, 15:02 17 Dec 2025, 15:02 17 Dec 2025, 03:27 16 Dec 2025, 21:01 16 Dec 2025, 18:02 16 Dec 2025, 00:05 15 Dec 2025, 21:01 15 Dec 2025, 18:02 13 Dec 2025, 06:02 12 Dec 2025, 21:01 12 Dec 2025, 00:05 11 Dec 2025, 21:02 11 Dec 2025, 18:01 11 Dec 2025, 06:02 10 Dec 2025, 09:03 9 Dec 2025, 18:01 9 Dec 2025, 06:02 9 Dec 2025, 03:25 8 Dec 2025, 21:01 8 Dec 2025, 06:02 8 Dec 2025, 00:05 6 Dec 2025, 18:02 5 Dec 2025, 00:04 4 Dec 2025, 21:02 4 Dec 2025, 18:02 4 Dec 2025, 06:02 4 Dec 2025, 03:26 3 Dec 2025, 00:04 2 Dec 2025, 21:01 2 Dec 2025, 00:04 1 Dec 2025, 03:31 27 Nov 2025, 06:02 27 Nov 2025, 03:20 26 Nov 2025, 00:04 25 Nov 2025, 03:22 24 Nov 2025, 21:01 21 Nov 2025, 00:04 20 Nov 2025, 18:02 20 Nov 2025, 06:02 20 Nov 2025, 03:20 19 Nov 2025, 03:21 19 Nov 2025, 00:05 18 Nov 2025, 18:02 18 Nov 2025, 09:02 18 Nov 2025, 03:21 17 Nov 2025, 03:24 17 Nov 2025, 00:04 16 Nov 2025, 00:04 14 Nov 2025, 21:26 6 Nov 2025, 18:02 6 Nov 2025, 15:02 6 Nov 2025, 12:02 6 Nov 2025, 06:01 6 Nov 2025, 03:22 4 Nov 2025, 18:02 4 Nov 2025, 03:19 4 Nov 2025, 00:04 3 Nov 2025, 21:01 3 Nov 2025, 12:03 3 Nov 2025, 09:02 3 Nov 2025, 06:02 3 Nov 2025, 03:24 3 Nov 2025, 00:04 2 Nov 2025, 18:01 2 Nov 2025, 12:02 2 Nov 2025, 09:01 1 Nov 2025, 21:01 31 Oct 2025, 00:04 30 Oct 2025, 18:02 29 Oct 2025, 21:02 28 Oct 2025, 18:02 27 Oct 2025, 18:02 24 Oct 2025, 21:01 23 Oct 2025, 21:02 23 Oct 2025, 09:02 23 Oct 2025, 06:02 23 Oct 2025, 00:04 21 Oct 2025, 00:04 20 Oct 2025, 21:02 20 Oct 2025, 15:12 20 Oct 2025, 00:05 17 Oct 2025, 18:01 17 Oct 2025, 12:03 16 Oct 2025, 18:02 16 Oct 2025, 00:05 15 Oct 2025, 18:02 13 Oct 2025, 21:01 12 Oct 2025, 18:01
27 Feb 2026, 00:08
12 May 2026, 16:02 12 May 2026, 14:59 12 May 2026, 01:59 12 May 2026, 00:01 11 May 2026, 23:00 11 May 2026, 21:57 11 May 2026, 20:02 11 May 2026, 18:59 11 May 2026, 18:00 11 May 2026, 15:00 10 May 2026, 23:03 10 May 2026, 17:00 10 May 2026, 04:02 9 May 2026, 04:57 9 May 2026, 04:01 9 May 2026, 03:01 8 May 2026, 22:00 8 May 2026, 19:00 8 May 2026, 18:00 8 May 2026, 16:57 8 May 2026, 07:02 8 May 2026, 06:02 8 May 2026, 03:01 8 May 2026, 02:03 8 May 2026, 01:02 8 May 2026, 00:02 7 May 2026, 22:59 7 May 2026, 21:57 7 May 2026, 17:08 5 May 2026, 23:00 5 May 2026, 21:00 5 May 2026, 17:00 5 May 2026, 15:59 5 May 2026, 14:57 5 May 2026, 00:02 4 May 2026, 22:58 4 May 2026, 22:01 4 May 2026, 18:58 4 May 2026, 15:35 4 May 2026, 06:55 4 May 2026, 04:18 2 May 2026, 18:14 2 May 2026, 04:05 2 May 2026, 00:19 1 May 2026, 18:19 1 May 2026, 04:22 1 May 2026, 00:20 29 Apr 2026, 21:21 29 Apr 2026, 15:36 29 Apr 2026, 09:39 29 Apr 2026, 04:11 29 Apr 2026, 00:20 28 Apr 2026, 21:21 28 Apr 2026, 18:28 28 Apr 2026, 15:45 28 Apr 2026, 06:49 27 Apr 2026, 21:20 27 Apr 2026, 18:23 26 Apr 2026, 04:08 25 Apr 2026, 21:10 24 Apr 2026, 18:11 24 Apr 2026, 06:34 24 Apr 2026, 00:17 23 Apr 2026, 18:19 23 Apr 2026, 04:04 23 Apr 2026, 00:17 22 Apr 2026, 21:15 22 Apr 2026, 04:00 22 Apr 2026, 00:13 21 Apr 2026, 21:14 21 Apr 2026, 09:30 21 Apr 2026, 04:01 20 Apr 2026, 21:14 20 Apr 2026, 18:16 18 Apr 2026, 18:09 18 Apr 2026, 00:13 17 Apr 2026, 21:13 17 Apr 2026, 18:14 17 Apr 2026, 00:15 16 Apr 2026, 21:13 16 Apr 2026, 18:21 16 Apr 2026, 15:30 16 Apr 2026, 04:02 16 Apr 2026, 00:16 15 Apr 2026, 18:20 15 Apr 2026, 15:24 15 Apr 2026, 09:29 15 Apr 2026, 04:00 14 Apr 2026, 21:14 14 Apr 2026, 18:21 14 Apr 2026, 06:32 14 Apr 2026, 04:00 14 Apr 2026, 00:16 13 Apr 2026, 21:14 13 Apr 2026, 18:21 11 Apr 2026, 00:11 10 Apr 2026, 21:09 10 Apr 2026, 18:13 10 Apr 2026, 06:32 10 Apr 2026, 00:12 9 Apr 2026, 21:14 9 Apr 2026, 18:17 9 Apr 2026, 15:29 9 Apr 2026, 03:55 9 Apr 2026, 00:09 8 Apr 2026, 21:13 8 Apr 2026, 18:21 8 Apr 2026, 15:27 8 Apr 2026, 00:12 7 Apr 2026, 21:14 4 Apr 2026, 18:05 4 Apr 2026, 03:46 4 Apr 2026, 00:09 3 Apr 2026, 21:07 3 Apr 2026, 18:08 3 Apr 2026, 03:54 3 Apr 2026, 00:11 2 Apr 2026, 21:08 2 Apr 2026, 18:12 2 Apr 2026, 09:19 2 Apr 2026, 06:21 2 Apr 2026, 03:53 1 Apr 2026, 21:12 1 Apr 2026, 18:13 1 Apr 2026, 04:00 1 Apr 2026, 00:11 31 Mar 2026, 21:09 31 Mar 2026, 06:24 31 Mar 2026, 03:56 31 Mar 2026, 00:11 30 Mar 2026, 21:13 30 Mar 2026, 18:15 28 Mar 2026, 18:04 28 Mar 2026, 15:06 27 Mar 2026, 21:09 27 Mar 2026, 18:14 27 Mar 2026, 15:15 27 Mar 2026, 06:21 27 Mar 2026, 03:56 27 Mar 2026, 00:10 26 Mar 2026, 21:07 26 Mar 2026, 18:16 26 Mar 2026, 15:25 26 Mar 2026, 06:21 26 Mar 2026, 03:55 26 Mar 2026, 00:10 25 Mar 2026, 21:08 25 Mar 2026, 18:15 25 Mar 2026, 06:18 25 Mar 2026, 03:47 25 Mar 2026, 00:08 24 Mar 2026, 18:15 24 Mar 2026, 00:07 23 Mar 2026, 21:08 23 Mar 2026, 18:13 23 Mar 2026, 00:09 22 Mar 2026, 18:04 22 Mar 2026, 00:07 21 Mar 2026, 18:03 21 Mar 2026, 00:07 20 Mar 2026, 21:05 20 Mar 2026, 18:08 20 Mar 2026, 15:13 20 Mar 2026, 03:45 20 Mar 2026, 00:08 19 Mar 2026, 06:17 19 Mar 2026, 00:08 18 Mar 2026, 18:16 18 Mar 2026, 12:11 18 Mar 2026, 09:15 18 Mar 2026, 03:50 18 Mar 2026, 00:09 17 Mar 2026, 21:10 17 Mar 2026, 18:15 17 Mar 2026, 03:46 17 Mar 2026, 00:08 16 Mar 2026, 21:10 16 Mar 2026, 18:15 14 Mar 2026, 03:44 14 Mar 2026, 00:08 13 Mar 2026, 21:07 13 Mar 2026, 18:07 13 Mar 2026, 06:12 12 Mar 2026, 21:07 12 Mar 2026, 18:12 12 Mar 2026, 00:07 11 Mar 2026, 03:43 11 Mar 2026, 00:05 10 Mar 2026, 03:43 10 Mar 2026, 00:05 9 Mar 2026, 21:06 7 Mar 2026, 03:37 7 Mar 2026, 00:07 6 Mar 2026, 06:10 6 Mar 2026, 03:44 6 Mar 2026, 00:12 5 Mar 2026, 06:12 5 Mar 2026, 03:45 5 Mar 2026, 00:07 4 Mar 2026, 21:06 4 Mar 2026, 18:09 4 Mar 2026, 09:09 1 Mar 2026, 06:10 1 Mar 2026, 03:49 28 Feb 2026, 21:01 28 Feb 2026, 00:05 27 Feb 2026, 21:05 27 Feb 2026, 18:07 27 Feb 2026, 09:11 27 Feb 2026, 06:13 27 Feb 2026, 00:08 26 Feb 2026, 21:08 26 Feb 2026, 18:12 26 Feb 2026, 09:14 26 Feb 2026, 06:17 26 Feb 2026, 00:07 25 Feb 2026, 03:47 25 Feb 2026, 00:09 24 Feb 2026, 21:08 24 Feb 2026, 18:15 23 Feb 2026, 21:13 21 Feb 2026, 18:03 21 Feb 2026, 06:08 20 Feb 2026, 21:03 20 Feb 2026, 06:14 20 Feb 2026, 00:07 19 Feb 2026, 21:06 19 Feb 2026, 03:48 19 Feb 2026, 00:08 18 Feb 2026, 03:48 17 Feb 2026, 21:08 17 Feb 2026, 00:08 16 Feb 2026, 21:05 14 Feb 2026, 03:44 13 Feb 2026, 21:09 12 Feb 2026, 00:06 11 Feb 2026, 21:10 11 Feb 2026, 00:11 10 Feb 2026, 21:13 10 Feb 2026, 03:56 10 Feb 2026, 00:11 9 Feb 2026, 15:17 9 Feb 2026, 00:08 7 Feb 2026, 21:05 7 Feb 2026, 18:03 7 Feb 2026, 03:43 6 Feb 2026, 21:06 6 Feb 2026, 00:05 5 Feb 2026, 21:06 5 Feb 2026, 18:13 5 Feb 2026, 03:46 5 Feb 2026, 00:07 4 Feb 2026, 21:07 4 Feb 2026, 18:11 4 Feb 2026, 03:45 4 Feb 2026, 00:06 3 Feb 2026, 21:08 3 Feb 2026, 18:14 3 Feb 2026, 09:10 3 Feb 2026, 03:46 1 Feb 2026, 21:03 1 Feb 2026, 18:02 31 Jan 2026, 03:42 31 Jan 2026, 00:06 30 Jan 2026, 18:07 30 Jan 2026, 00:06 29 Jan 2026, 21:03 28 Jan 2026, 15:06 28 Jan 2026, 03:30 28 Jan 2026, 00:05 27 Jan 2026, 21:01 27 Jan 2026, 18:03 27 Jan 2026, 06:02 26 Jan 2026, 21:03 25 Jan 2026, 03:34 24 Jan 2026, 03:29 23 Jan 2026, 21:01 23 Jan 2026, 18:02 23 Jan 2026, 00:05 22 Jan 2026, 21:03 22 Jan 2026, 15:05 22 Jan 2026, 03:31 22 Jan 2026, 00:05 21 Jan 2026, 21:05 21 Jan 2026, 06:02 21 Jan 2026, 03:30 21 Jan 2026, 00:05 20 Jan 2026, 21:03 20 Jan 2026, 18:03 20 Jan 2026, 15:05 20 Jan 2026, 03:30 19 Jan 2026, 21:01 19 Jan 2026, 00:05 16 Jan 2026, 21:01 16 Jan 2026, 18:02 16 Jan 2026, 15:02 16 Jan 2026, 00:05 14 Jan 2026, 06:02 14 Jan 2026, 00:05 12 Jan 2026, 21:02 12 Jan 2026, 18:02 12 Jan 2026, 00:05 11 Jan 2026, 18:02 11 Jan 2026, 03:31 11 Jan 2026, 00:06 10 Jan 2026, 21:01 10 Jan 2026, 03:29 10 Jan 2026, 00:04 9 Jan 2026, 21:01 9 Jan 2026, 00:04 8 Jan 2026, 21:02 8 Jan 2026, 06:02 8 Jan 2026, 03:29 8 Jan 2026, 00:05 7 Jan 2026, 21:01 7 Jan 2026, 18:02 7 Jan 2026, 09:05 7 Jan 2026, 06:02 7 Jan 2026, 03:30 7 Jan 2026, 00:04 6 Jan 2026, 21:01 6 Jan 2026, 03:29 6 Jan 2026, 00:05 3 Jan 2026, 18:02 27 Dec 2025, 06:02 27 Dec 2025, 03:28 23 Dec 2025, 18:02 20 Dec 2025, 00:04 19 Dec 2025, 21:01 19 Dec 2025, 18:02 19 Dec 2025, 00:05 18 Dec 2025, 21:01 18 Dec 2025, 18:02 18 Dec 2025, 15:02 17 Dec 2025, 15:02 17 Dec 2025, 03:27 16 Dec 2025, 21:01 16 Dec 2025, 18:02 16 Dec 2025, 00:05 15 Dec 2025, 21:01 15 Dec 2025, 18:02 13 Dec 2025, 06:02 12 Dec 2025, 21:01 12 Dec 2025, 00:05 11 Dec 2025, 21:02 11 Dec 2025, 18:01 11 Dec 2025, 06:02 10 Dec 2025, 09:03 9 Dec 2025, 18:01 9 Dec 2025, 06:02 9 Dec 2025, 03:25 8 Dec 2025, 21:01 8 Dec 2025, 06:02 8 Dec 2025, 00:05 6 Dec 2025, 18:02 5 Dec 2025, 00:04 4 Dec 2025, 21:02 4 Dec 2025, 18:02 4 Dec 2025, 06:02 4 Dec 2025, 03:26 3 Dec 2025, 00:04 2 Dec 2025, 21:01 2 Dec 2025, 00:04 1 Dec 2025, 03:31 27 Nov 2025, 06:02 27 Nov 2025, 03:20 26 Nov 2025, 00:04 25 Nov 2025, 03:22 24 Nov 2025, 21:01 21 Nov 2025, 00:04 20 Nov 2025, 18:02 20 Nov 2025, 06:02 20 Nov 2025, 03:20 19 Nov 2025, 03:21 19 Nov 2025, 00:05 18 Nov 2025, 18:02 18 Nov 2025, 09:02 18 Nov 2025, 03:21 17 Nov 2025, 03:24 17 Nov 2025, 00:04 16 Nov 2025, 00:04 14 Nov 2025, 21:26 6 Nov 2025, 18:02 6 Nov 2025, 15:02 6 Nov 2025, 12:02 6 Nov 2025, 06:01 6 Nov 2025, 03:22 4 Nov 2025, 18:02 4 Nov 2025, 03:19 4 Nov 2025, 00:04 3 Nov 2025, 21:01 3 Nov 2025, 12:03 3 Nov 2025, 09:02 3 Nov 2025, 06:02 3 Nov 2025, 03:24 3 Nov 2025, 00:04 2 Nov 2025, 18:01 2 Nov 2025, 12:02 2 Nov 2025, 09:01 1 Nov 2025, 21:01 31 Oct 2025, 00:04 30 Oct 2025, 18:02 29 Oct 2025, 21:02 28 Oct 2025, 18:02 27 Oct 2025, 18:02 24 Oct 2025, 21:01 23 Oct 2025, 21:02 23 Oct 2025, 09:02 23 Oct 2025, 06:02 23 Oct 2025, 00:04 21 Oct 2025, 00:04 20 Oct 2025, 21:02 20 Oct 2025, 15:12 20 Oct 2025, 00:05 17 Oct 2025, 18:01 17 Oct 2025, 12:03 16 Oct 2025, 18:02 16 Oct 2025, 00:05 15 Oct 2025, 18:02 13 Oct 2025, 21:01 12 Oct 2025, 18:01
Sun 1 18:02 Sun 1 21:03 Tue 3 03:46 Tue 3 09:10 Tue 3 18:14 Tue 3 21:08 Wed 4 00:06 Wed 4 03:45 Wed 4 18:11 Wed 4 21:07 Thu 5 00:07 Thu 5 03:46 Thu 5 18:13 Thu 5 21:06 Fri 6 00:05 Fri 6 21:06 Sat 7 03:43 Sat 7 18:03 Sat 7 21:05 Mon 9 00:08 Mon 9 15:17 Tue 10 00:11 Tue 10 03:56 Tue 10 21:13 Wed 11 00:11 Wed 11 21:10 Thu 12 00:06 Fri 13 21:09 Sat 14 03:44 Mon 16 21:05 Tue 17 00:08 Tue 17 21:08 Wed 18 03:48 Thu 19 00:08 Thu 19 03:48 Thu 19 21:06 Fri 20 00:07 Fri 20 06:14 Fri 20 21:03 Sat 21 06:08 Sat 21 18:03 Mon 23 21:13 Tue 24 18:15 Tue 24 21:08 Wed 25 00:09 Wed 25 03:47 Thu 26 00:07 Thu 26 06:17 Thu 26 09:14 Thu 26 18:12 Thu 26 21:08 Fri 27 00:08 Fri 27 06:13 Fri 27 09:11 Fri 27 18:07 Fri 27 21:05 Sat 28 00:05 Sat 28 21:01

agent-teams.md +33 −21

Details

36 36 

37Both agent teams and [subagents](/en/sub-agents) let you parallelize work, but they operate differently. Choose based on whether your workers need to communicate with each other:37Both agent teams and [subagents](/en/sub-agents) let you parallelize work, but they operate differently. Choose based on whether your workers need to communicate with each other:

38 38 

39<Frame caption="Subagents only report results back to the main agent and never talk to each other. In agent teams, teammates share a task list, claim work, and communicate directly with each other.">

40 <img src="https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-light.png?fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=2f8db9b4f3705dd3ab931fbe2d96e42a" className="dark:hidden" alt="Diagram comparing subagent and agent team architectures. Subagents are spawned by the main agent, do work, and report results back. Agent teams coordinate through a shared task list, with teammates communicating directly with each other." data-og-width="4245" width="4245" data-og-height="1615" height="1615" data-path="images/subagents-vs-agent-teams-light.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-light.png?w=280&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=a2cfe413c2084b477be40ac8723d9d40 280w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-light.png?w=560&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=c642c09a4c211b10b35eee7d7d0d149f 560w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-light.png?w=840&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=40d286f77c8a4075346b4fcaa2b36248 840w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-light.png?w=1100&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=923986caa23c0ef2c27d7e45f4dce6d1 1100w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-light.png?w=1650&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=17a730a070db6d71d029a98b074c68e8 1650w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-light.png?w=2500&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=e402533fc9e8b5e8d26a835cc4aa1742 2500w" />

41 

42 <img src="https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-dark.png?fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=d573a037540f2ada6a9ae7d8285b46fd" className="hidden dark:block" alt="Diagram comparing subagent and agent team architectures. Subagents are spawned by the main agent, do work, and report results back. Agent teams coordinate through a shared task list, with teammates communicating directly with each other." data-og-width="4245" width="4245" data-og-height="1615" height="1615" data-path="images/subagents-vs-agent-teams-dark.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-dark.png?w=280&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=06ca5b18b232855acc488357d8d01fa7 280w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-dark.png?w=560&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=3d34daee83994781eb74b74d1ed511c4 560w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-dark.png?w=840&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=82ea35ac837de7d674002de69689b9cf 840w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-dark.png?w=1100&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=3653085214a9fc65d1f589044894a296 1100w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-dark.png?w=1650&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=8e74b42694e428570e876d34f29e6ad6 1650w, https://mintcdn.com/claude-code/nsvRFSDNfpSU5nT7/images/subagents-vs-agent-teams-dark.png?w=2500&fit=max&auto=format&n=nsvRFSDNfpSU5nT7&q=85&s=3be00c56c6a0dcccbe15640020be0128 2500w" />

43</Frame>

44 

39| | Subagents | Agent teams |45| | Subagents | Agent teams |

40| :---------------- | :----------------------------------------------- | :-------------------------------------------------- |46| :---------------- | :----------------------------------------------- | :-------------------------------------------------- |

41| **Context** | Own context window; results return to the caller | Own context window; fully independent |47| **Context** | Own context window; results return to the caller | Own context window; fully independent |


64 70 

65This example works well because the three roles are independent and can explore the problem without waiting on each other:71This example works well because the three roles are independent and can explore the problem without waiting on each other:

66 72 

67```73```text theme={null}

68I'm designing a CLI tool that helps developers track TODO comments across74I'm designing a CLI tool that helps developers track TODO comments across

69their codebase. Create an agent team to explore this from different angles: one75their codebase. Create an agent team to explore this from different angles: one

70teammate on UX, one on technical architecture, one playing devil's advocate.76teammate on UX, one on technical architecture, one playing devil's advocate.


72 78 

73From there, Claude creates a team with a [shared task list](/en/interactive-mode#task-list), spawns teammates for each perspective, has them explore the problem, synthesizes findings, and attempts to [clean up the team](#clean-up-the-team) when finished.79From there, Claude creates a team with a [shared task list](/en/interactive-mode#task-list), spawns teammates for each perspective, has them explore the problem, synthesizes findings, and attempts to [clean up the team](#clean-up-the-team) when finished.

74 80 

75The lead's terminal lists all teammates and what they're working on. Use Shift+Up/Down to select a teammate and message them directly.81The lead's terminal lists all teammates and what they're working on. Use Shift+Down to cycle through teammates and message them directly. After the last teammate, Shift+Down wraps back to the lead.

76 82 

77If you want each teammate in its own split pane, see [Choose a display mode](#choose-a-display-mode).83If you want each teammate in its own split pane, see [Choose a display mode](#choose-a-display-mode).

78 84 


84 90 

85Agent teams support two display modes:91Agent teams support two display modes:

86 92 

87* **In-process**: all teammates run inside your main terminal. Use Shift+Up/Down to select a teammate and type to message them directly. Works in any terminal, no extra setup required.93* **In-process**: all teammates run inside your main terminal. Use Shift+Down to cycle through teammates and type to message them directly. Works in any terminal, no extra setup required.

88* **Split panes**: each teammate gets its own pane. You can see everyone's output at once and click into a pane to interact directly. Requires tmux, or iTerm2.94* **Split panes**: each teammate gets its own pane. You can see everyone's output at once and click into a pane to interact directly. Requires tmux, or iTerm2.

89 95 

90<Note>96<Note>


114 120 

115Claude decides the number of teammates to spawn based on your task, or you can specify exactly what you want:121Claude decides the number of teammates to spawn based on your task, or you can specify exactly what you want:

116 122 

117```123```text theme={null}

118Create a team with 4 teammates to refactor these modules in parallel.124Create a team with 4 teammates to refactor these modules in parallel.

119Use Sonnet for each teammate.125Use Sonnet for each teammate.

120```126```


123 129 

124For complex or risky tasks, you can require teammates to plan before implementing. The teammate works in read-only plan mode until the lead approves their approach:130For complex or risky tasks, you can require teammates to plan before implementing. The teammate works in read-only plan mode until the lead approves their approach:

125 131 

126```132```text theme={null}

127Spawn an architect teammate to refactor the authentication module.133Spawn an architect teammate to refactor the authentication module.

128Require plan approval before they make any changes.134Require plan approval before they make any changes.

129```135```


132 138 

133The lead makes approval decisions autonomously. To influence the lead's judgment, give it criteria in your prompt, such as "only approve plans that include test coverage" or "reject plans that modify the database schema."139The lead makes approval decisions autonomously. To influence the lead's judgment, give it criteria in your prompt, such as "only approve plans that include test coverage" or "reject plans that modify the database schema."

134 140 

135### Use delegate mode

136 

137Without delegate mode, the lead sometimes starts implementing tasks itself instead of waiting for teammates. Delegate mode prevents this by restricting the lead to coordination-only tools: spawning, messaging, shutting down teammates, and managing tasks.

138 

139This is useful when you want the lead to focus entirely on orchestration, such as breaking down work, assigning tasks, and synthesizing results, without touching code directly.

140 

141To enable it, start a team first, then press Shift+Tab to cycle into delegate mode.

142 

143### Talk to teammates directly141### Talk to teammates directly

144 142 

145Each teammate is a full, independent Claude Code session. You can message any teammate directly to give additional instructions, ask follow-up questions, or redirect their approach.143Each teammate is a full, independent Claude Code session. You can message any teammate directly to give additional instructions, ask follow-up questions, or redirect their approach.

146 144 

147* **In-process mode**: use Shift+Up/Down to select a teammate, then type to send them a message. Press Enter to view a teammate's session, then Escape to interrupt their current turn. Press Ctrl+T to toggle the task list.145* **In-process mode**: use Shift+Down to cycle through teammates, then type to send them a message. Press Enter to view a teammate's session, then Escape to interrupt their current turn. Press Ctrl+T to toggle the task list.

148* **Split-pane mode**: click into a teammate's pane to interact with their session directly. Each teammate has a full view of their own terminal.146* **Split-pane mode**: click into a teammate's pane to interact with their session directly. Each teammate has a full view of their own terminal.

149 147 

150### Assign and claim tasks148### Assign and claim tasks


162 160 

163To gracefully end a teammate's session:161To gracefully end a teammate's session:

164 162 

165```163```text theme={null}

166Ask the researcher teammate to shut down164Ask the researcher teammate to shut down

167```165```

168 166 


172 170 

173When you're done, ask the lead to clean up:171When you're done, ask the lead to clean up:

174 172 

175```173```text theme={null}

176Clean up the team174Clean up the team

177```175```

178 176 


255 253 

256A single reviewer tends to gravitate toward one type of issue at a time. Splitting review criteria into independent domains means security, performance, and test coverage all get thorough attention simultaneously. The prompt assigns each teammate a distinct lens so they don't overlap:254A single reviewer tends to gravitate toward one type of issue at a time. Splitting review criteria into independent domains means security, performance, and test coverage all get thorough attention simultaneously. The prompt assigns each teammate a distinct lens so they don't overlap:

257 255 

258```256```text theme={null}

259Create an agent team to review PR #142. Spawn three reviewers:257Create an agent team to review PR #142. Spawn three reviewers:

260- One focused on security implications258- One focused on security implications

261- One checking performance impact259- One checking performance impact


269 267 

270When the root cause is unclear, a single agent tends to find one plausible explanation and stop looking. The prompt fights this by making teammates explicitly adversarial: each one's job is not only to investigate its own theory but to challenge the others'.268When the root cause is unclear, a single agent tends to find one plausible explanation and stop looking. The prompt fights this by making teammates explicitly adversarial: each one's job is not only to investigate its own theory but to challenge the others'.

271 269 

272```270```text theme={null}

273Users report the app exits after one message instead of staying connected.271Users report the app exits after one message instead of staying connected.

274Spawn 5 agent teammates to investigate different hypotheses. Have them talk to272Spawn 5 agent teammates to investigate different hypotheses. Have them talk to

275each other to try to disprove each other's theories, like a scientific273each other to try to disprove each other's theories, like a scientific


286 284 

287Teammates load project context automatically, including CLAUDE.md, MCP servers, and skills, but they don't inherit the lead's conversation history. See [Context and communication](#context-and-communication) for details. Include task-specific details in the spawn prompt:285Teammates load project context automatically, including CLAUDE.md, MCP servers, and skills, but they don't inherit the lead's conversation history. See [Context and communication](#context-and-communication) for details. Include task-specific details in the spawn prompt:

288 286 

289```287```text theme={null}

290Spawn a security reviewer teammate with the prompt: "Review the authentication module288Spawn a security reviewer teammate with the prompt: "Review the authentication module

291at src/auth/ for security vulnerabilities. Focus on token handling, session289at src/auth/ for security vulnerabilities. Focus on token handling, session

292management, and input validation. The app uses JWT tokens stored in290management, and input validation. The app uses JWT tokens stored in

293httpOnly cookies. Report any issues with severity ratings."291httpOnly cookies. Report any issues with severity ratings."

294```292```

295 293 

294### Choose an appropriate team size

295 

296There's no hard limit on the number of teammates, but practical constraints apply:

297 

298* **Token costs scale linearly**: each teammate has its own context window and consumes tokens independently. See [agent team token costs](/en/costs#agent-team-token-costs) for details.

299* **Coordination overhead increases**: more teammates means more communication, task coordination, and potential for conflicts

300* **Diminishing returns**: beyond a certain point, additional teammates don't speed up work proportionally

301 

302Start with 3-5 teammates for most workflows. This balances parallel work with manageable coordination. The examples in this guide use 3-5 teammates because that range works well across different task types.

303 

304Having 5-6 [tasks](/en/agent-teams#architecture) per teammate keeps everyone productive without excessive context switching. If you have 15 independent tasks, 3 teammates is a good starting point.

305 

306Scale up only when the work genuinely benefits from having teammates work simultaneously. Three focused teammates often outperform five scattered ones.

307 

296### Size tasks appropriately308### Size tasks appropriately

297 309 

298* **Too small**: coordination overhead exceeds the benefit310* **Too small**: coordination overhead exceeds the benefit


307 319 

308Sometimes the lead starts implementing tasks itself instead of waiting for teammates. If you notice this:320Sometimes the lead starts implementing tasks itself instead of waiting for teammates. If you notice this:

309 321 

310```322```text theme={null}

311Wait for your teammates to complete their tasks before proceeding323Wait for your teammates to complete their tasks before proceeding

312```324```

313 325 


343 355 

344### Teammates stopping on errors356### Teammates stopping on errors

345 357 

346Teammates may stop after encountering errors instead of recovering. Check their output using Shift+Up/Down in in-process mode or by clicking the pane in split mode, then either:358Teammates may stop after encountering errors instead of recovering. Check their output using Shift+Down in in-process mode or by clicking the pane in split mode, then either:

347 359 

348* Give them additional instructions directly360* Give them additional instructions directly

349* Spawn a replacement teammate to continue the work361* Spawn a replacement teammate to continue the work

amazon-bedrock.md +26 −12

Details

11Before configuring Claude Code with Bedrock, ensure you have:11Before configuring Claude Code with Bedrock, ensure you have:

12 12 

13* An AWS account with Bedrock access enabled13* An AWS account with Bedrock access enabled

14* Access to desired Claude models (for example, Claude Sonnet 4.5) in Bedrock14* Access to desired Claude models (for example, Claude Sonnet 4.6) in Bedrock

15* AWS CLI installed and configured (optional - only needed if you don't have another mechanism for getting credentials)15* AWS CLI installed and configured (optional - only needed if you don't have another mechanism for getting credentials)

16* Appropriate IAM permissions16* Appropriate IAM permissions

17 17 

18<Note>

19 If you are deploying Claude Code to multiple users, [pin your model versions](#4-pin-model-versions) to prevent breakage when Anthropic releases new models.

20</Note>

21 

18## Setup22## Setup

19 23 

20### 1. Submit use case details24### 1. Submit use case details


120* When using Bedrock, the `/login` and `/logout` commands are disabled since authentication is handled through AWS credentials.124* When using Bedrock, the `/login` and `/logout` commands are disabled since authentication is handled through AWS credentials.

121* You can use settings files for environment variables like `AWS_PROFILE` that you don't want to leak to other processes. See [Settings](/en/settings) for more information.125* You can use settings files for environment variables like `AWS_PROFILE` that you don't want to leak to other processes. See [Settings](/en/settings) for more information.

122 126 

123### 4. Model configuration127### 4. Pin model versions

128 

129<Warning>

130 Pin specific model versions for every deployment. If you use model aliases (`sonnet`, `opus`, `haiku`) without pinning, Claude Code may attempt to use a newer model version that isn't available in your Bedrock account, breaking existing users when Anthropic releases updates.

131</Warning>

132 

133Set these environment variables to specific Bedrock model IDs:

134 

135```bash theme={null}

136export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-6-v1'

137export ANTHROPIC_DEFAULT_SONNET_MODEL='us.anthropic.claude-sonnet-4-6'

138export ANTHROPIC_DEFAULT_HAIKU_MODEL='us.anthropic.claude-haiku-4-5-20251001-v1:0'

139```

140 

141These variables use cross-region inference profile IDs (with the `us.` prefix). If you use a different region prefix or application inference profiles, adjust accordingly. For current and legacy model IDs, see [Models overview](https://platform.claude.com/docs/en/about-claude/models/overview). See [Model configuration](/en/model-config#pin-models-for-third-party-deployments) for the full list of environment variables.

124 142 

125Claude Code uses these default models for Bedrock:143Claude Code uses these default models when no pinning variables are set:

126 144 

127| Model type | Default value |145| Model type | Default value |

128| :--------------- | :------------------------------------------------- |146| :--------------- | :-------------------------------------------- |

129| Primary model | `global.anthropic.claude-sonnet-4-5-20250929-v1:0` |147| Primary model | `global.anthropic.claude-sonnet-4-6` |

130| Small/fast model | `us.anthropic.claude-haiku-4-5-20251001-v1:0` |148| Small/fast model | `us.anthropic.claude-haiku-4-5-20251001-v1:0` |

131 149 

132<Note>150To customize models further, use one of these methods:

133 For Bedrock users, Claude Code won't automatically upgrade from Haiku 3.5 to Haiku 4.5. To manually switch to a newer Haiku model, set the `ANTHROPIC_DEFAULT_HAIKU_MODEL` environment variable to the full model name (for example, `us.anthropic.claude-haiku-4-5-20251001-v1:0`).

134</Note>

135 

136To customize models, use one of these methods:

137 151 

138```bash theme={null}152```bash theme={null}

139# Using inference profile ID153# Using inference profile ID

140export ANTHROPIC_MODEL='global.anthropic.claude-sonnet-4-5-20250929-v1:0'154export ANTHROPIC_MODEL='global.anthropic.claude-sonnet-4-6'

141export ANTHROPIC_SMALL_FAST_MODEL='us.anthropic.claude-haiku-4-5-20251001-v1:0'155export ANTHROPIC_SMALL_FAST_MODEL='us.anthropic.claude-haiku-4-5-20251001-v1:0'

142 156 

143# Using application inference profile ARN157# Using application inference profile ARN


194For details, see [Bedrock IAM documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/security-iam.html).208For details, see [Bedrock IAM documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/security-iam.html).

195 209 

196<Note>210<Note>

197 We recommend creating a dedicated AWS account for Claude Code to simplify cost tracking and access control.211 Create a dedicated AWS account for Claude Code to simplify cost tracking and access control.

198</Note>212</Note>

199 213 

200## AWS Guardrails214## AWS Guardrails

authentication.md +28 −15

Details

4 4 

5# Authentication5# Authentication

6 6 

7> Learn how to configure user authentication and credential management for Claude Code in your organization.7> Log in to Claude Code and configure authentication for individuals, teams, and organizations.

8 8 

9## Authentication methods9Claude Code supports multiple authentication methods depending on your setup. Individual users can log in with a Claude.ai account, while teams can use Claude for Teams or Enterprise, the Claude Console, or a cloud provider like Amazon Bedrock, Google Vertex AI, or Microsoft Foundry.

10 10 

11Setting up Claude Code requires access to Anthropic models. For teams, you can set up Claude Code access in one of these ways:11## Log in to Claude Code

12 12 

13* [Claude for Teams or Enterprise](#claude-for-teams-or-enterprise) (recommended)13After [installing Claude Code](/en/setup#install-claude-code), run `claude` in your terminal. On first launch, Claude Code opens a browser window for you to log in.

14 

15If the browser doesn't open automatically, press `c` to copy the login URL to your clipboard, then paste it into your browser.

16 

17You can authenticate with any of these account types:

18 

19* **Claude Pro or Max subscription**: log in with your Claude.ai account. Subscribe at [claude.com/pricing](https://claude.com/pricing).

20* **Claude for Teams or Enterprise**: log in with the Claude.ai account your team admin invited you to.

21* **Claude Console**: log in with your Console credentials. Your admin must have [invited you](#claude-console-authentication) first.

22* **Cloud providers**: if your organization uses [Amazon Bedrock](/en/amazon-bedrock), [Google Vertex AI](/en/google-vertex-ai), or [Microsoft Foundry](/en/microsoft-foundry), set the required environment variables before running `claude`. No browser login is needed.

23 

24To log out and re-authenticate, type `/logout` at the Claude Code prompt.

25 

26If you're having trouble logging in, see [authentication troubleshooting](/en/troubleshooting#authentication-issues).

27 

28## Set up team authentication

29 

30For teams and organizations, you can configure Claude Code access in one of these ways:

31 

32* [Claude for Teams or Enterprise](#claude-for-teams-or-enterprise), recommended for most teams

14* [Claude Console](#claude-console-authentication)33* [Claude Console](#claude-console-authentication)

15* [Amazon Bedrock](/en/amazon-bedrock)34* [Amazon Bedrock](/en/amazon-bedrock)

16* [Google Vertex AI](/en/google-vertex-ai)35* [Google Vertex AI](/en/google-vertex-ai)


49 <Step title="Add users">68 <Step title="Add users">

50 You can add users through either method:69 You can add users through either method:

51 70 

52 * Bulk invite users from within the Console (Console -> Settings -> Members -> Invite)71 * Bulk invite users from within the Console: Settings -> Members -> Invite

53 * [Set up SSO](https://support.claude.com/en/articles/13132885-setting-up-single-sign-on-sso)72 * [Set up SSO](https://support.claude.com/en/articles/13132885-setting-up-single-sign-on-sso)

54 </Step>73 </Step>

55 74 


65 84 

66 * Accept the Console invite85 * Accept the Console invite

67 * [Check system requirements](/en/setup#system-requirements)86 * [Check system requirements](/en/setup#system-requirements)

68 * [Install Claude Code](/en/setup#installation)87 * [Install Claude Code](/en/setup#install-claude-code)

69 * Log in with Console account credentials88 * Log in with Console account credentials

70 </Step>89 </Step>

71</Steps>90</Steps>

72 91 

73### Cloud provider authentication92### Cloud provider authentication

74 93 

75For teams using Amazon Bedrock, Google Vertex AI, or Microsoft Azure:94For teams using Amazon Bedrock, Google Vertex AI, or Microsoft Foundry:

76 95 

77<Steps>96<Steps>

78 <Step title="Follow provider setup">97 <Step title="Follow provider setup">


84 </Step>103 </Step>

85 104 

86 <Step title="Install Claude Code">105 <Step title="Install Claude Code">

87 Users can [install Claude Code](/en/setup#installation).106 Users can [install Claude Code](/en/setup#install-claude-code).

88 </Step>107 </Step>

89</Steps>108</Steps>

90 109 


92 111 

93Claude Code securely manages your authentication credentials:112Claude Code securely manages your authentication credentials:

94 113 

95* **Storage location**: on macOS, API keys, OAuth tokens, and other credentials are stored in the encrypted macOS Keychain.114* **Storage location**: on macOS, credentials are stored in the encrypted macOS Keychain.

96* **Supported authentication types**: Claude.ai credentials, Claude API credentials, Azure Auth, Bedrock Auth, and Vertex Auth.115* **Supported authentication types**: Claude.ai credentials, Claude API credentials, Azure Auth, Bedrock Auth, and Vertex Auth.

97* **Custom credential scripts**: the [`apiKeyHelper`](/en/settings#available-settings) setting can be configured to run a shell script that returns an API key.116* **Custom credential scripts**: the [`apiKeyHelper`](/en/settings#available-settings) setting can be configured to run a shell script that returns an API key.

98* **Refresh intervals**: by default, `apiKeyHelper` is called after 5 minutes or on HTTP 401 response. Set `CLAUDE_CODE_API_KEY_HELPER_TTL_MS` environment variable for custom refresh intervals.117* **Refresh intervals**: by default, `apiKeyHelper` is called after 5 minutes or on HTTP 401 response. Set `CLAUDE_CODE_API_KEY_HELPER_TTL_MS` environment variable for custom refresh intervals.

99 

100## See also

101 

102* [Permissions](/en/permissions): configure what Claude Code can access and do

103* [Settings](/en/settings): complete configuration reference

104* [Security](/en/security): security safeguards and best practices

best-practices.md +25 −38

Details

148 Run `/init` to generate a starter CLAUDE.md file based on your current project structure, then refine over time.148 Run `/init` to generate a starter CLAUDE.md file based on your current project structure, then refine over time.

149</Tip>149</Tip>

150 150 

151CLAUDE.md is a special file that Claude reads at the start of every conversation. Include Bash commands, code style, and workflow rules. This gives Claude persistent context **it can't infer from code alone**.151CLAUDE.md is a special file that Claude reads at the start of every conversation. Include Bash commands, code style, and workflow rules. This gives Claude persistent context it can't infer from code alone.

152 152 

153The `/init` command analyzes your codebase to detect build systems, test frameworks, and code patterns, giving you a solid foundation to refine.153The `/init` command analyzes your codebase to detect build systems, test frameworks, and code patterns, giving you a solid foundation to refine.

154 154 


194 194 

195You can place CLAUDE.md files in several locations:195You can place CLAUDE.md files in several locations:

196 196 

197* **Home folder (`~/.claude/CLAUDE.md`)**: Applies to all Claude sessions197* **Home folder (`~/.claude/CLAUDE.md`)**: applies to all Claude sessions

198* **Project root (`./CLAUDE.md`)**: Check into git to share with your team, or name it `CLAUDE.local.md` and `.gitignore` it198* **Project root (`./CLAUDE.md`)**: check into git to share with your team, or name it `CLAUDE.local.md` and `.gitignore` it

199* **Parent directories**: Useful for monorepos where both `root/CLAUDE.md` and `root/foo/CLAUDE.md` are pulled in automatically199* **Parent directories**: useful for monorepos where both `root/CLAUDE.md` and `root/foo/CLAUDE.md` are pulled in automatically

200* **Child directories**: Claude pulls in child CLAUDE.md files on demand when working with files in those directories200* **Child directories**: Claude pulls in child CLAUDE.md files on demand when working with files in those directories

201 201 

202### Configure permissions202### Configure permissions


207 207 

208By default, Claude Code requests permission for actions that might modify your system: file writes, Bash commands, MCP tools, etc. This is safe but tedious. After the tenth approval you're not really reviewing anymore, you're just clicking through. There are two ways to reduce these interruptions:208By default, Claude Code requests permission for actions that might modify your system: file writes, Bash commands, MCP tools, etc. This is safe but tedious. After the tenth approval you're not really reviewing anymore, you're just clicking through. There are two ways to reduce these interruptions:

209 209 

210* **Permission allowlists**: Permit specific tools you know are safe (like `npm run lint` or `git commit`)210* **Permission allowlists**: permit specific tools you know are safe (like `npm run lint` or `git commit`)

211* **Sandboxing**: Enable OS-level isolation that restricts filesystem and network access, allowing Claude to work more freely within defined boundaries211* **Sandboxing**: enable OS-level isolation that restricts filesystem and network access, allowing Claude to work more freely within defined boundaries

212 212 

213Alternatively, use `--dangerously-skip-permissions` to bypass all permission checks for contained workflows like fixing lint errors or generating boilerplate.213Alternatively, use `--dangerously-skip-permissions` to bypass all permission checks for contained workflows like fixing lint errors or generating boilerplate.

214 214 


216 Letting Claude run arbitrary commands can result in data loss, system corruption, or data exfiltration via prompt injection. Only use `--dangerously-skip-permissions` in a sandbox without internet access.216 Letting Claude run arbitrary commands can result in data loss, system corruption, or data exfiltration via prompt injection. Only use `--dangerously-skip-permissions` in a sandbox without internet access.

217</Warning>217</Warning>

218 218 

219Read more about [configuring permissions](/en/settings) and [enabling sandboxing](/en/sandboxing#sandboxing).219Read more about [configuring permissions](/en/permissions) and [enabling sandboxing](/en/sandboxing).

220 220 

221### Use CLI tools221### Use CLI tools

222 222 


356 356 

357Claude asks about things you might not have considered yet, including technical implementation, UI/UX, edge cases, and tradeoffs.357Claude asks about things you might not have considered yet, including technical implementation, UI/UX, edge cases, and tradeoffs.

358 358 

359```359```text theme={null}

360I want to build [brief description]. Interview me in detail using the AskUserQuestion tool.360I want to build [brief description]. Interview me in detail using the AskUserQuestion tool.

361 361 

362Ask about technical implementation, UI/UX, edge cases, concerns, and tradeoffs. Don't ask obvious questions, dig into the hard parts I might not have considered.362Ask about technical implementation, UI/UX, edge cases, concerns, and tradeoffs. Don't ask obvious questions, dig into the hard parts I might not have considered.


380 380 

381The best results come from tight feedback loops. Though Claude occasionally solves problems perfectly on the first attempt, correcting it quickly generally produces better solutions faster.381The best results come from tight feedback loops. Though Claude occasionally solves problems perfectly on the first attempt, correcting it quickly generally produces better solutions faster.

382 382 

383* **`Esc`**: Stop Claude mid-action with the `Esc` key. Context is preserved, so you can redirect.383* **`Esc`**: stop Claude mid-action with the `Esc` key. Context is preserved, so you can redirect.

384* **`Esc + Esc` or `/rewind`**: Press `Esc` twice or run `/rewind` to open the rewind menu and restore previous conversation and code state, or summarize from a selected message.384* **`Esc + Esc` or `/rewind`**: press `Esc` twice or run `/rewind` to open the rewind menu and restore previous conversation and code state, or summarize from a selected message.

385* **`"Undo that"`**: Have Claude revert its changes.385* **`"Undo that"`**: have Claude revert its changes.

386* **`/clear`**: Reset context between unrelated tasks. Long sessions with irrelevant context can reduce performance.386* **`/clear`**: reset context between unrelated tasks. Long sessions with irrelevant context can reduce performance.

387 387 

388If you've corrected Claude more than twice on the same issue in one session, the context is cluttered with failed approaches. Run `/clear` and start fresh with a more specific prompt that incorporates what you learned. A clean session with a better prompt almost always outperforms a long session with accumulated corrections.388If you've corrected Claude more than twice on the same issue in one session, the context is cluttered with failed approaches. Run `/clear` and start fresh with a more specific prompt that incorporates what you learned. A clean session with a better prompt almost always outperforms a long session with accumulated corrections.

389 389 


411 411 

412Since context is your fundamental constraint, subagents are one of the most powerful tools available. When Claude researches a codebase it reads lots of files, all of which consume your context. Subagents run in separate context windows and report back summaries:412Since context is your fundamental constraint, subagents are one of the most powerful tools available. When Claude researches a codebase it reads lots of files, all of which consume your context. Subagents run in separate context windows and report back summaries:

413 413 

414```414```text theme={null}

415Use subagents to investigate how our authentication system handles token415Use subagents to investigate how our authentication system handles token

416refresh, and whether we have any existing OAuth utilities I should reuse.416refresh, and whether we have any existing OAuth utilities I should reuse.

417```417```


420 420 

421You can also use subagents for verification after Claude implements something:421You can also use subagents for verification after Claude implements something:

422 422 

423```423```text theme={null}

424use a subagent to review this code for edge cases424use a subagent to review this code for edge cases

425```425```

426 426 


444 Run `claude --continue` to pick up where you left off, or `--resume` to choose from recent sessions.444 Run `claude --continue` to pick up where you left off, or `--resume` to choose from recent sessions.

445</Tip>445</Tip>

446 446 

447Claude Code saves conversations locally. When a task spans multiple sessions (you start a feature, get interrupted, come back the next day) you don't have to re-explain the context:447Claude Code saves conversations locally. When a task spans multiple sessions, you don't have to re-explain the context:

448 448 

449```bash theme={null}449```bash theme={null}

450claude --continue # Resume the most recent conversation450claude --continue # Resume the most recent conversation

451claude --resume # Select from recent conversations451claude --resume # Select from recent conversations

452```452```

453 453 

454Use `/rename` to give sessions descriptive names (`"oauth-migration"`, `"debugging-memory-leak"`) so you can find them later. Treat sessions like branches. Different workstreams can have separate, persistent contexts.454Use `/rename` to give sessions descriptive names like `"oauth-migration"` or `"debugging-memory-leak"` so you can find them later. Treat sessions like branches: different workstreams can have separate, persistent contexts.

455 455 

456***456***

457 457 

458## Automate and scale458## Automate and scale

459 459 

460Once you're effective with one Claude, multiply your output with parallel sessions, headless mode, and fan-out patterns.460Once you're effective with one Claude, multiply your output with parallel sessions, non-interactive mode, and fan-out patterns.

461 461 

462Everything so far assumes one human, one Claude, and one conversation. But Claude Code scales horizontally. The techniques in this section show how you can get more done.462Everything so far assumes one human, one Claude, and one conversation. But Claude Code scales horizontally. The techniques in this section show how you can get more done.

463 463 

464### Run headless mode464### Run non-interactive mode

465 465 

466<Tip>466<Tip>

467 Use `claude -p "prompt"` in CI, pre-commit hooks, or scripts. Add `--output-format stream-json` for streaming JSON output.467 Use `claude -p "prompt"` in CI, pre-commit hooks, or scripts. Add `--output-format stream-json` for streaming JSON output.

468</Tip>468</Tip>

469 469 

470With `claude -p "your prompt"`, you can run Claude headlessly, without an interactive session. Headless mode is how you integrate Claude into CI pipelines, pre-commit hooks, or any automated workflow. The output formats (plain text, JSON, streaming JSON) let you parse results programmatically.470With `claude -p "your prompt"`, you can run Claude non-interactively, without a session. Non-interactive mode is how you integrate Claude into CI pipelines, pre-commit hooks, or any automated workflow. The output formats let you parse results programmatically: plain text, JSON, or streaming JSON.

471 471 

472```bash theme={null}472```bash theme={null}

473# One-off queries473# One-off queries


488 488 

489There are three main ways to run parallel sessions:489There are three main ways to run parallel sessions:

490 490 

491* [Claude Desktop](/en/desktop): Manage multiple local sessions visually. Each session gets its own isolated worktree.491* [Claude Code desktop app](/en/desktop#work-in-parallel-with-sessions): Manage multiple local sessions visually. Each session gets its own isolated worktree.

492* [Claude Code on the web](/en/claude-code-on-the-web): Run on Anthropic's secure cloud infrastructure in isolated VMs.492* [Claude Code on the web](/en/claude-code-on-the-web): Run on Anthropic's secure cloud infrastructure in isolated VMs.

493* [Agent teams](/en/agent-teams): Automated coordination of multiple sessions with shared tasks, messaging, and a team lead.493* [Agent teams](/en/agent-teams): Automated coordination of multiple sessions with shared tasks, messaging, and a team lead.

494 494 


539 539 

540Use `--verbose` for debugging during development, and turn it off in production.540Use `--verbose` for debugging during development, and turn it off in production.

541 541 

542### Safe Autonomous Mode542### Safe autonomous mode

543 543 

544Use `claude --dangerously-skip-permissions` to bypass all permission checks and let Claude work uninterrupted. This works well for workflows like fixing lint errors or generating boilerplate code.544Use `claude --dangerously-skip-permissions` to bypass all permission checks and let Claude work uninterrupted. This works well for workflows like fixing lint errors or generating boilerplate code.

545 545 


580 580 

581## Related resources581## Related resources

582 582 

583<CardGroup cols={2}>583* [How Claude Code works](/en/how-claude-code-works): the agentic loop, tools, and context management

584 <Card title="How Claude Code works" icon="gear" href="/en/how-claude-code-works">584* [Extend Claude Code](/en/features-overview): skills, hooks, MCP, subagents, and plugins

585 Understand the agentic loop, tools, and context management585* [Common workflows](/en/common-workflows): step-by-step recipes for debugging, testing, PRs, and more

586 </Card>586* [CLAUDE.md](/en/memory): store project conventions and persistent context

587 

588 <Card title="Extend Claude Code" icon="puzzle-piece" href="/en/features-overview">

589 Choose between skills, hooks, MCP, subagents, and plugins

590 </Card>

591 

592 <Card title="Common workflows" icon="list-check" href="/en/common-workflows">

593 Step-by-step recipes for debugging, testing, PRs, and more

594 </Card>

595 

596 <Card title="CLAUDE.md" icon="file-lines" href="/en/memory">

597 Store project conventions and persistent context

598 </Card>

599</CardGroup>

chrome.md +1 −1

Details

33* [Google Chrome](https://www.google.com/chrome/) or [Microsoft Edge](https://www.microsoft.com/edge) browser33* [Google Chrome](https://www.google.com/chrome/) or [Microsoft Edge](https://www.microsoft.com/edge) browser

34* [Claude in Chrome extension](https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn) version 1.0.36 or higher, available in the Chrome Web Store for both browsers34* [Claude in Chrome extension](https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn) version 1.0.36 or higher, available in the Chrome Web Store for both browsers

35* [Claude Code](/en/quickstart#step-1-install-claude-code) version 2.0.73 or higher35* [Claude Code](/en/quickstart#step-1-install-claude-code) version 2.0.73 or higher

36* A direct Anthropic plan (Pro, Max, Team, or Enterprise)36* A direct Anthropic plan (Pro, Max, Teams, or Enterprise)

37 37 

38<Note>38<Note>

39 Chrome integration is not available through third-party providers like Amazon Bedrock, Google Cloud Vertex AI, or Microsoft Foundry. If you access Claude exclusively through a third-party provider, you need a separate claude.ai account to use this feature.39 Chrome integration is not available through third-party providers like Amazon Bedrock, Google Cloud Vertex AI, or Microsoft Foundry. If you access Claude exclusively through a third-party provider, you need a separate claude.ai account to use this feature.

Details

20* **Repositories not on your local machine**: Work on code you don't have checked out locally20* **Repositories not on your local machine**: Work on code you don't have checked out locally

21* **Backend changes**: Where Claude Code can write tests and then write code to pass those tests21* **Backend changes**: Where Claude Code can write tests and then write code to pass those tests

22 22 

23Claude Code is also available on the Claude iOS app for kicking off tasks on the go and monitoring work in progress.23Claude Code is also available on the Claude app for [iOS](https://apps.apple.com/us/app/claude-by-anthropic/id6473753684) and [Android](https://play.google.com/store/apps/details?id=com.anthropic.claude) for kicking off tasks on the go and monitoring work in progress.

24 24 

25You can move between local and remote development: [send tasks from your terminal to run on the web](#from-terminal-to-web) with the `&` prefix, or [teleport web sessions back to your terminal](#from-web-to-terminal) to continue locally.25You can [kick off new tasks on the web from your terminal](#from-terminal-to-web) with `--remote`, or [teleport web sessions back to your terminal](#from-web-to-terminal) to continue locally. To use the web interface while running Claude Code on your own machine instead of cloud infrastructure, see [Remote Control](/en/remote-control).

26 26 

27## Who can use Claude Code on the web?27## Who can use Claude Code on the web?

28 28 


69 69 

70## Moving tasks between web and terminal70## Moving tasks between web and terminal

71 71 

72You can start tasks on the web and continue them in your terminal, or send tasks from your terminal to run on the web. Web sessions persist even if you close your laptop, and you can monitor them from anywhere including the Claude iOS app.72You can start new tasks on the web from your terminal, or pull web sessions into your terminal to continue locally. Web sessions persist even if you close your laptop, and you can monitor them from anywhere including the Claude mobile app.

73 73 

74<Note>74<Note>

75 Session handoff is one-way: you can pull web sessions into your terminal, but you can't push an existing terminal session to the web. The [`&` prefix](#from-terminal-to-web) creates a *new* web session with your current conversation context.75 Session handoff is one-way: you can pull web sessions into your terminal, but you can't push an existing terminal session to the web. The `--remote` flag creates a *new* web session for your current repository.

76</Note>76</Note>

77 77 

78### From terminal to web78### From terminal to web

79 79 

80Start a message with `&` inside Claude Code to send a task to run on the web:80Start a web session from the command line with the `--remote` flag:

81 

82```

83& Fix the authentication bug in src/auth/login.ts

84```

85 

86This creates a new web session on claude.ai with your current conversation context. The task runs in the cloud while you continue working locally. Use `/tasks` to check progress, or open the session on claude.ai or the Claude iOS app to interact directly. From there you can steer Claude, provide feedback, or answer questions just like any other conversation.

87 

88You can also start a web session directly from the command line:

89 81 

90```bash theme={null}82```bash theme={null}

91claude --remote "Fix the authentication bug in src/auth/login.ts"83claude --remote "Fix the authentication bug in src/auth/login.ts"

92```84```

93 85 

94#### Tips for background tasks86This creates a new web session on claude.ai. The task runs in the cloud while you continue working locally. Use `/tasks` to check progress, or open the session on claude.ai or the Claude mobile app to interact directly. From there you can steer Claude, provide feedback, or answer questions just like any other conversation.

87 

88#### Tips for remote tasks

95 89 

96**Plan locally, execute remotely**: For complex tasks, start Claude in plan mode to collaborate on the approach before sending work to the web:90**Plan locally, execute remotely**: For complex tasks, start Claude in plan mode to collaborate on the approach, then send work to the web:

97 91 

98```bash theme={null}92```bash theme={null}

99claude --permission-mode plan93claude --permission-mode plan

100```94```

101 95 

102In plan mode, Claude can only read files and explore the codebase. Once you're satisfied with the plan, send it to the web for autonomous execution:96In plan mode, Claude can only read files and explore the codebase. Once you're satisfied with the plan, start a remote session for autonomous execution:

103 97 

104```98```bash theme={null}

105& Execute the migration plan we discussed99claude --remote "Execute the migration plan in docs/migration-plan.md"

106```100```

107 101 

108This pattern gives you control over the strategy while letting Claude execute autonomously in the cloud.102This pattern gives you control over the strategy while letting Claude execute autonomously in the cloud.

109 103 

110**Run tasks in parallel**: Each `&` command creates its own web session that runs independently. You can kick off multiple tasks and they'll all run simultaneously in separate sessions:104**Run tasks in parallel**: Each `--remote` command creates its own web session that runs independently. You can kick off multiple tasks and they'll all run simultaneously in separate sessions:

111 105 

112```106```bash theme={null}

113& Fix the flaky test in auth.spec.ts107claude --remote "Fix the flaky test in auth.spec.ts"

114& Update the API documentation108claude --remote "Update the API documentation"

115& Refactor the logger to use structured output109claude --remote "Refactor the logger to use structured output"

116```110```

117 111 

118Monitor all sessions with `/tasks`. When a session completes, you can create a PR from the web interface or [teleport](#from-web-to-terminal) the session to your terminal to continue working.112Monitor all sessions with `/tasks`. When a session completes, you can create a PR from the web interface or [teleport](#from-web-to-terminal) the session to your terminal to continue working.


232 226 

233**To update an existing environment:** Select the current environment, to the right of the environment name, and select the settings button. This will open a dialog where you can update the environment name, network access, and environment variables.227**To update an existing environment:** Select the current environment, to the right of the environment name, and select the settings button. This will open a dialog where you can update the environment name, network access, and environment variables.

234 228 

235**To select your default environment from the terminal:** If you have multiple environments configured, run `/remote-env` to choose which one to use when starting web sessions from your terminal with `&` or `--remote`. With a single environment, this command shows your current configuration.229**To select your default environment from the terminal:** If you have multiple environments configured, run `/remote-env` to choose which one to use when starting web sessions from your terminal with `--remote`. With a single environment, this command shows your current configuration.

236 230 

237<Note>231<Note>

238 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:232 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:

239 233 

240 ```234 ```text theme={null}

241 API_KEY=your_api_key235 API_KEY=your_api_key

242 DEBUG=true236 DEBUG=true

243 ```237 ```

cli-reference.md +16 −8

Details

8 8 

9## CLI commands9## CLI commands

10 10 

11You can start sessions, pipe content, resume conversations, and manage updates with these commands:

12 

11| Command | Description | Example |13| Command | Description | Example |

12| :------------------------------ | :----------------------------------------------------- | :------------------------------------------------ |14| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------- |

13| `claude` | Start interactive REPL | `claude` |15| `claude` | Start interactive session | `claude` |

14| `claude "query"` | Start REPL with initial prompt | `claude "explain this project"` |16| `claude "query"` | Start interactive session with initial prompt | `claude "explain this project"` |

15| `claude -p "query"` | Query via SDK, then exit | `claude -p "explain this function"` |17| `claude -p "query"` | Query via SDK, then exit | `claude -p "explain this function"` |

16| `cat file \| claude -p "query"` | Process piped content | `cat logs.txt \| claude -p "explain"` |18| `cat file \| claude -p "query"` | Process piped content | `cat logs.txt \| claude -p "explain"` |

17| `claude -c` | Continue most recent conversation in current directory | `claude -c` |19| `claude -c` | Continue most recent conversation in current directory | `claude -c` |

18| `claude -c -p "query"` | Continue via SDK | `claude -c -p "Check for type errors"` |20| `claude -c -p "query"` | Continue via SDK | `claude -c -p "Check for type errors"` |

19| `claude -r "<session>" "query"` | Resume session by ID or name | `claude -r "auth-refactor" "Finish this PR"` |21| `claude -r "<session>" "query"` | Resume session by ID or name | `claude -r "auth-refactor" "Finish this PR"` |

20| `claude update` | Update to latest version | `claude update` |22| `claude update` | Update to latest version | `claude update` |

23| `claude auth login` | Sign in to your Anthropic account. Use `--email` to pre-fill your email address and `--sso` to force SSO authentication | `claude auth login --email user@example.com --sso` |

24| `claude auth logout` | Log out from your Anthropic account | `claude auth logout` |

25| `claude auth status` | Show authentication status as JSON. Use `--text` for human-readable output. Exits with code 0 if logged in, 1 if not | `claude auth status` |

26| `claude agents` | List all configured [subagents](/en/sub-agents), grouped by source | `claude agents` |

21| `claude mcp` | Configure Model Context Protocol (MCP) servers | See the [Claude Code MCP documentation](/en/mcp). |27| `claude mcp` | Configure Model Context Protocol (MCP) servers | See the [Claude Code MCP documentation](/en/mcp). |

28| `claude remote-control` | Start a [Remote Control session](/en/remote-control) to control Claude Code from Claude.ai or the Claude app while running locally. See [Remote Control](/en/remote-control) for flags | `claude remote-control` |

22 29 

23## CLI flags30## CLI flags

24 31 


53| `--max-budget-usd` | Maximum dollar amount to spend on API calls before stopping (print mode only) | `claude -p --max-budget-usd 5.00 "query"` |60| `--max-budget-usd` | Maximum dollar amount to spend on API calls before stopping (print mode only) | `claude -p --max-budget-usd 5.00 "query"` |

54| `--max-turns` | Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached. No limit by default | `claude -p --max-turns 3 "query"` |61| `--max-turns` | Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached. No limit by default | `claude -p --max-turns 3 "query"` |

55| `--mcp-config` | Load MCP servers from JSON files or strings (space-separated) | `claude --mcp-config ./mcp.json` |62| `--mcp-config` | Load MCP servers from JSON files or strings (space-separated) | `claude --mcp-config ./mcp.json` |

56| `--model` | Sets the model for the current session with an alias for the latest model (`sonnet` or `opus`) or a model's full name | `claude --model claude-sonnet-4-5-20250929` |63| `--model` | Sets the model for the current session with an alias for the latest model (`sonnet` or `opus`) or a model's full name | `claude --model claude-sonnet-4-6` |

57| `--no-chrome` | Disable [Chrome browser integration](/en/chrome) for this session | `claude --no-chrome` |64| `--no-chrome` | Disable [Chrome browser integration](/en/chrome) for this session | `claude --no-chrome` |

58| `--no-session-persistence` | Disable session persistence so sessions are not saved to disk and cannot be resumed (print mode only) | `claude -p --no-session-persistence "query"` |65| `--no-session-persistence` | Disable session persistence so sessions are not saved to disk and cannot be resumed (print mode only) | `claude -p --no-session-persistence "query"` |

59| `--output-format` | Specify output format for print mode (options: `text`, `json`, `stream-json`) | `claude -p "query" --output-format json` |66| `--output-format` | Specify output format for print mode (options: `text`, `json`, `stream-json`) | `claude -p "query" --output-format json` |


74| `--tools` | Restrict which built-in tools Claude can use (works in both interactive and print modes). Use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"` | `claude --tools "Bash,Edit,Read"` |81| `--tools` | Restrict which built-in tools Claude can use (works in both interactive and print modes). Use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"` | `claude --tools "Bash,Edit,Read"` |

75| `--verbose` | Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes) | `claude --verbose` |82| `--verbose` | Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes) | `claude --verbose` |

76| `--version`, `-v` | Output the version number | `claude -v` |83| `--version`, `-v` | Output the version number | `claude -v` |

84| `--worktree`, `-w` | Start Claude in an isolated [git worktree](/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees) at `<repo>/.claude/worktrees/<name>`. If no name is given, one is auto-generated | `claude -w feature-auth` |

77 85 

78<Tip>86<Tip>

79 The `--output-format json` flag is particularly useful for scripting and87 The `--output-format json` flag is particularly useful for scripting and


127 135 

128**When to use each:**136**When to use each:**

129 137 

130* **`--system-prompt`**: Use when you need complete control over Claude's system prompt. This removes all default Claude Code instructions, giving you a blank slate.138* **`--system-prompt`**: use when you need complete control over Claude's system prompt. This removes all default Claude Code instructions, giving you a blank slate.

131 ```bash theme={null}139 ```bash theme={null}

132 claude --system-prompt "You are a Python expert who only writes type-annotated code"140 claude --system-prompt "You are a Python expert who only writes type-annotated code"

133 ```141 ```

134 142 

135* **`--system-prompt-file`**: Use when you want to load a custom prompt from a file, useful for team consistency or version-controlled prompt templates.143* **`--system-prompt-file`**: use when you want to load a custom prompt from a file, useful for team consistency or version-controlled prompt templates.

136 ```bash theme={null}144 ```bash theme={null}

137 claude -p --system-prompt-file ./prompts/code-review.txt "Review this PR"145 claude -p --system-prompt-file ./prompts/code-review.txt "Review this PR"

138 ```146 ```

139 147 

140* **`--append-system-prompt`**: Use when you want to add specific instructions while keeping Claude Code's default capabilities intact. This is the safest option for most use cases.148* **`--append-system-prompt`**: use when you want to add specific instructions while keeping Claude Code's default capabilities intact. This is the safest option for most use cases.

141 ```bash theme={null}149 ```bash theme={null}

142 claude --append-system-prompt "Always use TypeScript and include JSDoc comments"150 claude --append-system-prompt "Always use TypeScript and include JSDoc comments"

143 ```151 ```

144 152 

145* **`--append-system-prompt-file`**: Use when you want to append instructions from a file while keeping Claude Code's defaults. Useful for version-controlled additions.153* **`--append-system-prompt-file`**: use when you want to append instructions from a file while keeping Claude Code's defaults. Useful for version-controlled additions.

146 ```bash theme={null}154 ```bash theme={null}

147 claude -p --append-system-prompt-file ./prompts/style-rules.txt "Review this PR"155 claude -p --append-system-prompt-file ./prompts/style-rules.txt "Review this PR"

148 ```156 ```

common-workflows.md +115 −51

Details

240 240 

241You can switch into Plan Mode during a session using **Shift+Tab** to cycle through permission modes.241You can switch into Plan Mode during a session using **Shift+Tab** to cycle through permission modes.

242 242 

243If you are in Normal Mode, **Shift+Tab** first switches into Auto-Accept Mode, indicated by `⏵⏵ accept edits on` at the bottom of the terminal. A subsequent **Shift+Tab** will switch into Plan Mode, indicated by `⏸ plan mode on`. When an [agent team](/en/agent-teams) is active, the cycle also includes Delegate Mode.243If you are in Normal Mode, **Shift+Tab** first switches into Auto-Accept Mode, indicated by `⏵⏵ accept edits on` at the bottom of the terminal. A subsequent **Shift+Tab** will switch into Plan Mode, indicated by `⏸ plan mode on`.

244 244 

245**Start a new session in Plan Mode**245**Start a new session in Plan Mode**

246 246 


540 540 

541**With other models**, thinking uses a fixed budget of up to 31,999 tokens from your output budget. You can limit this with the [`MAX_THINKING_TOKENS`](/en/settings#environment-variables) environment variable, or disable thinking entirely via `/config` or the `Option+T`/`Alt+T` toggle.541**With other models**, thinking uses a fixed budget of up to 31,999 tokens from your output budget. You can limit this with the [`MAX_THINKING_TOKENS`](/en/settings#environment-variables) environment variable, or disable thinking entirely via `/config` or the `Option+T`/`Alt+T` toggle.

542 542 

543`MAX_THINKING_TOKENS` is ignored when using Opus 4.6, since adaptive reasoning controls thinking depth instead. The one exception: setting `MAX_THINKING_TOKENS=0` still disables thinking entirely on any model.543`MAX_THINKING_TOKENS` is ignored on Opus 4.6 and Sonnet 4.6, since adaptive reasoning controls thinking depth instead. The one exception: setting `MAX_THINKING_TOKENS=0` still disables thinking entirely on any model. To disable adaptive thinking and revert to the fixed thinking budget, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1`. See [environment variables](/en/settings#environment-variables).

544 544 

545<Warning>545<Warning>

546 You're charged for all thinking tokens used, even though Claude 4 models show summarized thinking546 You're charged for all thinking tokens used, even though Claude 4 models show summarized thinking


642 642 

643## Run parallel Claude Code sessions with Git worktrees643## Run parallel Claude Code sessions with Git worktrees

644 644 

645Suppose you need to work on multiple tasks simultaneously with complete code isolation between Claude Code instances.645When working on multiple tasks at once, you need each Claude session to have its own copy of the codebase so changes don't collide. Git worktrees solve this by creating separate working directories that each have their own files and branch, while sharing the same repository history and remote connections. This means you can have Claude working on a feature in one worktree while fixing a bug in another, without either session interfering with the other.

646 

647Use the `--worktree` (`-w`) flag to create an isolated worktree and start Claude in it. The value you pass becomes the worktree directory name and branch name:

648 

649```bash theme={null}

650# Start Claude in a worktree named "feature-auth"

651# Creates .claude/worktrees/feature-auth/ with a new branch

652claude --worktree feature-auth

653 

654# Start another session in a separate worktree

655claude --worktree bugfix-123

656```

657 

658If you omit the name, Claude generates a random one automatically:

659 

660```bash theme={null}

661# Auto-generates a name like "bright-running-fox"

662claude --worktree

663```

664 

665Worktrees are created at `<repo>/.claude/worktrees/<name>` and branch from the default remote branch. The worktree branch is named `worktree-<name>`.

666 

667You can also ask Claude to "work in a worktree" or "start a worktree" during a session, and it will create one automatically.

668 

669### Subagent worktrees

670 

671Subagents can also use worktree isolation to work in parallel without conflicts. Ask Claude to "use worktrees for your agents" or configure it in a [custom subagent](/en/sub-agents#supported-frontmatter-fields) by adding `isolation: worktree` to the agent's frontmatter. Each subagent gets its own worktree that is automatically cleaned up when the subagent finishes without changes.

672 

673### Worktree cleanup

674 

675When you exit a worktree session, Claude handles cleanup based on whether you made changes:

676 

677* **No changes**: the worktree and its branch are removed automatically

678* **Changes or commits exist**: Claude prompts you to keep or remove the worktree. Keeping preserves the directory and branch so you can return later. Removing deletes the worktree directory and its branch, discarding all uncommitted changes and commits

679 

680To clean up worktrees outside of a Claude session, use [manual worktree management](#manage-worktrees-manually).

681 

682<Tip>

683 Add `.claude/worktrees/` to your `.gitignore` to prevent worktree contents from appearing as untracked files in your main repository.

684</Tip>

685 

686### Manage worktrees manually

687 

688For more control over worktree location and branch configuration, create worktrees with Git directly. This is useful when you need to check out a specific existing branch or place the worktree outside the repository.

689 

690```bash theme={null}

691# Create a worktree with a new branch

692git worktree add ../project-feature-a -b feature-a

693 

694# Create a worktree with an existing branch

695git worktree add ../project-bugfix bugfix-123

696 

697# Start Claude in the worktree

698cd ../project-feature-a && claude

699 

700# Clean up when done

701git worktree list

702git worktree remove ../project-feature-a

703```

704 

705Learn more in the [official Git worktree documentation](https://git-scm.com/docs/git-worktree).

706 

707<Tip>

708 Remember to initialize your development environment in each new worktree according to your project's setup. Depending on your stack, this might include running dependency installation (`npm install`, `yarn`), setting up virtual environments, or following your project's standard setup process.

709</Tip>

710 

711### Non-git version control

712 

713Worktree isolation works with git by default. For other version control systems like SVN, Perforce, or Mercurial, configure [WorktreeCreate and WorktreeRemove hooks](/en/hooks#worktreecreate) to provide custom worktree creation and cleanup logic. When configured, these hooks replace the default git behavior when you use `--worktree`.

714 

715For automated coordination of parallel sessions with shared tasks and messaging, see [agent teams](/en/agent-teams).

716 

717***

718 

719## Get notified when Claude needs your attention

720 

721When you kick off a long-running task and switch to another window, you can set up desktop notifications so you know when Claude finishes or needs your input. This uses the `Notification` [hook event](/en/hooks-guide#get-notified-when-claude-needs-input), which fires whenever Claude is waiting for permission, idle and ready for a new prompt, or completing authentication.

646 722 

647<Steps>723<Steps>

648 <Step title="Understand Git worktrees">724 <Step title="Open the hooks menu">

649 Git worktrees allow you to check out multiple branches from the same725 Type `/hooks` and select `Notification` from the list of events.

650 repository into separate directories. Each worktree has its own working

651 directory with isolated files, while sharing the same Git history. Learn

652 more in the [official Git worktree

653 documentation](https://git-scm.com/docs/git-worktree).

654 </Step>726 </Step>

655 727 

656 <Step title="Create a new worktree">728 <Step title="Configure the matcher">

657 ```bash theme={null}729 Select `+ Match all (no filter)` to fire on all notification types. To notify only for specific events, select `+ Add new matcher…` and enter one of these values:

658 # Create a new worktree with a new branch

659 git worktree add ../project-feature-a -b feature-a

660 

661 # Or create a worktree with an existing branch

662 git worktree add ../project-bugfix bugfix-123

663 ```

664 730 

665 This creates a new directory with a separate working copy of your repository.731 | Matcher | Fires when |

732 | :------------------- | :---------------------------------------------- |

733 | `permission_prompt` | Claude needs you to approve a tool use |

734 | `idle_prompt` | Claude is done and waiting for your next prompt |

735 | `auth_success` | Authentication completes |

736 | `elicitation_dialog` | Claude is asking you a question |

666 </Step>737 </Step>

667 738 

668 <Step title="Run Claude Code in each worktree">739 <Step title="Add your notification command">

669 ```bash theme={null}740 Select `+ Add new hook…` and enter the command for your OS:

670 # Navigate to your worktree 741 

671 cd ../project-feature-a742 <Tabs>

743 <Tab title="macOS">

744 Uses [`osascript`](https://ss64.com/mac/osascript.html) to trigger a native macOS notification through AppleScript:

672 745 

673 # Run Claude Code in this isolated environment

674 claude

675 ```746 ```

676 </Step>747 osascript -e 'display notification "Claude Code needs your attention" with title "Claude Code"'

748 ```

749 </Tab>

750 

751 <Tab title="Linux">

752 Uses `notify-send`, which is pre-installed on most Linux desktops with a notification daemon:

677 753 

678 <Step title="Run Claude in another worktree">

679 ```bash theme={null}

680 cd ../project-bugfix

681 claude

682 ```754 ```

683 </Step>755 notify-send 'Claude Code' 'Claude Code needs your attention'

756 ```

757 </Tab>

684 758 

685 <Step title="Manage your worktrees">759 <Tab title="Windows (PowerShell)">

686 ```bash theme={null}760 Uses PowerShell to show a native message box through .NET's Windows Forms:

687 # List all worktrees

688 git worktree list

689 761 

690 # Remove a worktree when done

691 git worktree remove ../project-feature-a

692 ```762 ```

763 powershell.exe -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')"

764 ```

765 </Tab>

766 </Tabs>

693 </Step>767 </Step>

694</Steps>

695 768 

696<Tip>769 <Step title="Save to user settings">

697 Tips:770 Select `User settings` to apply the notification across all your projects.

698 771 </Step>

699 * Each worktree has its own independent file state, making it perfect for parallel Claude Code sessions772</Steps>

700 * Changes made in one worktree won't affect others, preventing Claude instances from interfering with each other

701 * All worktrees share the same Git history and remote connections

702 * For long-running tasks, you can have Claude working in one worktree while you continue development in another

703 * Use descriptive directory names to easily identify which task each worktree is for

704 * Remember to initialize your development environment in each new worktree according to your project's setup. Depending on your stack, this might include:

705 * JavaScript projects: Running dependency installation (`npm install`, `yarn`)

706 * Python projects: Setting up virtual environments or installing with package managers

707 * Other languages: Following your project's standard setup process

708</Tip>

709 773 

710For automated coordination of parallel sessions with shared tasks and messaging, see [agent teams](/en/agent-teams).774For the full walkthrough with JSON configuration examples, see [Automate workflows with hooks](/en/hooks-guide#get-notified-when-claude-needs-input). For the complete event schema and notification types, see the [Notification reference](/en/hooks#notification).

711 775 

712***776***

713 777 

costs.md +2 −2

Details

8 8 

9Claude Code consumes tokens for each interaction. Costs vary based on codebase size, query complexity, and conversation length. The average cost is \$6 per developer per day, with daily costs remaining below \$12 for 90% of users.9Claude Code consumes tokens for each interaction. Costs vary based on codebase size, query complexity, and conversation length. The average cost is \$6 per developer per day, with daily costs remaining below \$12 for 90% of users.

10 10 

11For team usage, Claude Code charges by API token consumption. On average, Claude Code costs \~\$100-200/developer per month with Sonnet 4.5 though there is large variance depending on how many instances users are running and whether they're using it in automation.11For team usage, Claude Code charges by API token consumption. On average, Claude Code costs \~\$100-200/developer per month with Sonnet 4.6 though there is large variance depending on how many instances users are running and whether they're using it in automation.

12 12 

13This page covers how to [track your costs](#track-your-costs), [manage costs for teams](#managing-costs-for-teams), and [reduce token usage](#reduce-token-usage).13This page covers how to [track your costs](#track-your-costs), [manage costs for teams](#managing-costs-for-teams), and [reduce token usage](#reduce-token-usage).

14 14 


22 22 

23The `/cost` command provides detailed token usage statistics for your current session:23The `/cost` command provides detailed token usage statistics for your current session:

24 24 

25```25```text theme={null}

26Total cost: $0.5526Total cost: $0.55

27Total duration (API): 6m 19.7s27Total duration (API): 6m 19.7s

28Total duration (wall): 6h 33m 10.2s28Total duration (wall): 6h 33m 10.2s

data-usage.md +2 −2

Details

51 51 

52## Data access52## Data access

53 53 

54For all first party users, you can learn more about what data is logged for [local Claude Code](#local-claude-code-data-flow-and-dependencies) and [remote Claude Code](#cloud-execution-data-flow-and-dependencies). Note for remote Claude Code, Claude accesses the repository where you initiate your Claude Code session. Claude does not access repositories that you have connected but have not started a session in.54For all first party users, you can learn more about what data is logged for [local Claude Code](#local-claude-code-data-flow-and-dependencies) and [remote Claude Code](#cloud-execution-data-flow-and-dependencies). [Remote Control](/en/remote-control) sessions follow the local data flow since all execution happens on your machine. Note for remote Claude Code, Claude accesses the repository where you initiate your Claude Code session. Claude does not access repositories that you have connected but have not started a session in.

55 55 

56## Local Claude Code: Data flow and dependencies56## Local Claude Code: Data flow and dependencies

57 57 

58The diagram below shows how Claude Code connects to external services during installation and normal operation. Solid lines indicate required connections, while dashed lines represent optional or user-initiated data flows.58The diagram below shows how Claude Code connects to external services during installation and normal operation. Solid lines indicate required connections, while dashed lines represent optional or user-initiated data flows.

59 59 

60<img src="https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=9e77f476347e7c9983f6e211d27cf6a9" alt="Diagram showing Claude Code's external connections: install/update connects to NPM, and user requests connect to Anthropic services including Console auth, public-api, and optionally Statsig, Sentry, and bug reporting" data-og-width="720" width="720" data-og-height="520" height="520" data-path="images/claude-code-data-flow.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=280&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=94c033b9b6db3d10b9e2d7c6d681d9dc 280w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=560&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=430aaaf77c28c501d5753ffa456ee227 560w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=840&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=63c3c3f160b522220a8291fe2f93f970 840w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=1100&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=a7f6e838482f4a1a0a0b4683439369ea 1100w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=1650&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=5fbf749c2f94babb3ef72edfb7aba1e9 1650w, https://mintcdn.com/claude-code/I9Dpo7RZuIbc86cX/images/claude-code-data-flow.svg?w=2500&fit=max&auto=format&n=I9Dpo7RZuIbc86cX&q=85&s=7a1babbdccc4986957698d9c5c30c4a8 2500w" />60<img src="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/claude-code-data-flow.svg?fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=e0239c69a0bbae485b726338e50f1082" alt="Diagram showing Claude Code's external connections: install/update connects to NPM, and user requests connect to Anthropic services including Console auth, public-api, and optionally Statsig, Sentry, and bug reporting" data-og-width="720" width="720" data-og-height="520" height="520" data-path="images/claude-code-data-flow.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/claude-code-data-flow.svg?w=280&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=06435e080df22e66a454e99af1b6040b 280w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/claude-code-data-flow.svg?w=560&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=8261c15b4ffc12504e0a6e3f0ccd8c7d 560w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/claude-code-data-flow.svg?w=840&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=163bfaa8d4727a1bbb492cb086e5f083 840w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/claude-code-data-flow.svg?w=1100&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=ea3c2f801dfa5ad956b18b5f72df5c50 1100w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/claude-code-data-flow.svg?w=1650&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=91d743def7a8d074c93001b351f23037 1650w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/claude-code-data-flow.svg?w=2500&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=df68b2dd6de83316f70fd7f61c3a3bbd 2500w" />

61 61 

62Claude Code is installed from [NPM](https://www.npmjs.com/package/@anthropic-ai/claude-code). Claude Code runs locally. In order to interact with the LLM, Claude Code sends data over the network. This data includes all user prompts and model outputs. The data is encrypted in transit via TLS and is not encrypted at rest. Claude Code is compatible with most popular VPNs and LLM proxies.62Claude Code is installed from [NPM](https://www.npmjs.com/package/@anthropic-ai/claude-code). Claude Code runs locally. In order to interact with the LLM, Claude Code sends data over the network. This data includes all user prompts and model outputs. The data is encrypted in transit via TLS and is not encrypted at rest. Claude Code is compatible with most popular VPNs and LLM proxies.

63 63 

desktop.md +416 −174

Details

2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt

3> Use this file to discover all available pages before exploring further.3> Use this file to discover all available pages before exploring further.

4 4 

5# Claude Code on desktop5# Use Claude Code Desktop

6 6 

7> Run Claude Code tasks locally or on secure cloud infrastructure with the Claude desktop app7> Get more out of Claude Code Desktop: parallel sessions with Git isolation, visual diff review, app previews, PR monitoring, permission modes, connectors, and enterprise configuration.

8 8 

9<Note>9The Code tab within the Claude Desktop app lets you use Claude Code through a graphical interface instead of the terminal.

10 Claude Code on desktop is currently in preview.

11</Note>

12 10 

13Claude Code is an AI coding assistant that works directly with your codebase. Unlike Claude.ai chat, it can read your project files, edit code, run terminal commands, and understand how different parts of your code connect. You watch changes happen in real time.11Desktop adds these capabilities on top of the standard Claude Code experience:

14 12 

15You can use Claude Code through the terminal ([CLI](/en/quickstart)) or through the desktop app described here. Both provide the same core capabilities. The desktop app adds a graphical interface and visual session management.13* Visual diff review with inline comments

14* Live app preview with dev servers

15* GitHub PR monitoring with auto-fix and auto-merge

16* Parallel sessions with automatic Git worktree isolation

17* Connectors for GitHub, Slack, Linear, and more

18* Local, [SSH](#ssh-sessions), and [cloud](#run-long-running-tasks-remotely) environments

16 19 

17<CardGroup cols={2}>20<Tip>

18 <Card title="New to Claude Code?" icon="rocket" href="#installation-and-setup">21 New to Desktop? Start with [Get started](/en/desktop-quickstart) to install the app and make your first edit.

19 Start here to install and make your first edit22</Tip>

20 </Card>

21 23 

22 <Card title="Coming from the CLI?" icon="terminal" href="#how-desktop-relates-to-cli">24This page covers [working with code](#work-with-code), [managing sessions](#manage-sessions), [extending Claude Code](#extend-claude-code), and [configuration](#environment-configuration). It also includes a [CLI comparison](#coming-from-the-cli) and [troubleshooting](#troubleshooting).

23 See what's shared and what's different

24 </Card>

25</CardGroup>

26 25 

27The desktop app has three tabs:26## Start a session

28 27 

29* **Chat**: A conversational interface for general questions and tasks (like Claude.ai)28Before you send your first message, configure four things in the prompt area:

30* **Cowork**: An autonomous agent that works on tasks in the background

31* **Code**: An AI coding assistant that reads and edits your project files directly

32 29 

33This documentation covers the **Code** tab. For the chat interface, see the [Claude Desktop support articles](https://support.claude.com/en/collections/16163169-claude-desktop).30* **Environment**: choose where Claude runs. Select **Local** for your machine, **Remote** for Anthropic-hosted cloud sessions, or an [**SSH connection**](#ssh-sessions) for a remote machine you manage. See [environment configuration](#environment-configuration).

31* **Project folder**: select the folder or repository Claude works in. For remote sessions, you can add [multiple repositories](#run-long-running-tasks-remotely).

32* **Model**: pick a [model](/en/model-config#available-models) from the dropdown next to the send button. The model is locked once the session starts.

33* **Permission mode**: choose how much autonomy Claude has from the [mode selector](#choose-a-permission-mode). You can change this during the session.

34 34 

35## Installation and setup35Type your task and press **Enter** to start. Each session tracks its own context and changes independently.

36 36 

37<Steps>37## Work with code

38 <Step title="Download the app">

39 Download Claude for your platform. You'll need an Anthropic account ([sign up at claude.ai](https://claude.ai) if you don't have one).

40 38 

41 <CardGroup cols={2}>39Give Claude the right context, control how much it does on its own, and review what it changed.

42 <Card title="macOS" icon="apple" href="https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs">

43 Universal build for Intel and Apple Silicon

44 </Card>

45 40 

46 <Card title="Windows" icon="windows" href="https://claude.ai/api/desktop/win32/x64/exe/latest/redirect?utm_source=claude_code&utm_medium=docs">41### Use the prompt box

47 For x64 processors

48 </Card>

49 </CardGroup>

50 42 

51 For Windows ARM64, [download here](https://claude.ai/api/desktop/win32/arm64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs). Local sessions are not available on ARM64 devices, so use remote sessions instead.43Type what you want Claude to do and press **Enter** to send. Claude reads your project files, makes changes, and runs commands based on your [permission mode](#choose-a-permission-mode). You can interrupt Claude at any point: click the stop button or type your correction and press **Enter**. Claude stops what it's doing and adjusts based on your input.

52 44 

53 Linux is not currently supported.45The **+** button next to the prompt box gives you access to file attachments, [skills](#use-skills), [connectors](#connect-external-tools), and [plugins](#install-plugins).

54 </Step>

55 46 

56 <Step title="Open the app and sign in">47### Add files and context to prompts

57 Launch Claude from your Applications folder (macOS) or Start menu (Windows). Sign in with your Anthropic account.

58 </Step>

59 48 

60 <Step title="Select the Code tab">49The prompt box supports two ways to bring in external context:

61 Click the **Code** tab in the top left. If clicking Code prompts you to sign in online, complete the sign-in and restart the app.

62 </Step>

63</Steps>

64 50 

65## Getting started51* **@mention files**: type `@` followed by a filename to add a file to the conversation context. Claude can then read and reference that file.

52* **Attach files**: attach images, PDFs, and other files to your prompt using the attachment button, or drag and drop files directly into the prompt. This is useful for sharing screenshots of bugs, design mockups, or reference documents.

66 53 

67If you already use the CLI, you can skip to [How Desktop relates to CLI](#how-desktop-relates-to-cli) for a quick overview of differences.54### Choose a permission mode

68 55 

69<Steps>56Permission modes control how much autonomy Claude has during a session: whether it asks before editing files, running commands, or both. You can switch modes at any time using the mode selector next to the send button. Start with Ask permissions to see exactly what Claude does, then move to Auto accept edits or Plan mode as you get comfortable.

70 <Step title="Choose a folder and environment">

71 Select **Local** to run Claude on your machine using your files directly. This is the best choice for getting started. Click **Select folder** and choose your project directory.

72 57 

73 You can also run [remote sessions](/en/claude-code-on-the-web) that continue in the cloud even if you close the app.58| Mode | Settings key | Behavior |

74 </Step>59| ---------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

60| **Ask permissions** | `default` | Claude asks before editing files or running commands. You see a diff and can accept or reject each change. Recommended for new users. |

61| **Auto accept edits** | `acceptEdits` | Claude auto-accepts file edits but still asks before running terminal commands. Use this when you trust file changes and want faster iteration. |

62| **Plan mode** | `plan` | Claude analyzes your code and creates a plan without modifying files or running commands. Good for complex tasks where you want to review the approach first. |

63| **Bypass permissions** | `bypassPermissions` | Claude runs without any permission prompts, equivalent to `--dangerously-skip-permissions` in the CLI. Enable in your Settings → Claude Code under "Allow bypass permissions mode". Only use this in sandboxed containers or VMs. Enterprise admins can disable this option. |

75 64 

76 <Step title="Start a session">65The `dontAsk` permission mode is available only in the [CLI](/en/permissions#permission-modes).

77 Type what you want Claude to do:

78 66 

79 * "Find a TODO comment and fix it"67<Tip title="Best practice">

80 * "Add tests for the main function"68 Start complex tasks in Plan mode so Claude maps out an approach before making changes. Once you approve the plan, switch to Auto accept edits or Ask permissions to execute it. See [explore first, then plan, then code](/en/best-practices#explore-first-then-plan-then-code) for more on this workflow.

81 * "Create a CLAUDE.md with instructions for this codebase"69</Tip>

82 70 

83 A **session** is a conversation with Claude about your code. Each session tracks its own context and changes, so you can work on multiple tasks without them interfering with each other.71Remote sessions support Auto accept edits and Plan mode. Ask permissions is not available because remote sessions auto-accept file edits by default, and Bypass permissions is not available because the remote environment is already sandboxed.

84 </Step>

85 72 

86 <Step title="Review and accept changes">73Enterprise admins can restrict which permission modes are available. See [enterprise configuration](#enterprise-configuration) for details.

87 By default, Code is in **Ask** mode, where Claude proposes changes and waits for your approval before applying them. You'll see:

88 74 

89 1. **A diff view** showing exactly what will change in each file75### Preview your app

90 2. **Accept/Reject buttons** to approve or decline each change

91 3. **Real-time updates** as Claude works through your request

92 76 

93 If you reject a change, Claude will ask how you'd like to proceed differently. Your files aren't modified until you accept.77Claude can start a dev server and open an embedded browser to verify its changes. This works for frontend web apps as well as backend servers: Claude can test API endpoints, view server logs, and iterate on issues it finds. In most cases, Claude starts the server automatically after editing project files. You can also ask Claude to preview at any time. By default, Claude [auto-verifies](#auto-verify-changes) changes after every edit.

94 </Step>

95</Steps>

96 78 

97The sections below cover commands, permission modes, parallel sessions, and ways to extend Claude Code with custom workflows and integrations.79From the preview panel, you can:

98 80 

99## What you can do81* Interact with your running app directly in the embedded browser

82* Watch Claude verify its own changes automatically: it takes screenshots, inspects the DOM, clicks elements, fills forms, and fixes issues it finds

83* Start or stop servers from the **Preview** dropdown in the session toolbar

84* Persist cookies and local storage across server restarts by selecting **Persist sessions** in the dropdown, so you don't have to re-login during development

85* Edit the server configuration or stop all servers at once

100 86 

101Claude Code can edit files, run terminal commands, and understand how your code connects. Try prompts like:87Claude creates the initial server configuration based on your project. If your app uses a custom dev command, edit `.claude/launch.json` to match your setup. See [Configure preview servers](#configure-preview-servers) for the full reference.

102 88 

103* `Fix the bug in the login function`89To clear saved session data, toggle **Persist preview sessions** off in Settings Claude Code. To disable preview entirely, toggle off **Preview** in Settings → Claude Code.

104* `Run the tests and fix any failures`

105* `How does the authentication flow work?`

106 90 

107You can rename, resume, and archive sessions through the sidebar.91### Review changes with diff view

108 92 

109### Choose a permission mode93After Claude makes changes to your code, the diff view lets you review modifications file by file before creating a pull request.

110 94 

111Control how Claude works using the mode selector next to the send button:95When Claude changes files, a diff stats indicator appears showing the number of lines added and removed, such as `+12 -1`. Click this indicator to open the diff viewer, which displays a file list on the left and the changes for each file on the right.

112 96 

113* **Ask** (recommended for new users): Claude asks for your approval before each file edit or command. You see a diff view and can accept or reject each change.97To comment on specific lines, click any line in the diff to open a comment box. Type your feedback and press **Enter** to add the comment. After adding comments to multiple lines, submit all comments at once:

114* **Code**: Claude auto-accepts file edits but still asks before running terminal commands. Use this when you trust file changes and want faster iteration.

115* **Plan**: Claude creates a detailed plan for your approval before making any changes. Good for complex tasks where you want to review the approach first.

116* **Act**: Claude runs without permission checks, automatically executing file edits and terminal commands. Only use this mode in trusted environments.

117 98 

118<Warning title="Act mode">99* **macOS**: press **Cmd+Enter**

119 Act runs in `bypassPermissions` mode, which disables all permission checks and should only be used in isolated environments like containers or VMs where Claude Code cannot cause damage. This mode is disabled by default. For personal accounts, enable it in [Claude Code personal settings](https://claude.ai/settings/claude-code). For Team and Enterprise plans, admins must enable it in [Claude Code admin settings](https://claude.ai/admin-settings/claude-code). Act mode does not persist across sessions.100* **Windows**: press **Ctrl+Enter**

120</Warning>

121 101 

122To stop Claude mid-task, click the stop button.102Claude reads your comments and makes the requested changes, which appear as a new diff you can review.

123 103 

124Remote sessions only support **Code** and **Plan** modes because they continue running in the background without requiring your active participation. See [permission modes](/en/permissions#permission-modes) for details on how these work internally.104### Review your code

125 105 

126### Work in parallel with sessions106In the diff view, click **Review code** in the top-right toolbar to ask Claude to evaluate the changes before you commit. Claude examines the current diffs and leaves comments directly in the diff view. You can respond to any comment or ask Claude to revise.

107 

108The review focuses on high-signal issues: compile errors, definite logic errors, security vulnerabilities, and obvious bugs. It does not flag style, formatting, pre-existing issues, or anything a linter would catch.

109 

110### Monitor pull request status

127 111 

128Click **+ New session** in the sidebar to work on multiple tasks in parallel. For Git repositories, each session gets its own isolated copy of your project using worktrees, so changes in one session don't affect another until you commit them. Worktrees are stored in `~/.claude-worktrees/` by default.112After you open a pull request, a CI status bar appears in the session. Claude Code uses the GitHub CLI to poll check results and surface failures.

113 

114* **Auto-fix**: when enabled, Claude automatically attempts to fix failing CI checks by reading the failure output and iterating.

115* **Auto-merge**: when enabled, Claude merges the PR once all checks pass. The merge method is squash. Auto-merge must be [enabled in your GitHub repository settings](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) for this to work.

116 

117Use the **Auto-fix** and **Auto-merge** toggles in the CI status bar to enable either option. Claude Code also sends a desktop notification when CI finishes.

129 118 

130<Note>119<Note>

131 Session isolation requires [Git](https://git-scm.com/downloads). Without Git, sessions in the same directory edit the same files, so changes in one session are immediately visible in others.120 PR monitoring requires the [GitHub CLI (`gh`)](https://cli.github.com/) to be installed and authenticated on your machine. If `gh` is not installed, Desktop prompts you to install it the first time you try to create a PR.

132</Note>121</Note>

133 122 

134To include files listed in your `.gitignore` (like `.env`) in new worktrees, create a `.worktreeinclude` file in your project root listing the file patterns to copy.123## Manage sessions

135 124 

136To manage a session, click its dropdown in the sidebar to rename it, archive it, or check context usage. When context fills up, Claude automatically summarizes the conversation. You can also ask Claude to compact if you want to free up space earlier.125Each session is an independent conversation with its own context and changes. You can run multiple sessions in parallel or send work to the cloud.

126 

127### Work in parallel with sessions

128 

129Click **+ New session** in the sidebar to work on multiple tasks in parallel. For Git repositories, each session gets its own isolated copy of your project using [Git worktrees](/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees), so changes in one session don't affect other sessions until you commit them.

130 

131Worktrees are stored in `<project-root>/.claude/worktrees/` by default. You can change this to a custom directory in Settings → Claude Code under "Worktree location". You can also set a branch prefix that gets prepended to every worktree branch name, which is useful for keeping Claude-created branches organized. To remove a worktree when you're done, hover over the session in the sidebar and click the archive icon.

132 

133<Note>

134 Session isolation requires [Git](https://git-scm.com/downloads). Most Macs include Git by default. Run `git --version` in Terminal to check. On Windows, Git is required for the Code tab to work: [download Git for Windows](https://git-scm.com/downloads/win), install it, and restart the app. If you run into Git errors, try a Cowork session to help troubleshoot your setup.

135</Note>

136 

137Use the filter icon at the top of the sidebar to filter sessions by status (Active, Archived) and environment (Local, Cloud). To rename a session or check context usage, click the session title in the toolbar at the top of the active session. When context fills up, Claude automatically summarizes the conversation and continues working. You can also type `/compact` to trigger summarization earlier and free up context space. See [the context window](/en/how-claude-code-works#the-context-window) for details on how compaction works.

137 138 

138### Run long-running tasks remotely139### Run long-running tasks remotely

139 140 

140For large refactors, test suites, migrations, or other long-running tasks, select **Remote** instead of **Local** when starting a session. Remote sessions run on Anthropic's cloud infrastructure and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction.141For large refactors, test suites, migrations, or other long-running tasks, select **Remote** instead of **Local** when starting a session. Remote sessions run on Anthropic's cloud infrastructure and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction. You can also monitor remote sessions from [claude.ai/code](https://claude.ai/code) or the Claude iOS app.

141 142 

142Remote sessions support **Code** and **Plan** modes. See [Claude Code on the web](/en/claude-code-on-the-web) for details on configuring remote environments.143Remote sessions also support multiple repositories. After selecting a cloud environment, click the **+** button next to the repo pill to add additional repositories to the session. Each repo gets its own branch selector. This is useful for tasks that span multiple codebases, such as updating a shared library and its consumers.

143 144 

144### Review changes with diff view145See [Claude Code on the web](/en/claude-code-on-the-web) for more on how remote sessions work.

145 146 

146After Claude makes changes to your code, the diff view lets you review modifications file by file before creating a pull request.147### Continue in another surface

147 148 

148When Claude changes files, a diff stats indicator appears showing the number of lines added and removed (for example, `+12 -1`). Click this indicator to open the diff viewer, which displays a file list on the left and the changes for each file on the right.149The **Continue in** menu, accessible from the VS Code icon in the bottom right of the session toolbar, lets you move your session to another surface:

149 150 

150To comment on specific lines, click any line in the diff to open a comment box. Type your feedback and press **Enter** to send. In the full diff view, press **Enter** to accept each comment, then **Cmd+Enter** to send them all. Claude reads your comments and makes the requested changes, which appear as a new diff you can review.151* **Claude Code on the Web**: sends your local session to continue running remotely. Desktop pushes your branch, generates a summary of the conversation, and creates a new remote session with the full context. You can then choose to archive the local session or keep it. This requires a clean working tree, and is not available for SSH sessions.

152* **Your IDE**: opens your project in a supported IDE at the current working directory.

151 153 

152## Extend Claude Code154## Extend Claude Code

153 155 

154You can extend Claude Code with custom commands, automated workflows, and external integrations.156Connect external services, add reusable workflows, customize Claude's behavior, and configure preview servers.

155 157 

156### Connect external tools158### Connect external tools

157 159 

158For local sessions, click the **...** button before starting and select **Connectors** to add integrations like Google Calendar, Slack, GitHub, Linear, Notion, and more. Connectors must be configured before the session starts and are only available for local sessions. Once connected, Claude can read your calendar, send messages, create issues, and interact with your tools directly. You can ask Claude what connectors are configured in your session.160For local and [SSH](#ssh-sessions) sessions, click the **+** button next to the prompt box and select **Connectors** to add integrations like Google Calendar, Slack, GitHub, Linear, Notion, and more. You can add connectors before or during a session. Connectors are not available for remote sessions.

161 

162To manage or disconnect connectors, go to Settings → Connectors in the desktop app, or select **Manage connectors** from the Connectors menu in the prompt box.

163 

164Once connected, Claude can read your calendar, send messages, create issues, and interact with your tools directly. You can ask Claude what connectors are configured in your session.

159 165 

160Connectors are [MCP (Model Context Protocol) servers](/en/mcp) with built-in setup. You can also [create custom connectors](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp) or add MCP servers manually via [configuration files](/en/mcp#configure-mcp-servers).166Connectors are [MCP servers](/en/mcp) with a graphical setup flow. Use them for quick integration with supported services. For integrations not listed in Connectors, add MCP servers manually via [settings files](/en/mcp#installing-mcp-servers). You can also [create custom connectors](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp).

161 167 

162### Create custom skills168### Use skills

163 169 

164[Skills](/en/skills) are reusable prompts that extend Claude's capabilities. For example, you could create a `review` skill that runs your standard code review checklist, or a `deploy` skill that walks through your deployment steps. Skills are defined as markdown files in `.claude/skills/` and can include instructions, context, and even call other tools. Ask Claude what skills are available or to run a specific skill. Claude can also help you create a skill if you describe what you want, or see [skills](/en/skills) to learn how to write them yourself.170[Skills](/en/skills) extend what Claude can do. Claude loads them automatically when relevant, or you can invoke one directly: type `/` in the prompt box or click the **+** button and select **Slash commands** to browse what's available. This includes [built-in commands](/en/interactive-mode#built-in-commands), your [custom skills](/en/skills#create-custom-skills), project skills from your codebase, and skills from any [installed plugins](/en/plugins). Select one and it appears highlighted in the input field. Type your task after it and send as usual.

165 171 

166### Automate workflows with hooks172### Install plugins

167 173 

168[Hooks](/en/hooks) run shell commands automatically in response to Claude Code events. For example, you could run a linter after every file edit, auto-format code, or send notifications when tasks complete. Hooks are configured in your [settings files](/en/settings). See [hooks](/en/hooks) for available events and configuration examples.174[Plugins](/en/plugins) are reusable packages that add skills, agents, hooks, MCP servers, and LSP configurations to Claude Code. You can install plugins from the desktop app without using the terminal.

175 

176For local and [SSH](#ssh-sessions) sessions, click the **+** button next to the prompt box and select **Plugins** to see your installed plugins and their commands. To add a plugin, select **Add plugin** from the submenu to open the plugin browser, which shows available plugins from your configured [marketplaces](/en/plugin-marketplaces) including the official Anthropic marketplace. Select **Manage plugins** to enable, disable, or uninstall plugins.

177 

178Plugins can be scoped to your user account, a specific project, or local-only. Plugins are not available for remote sessions. For the full plugin reference including creating your own plugins, see [plugins](/en/plugins).

179 

180### Configure preview servers

181 

182Claude automatically detects your dev server setup and stores the configuration in `.claude/launch.json` at the root of the folder you selected when starting the session. Preview uses this folder as its working directory, so if you selected a parent folder, subfolders with their own dev servers won't be detected automatically. To work with a subfolder's server, either start a session in that folder directly or add a configuration manually.

183 

184To customize how your server starts, for example to use `yarn dev` instead of `npm run dev` or to change the port, edit the file manually or click **Edit configuration** in the Preview dropdown to open it in your code editor. The file supports JSON with comments.

185 

186```json theme={null}

187{

188 "version": "0.0.1",

189 "configurations": [

190 {

191 "name": "my-app",

192 "runtimeExecutable": "npm",

193 "runtimeArgs": ["run", "dev"],

194 "port": 3000

195 }

196 ]

197}

198```

199 

200You can define multiple configurations to run different servers from the same project, such as a frontend and an API. See the [examples](#examples) below.

201 

202#### Auto-verify changes

203 

204When `autoVerify` is enabled, Claude automatically verifies code changes after editing files. It takes screenshots, checks for errors, and confirms changes work before completing its response.

205 

206Auto-verify is on by default. Disable it per-project by adding `"autoVerify": false` to `.claude/launch.json`, or toggle it from the **Preview** dropdown menu.

207 

208```json theme={null}

209{

210 "version": "0.0.1",

211 "autoVerify": false,

212 "configurations": [...]

213}

214```

215 

216When disabled, preview tools are still available and you can ask Claude to verify at any time. Auto-verify makes it automatic after every edit.

217 

218#### Configuration fields

219 

220Each entry in the `configurations` array accepts the following fields:

221 

222| Field | Type | Description |

223| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

224| `name` | string | A unique identifier for this server |

225| `runtimeExecutable` | string | The command to run, such as `npm`, `yarn`, or `node` |

226| `runtimeArgs` | string\[] | Arguments passed to `runtimeExecutable`, such as `["run", "dev"]` |

227| `port` | number | The port your server listens on. Defaults to 3000 |

228| `cwd` | string | Working directory relative to your project root. Defaults to the project root. Use `${workspaceFolder}` to reference the project root explicitly |

229| `env` | object | Additional environment variables as key-value pairs, such as `{ "NODE_ENV": "development" }`. Don't put secrets here since this file is committed to your repo. Secrets set in your shell profile are inherited automatically. |

230| `autoPort` | boolean | How to handle port conflicts. See below |

231| `program` | string | A script to run with `node`. See [when to use `program` vs `runtimeExecutable`](#when-to-use-program-vs-runtimeexecutable) |

232| `args` | string\[] | Arguments passed to `program`. Only used when `program` is set |

233 

234##### When to use `program` vs `runtimeExecutable`

235 

236Use `runtimeExecutable` with `runtimeArgs` to start a dev server through a package manager. For example, `"runtimeExecutable": "npm"` with `"runtimeArgs": ["run", "dev"]` runs `npm run dev`.

237 

238Use `program` when you have a standalone script you want to run with `node` directly. For example, `"program": "server.js"` runs `node server.js`. Pass additional flags with `args`.

239 

240#### Port conflicts

241 

242The `autoPort` field controls what happens when your preferred port is already in use:

243 

244* **`true`**: Claude finds and uses a free port automatically. Suitable for most dev servers.

245* **`false`**: Claude fails with an error. Use this when your server must use a specific port, such as for OAuth callbacks or CORS allowlists.

246* **Not set (default)**: Claude asks whether the server needs that exact port, then saves your answer.

247 

248When Claude picks a different port, it passes the assigned port to your server via the `PORT` environment variable.

249 

250#### Examples

251 

252These configurations show common setups for different project types:

253 

254<Tabs>

255 <Tab title="Next.js">

256 This configuration runs a Next.js app using Yarn on port 3000:

257 

258 ```json theme={null}

259 {

260 "version": "0.0.1",

261 "configurations": [

262 {

263 "name": "web",

264 "runtimeExecutable": "yarn",

265 "runtimeArgs": ["dev"],

266 "port": 3000

267 }

268 ]

269 }

270 ```

271 </Tab>

272 

273 <Tab title="Multiple servers">

274 For a monorepo with a frontend and an API server, define multiple configurations. The frontend uses `autoPort: true` so it picks a free port if 3000 is taken, while the API server requires port 8080 exactly:

275 

276 ```json theme={null}

277 {

278 "version": "0.0.1",

279 "configurations": [

280 {

281 "name": "frontend",

282 "runtimeExecutable": "npm",

283 "runtimeArgs": ["run", "dev"],

284 "cwd": "apps/web",

285 "port": 3000,

286 "autoPort": true

287 },

288 {

289 "name": "api",

290 "runtimeExecutable": "npm",

291 "runtimeArgs": ["run", "start"],

292 "cwd": "server",

293 "port": 8080,

294 "env": { "NODE_ENV": "development" },

295 "autoPort": false

296 }

297 ]

298 }

299 ```

300 </Tab>

301 

302 <Tab title="Node.js script">

303 To run a Node.js script directly instead of using a package manager command, use the `program` field:

304 

305 ```json theme={null}

306 {

307 "version": "0.0.1",

308 "configurations": [

309 {

310 "name": "server",

311 "program": "server.js",

312 "args": ["--verbose"],

313 "port": 4000

314 }

315 ]

316 }

317 ```

318 </Tab>

319</Tabs>

169 320 

170## Environment configuration321## Environment configuration

171 322 

172When starting a session, you choose between **Local** (runs on your machine) or **Remote** (runs on Anthropic's cloud).323When starting a session, you choose between three environments:

324 

325* **Local**: runs on your machine with direct access to your files

326* **Remote**: runs on Anthropic's cloud infrastructure. Sessions continue even if you close the app.

327* **SSH**: runs on a remote machine you connect to over SSH, such as your own servers, cloud VMs, or dev containers

328 

329### Local sessions

330 

331Local sessions inherit environment variables from your shell. If you need additional variables, set them in your shell profile, such as `~/.zshrc` or `~/.bashrc`, and restart the desktop app. See [environment variables](/en/settings#environment-variables) for the full list of supported variables.

332 

333[Extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. To disable thinking entirely, set `MAX_THINKING_TOKENS=0` in your shell profile. On Opus, `MAX_THINKING_TOKENS` is ignored except for `0` because adaptive reasoning controls thinking depth instead.

334 

335### Remote sessions

336 

337Remote sessions continue in the background even if you close the app. Usage counts toward your [subscription plan limits](/en/costs) with no separate compute charges.

338 

339You can create custom cloud environments with different network access levels and environment variables. Select the environment dropdown when starting a remote session and choose **Add environment**. See [cloud environments](/en/claude-code-on-the-web#cloud-environment) for details on configuring network access and environment variables.

340 

341### SSH sessions

342 

343SSH sessions let you run Claude Code on a remote machine while using the desktop app as your interface. This is useful for working with codebases that live on cloud VMs, dev containers, or servers with specific hardware or dependencies.

173 344 

174**Local sessions** inherit environment variables from your shell. If you need additional variables, set them in your shell profile (`~/.zshrc`, `~/.bashrc`) and restart the desktop app. See [environment variables](/en/settings#environment-variables) for the full list of supported variables.345To add an SSH connection, click the environment dropdown before starting a session and select **+ Add SSH connection**. The dialog asks for:

175 346 

176[Extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. The thinking process runs in the background but isn't displayed in the Desktop interface. To disable it or adjust the budget, set `MAX_THINKING_TOKENS` in your shell profile (use `0` to disable).347* **Name**: a friendly label for this connection

348* **SSH Host**: `user@hostname` or a host defined in `~/.ssh/config`

349* **SSH Port**: defaults to 22 if left empty, or uses the port from your SSH config

350* **Identity File**: path to your private key, such as `~/.ssh/id_rsa`. Leave empty to use the default key or your SSH config.

177 351 

178**Remote sessions** run on Anthropic's cloud infrastructure and continue even if you close the app. Usage counts toward your subscription plan limits with no separate compute charges. See [Claude Code on the web](/en/claude-code-on-the-web) for details on configuring remote environments.352Once added, the connection appears in the environment dropdown. Select it to start a session on that machine. Claude runs on the remote machine with access to its files and tools.

179 353 

180## How Desktop relates to CLI354Claude Code must be installed on the remote machine. Once connected, SSH sessions support permission modes, connectors, plugins, and MCP servers.

181 355 

182If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each maintains separate session history, but they share configuration and project memory (CLAUDE.md files).356## Enterprise configuration

357 

358Organizations on Teams or Enterprise plans can manage desktop app behavior through admin console controls, managed settings files, and device management policies.

359 

360### Admin console controls

361 

362These settings are configured through the [admin settings console](https://claude.ai/admin-settings/claude-code):

363 

364* **Enable or disable the Code tab**: control whether users in your organization can access Claude Code in the desktop app

365* **Disable Bypass permissions mode**: prevent users in your organization from enabling bypass permissions mode

366* **Disable Claude Code on the web**: enable or disable remote sessions for your organization

367 

368### Managed settings

369 

370Managed settings override project and user settings and apply when Desktop spawns CLI sessions. You can set these keys in your organization's [managed settings](/en/settings#settings-precedence) file or push them remotely through the admin console.

371 

372| Key | Description |

373| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |

374| `disableBypassPermissionsMode` | set to `"disable"` to prevent users from enabling Bypass permissions mode. See [managed settings](/en/permissions#managed-only-settings). |

375 

376For the complete list of managed-only settings including `allowManagedPermissionRulesOnly` and `allowManagedHooksOnly`, see [managed-only settings](/en/permissions#managed-only-settings).

377 

378Remote managed settings uploaded through the admin console currently apply to CLI and IDE sessions only. For Desktop-specific restrictions, use the admin console controls above.

379 

380### Device management policies

381 

382IT teams can manage the desktop app through MDM on macOS or group policy on Windows. Available policies include enabling or disabling the Claude Code feature, controlling auto-updates, and setting a custom deployment URL.

383 

384* **macOS**: configure via `com.anthropic.Claude` preference domain using tools like Jamf or Kandji

385* **Windows**: configure via registry at `SOFTWARE\Policies\Claude`

386 

387### Authentication and SSO

388 

389Enterprise organizations can require SSO for all users. See [authentication](/en/authentication) for plan-level details and [Setting up SSO](https://support.claude.com/en/articles/13132885-setting-up-single-sign-on-sso) for SAML and OIDC configuration.

390 

391### Data handling

392 

393Claude Code processes your code locally in local sessions or on Anthropic's cloud infrastructure in remote sessions. Conversations and code context are sent to Anthropic's API for processing. See [data handling](/en/data-usage) for details on data retention, privacy, and compliance.

394 

395### Deployment

396 

397Desktop can be distributed through enterprise deployment tools:

398 

399* **macOS**: distribute via MDM such as Jamf or Kandji using the `.dmg` installer

400* **Windows**: deploy via MSIX package or `.exe` installer. See [Deploy Claude Desktop for Windows](https://support.claude.com/en/articles/12622703-deploy-claude-desktop-for-windows) for enterprise deployment options including silent installation

401 

402For network configuration such as proxy settings, firewall allowlisting, and LLM gateways, see [network configuration](/en/network-config).

403 

404For the full enterprise configuration reference, see the [enterprise configuration guide](https://support.claude.com/en/articles/12622667-enterprise-configuration).

405 

406## Coming from the CLI?

407 

408If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each maintains separate session history, but they share configuration and project memory via CLAUDE.md files.

409 

410To move a CLI session into Desktop, run `/desktop` in the terminal. Claude saves your session and opens it in the desktop app, then exits the CLI. This command is available on macOS and Windows only.

411 

412<Tip>

413 When to use Desktop vs CLI: use Desktop when you want visual diff review, file attachments, or session management in a sidebar. Use the CLI when you need scripting, automation, third-party providers, or prefer a terminal workflow.

414</Tip>

183 415 

184### CLI flag equivalents416### CLI flag equivalents

185 417 

186If you're used to CLI flags, the table below shows the Desktop equivalent for each. Some flags have no Desktop equivalent because they're designed for scripting or automation.418This table shows the desktop app equivalent for common CLI flags. Flags not listed have no desktop equivalent because they are designed for scripting or automation.

187 419 

188| CLI | Desktop equivalent |420| CLI | Desktop equivalent |

189| ------------------------------------- | ---------------------------------------------- |421| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |

190| `--model sonnet` | **...** menu > Model (before starting session) |422| `--model sonnet` | model dropdown next to the send button, before starting a session |

191| `--resume`, `--continue` | Click a session in the sidebar |423| `--resume`, `--continue` | click a session in the sidebar |

192| `--allowedTools`, `--disallowedTools` | Not available in Desktop |424| `--permission-mode` | mode selector next to the send button |

193| `--dangerously-skip-permissions` | Not available in Desktop |425| `--dangerously-skip-permissions` | Bypass permissions mode. Enable in Settings → Claude Code → "Allow bypass permissions mode". Enterprise admins can disable this setting. |

194| `--print` | Not available (Desktop is interactive) |426| `--add-dir` | add multiple repos with the **+** button in remote sessions |

427| `--allowedTools`, `--disallowedTools` | not available in Desktop |

428| `--verbose` | not available. Check system logs: Console.app on macOS, Event Viewer → Windows Logs → Application on Windows |

429| `--print`, `--output-format` | not available. Desktop is interactive only. |

430| `ANTHROPIC_MODEL` env var | model dropdown next to the send button |

431| `MAX_THINKING_TOKENS` env var | set in shell profile; applies to local sessions. See [environment configuration](#environment-configuration). |

195 432 

196### Shared configuration433### Shared configuration

197 434 


200* **[CLAUDE.md](/en/memory)** and **CLAUDE.local.md** files in your project are used by both437* **[CLAUDE.md](/en/memory)** and **CLAUDE.local.md** files in your project are used by both

201* **[MCP servers](/en/mcp)** configured in `~/.claude.json` or `.mcp.json` work in both438* **[MCP servers](/en/mcp)** configured in `~/.claude.json` or `.mcp.json` work in both

202* **[Hooks](/en/hooks)** and **[skills](/en/skills)** defined in settings apply to both439* **[Hooks](/en/hooks)** and **[skills](/en/skills)** defined in settings apply to both

203* **[Settings](/en/settings)** in `~/.claude.json` and `~/.claude/settings.json` are shared440* **[Settings](/en/settings)** in `~/.claude.json` and `~/.claude/settings.json` are shared. Permission rules, allowed tools, and other settings in `settings.json` apply to Desktop sessions.

204* **Models** (Sonnet, Opus, Haiku) are available in both (Desktop requires selecting before starting a session)441* **Models**: Sonnet, Opus, and Haiku are available in both. In Desktop, select the model from the dropdown next to the send button before starting a session. You cannot change the model during an active session.

205 442 

206<Note>443<Note>

207 MCP servers configured for the **Claude Desktop chat app** (in `claude_desktop_config.json`) are separate from Claude Code. To use MCP servers in Claude Code, configure them in `~/.claude.json` or your project's `.mcp.json` file. See [MCP configuration](/en/mcp#configure-mcp-servers) for details.444 **MCP servers: desktop chat app vs Claude Code**: MCP servers configured for the Claude Desktop chat app in `claude_desktop_config.json` are separate from Claude Code and will not appear in the Code tab. To use MCP servers in Claude Code, configure them in `~/.claude.json` or your project's `.mcp.json` file. See [MCP configuration](/en/mcp#installing-mcp-servers) for details.

208</Note>445</Note>

209 446 

210### What's different447### Feature comparison

211 448 

212**Desktop adds:**449This table compares core capabilities between the CLI and Desktop. For a full list of CLI flags, see the [CLI reference](/en/cli-reference).

213 450 

214* Graphical interface with visual session management451| Feature | CLI | Desktop |

215* Built-in connectors for common integrations452| ----------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------- |

216* Automatic session isolation for Git repositories (each session gets its own worktree)453| Permission modes | all modes including `dontAsk` | Ask permissions, Auto accept edits, Plan mode, and Bypass permissions via Settings |

454| `--dangerously-skip-permissions` | CLI flag | Bypass permissions mode. Enable in Settings → Claude Code → "Allow bypass permissions mode" |

455| [Third-party providers](/en/third-party-integrations) | Bedrock, Vertex, Foundry | not available. Desktop connects to Anthropic's API directly. |

456| [MCP servers](/en/mcp) | configure in settings files | Connectors UI for local and SSH sessions, or settings files |

457| [Plugins](/en/plugins) | `/plugin` command | plugin manager UI |

458| @mention files | text-based | with autocomplete |

459| File attachments | not available | images, PDFs |

460| Session isolation | [`--worktree`](/en/cli-reference) flag | automatic worktrees |

461| Multiple sessions | separate terminals | sidebar tabs |

462| Scripting and automation | [`--print`](/en/cli-reference), [Agent SDK](/en/headless) | not available |

217 463 

218**CLI adds:**464### What's not available in Desktop

219 465 

220* [Third-party API providers](/en/third-party-integrations) (Bedrock, Vertex, Foundry). If you use these, continue using CLI for those projects.466The following features are only available in the CLI or VS Code extension:

221* [CLI flags](/en/cli-reference) for scripting (`--print`, `--resume`, `--continue`)

222* [Programmatic usage](/en/headless) via the Agent SDK

223 467 

224## Troubleshooting468* **Third-party providers**: Desktop connects to Anthropic's API directly. Use the [CLI](/en/quickstart) with Bedrock, Vertex, or Foundry instead.

469* **Linux**: the desktop app is available on macOS and Windows only.

470* **Inline code suggestions**: Desktop does not provide autocomplete-style suggestions. It works through conversational prompts and explicit code changes.

471* **Agent teams**: multi-agent orchestration is available via the [CLI](/en/agent-teams) and [Agent SDK](/en/headless), not in Desktop.

225 472 

226Solutions to common issues with the Claude desktop app. For CLI issues, see [CLI troubleshooting](/en/troubleshooting).473## Troubleshooting

227 474 

228### Check your version475### Check your version

229 476 

230To see which version of the desktop app you're running:477To see which version of the desktop app you're running:

231 478 

232* **macOS**: Click **Claude** in the menu bar, then **About Claude**479* **macOS**: click **Claude** in the menu bar, then **About Claude**

233* **Windows**: Click **Help**, then **About**480* **Windows**: click **Help**, then **About**

234 481 

235Click the version number to copy it to your clipboard.482Click the version number to copy it to your clipboard.

236 483 

237### "Branch doesn't exist yet" when opening in CLI484### 403 or authentication errors in the Code tab

238 485 

239Remote sessions can create branches that don't exist on your local machine. Click the branch name in the session toolbar to copy it, then fetch it locally:486If you see `Error 403: Forbidden` or other authentication failures when using the Code tab:

240 487 

241```bash theme={null}4881. Sign out and back in from the app menu. This is the most common fix.

242git fetch origin <branch-name>4892. Verify you have an active paid subscription: Pro, Max, Teams, or Enterprise.

243git checkout <branch-name>4903. If the CLI works but Desktop does not, quit the desktop app completely, not just close the window, then reopen and sign in again.

244```4914. Check your internet connection and proxy settings.

245 492 

246### "Failed to load session" error493### Blank or stuck screen on launch

247 494 

248This error can occur for several reasons:495If the app opens but shows a blank or unresponsive screen:

249 496 

250* The selected folder no longer exists or is inaccessible4971. Restart the app.

251* A Git repository requires Git LFS but it's not installed (see [Git LFS errors](#git-lfs-errors))4982. Check for pending updates. The app auto-updates on launch.

252* File permissions prevent access to the project directory4993. On Windows, check Event Viewer for crash logs under **Windows Logs → Application**.

253 500 

254Try selecting a different folder or restarting the desktop app.501### "Failed to load session"

255 502 

256### App won't quit503If you see `Failed to load session`, the selected folder may no longer exist, a Git repository may require Git LFS that isn't installed, or file permissions may prevent access. Try selecting a different folder or restarting the app.

257 504 

258If the desktop app doesn't close properly:505### Session not finding installed tools

259 506 

260* **macOS**: Press Cmd+Q. If the app doesn't respond, use Force Quit (Cmd+Option+Esc, select Claude, click Force Quit).507If Claude can't find tools like `npm`, `node`, or other CLI commands, verify the tools work in your regular terminal, check that your shell profile properly sets up PATH, and restart the desktop app to reload environment variables.

261* **Windows**: Use Task Manager (Ctrl+Shift+Esc) to end the Claude process.

262 508 

263### Windows installation issues509### Git and Git LFS errors

264 510 

265If the installer fails silently or doesn't complete properly:511On Windows, Git is required for the Code tab to start local sessions. If you see "Git is required," install [Git for Windows](https://git-scm.com/downloads/win) and restart the app.

266 512 

2671. **PATH not updated**: After installation, open a new terminal window. The PATH updates only apply to new terminal sessions.513If you see "Git LFS is required by this repository but is not installed," install Git LFS from [git-lfs.com](https://git-lfs.com/), run `git lfs install`, and restart the app.

2682. **Concurrent installation error**: If you see an error about another installation in progress but there isn't one, try running the installer as Administrator.

269 514 

270### Session not finding installed tools515### MCP servers not working on Windows

271 516 

272If Claude can't find tools like `npm`, `node`, or other CLI commands:517If MCP server toggles don't respond or servers fail to connect on Windows, check that the server is properly configured in your settings, restart the app, verify the server process is running in Task Manager, and review server logs for connection errors.

273 518 

2741. Verify the tools work in your regular terminal519### App won't quit

2752. Check that your shell profile (`~/.zshrc`, `~/.bashrc`) properly sets up PATH

2763. Restart the desktop app to reload environment variables

277 520 

278### MCP servers not working (Windows)521* **macOS**: press Cmd+Q. If the app doesn't respond, use Force Quit with Cmd+Option+Esc, select Claude, and click Force Quit.

522* **Windows**: use Task Manager with Ctrl+Shift+Esc to end the Claude process.

279 523 

280If MCP server toggles don't respond or servers fail to connect on Windows:524### Windows-specific issues

281 525 

2821. Check that the MCP server is properly configured in your settings526* **PATH not updated after install**: open a new terminal window. PATH updates only apply to new terminal sessions.

2832. Restart the desktop app after making changes527* **Concurrent installation error**: if you see an error about another installation in progress but there isn't one, try running the installer as Administrator.

2843. Verify the MCP server process is running (check Task Manager)528* **ARM64**: Windows ARM64 devices are fully supported.

2854. Review the server logs for connection errors

286 529 

287### Git LFS errors530### Cowork tab unavailable on Intel Macs

288 531 

289If you see "Git LFS is required by this repository but is not installed," your repository uses Git Large File Storage for large binary files. Install Git LFS before opening this repository:532The Cowork tab requires Apple Silicon (M1 or later) on macOS. On Windows, Cowork is available on all supported hardware. The Chat and Code tabs work normally on Intel Macs.

290 533 

2911. Install Git LFS from [git-lfs.com](https://git-lfs.com/)534### "Branch doesn't exist yet" when opening in CLI

2922. Run `git lfs install` in your terminal

2933. Restart the desktop app

294 535 

295## Enterprise configuration536Remote sessions can create branches that don't exist on your local machine. Click the branch name in the session toolbar to copy it, then fetch it locally:

537 

538```bash theme={null}

539git fetch origin <branch-name>

540git checkout <branch-name>

541```

296 542 

297Organizations can disable local Claude Code use in the desktop application with the `isClaudeCodeForDesktopEnabled` [enterprise policy option](https://support.claude.com/en/articles/12622667-enterprise-configuration#h_003283c7cb). Additionally, Claude Code on the web can be disabled in your [admin settings](https://claude.ai/admin-settings/claude-code).543### Still stuck?

298 544 

299## Related resources545* Search or file a bug on [GitHub Issues](https://github.com/anthropics/claude-code/issues)

546* Visit the [Claude support center](https://support.claude.com/)

300 547 

301* [Claude Code on the web](/en/claude-code-on-the-web): Run remote sessions that continue in the cloud548When filing a bug, include your desktop app version, your operating system, the exact error message, and relevant logs. On macOS, check Console.app. On Windows, check Event Viewer → Windows Logs → Application.

302* [CLI reference](/en/cli-reference): Use Claude Code in your terminal with flags and scripting

303* [Common workflows](/en/common-workflows): Tutorials for debugging, refactoring, testing, and more

304* [Settings reference](/en/settings): Configure Claude Code behavior with settings files

305* [Claude Desktop support](https://support.claude.com/en/collections/16163169-claude-desktop): Help articles for the Chat tab and general desktop app usage

306* [Enterprise configuration](https://support.claude.com/en/articles/12622667-enterprise-configuration): Admin policies for organizational deployments

desktop-quickstart.md +137 −0 added

Details

1> ## Documentation Index

2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt

3> Use this file to discover all available pages before exploring further.

4 

5# Get started with the desktop app

6 

7> Install Claude Code on desktop and start your first coding session

8 

9The desktop app gives you Claude Code with a graphical interface: visual diff review, live app preview, GitHub PR monitoring with auto-merge, parallel sessions with Git worktree isolation, and the ability to run tasks remotely. No terminal required.

10 

11This page walks through installing the app and starting your first session. If you're already set up, see [Use Claude Code Desktop](/en/desktop) for the full reference.

12 

13<Frame>

14 <img src="https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-light.png?fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=9a36a7a27b9f4c6f2e1c83bdb34f69ce" className="block dark:hidden" alt="The Claude Code Desktop interface showing the Code tab selected, with a prompt box, permission mode selector set to Ask permissions, model picker, folder selector, and Local environment option" data-og-width="2500" width="2500" data-og-height="1376" height="1376" data-path="images/desktop-code-tab-light.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-light.png?w=280&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=b4d1408a312d3ff3ac96dd133e4ef32b 280w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-light.png?w=560&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=c2d9f668767d4de33696b3de190c0024 560w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-light.png?w=840&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=89a78335d513c0ec2131feb11eeef6dc 840w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-light.png?w=1100&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=0ef93540eafcedd2fb0ad718553325f4 1100w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-light.png?w=1650&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=e7923c583f632de9f8a7e0e0da4f8c84 1650w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-light.png?w=2500&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=38d64bdceaba941a73446f258be336ea 2500w" />

15 

16 <img src="https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-dark.png?fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=5463defe81c459fb9b1f91f6a958cfb8" className="hidden dark:block" alt="The Claude Code Desktop interface in dark mode showing the Code tab selected, with a prompt box, permission mode selector set to Ask permissions, model picker, folder selector, and Local environment option" data-og-width="2504" width="2504" data-og-height="1374" height="1374" data-path="images/desktop-code-tab-dark.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-dark.png?w=280&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=f2a6322688262feb9d680b99c24817ab 280w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-dark.png?w=560&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=ffe9a3d1c4260fb12c66f533fdedc02e 560w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-dark.png?w=840&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=867b7997a910af3ffac1101559564dd7 840w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-dark.png?w=1100&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=976c9049c9e4cea2b02d4b6a1ef55142 1100w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-dark.png?w=1650&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=d8f3792ddadf66f61306dc41680aaa34 1650w, https://mintcdn.com/claude-code/CNLUpFGiXoc9mhvD/images/desktop-code-tab-dark.png?w=2500&fit=max&auto=format&n=CNLUpFGiXoc9mhvD&q=85&s=88d049488f547e483e8c4f59ea8b2fd8 2500w" />

17</Frame>

18 

19The desktop app has three tabs:

20 

21* **Chat**: General conversation with no file access, similar to claude.ai.

22* **Cowork**: An autonomous background agent that works on tasks in a cloud VM with its own environment. It can run independently while you do other work.

23* **Code**: An interactive coding assistant with direct access to your local files. You review and approve each change in real time.

24 

25Chat and Cowork are covered in the [Claude Desktop support articles](https://support.claude.com/en/collections/16163169-claude-desktop). This page focuses on the **Code** tab.

26 

27<Note>

28 Claude Code requires a [Pro, Max, Teams, or Enterprise subscription](https://claude.com/pricing).

29</Note>

30 

31## Install

32 

33<Steps>

34 <Step title="Download the app">

35 Download Claude for your platform.

36 

37 <CardGroup cols={2}>

38 <Card title="macOS" icon="apple" href="https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs">

39 Universal build for Intel and Apple Silicon

40 </Card>

41 

42 <Card title="Windows" icon="windows" href="https://claude.ai/api/desktop/win32/x64/exe/latest/redirect?utm_source=claude_code&utm_medium=docs">

43 For x64 processors

44 </Card>

45 </CardGroup>

46 

47 For Windows ARM64, [download here](https://claude.ai/api/desktop/win32/arm64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs).

48 

49 Linux is not currently supported.

50 </Step>

51 

52 <Step title="Sign in">

53 Launch Claude from your Applications folder (macOS) or Start menu (Windows). Sign in with your Anthropic account.

54 </Step>

55 

56 <Step title="Open the Code tab">

57 Click the **Code** tab at the top center. If clicking Code prompts you to upgrade, you need to [subscribe to a paid plan](https://claude.com/pricing) first. If it prompts you to sign in online, complete the sign-in and restart the app. If you see a 403 error, see [authentication troubleshooting](/en/desktop#403-or-authentication-errors-in-the-code-tab).

58 </Step>

59</Steps>

60 

61The desktop app includes Claude Code. You don't need to install Node.js or the CLI separately. To use `claude` from the terminal, install the CLI separately. See [Get started with the CLI](/en/quickstart).

62 

63## Start your first session

64 

65With the Code tab open, choose a project and give Claude something to do.

66 

67<Steps>

68 <Step title="Choose an environment and folder">

69 Select **Local** to run Claude on your machine using your files directly. Click **Select folder** and choose your project directory.

70 

71 <Tip>

72 Start with a small project you know well. It's the fastest way to see what Claude Code can do. On Windows, [Git](https://git-scm.com/downloads/win) must be installed for local sessions to work. Most Macs include Git by default.

73 </Tip>

74 

75 You can also select:

76 

77 * **Remote**: Run sessions on Anthropic's cloud infrastructure that continue even if you close the app. Remote sessions use the same infrastructure as [Claude Code on the web](/en/claude-code-on-the-web).

78 * **SSH**: Connect to a remote machine over SSH (your own servers, cloud VMs, or dev containers). Claude Code must be installed on the remote machine.

79 </Step>

80 

81 <Step title="Choose a model">

82 Select a model from the dropdown next to the send button. See [models](/en/model-config#available-models) for a comparison of Opus, Sonnet, and Haiku. You cannot change the model after the session starts.

83 </Step>

84 

85 <Step title="Tell Claude what to do">

86 Type what you want Claude to do:

87 

88 * `Find a TODO comment and fix it`

89 * `Add tests for the main function`

90 * `Create a CLAUDE.md with instructions for this codebase`

91 

92 A [session](/en/desktop#work-in-parallel-with-sessions) is a conversation with Claude about your code. Each session tracks its own context and changes, so you can work on multiple tasks without them interfering with each other.

93 </Step>

94 

95 <Step title="Review and accept changes">

96 By default, the Code tab starts in [Ask permissions mode](/en/desktop#choose-a-permission-mode), where Claude proposes changes and waits for your approval before applying them. You'll see:

97 

98 1. A [diff view](/en/desktop#review-changes-with-diff-view) showing exactly what will change in each file

99 2. Accept/Reject buttons to approve or decline each change

100 3. Real-time updates as Claude works through your request

101 

102 If you reject a change, Claude will ask how you'd like to proceed differently. Your files aren't modified until you accept.

103 </Step>

104</Steps>

105 

106## Now what?

107 

108You've made your first edit. For the full reference on everything Desktop can do, see [Use Claude Code Desktop](/en/desktop). Here are some things to try next.

109 

110**Interrupt and steer.** You can interrupt Claude at any point. If it's going down the wrong path, click the stop button or type your correction and press **Enter**. Claude stops what it's doing and adjusts based on your input. You don't have to wait for it to finish or start over.

111 

112**Give Claude more context.** Type `@filename` in the prompt box to pull a specific file into the conversation, attach images and PDFs using the attachment button, or drag and drop files directly into the prompt. The more context Claude has, the better the results. See [Add files and context](/en/desktop#add-files-and-context-to-prompts).

113 

114**Use skills for repeatable tasks.** Type `/` or click **+** → **Slash commands** to browse [built-in commands](/en/interactive-mode#built-in-commands), [custom skills](/en/skills), and plugin skills. Skills are reusable prompts you can invoke whenever you need them, like code review checklists or deployment steps.

115 

116**Review changes before committing.** After Claude edits files, a `+12 -1` indicator appears. Click it to open the [diff view](/en/desktop#review-changes-with-diff-view), review modifications file by file, and comment on specific lines. Claude reads your comments and revises. Click **Review code** to have Claude evaluate the diffs itself and leave inline suggestions.

117 

118**Adjust how much control you have.** Your [permission mode](/en/desktop#choose-a-permission-mode) controls the balance. Ask permissions (default) requires approval before every edit. Auto accept edits auto-accepts file edits for faster iteration. Plan mode lets Claude map out an approach without touching any files, which is useful before a large refactor.

119 

120**Add plugins for more capabilities.** Click the **+** button next to the prompt box and select **Plugins** to browse and install [plugins](/en/desktop#install-plugins) that add skills, agents, MCP servers, and more.

121 

122**Preview your app.** Click the **Preview** dropdown to run your dev server directly in the desktop. Claude can view the running app, test endpoints, inspect logs, and iterate on what it sees. See [Preview your app](/en/desktop#preview-your-app).

123 

124**Track your pull request.** After opening a PR, Claude Code monitors CI check results and can automatically fix failures or merge the PR once all checks pass. See [Monitor pull request status](/en/desktop#monitor-pull-request-status).

125 

126**Scale up when you're ready.** Open [parallel sessions](/en/desktop#work-in-parallel-with-sessions) from the sidebar to work on multiple tasks at once, each in its own Git worktree. Send [long-running work to the cloud](/en/desktop#run-long-running-tasks-remotely) so it continues even if you close the app, or [continue a session on the web or in your IDE](/en/desktop#continue-in-another-surface) if a task takes longer than expected. [Connect external tools](/en/desktop#extend-claude-code) like GitHub, Slack, and Linear to bring your workflow together.

127 

128## Coming from the CLI?

129 

130Desktop runs the same engine as the CLI with a graphical interface. You can run both simultaneously on the same project, and they share configuration (CLAUDE.md files, MCP servers, hooks, skills, and settings). For a full comparison of features, flag equivalents, and what's not available in Desktop, see [CLI comparison](/en/desktop#coming-from-the-cli).

131 

132## What's next

133 

134* [Use Claude Code Desktop](/en/desktop): permission modes, parallel sessions, diff view, connectors, and enterprise configuration

135* [Troubleshooting](/en/desktop#troubleshooting): solutions to common errors and setup issues

136* [Best practices](/en/best-practices): tips for writing effective prompts and getting the most out of Claude Code

137* [Common workflows](/en/common-workflows): tutorials for debugging, refactoring, testing, and more

Details

37```37```

38 38 

39<Note>39<Note>

40 The official marketplace is maintained by Anthropic. To distribute your own plugins, [create your own marketplace](/en/plugin-marketplaces) and share it with users.40 The official marketplace is maintained by Anthropic. To submit a plugin to the official marketplace, use one of the in-app submission forms:

41 

42 * **Claude.ai**: [claude.ai/settings/plugins/submit](https://claude.ai/settings/plugins/submit)

43 * **Console**: [platform.claude.com/plugins/submit](https://platform.claude.com/plugins/submit)

44 

45 To distribute plugins independently, [create your own marketplace](/en/plugin-marketplaces) and share it with users.

41</Note>46</Note>

42 47 

43The official marketplace includes several categories of plugins:48The official marketplace includes several categories of plugins:


356 361 

357Team admins can set up automatic marketplace installation for projects by adding marketplace configuration to `.claude/settings.json`. When team members trust the repository folder, Claude Code prompts them to install these marketplaces and plugins.362Team admins can set up automatic marketplace installation for projects by adding marketplace configuration to `.claude/settings.json`. When team members trust the repository folder, Claude Code prompts them to install these marketplaces and plugins.

358 363 

364Add `extraKnownMarketplaces` to your project's `.claude/settings.json`:

365 

366```json theme={null}

367{

368 "extraKnownMarketplaces": {

369 "my-team-tools": {

370 "source": {

371 "source": "github",

372 "repo": "your-org/claude-plugins"

373 }

374 }

375 }

376}

377```

378 

359For full configuration options including `extraKnownMarketplaces` and `enabledPlugins`, see [Plugin settings](/en/settings#plugin-settings).379For full configuration options including `extraKnownMarketplaces` and `enabledPlugins`, see [Plugin settings](/en/settings#plugin-settings).

360 380 

361## Troubleshooting381## Troubleshooting

Details

172 172 

173Each feature loads at different points in your session. The tabs below explain when each one loads and what goes into context.173Each feature loads at different points in your session. The tabs below explain when each one loads and what goes into context.

174 174 

175<img src="https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/context-loading.svg?fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=bd2e24b8e6a99b31ecfffb63f5b23bf5" alt="Context loading: CLAUDE.md and MCP load at session start and stay in every request. Skills load descriptions at start, full content on invocation. Subagents get isolated context. Hooks run externally." data-og-width="720" width="720" data-og-height="410" height="410" data-path="images/context-loading.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/context-loading.svg?w=280&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=aebaadd1f484f285dd9cb4e0ea6d49b9 280w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/context-loading.svg?w=560&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=030c9b46126d750de315612560082727 560w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/context-loading.svg?w=840&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=6c73f8b0389da4f3190843140c810fe9 840w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/context-loading.svg?w=1100&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=9844c55d08d2c386672447f2e8518669 1100w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/context-loading.svg?w=1650&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=21a9522d0e4bd10ced146aab850ede76 1650w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/context-loading.svg?w=2500&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=d318525915aee1a1a6a4215cfaa61fb9 2500w" />175<img src="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/context-loading.svg?fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=43114d93ae62bdc1ab6aa64660e2ba3b" alt="Context loading: CLAUDE.md and MCP load at session start and stay in every request. Skills load descriptions at start, full content on invocation. Subagents get isolated context. Hooks run externally." data-og-width="720" width="720" data-og-height="410" height="410" data-path="images/context-loading.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/context-loading.svg?w=280&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=cc37ac2b6b486c75dea4cf64add648ec 280w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/context-loading.svg?w=560&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=22394bf8452988091802c6bc471a3153 560w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/context-loading.svg?w=840&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=aaf0301abbd63349b3f5ecf27f3bc4c5 840w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/context-loading.svg?w=1100&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=f262d974340400cfd964c555b523808a 1100w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/context-loading.svg?w=1650&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=430b76391f55ba65a0a3da569a52a450 1650w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/context-loading.svg?w=2500&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=46522043165b15cfef464d5f63c70f7c 2500w" />

176 176 

177<Tabs>177<Tabs>

178 <Tab title="CLAUDE.md">178 <Tab title="CLAUDE.md">

Details

117 anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}117 anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

118 custom_instructions: "Follow our coding standards"118 custom_instructions: "Follow our coding standards"

119 max_turns: "10"119 max_turns: "10"

120 model: "claude-sonnet-4-5-20250929"120 model: "claude-sonnet-4-6"

121```121```

122 122 

123**GA version (v1.0):**123**GA version (v1.0):**


130 claude_args: |130 claude_args: |

131 --append-system-prompt "Follow our coding standards"131 --append-system-prompt "Follow our coding standards"

132 --max-turns 10132 --max-turns 10

133 --model claude-sonnet-4-5-20250929133 --model claude-sonnet-4-6

134```134```

135 135 

136<Tip>136<Tip>


200 200 

201In issue or PR comments:201In issue or PR comments:

202 202 

203```203```text theme={null}

204@claude implement this feature based on the issue description204@claude implement this feature based on the issue description

205@claude how should I implement user authentication for this endpoint?205@claude how should I implement user authentication for this endpoint?

206@claude fix the TypeError in the user dashboard component206@claude fix the TypeError in the user dashboard component


521 with:521 with:

522 github_token: ${{ steps.app-token.outputs.token }}522 github_token: ${{ steps.app-token.outputs.token }}

523 use_bedrock: "true"523 use_bedrock: "true"

524 claude_args: '--model us.anthropic.claude-sonnet-4-5-20250929-v1:0 --max-turns 10'524 claude_args: '--model us.anthropic.claude-sonnet-4-6 --max-turns 10'

525 ```525 ```

526 526 

527 <Tip>527 <Tip>

528 The model ID format for Bedrock includes the region prefix (e.g., `us.anthropic.claude...`) and version suffix.528 The model ID format for Bedrock includes a region prefix (for example, `us.anthropic.claude-sonnet-4-6`).

529 </Tip>529 </Tip>

530 </Accordion>530 </Accordion>

531 531 


645The `claude_args` parameter accepts any Claude Code CLI arguments:645The `claude_args` parameter accepts any Claude Code CLI arguments:

646 646 

647```yaml theme={null}647```yaml theme={null}

648claude_args: "--max-turns 5 --model claude-sonnet-4-5-20250929 --mcp-config /path/to/config.json"648claude_args: "--max-turns 5 --model claude-sonnet-4-6 --mcp-config /path/to/config.json"

649```649```

650 650 

651Common arguments:651Common arguments:

652 652 

653* `--max-turns`: Maximum conversation turns (default: 10)653* `--max-turns`: Maximum conversation turns (default: 10)

654* `--model`: Model to use (for example, `claude-sonnet-4-5-20250929`)654* `--model`: Model to use (for example, `claude-sonnet-4-6`)

655* `--mcp-config`: Path to MCP configuration655* `--mcp-config`: Path to MCP configuration

656* `--allowed-tools`: Comma-separated list of allowed tools656* `--allowed-tools`: Comma-separated list of allowed tools

657* `--debug`: Enable debug output657* `--debug`: Enable debug output

gitlab-ci-cd.md +4 −4

Details

126 126 

127In an issue comment:127In an issue comment:

128 128 

129```129```text theme={null}

130@claude implement this feature based on the issue description130@claude implement this feature based on the issue description

131```131```

132 132 


136 136 

137In an MR discussion:137In an MR discussion:

138 138 

139```139```text theme={null}

140@claude suggest a concrete approach to cache the results of this API call140@claude suggest a concrete approach to cache the results of this API call

141```141```

142 142 


146 146 

147In an issue or MR comment:147In an issue or MR comment:

148 148 

149```149```text theme={null}

150@claude fix the TypeError in the user dashboard component150@claude fix the TypeError in the user dashboard component

151```151```

152 152 


319```319```

320 320 

321<Note>321<Note>

322 Model IDs for Bedrock include region-specific prefixes and version suffixes (for example, `us.anthropic.claude-sonnet-4-5-20250929-v1:0`). Pass the desired model via your job configuration or prompt if your workflow supports it.322 Model IDs for Bedrock include region-specific prefixes (for example, `us.anthropic.claude-sonnet-4-6`). Pass the desired model via your job configuration or prompt if your workflow supports it.

323</Note>323</Note>

324 324 

325### Google Vertex AI job example (Workload Identity Federation)325### Google Vertex AI job example (Workload Identity Federation)

Details

12 12 

13* A Google Cloud Platform (GCP) account with billing enabled13* A Google Cloud Platform (GCP) account with billing enabled

14* A GCP project with Vertex AI API enabled14* A GCP project with Vertex AI API enabled

15* Access to desired Claude models (for example, Claude Sonnet 4.5)15* Access to desired Claude models (for example, Claude Sonnet 4.6)

16* Google Cloud SDK (`gcloud`) installed and configured16* Google Cloud SDK (`gcloud`) installed and configured

17* Quota allocated in desired GCP region17* Quota allocated in desired GCP region

18 18 

19<Note>

20 If you are deploying Claude Code to multiple users, [pin your model versions](#5-pin-model-versions) to prevent breakage when Anthropic releases new models.

21</Note>

22 

19## Region Configuration23## Region Configuration

20 24 

21Claude Code can be used with both Vertex AI [global](https://cloud.google.com/blog/products/ai-machine-learning/global-endpoint-for-claude-models-generally-available-on-vertex-ai) and regional endpoints.25Claude Code can be used with both Vertex AI [global](https://cloud.google.com/blog/products/ai-machine-learning/global-endpoint-for-claude-models-generally-available-on-vertex-ai) and regional endpoints.

22 26 

23<Note>27<Note>

24 Vertex AI may not support the Claude Code default models on all regions. You may need to switch to a [supported region or model](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations#genai-partner-models).28 Vertex AI may not support the Claude Code default models in all [regions](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations#genai-partner-models) or on [global endpoints](https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models#supported_models). You may need to switch to a supported region, use a regional endpoint, or specify a supported model.

25</Note>

26 

27<Note>

28 Vertex AI may not support the Claude Code default models on global endpoints. You may need to switch to a regional endpoint or [supported model](https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models#supported_models).

29</Note>29</Note>

30 30 

31## Setup31## Setup


48 48 

491. Navigate to the [Vertex AI Model Garden](https://console.cloud.google.com/vertex-ai/model-garden)491. Navigate to the [Vertex AI Model Garden](https://console.cloud.google.com/vertex-ai/model-garden)

502. Search for "Claude" models502. Search for "Claude" models

513. Request access to desired Claude models (for example, Claude Sonnet 4.5)513. Request access to desired Claude models (for example, Claude Sonnet 4.6)

524. Wait for approval (may take 24-48 hours)524. Wait for approval (may take 24-48 hours)

53 53 

54### 3. Configure GCP credentials54### 3. Configure GCP credentials


85export VERTEX_REGION_CLAUDE_4_1_OPUS=europe-west185export VERTEX_REGION_CLAUDE_4_1_OPUS=europe-west1

86```86```

87 87 

88<Note>88[Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) is automatically supported when you specify the `cache_control` ephemeral flag. To disable it, set `DISABLE_PROMPT_CACHING=1`. For heightened rate limits, contact Google Cloud support. When using Vertex AI, the `/login` and `/logout` commands are disabled since authentication is handled through Google Cloud credentials.

89 [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) is automatically supported when you specify the `cache_control` ephemeral flag. To disable it, set `DISABLE_PROMPT_CACHING=1`. For heightened rate limits, contact Google Cloud support.

90</Note>

91 89 

92<Note>90### 5. Pin model versions

93 When using Vertex AI, the `/login` and `/logout` commands are disabled since authentication is handled through Google Cloud credentials.91 

94</Note>92<Warning>

93 Pin specific model versions for every deployment. If you use model aliases (`sonnet`, `opus`, `haiku`) without pinning, Claude Code may attempt to use a newer model version that isn't enabled in your Vertex AI project, breaking existing users when Anthropic releases updates.

94</Warning>

95 

96Set these environment variables to specific Vertex AI model IDs:

95 97 

96### 5. Model configuration98```bash theme={null}

99export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'

100export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-6'

101export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5@20251001'

102```

97 103 

98Claude Code uses these default models for Vertex AI:104For current and legacy model IDs, see [Models overview](https://platform.claude.com/docs/en/about-claude/models/overview). See [Model configuration](/en/model-config#pin-models-for-third-party-deployments) for the full list of environment variables.

105 

106Claude Code uses these default models when no pinning variables are set:

99 107 

100| Model type | Default value |108| Model type | Default value |

101| :--------------- | :--------------------------- |109| :--------------- | :-------------------------- |

102| Primary model | `claude-sonnet-4-5@20250929` |110| Primary model | `claude-sonnet-4-6` |

103| Small/fast model | `claude-haiku-4-5@20251001` |111| Small/fast model | `claude-haiku-4-5@20251001` |

104 112 

105<Note>113To customize models further:

106 For Vertex AI users, Claude Code will not automatically upgrade from Haiku 3.5 to Haiku 4.5. To manually switch to a newer Haiku model, set the `ANTHROPIC_DEFAULT_HAIKU_MODEL` environment variable to the full model name (for example, `claude-haiku-4-5@20251001`).

107</Note>

108 

109To customize models:

110 114 

111```bash theme={null}115```bash theme={null}

112export ANTHROPIC_MODEL='claude-opus-4-6'116export ANTHROPIC_MODEL='claude-opus-4-6'


126For details, see [Vertex IAM documentation](https://cloud.google.com/vertex-ai/docs/general/access-control).130For details, see [Vertex IAM documentation](https://cloud.google.com/vertex-ai/docs/general/access-control).

127 131 

128<Note>132<Note>

129 We recommend creating a dedicated GCP project for Claude Code to simplify cost tracking and access control.133 Create a dedicated GCP project for Claude Code to simplify cost tracking and access control.

130</Note>134</Note>

131 135 

132## 1M token context window136## 1M token context window

133 137 

134Claude Sonnet 4 and Sonnet 4.5 support the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window) on Vertex AI.138Claude Sonnet 4 and Sonnet 4.6 support the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window) on Vertex AI.

135 139 

136<Note>140<Note>

137 The 1M token context window is currently in beta. To use the extended context window, include the `context-1m-2025-08-07` beta header in your Vertex AI requests.141 The 1M token context window is currently in beta. To use the extended context window, include the `context-1m-2025-08-07` beta header in your Vertex AI requests.

headless.md +4 −17

Details

152 152 

153## Next steps153## Next steps

154 154 

155<CardGroup cols={2}>155* [Agent SDK quickstart](https://platform.claude.com/docs/en/agent-sdk/quickstart): build your first agent with Python or TypeScript

156 <Card title="Agent SDK quickstart" icon="play" href="https://platform.claude.com/docs/en/agent-sdk/quickstart">156* [CLI reference](/en/cli-reference): all CLI flags and options

157 Build your first agent with Python or TypeScript157* [GitHub Actions](/en/github-actions): use the Agent SDK in GitHub workflows

158 </Card>158* [GitLab CI/CD](/en/gitlab-ci-cd): use the Agent SDK in GitLab pipelines

159 

160 <Card title="CLI reference" icon="terminal" href="/en/cli-reference">

161 Explore all CLI flags and options

162 </Card>

163 

164 <Card title="GitHub Actions" icon="github" href="/en/github-actions">

165 Use the Agent SDK in GitHub workflows

166 </Card>

167 

168 <Card title="GitLab CI/CD" icon="gitlab" href="/en/gitlab-ci-cd">

169 Use the Agent SDK in GitLab pipelines

170 </Card>

171</CardGroup>

hooks.md +208 −17

Details

18 18 

19<div style={{maxWidth: "500px", margin: "0 auto"}}>19<div style={{maxWidth: "500px", margin: "0 auto"}}>

20 <Frame>20 <Frame>

21 <img src="https://mintcdn.com/claude-code/tpQvD9DKENFo4zX_/images/hooks-lifecycle.svg?fit=max&auto=format&n=tpQvD9DKENFo4zX_&q=85&s=7a351ea1cc3d5da7a2176bf51196bc1a" alt="Hook lifecycle diagram showing the sequence of hooks from SessionStart through the agentic loop to SessionEnd" data-og-width="520" width="520" data-og-height="960" height="960" data-path="images/hooks-lifecycle.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/tpQvD9DKENFo4zX_/images/hooks-lifecycle.svg?w=280&fit=max&auto=format&n=tpQvD9DKENFo4zX_&q=85&s=8f32c67d025f0a318d5ed10a4f8ff2e6 280w, https://mintcdn.com/claude-code/tpQvD9DKENFo4zX_/images/hooks-lifecycle.svg?w=560&fit=max&auto=format&n=tpQvD9DKENFo4zX_&q=85&s=896fc424e39ff8d590720331a77e3d80 560w, https://mintcdn.com/claude-code/tpQvD9DKENFo4zX_/images/hooks-lifecycle.svg?w=840&fit=max&auto=format&n=tpQvD9DKENFo4zX_&q=85&s=a1c1c9739cde965e1eade843cee567c5 840w, https://mintcdn.com/claude-code/tpQvD9DKENFo4zX_/images/hooks-lifecycle.svg?w=1100&fit=max&auto=format&n=tpQvD9DKENFo4zX_&q=85&s=5bb083988de020e7d568e8dd8f1422fc 1100w, https://mintcdn.com/claude-code/tpQvD9DKENFo4zX_/images/hooks-lifecycle.svg?w=1650&fit=max&auto=format&n=tpQvD9DKENFo4zX_&q=85&s=343e9883c1e3172f08096c352aa46f12 1650w, https://mintcdn.com/claude-code/tpQvD9DKENFo4zX_/images/hooks-lifecycle.svg?w=2500&fit=max&auto=format&n=tpQvD9DKENFo4zX_&q=85&s=4de37b29de0f6df8b0c3e937a76c3bc6 2500w" />21 <img src="https://mintcdn.com/claude-code/rsuu-ovdPNos9Dnn/images/hooks-lifecycle.svg?fit=max&auto=format&n=rsuu-ovdPNos9Dnn&q=85&s=ce5f1225339bbccdfbb52e99205db912" alt="Hook lifecycle diagram showing the sequence of hooks from SessionStart through the agentic loop to SessionEnd, with WorktreeCreate and WorktreeRemove as standalone setup and teardown events" data-og-width="520" width="520" data-og-height="1020" height="1020" data-path="images/hooks-lifecycle.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/rsuu-ovdPNos9Dnn/images/hooks-lifecycle.svg?w=280&fit=max&auto=format&n=rsuu-ovdPNos9Dnn&q=85&s=7c7143c65492c1beb6bc66f5d206ba15 280w, https://mintcdn.com/claude-code/rsuu-ovdPNos9Dnn/images/hooks-lifecycle.svg?w=560&fit=max&auto=format&n=rsuu-ovdPNos9Dnn&q=85&s=dafaebf8f789f94edbf6bd66853c69df 560w, https://mintcdn.com/claude-code/rsuu-ovdPNos9Dnn/images/hooks-lifecycle.svg?w=840&fit=max&auto=format&n=rsuu-ovdPNos9Dnn&q=85&s=2caa51d2d95596f1f80b92e3f5f534fa 840w, https://mintcdn.com/claude-code/rsuu-ovdPNos9Dnn/images/hooks-lifecycle.svg?w=1100&fit=max&auto=format&n=rsuu-ovdPNos9Dnn&q=85&s=614def559f34f9b0c1dec93739d96b64 1100w, https://mintcdn.com/claude-code/rsuu-ovdPNos9Dnn/images/hooks-lifecycle.svg?w=1650&fit=max&auto=format&n=rsuu-ovdPNos9Dnn&q=85&s=ca45b85fdd8b2da81c69d12c453230cb 1650w, https://mintcdn.com/claude-code/rsuu-ovdPNos9Dnn/images/hooks-lifecycle.svg?w=2500&fit=max&auto=format&n=rsuu-ovdPNos9Dnn&q=85&s=7fd92d6b9713493f59962c9f295c9d2f 2500w" />

22 </Frame>22 </Frame>

23</div>23</div>

24 24 

25The table below summarizes when each event fires. The [Hook events](#hook-events) section documents the full input schema and decision control options for each one.25The table below summarizes when each event fires. The [Hook events](#hook-events) section documents the full input schema and decision control options for each one.

26 26 

27| Event | When it fires |27| Event | When it fires |

28| :------------------- | :----------------------------------------------------------------- |28| :------------------- | :---------------------------------------------------------------------------------------------------------- |

29| `SessionStart` | When a session begins or resumes |29| `SessionStart` | When a session begins or resumes |

30| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |30| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |

31| `PreToolUse` | Before a tool call executes. Can block it |31| `PreToolUse` | Before a tool call executes. Can block it |


38| `Stop` | When Claude finishes responding |38| `Stop` | When Claude finishes responding |

39| `TeammateIdle` | When an [agent team](/en/agent-teams) teammate is about to go idle |39| `TeammateIdle` | When an [agent team](/en/agent-teams) teammate is about to go idle |

40| `TaskCompleted` | When a task is being marked as completed |40| `TaskCompleted` | When a task is being marked as completed |

41| `ConfigChange` | When a configuration file changes during a session |

42| `WorktreeCreate` | When a worktree is being created via `--worktree` or `isolation: "worktree"`. Replaces default git behavior |

43| `WorktreeRemove` | When a worktree is being removed, either at session exit or when a subagent finishes |

41| `PreCompact` | Before context compaction |44| `PreCompact` | Before context compaction |

42| `SessionEnd` | When a session terminates |45| `SessionEnd` | When a session terminates |

43 46 


86Now suppose Claude Code decides to run `Bash "rm -rf /tmp/build"`. Here's what happens:89Now suppose Claude Code decides to run `Bash "rm -rf /tmp/build"`. Here's what happens:

87 90 

88<Frame>91<Frame>

89 <img src="https://mintcdn.com/claude-code/s7NM0vfd_wres2nf/images/hook-resolution.svg?fit=max&auto=format&n=s7NM0vfd_wres2nf&q=85&s=7c13f51ffcbc37d22a593b27e2f2de72" alt="Hook resolution flow: PreToolUse event fires, matcher checks for Bash match, hook handler runs, result returns to Claude Code" data-og-width="780" width="780" data-og-height="290" height="290" data-path="images/hook-resolution.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/s7NM0vfd_wres2nf/images/hook-resolution.svg?w=280&fit=max&auto=format&n=s7NM0vfd_wres2nf&q=85&s=36a39a07e8bc1995dcb4639e09846905 280w, https://mintcdn.com/claude-code/s7NM0vfd_wres2nf/images/hook-resolution.svg?w=560&fit=max&auto=format&n=s7NM0vfd_wres2nf&q=85&s=6568d90c596c7605bbac2c325b0a0c86 560w, https://mintcdn.com/claude-code/s7NM0vfd_wres2nf/images/hook-resolution.svg?w=840&fit=max&auto=format&n=s7NM0vfd_wres2nf&q=85&s=255a6f68b9475a0e41dbde7b88002dad 840w, https://mintcdn.com/claude-code/s7NM0vfd_wres2nf/images/hook-resolution.svg?w=1100&fit=max&auto=format&n=s7NM0vfd_wres2nf&q=85&s=dcecf8d5edc88cd2bc49deb006d5760d 1100w, https://mintcdn.com/claude-code/s7NM0vfd_wres2nf/images/hook-resolution.svg?w=1650&fit=max&auto=format&n=s7NM0vfd_wres2nf&q=85&s=04fe51bf69ae375e9fd517f18674e35f 1650w, https://mintcdn.com/claude-code/s7NM0vfd_wres2nf/images/hook-resolution.svg?w=2500&fit=max&auto=format&n=s7NM0vfd_wres2nf&q=85&s=b1b76e0b77fddb5c7fa7bf302dacd80b 2500w" />92 <img src="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/hook-resolution.svg?fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=5bb890134390ecd0581477cf41ef730b" alt="Hook resolution flow: PreToolUse event fires, matcher checks for Bash match, hook handler runs, result returns to Claude Code" data-og-width="780" width="780" data-og-height="290" height="290" data-path="images/hook-resolution.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/hook-resolution.svg?w=280&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=5dcaecd24c260b8a90365d74e2c1fcda 280w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/hook-resolution.svg?w=560&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=c03d91c279f01d92e58ddd70fdbe66f2 560w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/hook-resolution.svg?w=840&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=1be57a4819cbb949a5ea9d08a05c9ecd 840w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/hook-resolution.svg?w=1100&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=0e9dd1807dc7a5c56011d0889b0d5208 1100w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/hook-resolution.svg?w=1650&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=69496ac02e70fabfece087ba31a1dcfc 1650w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/hook-resolution.svg?w=2500&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=a012346cb46a33b86580348802055267 2500w" />

90</Frame>93</Frame>

91 94 

92<Steps>95<Steps>


159The `matcher` field is a regex string that filters when hooks fire. Use `"*"`, `""`, or omit `matcher` entirely to match all occurrences. Each event type matches on a different field:162The `matcher` field is a regex string that filters when hooks fire. Use `"*"`, `""`, or omit `matcher` entirely to match all occurrences. Each event type matches on a different field:

160 163 

161| Event | What the matcher filters | Example matcher values |164| Event | What the matcher filters | Example matcher values |

162| :--------------------------------------------------------------------- | :------------------------ | :----------------------------------------------------------------------------- |165| :---------------------------------------------------------------------------------------------- | :------------------------ | :--------------------------------------------------------------------------------- |

163| `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest` | tool name | `Bash`, `Edit\|Write`, `mcp__.*` |166| `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest` | tool name | `Bash`, `Edit\|Write`, `mcp__.*` |

164| `SessionStart` | how the session started | `startup`, `resume`, `clear`, `compact` |167| `SessionStart` | how the session started | `startup`, `resume`, `clear`, `compact` |

165| `SessionEnd` | why the session ended | `clear`, `logout`, `prompt_input_exit`, `bypass_permissions_disabled`, `other` |168| `SessionEnd` | why the session ended | `clear`, `logout`, `prompt_input_exit`, `bypass_permissions_disabled`, `other` |


167| `SubagentStart` | agent type | `Bash`, `Explore`, `Plan`, or custom agent names |170| `SubagentStart` | agent type | `Bash`, `Explore`, `Plan`, or custom agent names |

168| `PreCompact` | what triggered compaction | `manual`, `auto` |171| `PreCompact` | what triggered compaction | `manual`, `auto` |

169| `SubagentStop` | agent type | same values as `SubagentStart` |172| `SubagentStop` | agent type | same values as `SubagentStart` |

170| `UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCompleted` | no matcher support | always fires on every occurrence |173| `ConfigChange` | configuration source | `user_settings`, `project_settings`, `local_settings`, `policy_settings`, `skills` |

174| `UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCompleted`, `WorktreeCreate`, `WorktreeRemove` | no matcher support | always fires on every occurrence |

171 175 

172The matcher is a regex, so `Edit|Write` matches either tool and `Notebook.*` matches any tool starting with Notebook. The matcher runs against a field from the [JSON input](#hook-input-and-output) that Claude Code sends to your hook on stdin. For tool events, that field is `tool_name`. Each [hook event](#hook-events) section lists the full set of matcher values and the input schema for that event.176The matcher is a regex, so `Edit|Write` matches either tool and `Notebook.*` matches any tool starting with Notebook. The matcher runs against a field from the [JSON input](#hook-input-and-output) that Claude Code sends to your hook on stdin. For tool events, that field is `tool_name`. Each [hook event](#hook-events) section lists the full set of matcher values and the input schema for that event.

173 177 


191}195}

192```196```

193 197 

194`UserPromptSubmit` and `Stop` don't support matchers and always fire on every occurrence. If you add a `matcher` field to these events, it is silently ignored.198`UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCompleted`, `WorktreeCreate`, and `WorktreeRemove` don't support matchers and always fire on every occurrence. If you add a `matcher` field to these events, it is silently ignored.

195 199 

196#### Match MCP tools200#### Match MCP tools

197 201 


377 381 

378To temporarily disable all hooks without removing them, set `"disableAllHooks": true` in your settings file or use the toggle in the `/hooks` menu. There is no way to disable an individual hook while keeping it in the configuration.382To temporarily disable all hooks without removing them, set `"disableAllHooks": true` in your settings file or use the toggle in the `/hooks` menu. There is no way to disable an individual hook while keeping it in the configuration.

379 383 

384The `disableAllHooks` setting respects the managed settings hierarchy. If an administrator has configured hooks through managed policy settings, `disableAllHooks` set in user, project, or local settings cannot disable those managed hooks. Only `disableAllHooks` set at the managed settings level can disable managed hooks.

385 

380Direct edits to hooks in settings files don't take effect immediately. Claude Code captures a snapshot of hooks at startup and uses it throughout the session. This prevents malicious or accidental hook modifications from taking effect mid-session without your review. If hooks are modified externally, Claude Code warns you and requires review in the `/hooks` menu before changes apply.386Direct edits to hooks in settings files don't take effect immediately. Claude Code captures a snapshot of hooks at startup and uses it throughout the session. This prevents malicious or accidental hook modifications from taking effect mid-session without your review. If hooks are modified externally, Claude Code warns you and requires review in the `/hooks` menu before changes apply.

381 387 

382## Hook input and output388## Hook input and output


443Exit code 2 is the way a hook signals "stop, don't do this." The effect depends on the event, because some events represent actions that can be blocked (like a tool call that hasn't happened yet) and others represent things that already happened or can't be prevented.449Exit code 2 is the way a hook signals "stop, don't do this." The effect depends on the event, because some events represent actions that can be blocked (like a tool call that hasn't happened yet) and others represent things that already happened or can't be prevented.

444 450 

445| Hook event | Can block? | What happens on exit 2 |451| Hook event | Can block? | What happens on exit 2 |

446| :------------------- | :--------- | :----------------------------------------------------------------- |452| :------------------- | :--------- | :---------------------------------------------------------------------------- |

447| `PreToolUse` | Yes | Blocks the tool call |453| `PreToolUse` | Yes | Blocks the tool call |

448| `PermissionRequest` | Yes | Denies the permission |454| `PermissionRequest` | Yes | Denies the permission |

449| `UserPromptSubmit` | Yes | Blocks prompt processing and erases the prompt |455| `UserPromptSubmit` | Yes | Blocks prompt processing and erases the prompt |


451| `SubagentStop` | Yes | Prevents the subagent from stopping |457| `SubagentStop` | Yes | Prevents the subagent from stopping |

452| `TeammateIdle` | Yes | Prevents the teammate from going idle (teammate continues working) |458| `TeammateIdle` | Yes | Prevents the teammate from going idle (teammate continues working) |

453| `TaskCompleted` | Yes | Prevents the task from being marked as completed |459| `TaskCompleted` | Yes | Prevents the task from being marked as completed |

460| `ConfigChange` | Yes | Blocks the configuration change from taking effect (except `policy_settings`) |

454| `PostToolUse` | No | Shows stderr to Claude (tool already ran) |461| `PostToolUse` | No | Shows stderr to Claude (tool already ran) |

455| `PostToolUseFailure` | No | Shows stderr to Claude (tool already failed) |462| `PostToolUseFailure` | No | Shows stderr to Claude (tool already failed) |

456| `Notification` | No | Shows stderr to user only |463| `Notification` | No | Shows stderr to user only |


458| `SessionStart` | No | Shows stderr to user only |465| `SessionStart` | No | Shows stderr to user only |

459| `SessionEnd` | No | Shows stderr to user only |466| `SessionEnd` | No | Shows stderr to user only |

460| `PreCompact` | No | Shows stderr to user only |467| `PreCompact` | No | Shows stderr to user only |

468| `WorktreeCreate` | Yes | Any non-zero exit code causes worktree creation to fail |

469| `WorktreeRemove` | No | Failures are logged in debug mode only |

461 470 

462### JSON output471### JSON output

463 472 


493Not every event supports blocking or controlling behavior through JSON. The events that do each use a different set of fields to express that decision. Use this table as a quick reference before writing a hook:502Not every event supports blocking or controlling behavior through JSON. The events that do each use a different set of fields to express that decision. Use this table as a quick reference before writing a hook:

494 503 

495| Events | Decision pattern | Key fields |504| Events | Decision pattern | Key fields |

496| :-------------------------------------------------------------------- | :------------------- | :---------------------------------------------------------------- |505| :---------------------------------------------------------------------------------- | :------------------- | :-------------------------------------------------------------------------- |

497| UserPromptSubmit, PostToolUse, PostToolUseFailure, Stop, SubagentStop | Top-level `decision` | `decision: "block"`, `reason` |506| UserPromptSubmit, PostToolUse, PostToolUseFailure, Stop, SubagentStop, ConfigChange | Top-level `decision` | `decision: "block"`, `reason` |

498| TeammateIdle, TaskCompleted | Exit code only | Exit code 2 blocks the action, stderr is fed back as feedback |507| TeammateIdle, TaskCompleted | Exit code only | Exit code 2 blocks the action, stderr is fed back as feedback |

499| PreToolUse | `hookSpecificOutput` | `permissionDecision` (allow/deny/ask), `permissionDecisionReason` |508| PreToolUse | `hookSpecificOutput` | `permissionDecision` (allow/deny/ask), `permissionDecisionReason` |

500| PermissionRequest | `hookSpecificOutput` | `decision.behavior` (allow/deny) |509| PermissionRequest | `hookSpecificOutput` | `decision.behavior` (allow/deny) |

510| WorktreeCreate | stdout path | Hook prints absolute path to created worktree. Non-zero exit fails creation |

511| WorktreeRemove, Notification, SessionEnd, PreCompact | None | No decision control. Used for side effects like logging or cleanup |

501 512 

502Here are examples of each pattern in action:513Here are examples of each pattern in action:

503 514 

504<Tabs>515<Tabs>

505 <Tab title="Top-level decision">516 <Tab title="Top-level decision">

506 Used by `UserPromptSubmit`, `PostToolUse`, `PostToolUseFailure`, `Stop`, and `SubagentStop`. The only value is `"block"`. To allow the action to proceed, omit `decision` from your JSON, or exit 0 without any JSON at all:517 Used by `UserPromptSubmit`, `PostToolUse`, `PostToolUseFailure`, `Stop`, `SubagentStop`, and `ConfigChange`. The only value is `"block"`. To allow the action to proceed, omit `decision` from your JSON, or exit 0 without any JSON at all:

507 518 

508 ```json theme={null}519 ```json theme={null}

509 {520 {


579 "permission_mode": "default",590 "permission_mode": "default",

580 "hook_event_name": "SessionStart",591 "hook_event_name": "SessionStart",

581 "source": "startup",592 "source": "startup",

582 "model": "claude-sonnet-4-5-20250929"593 "model": "claude-sonnet-4-6"

583}594}

584```595```

585 596 


1085 1096 

1086#### SubagentStop input1097#### SubagentStop input

1087 1098 

1088In addition to the [common input fields](#common-input-fields), SubagentStop hooks receive `stop_hook_active`, `agent_id`, `agent_type`, and `agent_transcript_path`. The `agent_type` field is the value used for matcher filtering. The `transcript_path` is the main session's transcript, while `agent_transcript_path` is the subagent's own transcript stored in a nested `subagents/` folder.1099In addition to the [common input fields](#common-input-fields), SubagentStop hooks receive `stop_hook_active`, `agent_id`, `agent_type`, `agent_transcript_path`, and `last_assistant_message`. The `agent_type` field is the value used for matcher filtering. The `transcript_path` is the main session's transcript, while `agent_transcript_path` is the subagent's own transcript stored in a nested `subagents/` folder. The `last_assistant_message` field contains the text content of the subagent's final response, so hooks can access it without parsing the transcript file.

1089 1100 

1090```json theme={null}1101```json theme={null}

1091{1102{


1097 "stop_hook_active": false,1108 "stop_hook_active": false,

1098 "agent_id": "def456",1109 "agent_id": "def456",

1099 "agent_type": "Explore",1110 "agent_type": "Explore",

1100 "agent_transcript_path": "~/.claude/projects/.../abc123/subagents/agent-def456.jsonl"1111 "agent_transcript_path": "~/.claude/projects/.../abc123/subagents/agent-def456.jsonl",

1112 "last_assistant_message": "Analysis complete. Found 3 potential issues..."

1101}1113}

1102```1114```

1103 1115 


1110 1122 

1111#### Stop input1123#### Stop input

1112 1124 

1113In addition to the [common input fields](#common-input-fields), Stop hooks receive `stop_hook_active`. This field is `true` when Claude Code is already continuing as a result of a stop hook. Check this value or process the transcript to prevent Claude Code from running indefinitely.1125In addition to the [common input fields](#common-input-fields), Stop hooks receive `stop_hook_active` and `last_assistant_message`. The `stop_hook_active` field is `true` when Claude Code is already continuing as a result of a stop hook. Check this value or process the transcript to prevent Claude Code from running indefinitely. The `last_assistant_message` field contains the text content of Claude's final response, so hooks can access it without parsing the transcript file.

1114 1126 

1115```json theme={null}1127```json theme={null}

1116{1128{


1119 "cwd": "/Users/...",1131 "cwd": "/Users/...",

1120 "permission_mode": "default",1132 "permission_mode": "default",

1121 "hook_event_name": "Stop",1133 "hook_event_name": "Stop",

1122 "stop_hook_active": true1134 "stop_hook_active": true,

1135 "last_assistant_message": "I've completed the refactoring. Here's a summary..."

1123}1136}

1124```1137```

1125 1138 


1232exit 01245exit 0

1233```1246```

1234 1247 

1248### ConfigChange

1249 

1250Runs when a configuration file changes during a session. Use this to audit settings changes, enforce security policies, or block unauthorized modifications to configuration files.

1251 

1252ConfigChange hooks fire for changes to settings files, managed policy settings, and skill files. The `source` field in the input tells you which type of configuration changed, and the optional `file_path` field provides the path to the changed file.

1253 

1254The matcher filters on the configuration source:

1255 

1256| Matcher | When it fires |

1257| :----------------- | :---------------------------------------- |

1258| `user_settings` | `~/.claude/settings.json` changes |

1259| `project_settings` | `.claude/settings.json` changes |

1260| `local_settings` | `.claude/settings.local.json` changes |

1261| `policy_settings` | Managed policy settings change |

1262| `skills` | A skill file in `.claude/skills/` changes |

1263 

1264This example logs all configuration changes for security auditing:

1265 

1266```json theme={null}

1267{

1268 "hooks": {

1269 "ConfigChange": [

1270 {

1271 "hooks": [

1272 {

1273 "type": "command",

1274 "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/audit-config-change.sh"

1275 }

1276 ]

1277 }

1278 ]

1279 }

1280}

1281```

1282 

1283#### ConfigChange input

1284 

1285In addition to the [common input fields](#common-input-fields), ConfigChange hooks receive `source` and optionally `file_path`. The `source` field indicates which configuration type changed, and `file_path` provides the path to the specific file that was modified.

1286 

1287```json theme={null}

1288{

1289 "session_id": "abc123",

1290 "transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",

1291 "cwd": "/Users/...",

1292 "permission_mode": "default",

1293 "hook_event_name": "ConfigChange",

1294 "source": "project_settings",

1295 "file_path": "/Users/.../my-project/.claude/settings.json"

1296}

1297```

1298 

1299#### ConfigChange decision control

1300 

1301ConfigChange hooks can block configuration changes from taking effect. Use exit code 2 or a JSON `decision` to prevent the change. When blocked, the new settings are not applied to the running session.

1302 

1303| Field | Description |

1304| :--------- | :--------------------------------------------------------------------------------------- |

1305| `decision` | `"block"` prevents the configuration change from being applied. Omit to allow the change |

1306| `reason` | Explanation shown to the user when `decision` is `"block"` |

1307 

1308```json theme={null}

1309{

1310 "decision": "block",

1311 "reason": "Configuration changes to project settings require admin approval"

1312}

1313```

1314 

1315`policy_settings` changes cannot be blocked. Hooks still fire for `policy_settings` sources, so you can use them for audit logging, but any blocking decision is ignored. This ensures enterprise-managed settings always take effect.

1316 

1317### WorktreeCreate

1318 

1319When you run `claude --worktree` or a [subagent uses `isolation: "worktree"`](/en/sub-agents#choose-the-subagent-scope), Claude Code creates an isolated working copy using `git worktree`. If you configure a WorktreeCreate hook, it replaces the default git behavior, letting you use a different version control system like SVN, Perforce, or Mercurial.

1320 

1321The hook must print the absolute path to the created worktree directory on stdout. Claude Code uses this path as the working directory for the isolated session.

1322 

1323This example creates an SVN working copy and prints the path for Claude Code to use. Replace the repository URL with your own:

1324 

1325```json theme={null}

1326{

1327 "hooks": {

1328 "WorktreeCreate": [

1329 {

1330 "hooks": [

1331 {

1332 "type": "command",

1333 "command": "bash -c 'NAME=$(jq -r .name); DIR=\"$HOME/.claude/worktrees/$NAME\"; svn checkout https://svn.example.com/repo/trunk \"$DIR\" >&2 && echo \"$DIR\"'"

1334 }

1335 ]

1336 }

1337 ]

1338 }

1339}

1340```

1341 

1342The hook reads the worktree `name` from the JSON input on stdin, checks out a fresh copy into a new directory, and prints the directory path. The `echo` on the last line is what Claude Code reads as the worktree path. Redirect any other output to stderr so it doesn't interfere with the path.

1343 

1344#### WorktreeCreate input

1345 

1346In addition to the [common input fields](#common-input-fields), WorktreeCreate hooks receive the `name` field. This is a slug identifier for the new worktree, either specified by the user or auto-generated (for example, `bold-oak-a3f2`).

1347 

1348```json theme={null}

1349{

1350 "session_id": "abc123",

1351 "transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",

1352 "cwd": "/Users/...",

1353 "hook_event_name": "WorktreeCreate",

1354 "name": "feature-auth"

1355}

1356```

1357 

1358#### WorktreeCreate output

1359 

1360The hook must print the absolute path to the created worktree directory on stdout. If the hook fails or produces no output, worktree creation fails with an error.

1361 

1362WorktreeCreate hooks do not use the standard allow/block decision model. Instead, the hook's success or failure determines the outcome. Only `type: "command"` hooks are supported.

1363 

1364### WorktreeRemove

1365 

1366The cleanup counterpart to [WorktreeCreate](#worktreecreate). This hook fires when a worktree is being removed, either when you exit a `--worktree` session and choose to remove it, or when a subagent with `isolation: "worktree"` finishes. For git-based worktrees, Claude handles cleanup automatically with `git worktree remove`. If you configured a WorktreeCreate hook for a non-git version control system, pair it with a WorktreeRemove hook to handle cleanup. Without one, the worktree directory is left on disk.

1367 

1368Claude Code passes the path that WorktreeCreate printed on stdout as `worktree_path` in the hook input. This example reads that path and removes the directory:

1369 

1370```json theme={null}

1371{

1372 "hooks": {

1373 "WorktreeRemove": [

1374 {

1375 "hooks": [

1376 {

1377 "type": "command",

1378 "command": "bash -c 'jq -r .worktree_path | xargs rm -rf'"

1379 }

1380 ]

1381 }

1382 ]

1383 }

1384}

1385```

1386 

1387#### WorktreeRemove input

1388 

1389In addition to the [common input fields](#common-input-fields), WorktreeRemove hooks receive the `worktree_path` field, which is the absolute path to the worktree being removed.

1390 

1391```json theme={null}

1392{

1393 "session_id": "abc123",

1394 "transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",

1395 "cwd": "/Users/...",

1396 "hook_event_name": "WorktreeRemove",

1397 "worktree_path": "/Users/.../my-project/.claude/worktrees/feature-auth"

1398}

1399```

1400 

1401WorktreeRemove hooks have no decision control. They cannot block worktree removal but can perform cleanup tasks like removing version control state or archiving changes. Hook failures are logged in debug mode only. Only `type: "command"` hooks are supported.

1402 

1235### PreCompact1403### PreCompact

1236 1404 

1237Runs before Claude Code is about to run a compact operation.1405Runs before Claude Code is about to run a compact operation.


1293 1461 

1294## Prompt-based hooks1462## Prompt-based hooks

1295 1463 

1296In addition to Bash command hooks (`type: "command"`), Claude Code supports prompt-based hooks (`type: "prompt"`) that use an LLM to evaluate whether to allow or block an action. Prompt-based hooks work with the following events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `UserPromptSubmit`, `Stop`, `SubagentStop`, and `TaskCompleted`. `TeammateIdle` does not support prompt-based or agent-based hooks.1464In addition to Bash command hooks (`type: "command"`), Claude Code supports prompt-based hooks (`type: "prompt"`) that use an LLM to evaluate whether to allow or block an action, and agent hooks (`type: "agent"`) that spawn an agentic verifier with tool access. Not all events support every hook type.

1465 

1466Events that support all three hook types (`command`, `prompt`, and `agent`):

1467 

1468* `PermissionRequest`

1469* `PostToolUse`

1470* `PostToolUseFailure`

1471* `PreToolUse`

1472* `Stop`

1473* `SubagentStop`

1474* `TaskCompleted`

1475* `UserPromptSubmit`

1476 

1477Events that only support `type: "command"` hooks:

1478 

1479* `ConfigChange`

1480* `Notification`

1481* `PreCompact`

1482* `SessionEnd`

1483* `SessionStart`

1484* `SubagentStart`

1485* `TeammateIdle`

1486* `WorktreeCreate`

1487* `WorktreeRemove`

1297 1488 

1298### How prompt-based hooks work1489### How prompt-based hooks work

1299 1490 


1540 1731 

1541Run `claude --debug` to see hook execution details, including which hooks matched, their exit codes, and output. Toggle verbose mode with `Ctrl+O` to see hook progress in the transcript.1732Run `claude --debug` to see hook execution details, including which hooks matched, their exit codes, and output. Toggle verbose mode with `Ctrl+O` to see hook progress in the transcript.

1542 1733 

1543```1734```text theme={null}

1544[DEBUG] Executing hooks for PostToolUse:Write1735[DEBUG] Executing hooks for PostToolUse:Write

1545[DEBUG] Getting matching hook commands for PostToolUse with query: Write1736[DEBUG] Getting matching hook commands for PostToolUse with query: Write

1546[DEBUG] Found 1 hook matchers in settings1737[DEBUG] Found 1 hook matchers in settings

hooks-guide.md +39 −8

Details

36 <Tab title="macOS">36 <Tab title="macOS">

37 Uses [`osascript`](https://ss64.com/mac/osascript.html) to trigger a native macOS notification through AppleScript:37 Uses [`osascript`](https://ss64.com/mac/osascript.html) to trigger a native macOS notification through AppleScript:

38 38 

39 ```39 ```bash theme={null}

40 osascript -e 'display notification "Claude Code needs your attention" with title "Claude Code"'40 osascript -e 'display notification "Claude Code needs your attention" with title "Claude Code"'

41 ```41 ```

42 </Tab>42 </Tab>


44 <Tab title="Linux">44 <Tab title="Linux">

45 Uses `notify-send`, which is pre-installed on most Linux desktops with a notification daemon:45 Uses `notify-send`, which is pre-installed on most Linux desktops with a notification daemon:

46 46 

47 ```47 ```bash theme={null}

48 notify-send 'Claude Code' 'Claude Code needs your attention'48 notify-send 'Claude Code' 'Claude Code needs your attention'

49 ```49 ```

50 </Tab>50 </Tab>


52 <Tab title="Windows (PowerShell)">52 <Tab title="Windows (PowerShell)">

53 Uses PowerShell to show a native message box through .NET's Windows Forms:53 Uses PowerShell to show a native message box through .NET's Windows Forms:

54 54 

55 ```55 ```powershell theme={null}

56 powershell.exe -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')"56 powershell.exe -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')"

57 ```57 ```

58 </Tab>58 </Tab>


78* [Auto-format code after edits](#auto-format-code-after-edits)78* [Auto-format code after edits](#auto-format-code-after-edits)

79* [Block edits to protected files](#block-edits-to-protected-files)79* [Block edits to protected files](#block-edits-to-protected-files)

80* [Re-inject context after compaction](#re-inject-context-after-compaction)80* [Re-inject context after compaction](#re-inject-context-after-compaction)

81* [Audit configuration changes](#audit-configuration-changes)

81 82 

82### Get notified when Claude needs input83### Get notified when Claude needs input

83 84 


262 263 

263You can replace the `echo` with any command that produces dynamic output, like `git log --oneline -5` to show recent commits. For injecting context on every session start, consider using [CLAUDE.md](/en/memory) instead. For environment variables, see [`CLAUDE_ENV_FILE`](/en/hooks#persist-environment-variables) in the reference.264You can replace the `echo` with any command that produces dynamic output, like `git log --oneline -5` to show recent commits. For injecting context on every session start, consider using [CLAUDE.md](/en/memory) instead. For environment variables, see [`CLAUDE_ENV_FILE`](/en/hooks#persist-environment-variables) in the reference.

264 265 

266### Audit configuration changes

267 

268Track when settings or skills files change during a session. The `ConfigChange` event fires when an external process or editor modifies a configuration file, so you can log changes for compliance or block unauthorized modifications.

269 

270This example appends each change to an audit log. Add this to `~/.claude/settings.json`:

271 

272```json theme={null}

273{

274 "hooks": {

275 "ConfigChange": [

276 {

277 "matcher": "",

278 "hooks": [

279 {

280 "type": "command",

281 "command": "jq -c '{timestamp: now | todate, source: .source, file: .file_path}' >> ~/claude-config-audit.log"

282 }

283 ]

284 }

285 ]

286 }

287}

288```

289 

290The matcher filters by configuration type: `user_settings`, `project_settings`, `local_settings`, `policy_settings`, or `skills`. To block a change from taking effect, exit with code 2 or return `{"decision": "block"}`. See the [ConfigChange reference](/en/hooks#configchange) for the full input schema.

291 

265## How hooks work292## How hooks work

266 293 

267Hook events fire at specific lifecycle points in Claude Code. When an event fires, all matching hooks run in parallel, and identical hook commands are automatically deduplicated. The table below shows each event and when it triggers:294Hook events fire at specific lifecycle points in Claude Code. When an event fires, all matching hooks run in parallel, and identical hook commands are automatically deduplicated. The table below shows each event and when it triggers:

268 295 

269| Event | When it fires |296| Event | When it fires |

270| :------------------- | :----------------------------------------------------------------- |297| :------------------- | :---------------------------------------------------------------------------------------------------------- |

271| `SessionStart` | When a session begins or resumes |298| `SessionStart` | When a session begins or resumes |

272| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |299| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |

273| `PreToolUse` | Before a tool call executes. Can block it |300| `PreToolUse` | Before a tool call executes. Can block it |


280| `Stop` | When Claude finishes responding |307| `Stop` | When Claude finishes responding |

281| `TeammateIdle` | When an [agent team](/en/agent-teams) teammate is about to go idle |308| `TeammateIdle` | When an [agent team](/en/agent-teams) teammate is about to go idle |

282| `TaskCompleted` | When a task is being marked as completed |309| `TaskCompleted` | When a task is being marked as completed |

310| `ConfigChange` | When a configuration file changes during a session |

311| `WorktreeCreate` | When a worktree is being created via `--worktree` or `isolation: "worktree"`. Replaces default git behavior |

312| `WorktreeRemove` | When a worktree is being removed, either at session exit or when a subagent finishes |

283| `PreCompact` | Before context compaction |313| `PreCompact` | Before context compaction |

284| `SessionEnd` | When a session terminates |314| `SessionEnd` | When a session terminates |

285 315 


305}335}

306```336```

307 337 

308Your script can parse that JSON and act on any of those fields. `UserPromptSubmit` hooks get the `prompt` text instead, `SessionStart` hooks get the `source` (startup, resume, compact), and so on. See [Common input fields](/en/hooks#common-input-fields) in the reference for shared fields, and each event's section for event-specific schemas.338Your script can parse that JSON and act on any of those fields. `UserPromptSubmit` hooks get the `prompt` text instead, `SessionStart` hooks get the `source` (startup, resume, clear, compact), and so on. See [Common input fields](/en/hooks#common-input-fields) in the reference for shared fields, and each event's section for event-specific schemas.

309 339 

310#### Hook output340#### Hook output

311 341 


384Each event type matches on a specific field. Matchers support exact strings and regex patterns:414Each event type matches on a specific field. Matchers support exact strings and regex patterns:

385 415 

386| Event | What the matcher filters | Example matcher values |416| Event | What the matcher filters | Example matcher values |

387| :--------------------------------------------------------------------- | :------------------------ | :----------------------------------------------------------------------------- |417| :---------------------------------------------------------------------------------------------- | :------------------------ | :--------------------------------------------------------------------------------- |

388| `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest` | tool name | `Bash`, `Edit\|Write`, `mcp__.*` |418| `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest` | tool name | `Bash`, `Edit\|Write`, `mcp__.*` |

389| `SessionStart` | how the session started | `startup`, `resume`, `clear`, `compact` |419| `SessionStart` | how the session started | `startup`, `resume`, `clear`, `compact` |

390| `SessionEnd` | why the session ended | `clear`, `logout`, `prompt_input_exit`, `bypass_permissions_disabled`, `other` |420| `SessionEnd` | why the session ended | `clear`, `logout`, `prompt_input_exit`, `bypass_permissions_disabled`, `other` |

391| `Notification` | notification type | `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog` |421| `Notification` | notification type | `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog` |

392| `SubagentStart` | agent type | `Bash`, `Explore`, `Plan`, or custom agent names |422| `SubagentStart` | agent type | `Bash`, `Explore`, `Plan`, or custom agent names |

393| `PreCompact` | what triggered compaction | `manual`, `auto` |423| `PreCompact` | what triggered compaction | `manual`, `auto` |

394| `UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCompleted` | no matcher support | always fires on every occurrence |

395| `SubagentStop` | agent type | same values as `SubagentStart` |424| `SubagentStop` | agent type | same values as `SubagentStart` |

425| `ConfigChange` | configuration source | `user_settings`, `project_settings`, `local_settings`, `policy_settings`, `skills` |

426| `UserPromptSubmit`, `Stop`, `TeammateIdle`, `TaskCompleted`, `WorktreeCreate`, `WorktreeRemove` | no matcher support | always fires on every occurrence |

396 427 

397A few more examples showing matchers on different event types:428A few more examples showing matchers on different event types:

398 429 


606 637 

607When Claude Code runs a hook, it spawns a shell that sources your profile (`~/.zshrc` or `~/.bashrc`). If your profile contains unconditional `echo` statements, that output gets prepended to your hook's JSON:638When Claude Code runs a hook, it spawns a shell that sources your profile (`~/.zshrc` or `~/.bashrc`). If your profile contains unconditional `echo` statements, that output gets prepended to your hook's JSON:

608 639 

609```640```text theme={null}

610Shell ready on arm64641Shell ready on arm64

611{"decision": "block", "reason": "Not allowed"}642{"decision": "block", "reason": "Not allowed"}

612```643```

Details

14 14 

15When you give Claude a task, it works through three phases: **gather context**, **take action**, and **verify results**. These phases blend together. Claude uses tools throughout, whether searching files to understand your code, editing to make changes, or running tests to check its work.15When you give Claude a task, it works through three phases: **gather context**, **take action**, and **verify results**. These phases blend together. Claude uses tools throughout, whether searching files to understand your code, editing to make changes, or running tests to check its work.

16 16 

17<img src="https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/agentic-loop.svg?fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=e30acfc80d6ff01ec877dd19c7af58b2" alt="The agentic loop: Your prompt leads to Claude gathering context, taking action, verifying results, and repeating until task complete. You can interrupt at any point." data-og-width="720" width="720" data-og-height="280" height="280" data-path="images/agentic-loop.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/agentic-loop.svg?w=280&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=8620f6ebce761a1e8bbf7f0a0255cc15 280w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/agentic-loop.svg?w=560&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=7b46b5ff4454aa4a03725eee625b39a0 560w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/agentic-loop.svg?w=840&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=7fa0397bc37d147e3bf3bb6296c6477f 840w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/agentic-loop.svg?w=1100&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=73b2a7040c4c93821c4d5bbee9f4a2d4 1100w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/agentic-loop.svg?w=1650&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=17703cbeb6f59b40a00ab24f56d5f8f9 1650w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/agentic-loop.svg?w=2500&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=20dedb60b95d45a1bd60a0cccaf3e1ff 2500w" />17<img src="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/agentic-loop.svg?fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=9d9cdb2102f397a0f57450ca5ca2a969" alt="The agentic loop: Your prompt leads to Claude gathering context, taking action, verifying results, and repeating until task complete. You can interrupt at any point." data-og-width="720" width="720" data-og-height="280" height="280" data-path="images/agentic-loop.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/agentic-loop.svg?w=280&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=9c6a590754c1c1b281d40fc9f10fed0d 280w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/agentic-loop.svg?w=560&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=9fb2f2fc174e285797cad25a9ca2a326 560w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/agentic-loop.svg?w=840&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=3a1b68dd7b861e8ff25391773d8ab60c 840w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/agentic-loop.svg?w=1100&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=e64edf9f5cbc62464617945cf08ef134 1100w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/agentic-loop.svg?w=1650&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=3bf3319e76669f11513c6bcc5bf86feb 1650w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/agentic-loop.svg?w=2500&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=9413880a191409ff3c81bafc8f7ab977 2500w" />

18 18 

19The loop adapts to what you ask. A question about your codebase might only need context gathering. A bug fix cycles through all three phases repeatedly. A refactor might involve extensive verification. Claude decides what each step requires based on what it learned from the previous step, chaining dozens of actions together and course-correcting along the way.19The loop adapts to what you ask. A question about your codebase might only need context gathering. A bug fix cycles through all three phases repeatedly. A refactor might involve extensive verification. Claude decides what each step requires based on what it learned from the previous step, chaining dozens of actions together and course-correcting along the way.

20 20 


34 34 

35Tools are what make Claude Code agentic. Without tools, Claude can only respond with text. With tools, Claude can act: read your code, edit files, run commands, search the web, and interact with external services. Each tool use returns information that feeds back into the loop, informing Claude's next decision.35Tools are what make Claude Code agentic. Without tools, Claude can only respond with text. With tools, Claude can act: read your code, edit files, run commands, search the web, and interact with external services. Each tool use returns information that feeds back into the loop, informing Claude's next decision.

36 36 

37The built-in tools generally fall into four categories, each representing a different kind of agency.37The built-in tools generally fall into five categories, each representing a different kind of agency.

38 38 

39| Category | What Claude can do |39| Category | What Claude can do |

40| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |40| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |


61 61 

62## What Claude can access62## What Claude can access

63 63 

64This guide focuses on the terminal. Claude Code also runs in [VS Code, JetBrains IDEs, and other environments](/en/ide-integrations).

65 

66When you run `claude` in a directory, Claude Code gains access to:64When you run `claude` in a directory, Claude Code gains access to:

67 65 

68* **Your project.** Files in your directory and subdirectories, plus files elsewhere with your permission.66* **Your project.** Files in your directory and subdirectories, plus files elsewhere with your permission.


73 71 

74Because Claude sees your whole project, it can work across it. When you ask Claude to "fix the authentication bug," it searches for relevant files, reads multiple files to understand context, makes coordinated edits across them, runs tests to verify the fix, and commits the changes if you ask. This is different from inline code assistants that only see the current file.72Because Claude sees your whole project, it can work across it. When you ask Claude to "fix the authentication bug," it searches for relevant files, reads multiple files to understand context, makes coordinated edits across them, runs tests to verify the fix, and commits the changes if you ask. This is different from inline code assistants that only see the current file.

75 73 

74## Environments and interfaces

75 

76The agentic loop, tools, and capabilities described above are the same everywhere you use Claude Code. What changes is where the code executes and how you interact with it.

77 

78### Execution environments

79 

80Claude Code runs in three environments, each with different tradeoffs for where your code executes.

81 

82| Environment | Where code runs | Use case |

83| ------------------ | --------------------------------------- | ---------------------------------------------------------- |

84| **Local** | Your machine | Default. Full access to your files, tools, and environment |

85| **Cloud** | Anthropic-managed VMs | Offload tasks, work on repos you don't have locally |

86| **Remote Control** | Your machine, controlled from a browser | Use the web UI while keeping everything local |

87 

88### Interfaces

89 

90You can access Claude Code through the terminal, the [desktop app](/en/desktop), [IDE extensions](/en/ide-integrations), [claude.ai/code](https://claude.ai/code), [Remote Control](/en/remote-control), [Slack](/en/slack), and [CI/CD pipelines](/en/github-actions). The interface determines how you see and interact with Claude, but the underlying agentic loop is identical. See [Use Claude Code everywhere](/en/overview#use-claude-code-everywhere) for the full list.

91 

76## Work with sessions92## Work with sessions

77 93 

78Claude Code saves your conversation locally as you work. Each message, tool use, and result is stored, which enables [rewinding](#undo-changes-with-checkpoints), [resuming, and forking](#resume-or-fork-sessions) sessions. Before Claude makes code changes, it also snapshots the affected files so you can revert if needed.94Claude Code saves your conversation locally as you work. Each message, tool use, and result is stored, which enables [rewinding](#undo-changes-with-checkpoints), [resuming, and forking](#resume-or-fork-sessions) sessions. Before Claude makes code changes, it also snapshots the affected files so you can revert if needed.


91 107 

92When you resume a session with `claude --continue` or `claude --resume`, you pick up where you left off using the same session ID. New messages append to the existing conversation. Your full conversation history is restored, but session-scoped permissions are not. You'll need to re-approve those.108When you resume a session with `claude --continue` or `claude --resume`, you pick up where you left off using the same session ID. New messages append to the existing conversation. Your full conversation history is restored, but session-scoped permissions are not. You'll need to re-approve those.

93 109 

94<img src="https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/session-continuity.svg?fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=f671b603cc856119c95475b9084ebfef" alt="Session continuity: resume continues the same session, fork creates a new branch with a new ID." data-og-width="560" width="560" data-og-height="280" height="280" data-path="images/session-continuity.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/session-continuity.svg?w=280&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=bddf1f33d419a27d7427acdf06058804 280w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/session-continuity.svg?w=560&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=417478eb9b86003b8eebaac058a8618a 560w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/session-continuity.svg?w=840&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=1d89d26e2c0487f067d187c3fa5f7170 840w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/session-continuity.svg?w=1100&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=8ea739a1f7860e4edbbcf74d444e37b2 1100w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/session-continuity.svg?w=1650&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=9cb5095d6a8920f04c3b78d31a69c809 1650w, https://mintcdn.com/claude-code/ELkJZG54dIaeldDC/images/session-continuity.svg?w=2500&fit=max&auto=format&n=ELkJZG54dIaeldDC&q=85&s=d67e1744e4878813d20c6c3f39d9459d 2500w" />110<img src="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/session-continuity.svg?fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=808da1b213c731bf98874c75981d688b" alt="Session continuity: resume continues the same session, fork creates a new branch with a new ID." data-og-width="560" width="560" data-og-height="280" height="280" data-path="images/session-continuity.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/session-continuity.svg?w=280&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=ba75f64bc571f3ef84a3237ef795bf22 280w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/session-continuity.svg?w=560&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=343ad422a171a2b909c87ed01c768745 560w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/session-continuity.svg?w=840&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=afce54d5e3b08cdb54d506332462b74c 840w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/session-continuity.svg?w=1100&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=28648c0a04cf7aef2de02d1c98491965 1100w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/session-continuity.svg?w=1650&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=a5287882beedaea54af606f682e4818d 1650w, https://mintcdn.com/claude-code/TBPmHzr19mDCuhZi/images/session-continuity.svg?w=2500&fit=max&auto=format&n=TBPmHzr19mDCuhZi&q=85&s=f392dbe67b63eead4a2aae67adfbfdbe 2500w" />

95 111 

96To branch off and try a different approach without affecting the original session, use the `--fork-session` flag:112To branch off and try a different approach without affecting the original session, use the `--fork-session` flag:

97 113 


142* **Default**: Claude asks before file edits and shell commands158* **Default**: Claude asks before file edits and shell commands

143* **Auto-accept edits**: Claude edits files without asking, still asks for commands159* **Auto-accept edits**: Claude edits files without asking, still asks for commands

144* **Plan mode**: Claude uses read-only tools only, creating a plan you can approve before execution160* **Plan mode**: Claude uses read-only tools only, creating a plan you can approve before execution

145* **Delegate mode**: Claude coordinates work through [agent teammates](/en/agent-teams) only, with no direct implementation. Only available when an agent team is active.

146 161 

147You can also allow specific commands in `.claude/settings.json` so Claude doesn't ask each time. This is useful for trusted commands like `npm test` or `git status`. Settings can be scoped from organization-wide policies down to personal preferences. See [Permissions](/en/permissions) for details.162You can also allow specific commands in `.claude/settings.json` so Claude doesn't ask each time. This is useful for trusted commands like `npm test` or `git status`. Settings can be scoped from organization-wide policies down to personal preferences. See [Permissions](/en/permissions) for details.

148 163 

Details

13 13 

14 **macOS users**: Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal:14 **macOS users**: Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+M`, `Alt+P`) require configuring Option as Meta in your terminal:

15 15 

16 * **iTerm2**: Settings → Profiles → Keys → Set Left/Right Option key to "Esc+"16 * **iTerm2**: settings → Profiles → Keys → set Left/Right Option key to "Esc+"

17 * **Terminal.app**: Settings → Profiles → Keyboard → Check "Use Option as Meta Key"17 * **Terminal.app**: settings → Profiles → Keyboard → check "Use Option as Meta Key"

18 * **VS Code**: Settings → Profiles → Keys → Set Left/Right Option key to "Esc+"18 * **VS Code**: settings → Profiles → Keys → set Left/Right Option key to "Esc+"

19 19 

20 See [Terminal configuration](/en/terminal-config) for details.20 See [Terminal configuration](/en/terminal-config) for details.

21</Note>21</Note>


23### General controls23### General controls

24 24 

25| Shortcut | Description | Context |25| Shortcut | Description | Context |

26| :------------------------------------------------ | :--------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- |26| :------------------------------------------------ | :------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------- |

27| `Ctrl+C` | Cancel current input or generation | Standard interrupt |27| `Ctrl+C` | Cancel current input or generation | Standard interrupt |

28| `Ctrl+F` | Kill all background agents. Press twice within 3 seconds to confirm | Background agent control |

28| `Ctrl+D` | Exit Claude Code session | EOF signal |29| `Ctrl+D` | Exit Claude Code session | EOF signal |

29| `Ctrl+G` | Open in default text editor | Edit your prompt or custom response in your default text editor |30| `Ctrl+G` | Open in default text editor | Edit your prompt or custom response in your default text editor |

30| `Ctrl+L` | Clear terminal screen | Keeps conversation history |31| `Ctrl+L` | Clear terminal screen | Keeps conversation history |


36| `Left/Right arrows` | Cycle through dialog tabs | Navigate between tabs in permission dialogs and menus |37| `Left/Right arrows` | Cycle through dialog tabs | Navigate between tabs in permission dialogs and menus |

37| `Up/Down arrows` | Navigate command history | Recall previous inputs |38| `Up/Down arrows` | Navigate command history | Recall previous inputs |

38| `Esc` + `Esc` | Rewind or summarize | Restore code and/or conversation to a previous point, or summarize from a selected message |39| `Esc` + `Esc` | Rewind or summarize | Restore code and/or conversation to a previous point, or summarize from a selected message |

39| `Shift+Tab` or `Alt+M` (some configurations) | Toggle permission modes | Switch between Auto-Accept Mode, Plan Mode, and normal mode. When an [agent team](/en/agent-teams) is active, the cycle also includes Delegate Mode. |40| `Shift+Tab` or `Alt+M` (some configurations) | Toggle permission modes | Switch between Auto-Accept Mode, Plan Mode, and normal mode. |

40| `Option+P` (macOS) or `Alt+P` (Windows/Linux) | Switch model | Switch models without clearing your prompt |41| `Option+P` (macOS) or `Alt+P` (Windows/Linux) | Switch model | Switch models without clearing your prompt |

41| `Option+T` (macOS) or `Alt+T` (Windows/Linux) | Toggle extended thinking | Enable or disable extended thinking mode. Run `/terminal-setup` first to enable this shortcut |42| `Option+T` (macOS) or `Alt+T` (Windows/Linux) | Toggle extended thinking | Enable or disable extended thinking mode. Run `/terminal-setup` first to enable this shortcut |

42 43 


107| `/model` | Select or change the AI model. With Opus 4.6, use left/right arrows to [adjust effort level](/en/model-config#adjust-effort-level). The change takes effect immediately without waiting for the current response to finish |108| `/model` | Select or change the AI model. With Opus 4.6, use left/right arrows to [adjust effort level](/en/model-config#adjust-effort-level). The change takes effect immediately without waiting for the current response to finish |

108| `/permissions` | View or update [permissions](/en/permissions#manage-permissions) |109| `/permissions` | View or update [permissions](/en/permissions#manage-permissions) |

109| `/plan` | Enter plan mode directly from the prompt |110| `/plan` | Enter plan mode directly from the prompt |

110| `/rename <name>` | Rename the current session for easier identification |111| `/rename [name]` | Rename the current session. Without a name, generates one from conversation history (requires at least one message in the conversation context). |

111| `/resume [session]` | Resume a conversation by ID or name, or open the session picker |112| `/resume [session]` | Resume a conversation by ID or name, or open the session picker |

112| `/rewind` | Rewind the conversation and/or code, or summarize from a selected message |113| `/rewind` | Rewind the conversation and/or code, or summarize from a selected message |

113| `/stats` | Visualize daily usage, session history, streaks, and model preferences |114| `/stats` | Visualize daily usage, session history, streaks, and model preferences |

114| `/status` | Open the Settings interface (Status tab) showing version, model, account, and connectivity |115| `/status` | Open the Settings interface (Status tab) showing version, model, account, and connectivity |

115| `/statusline` | Set up Claude Code's status line UI |116| `/statusline` | Set up Claude Code's status line UI |

116| `/copy` | Copy the last assistant response to clipboard |117| `/copy` | Copy the last response to clipboard. When code blocks are present, shows an interactive picker to select individual code blocks or the full response |

117| `/tasks` | List and manage background tasks |118| `/tasks` | List and manage background tasks |

118| `/teleport` | Resume a remote session from claude.ai (subscribers only) |119| `/teleport` | Resume a remote session from claude.ai (subscribers only) |

120| `/desktop` | Hand off the current CLI session to the Claude Code Desktop app (macOS and Windows only) |

119| `/theme` | Change the color theme |121| `/theme` | Change the color theme |

120| `/todos` | List current TODO items |122| `/todos` | List current TODO items |

121| `/usage` | For subscription plans only: show plan usage limits and rate limit status |123| `/usage` | For subscription plans only: show plan usage limits and rate limit status |


202 204 

203Claude Code maintains command history for the current session:205Claude Code maintains command history for the current session:

204 206 

205* History is stored per working directory207* Input history is stored per working directory

206* Cleared with `/clear` command208* Input history resets when you run `/clear` to start a new session. The previous session's conversation is preserved and can be resumed.

207* Use Up/Down arrows to navigate (see keyboard shortcuts above)209* Use Up/Down arrows to navigate (see keyboard shortcuts above)

208* **Note**: History expansion (`!`) is disabled by default210* **Note**: history expansion (`!`) is disabled by default

209 211 

210### Reverse search with Ctrl+R212### Reverse search with Ctrl+R

211 213 

212Press `Ctrl+R` to interactively search through your command history:214Press `Ctrl+R` to interactively search through your command history:

213 215 

2141. **Start search**: Press `Ctrl+R` to activate reverse history search2161. **Start search**: press `Ctrl+R` to activate reverse history search

2152. **Type query**: Enter text to search for in previous commands - the search term will be highlighted in matching results2172. **Type query**: enter text to search for in previous commands. The search term is highlighted in matching results

2163. **Navigate matches**: Press `Ctrl+R` again to cycle through older matches2183. **Navigate matches**: press `Ctrl+R` again to cycle through older matches

2174. **Accept match**:2194. **Accept match**:

218 * Press `Tab` or `Esc` to accept the current match and continue editing220 * Press `Tab` or `Esc` to accept the current match and continue editing

219 * Press `Enter` to accept and execute the command immediately221 * Press `Enter` to accept and execute the command immediately


221 * Press `Ctrl+C` to cancel and restore your original input223 * Press `Ctrl+C` to cancel and restore your original input

222 * Press `Backspace` on empty search to cancel224 * Press `Backspace` on empty search to cancel

223 225 

224The search displays matching commands with the search term highlighted, making it easy to find and reuse previous inputs.226The search displays matching commands with the search term highlighted, so you can find and reuse previous inputs.

225 227 

226## Background bash commands228## Background bash commands

227 229 

keybindings.md +2 −2

Details

292 292 

293For example:293For example:

294 294 

295```295```text theme={null}

296ctrl+k Single key with modifier296ctrl+k Single key with modifier

297shift+tab Shift + Tab297shift+tab Shift + Tab

298meta+p Command/Meta + P298meta+p Command/Meta + P


309 309 

310Chords are sequences of keystrokes separated by spaces:310Chords are sequences of keystrokes separated by spaces:

311 311 

312```312```text theme={null}

313ctrl+k ctrl+s Press Ctrl+K, release, then Ctrl+S313ctrl+k ctrl+s Press Ctrl+K, release, then Ctrl+S

314```314```

315 315 

mcp.md +25 −0

Details

543 * If servers with the same names already exist, they will get a numerical suffix (for example, `server_1`)543 * If servers with the same names already exist, they will get a numerical suffix (for example, `server_1`)

544</Tip>544</Tip>

545 545 

546## Use MCP servers from Claude.ai

547 

548If you've logged into Claude Code with a [Claude.ai](https://claude.ai) account, MCP servers you've added in Claude.ai are automatically available in Claude Code:

549 

550<Steps>

551 <Step title="Configure MCP servers in Claude.ai">

552 Add servers at [claude.ai/settings/connectors](https://claude.ai/settings/connectors). On Team and Enterprise plans, only admins can add servers.

553 </Step>

554 

555 <Step title="Authenticate the MCP server">

556 Complete any required authentication steps in Claude.ai.

557 </Step>

558 

559 <Step title="View and manage servers in Claude Code">

560 In Claude Code, use the command:

561 

562 ```

563 # Within Claude Code, see all MCP servers including Claude.ai ones

564 > /mcp

565 ```

566 

567 Claude.ai servers appear in the list with indicators showing they come from Claude.ai.

568 </Step>

569</Steps>

570 

546## Use Claude Code as an MCP server571## Use Claude Code as an MCP server

547 572 

548You can use Claude Code itself as an MCP server that other applications can connect to:573You can use Claude Code itself as an MCP server that other applications can connect to:

memory.md +19 −3

Details

37Auto memory is a persistent directory where Claude records learnings, patterns, and insights as it works. Unlike CLAUDE.md files that contain instructions you write for Claude, auto memory contains notes Claude writes for itself based on what it discovers during sessions.37Auto memory is a persistent directory where Claude records learnings, patterns, and insights as it works. Unlike CLAUDE.md files that contain instructions you write for Claude, auto memory contains notes Claude writes for itself based on what it discovers during sessions.

38 38 

39<Note>39<Note>

40 Auto memory is being rolled out gradually. If you aren't seeing auto memory, you can opt in by setting `CLAUDE_CODE_DISABLE_AUTO_MEMORY=0` in your environment.40 Auto memory is enabled by default. To toggle it on or off, use `/memory` and select the auto-memory toggle.

41</Note>41</Note>

42 42 

43### What Claude remembers43### What Claude remembers


73 73 

74### Manage auto memory74### Manage auto memory

75 75 

76Auto memory files are markdown files you can edit at any time. Use `/memory` to open the file selector, which includes your auto memory entrypoint alongside your CLAUDE.md files.76Auto memory files are markdown files you can edit at any time. Use `/memory` to open the file selector, which includes your auto memory entrypoint alongside your CLAUDE.md files. The `/memory` selector also includes an auto-memory toggle to turn the feature on or off.

77 77 

78To ask Claude to save something specific, tell it directly: "remember that we use pnpm, not npm" or "save to memory that the API tests require a local Redis instance".78To ask Claude to save something specific, tell it directly: "remember that we use pnpm, not npm" or "save to memory that the API tests require a local Redis instance".

79 79 

80When neither variable is set, auto memory follows the gradual rollout. The variable name uses double-negative logic: `DISABLE=0` means "don't disable" and forces auto memory on.80You can also control auto memory through settings or environment variables.

81 

82Disable auto memory for all projects by adding `autoMemoryEnabled` to your user settings:

83 

84```json theme={null}

85// ~/.claude/settings.json

86{ "autoMemoryEnabled": false }

87```

88 

89Disable auto memory for a single project by adding `autoMemoryEnabled` to the project settings:

90 

91```json theme={null}

92// .claude/settings.json

93{ "autoMemoryEnabled": false }

94```

95 

96Override all other settings with the `CLAUDE_CODE_DISABLE_AUTO_MEMORY` environment variable. This takes precedence over both the `/memory` toggle and `settings.json`, making it useful for CI or managed environments:

81 97 

82```bash theme={null}98```bash theme={null}

83export CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 # Force off99export CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 # Force off

Details

14* RBAC permissions to create Microsoft Foundry resources and deployments14* RBAC permissions to create Microsoft Foundry resources and deployments

15* Azure CLI installed and configured (optional - only needed if you don't have another mechanism for getting credentials)15* Azure CLI installed and configured (optional - only needed if you don't have another mechanism for getting credentials)

16 16 

17<Note>

18 If you are deploying Claude Code to multiple users, [pin your model versions](#4-pin-model-versions) to prevent breakage when Anthropic releases new models.

19</Note>

20 

17## Setup21## Setup

18 22 

19### 1. Provision Microsoft Foundry resource23### 1. Provision Microsoft Foundry resource


59 63 

60### 3. Configure Claude Code64### 3. Configure Claude Code

61 65 

62Set the following environment variables to enable Microsoft Foundry. Note that your deployments' names are set as the model identifiers in Claude Code (may be optional if using suggested deployment names).66Set the following environment variables to enable Microsoft Foundry:

63 67 

64```bash theme={null}68```bash theme={null}

65# Enable Microsoft Foundry integration69# Enable Microsoft Foundry integration


69export ANTHROPIC_FOUNDRY_RESOURCE={resource}73export ANTHROPIC_FOUNDRY_RESOURCE={resource}

70# Or provide the full base URL:74# Or provide the full base URL:

71# export ANTHROPIC_FOUNDRY_BASE_URL=https://{resource}.services.ai.azure.com/anthropic75# export ANTHROPIC_FOUNDRY_BASE_URL=https://{resource}.services.ai.azure.com/anthropic

76```

72 77 

73# Set models to your resource's deployment names78### 4. Pin model versions

74export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-5'79 

75export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5'80<Warning>

81 Pin specific model versions for every deployment. If you use model aliases (`sonnet`, `opus`, `haiku`) without pinning, Claude Code may attempt to use a newer model version that isn't available in your Foundry account, breaking existing users when Anthropic releases updates. When you create Azure deployments, select a specific model version rather than "auto-update to latest."

82</Warning>

83 

84Set the model variables to match the deployment names you created in step 1:

85 

86```bash theme={null}

76export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'87export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'

88export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-6'

89export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5'

77```90```

78 91 

79For more details on model configuration options, see [Model configuration](/en/model-config).92For current and legacy model IDs, see [Models overview](https://platform.claude.com/docs/en/about-claude/models/overview). See [Model configuration](/en/model-config#pin-models-for-third-party-deployments) for the full list of environment variables.

80 93 

81## Azure RBAC configuration94## Azure RBAC configuration

82 95 

model-config.md +84 −12

Details

25| Model alias | Behavior |25| Model alias | Behavior |

26| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |26| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

27| **`default`** | Recommended model setting, depending on your account type |27| **`default`** | Recommended model setting, depending on your account type |

28| **`sonnet`** | Uses the latest Sonnet model (currently Sonnet 4.5) for daily coding tasks |28| **`sonnet`** | Uses the latest Sonnet model (currently Sonnet 4.6) for daily coding tasks |

29| **`opus`** | Uses the latest Opus model (currently Opus 4.6) for complex reasoning tasks |29| **`opus`** | Uses the latest Opus model (currently Opus 4.6) for complex reasoning tasks |

30| **`haiku`** | Uses the fast and efficient Haiku model for simple tasks |30| **`haiku`** | Uses the fast and efficient Haiku model for simple tasks |

31| **`sonnet[1m]`** | Uses Sonnet with a [1 million token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window) for long sessions |31| **`sonnet[1m]`** | Uses Sonnet with a [1 million token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window) for long sessions |


55 55 

56Example settings file:56Example settings file:

57 57 

58```58```json theme={null}

59{59{

60 "permissions": {60 "permissions": {

61 ...61 ...


64}64}

65```65```

66 66 

67## Restrict model selection

68 

69Enterprise administrators can use `availableModels` in [managed or policy settings](/en/settings#settings-files) to restrict which models users can select.

70 

71When `availableModels` is set, users cannot switch to models not in the list via `/model`, `--model` flag, Config tool, or `ANTHROPIC_MODEL` environment variable.

72 

73```json theme={null}

74{

75 "availableModels": ["sonnet", "haiku"]

76}

77```

78 

79### Default model behavior

80 

81The Default option in the model picker is not affected by `availableModels`. It always remains available and represents the system's runtime default [based on the user's subscription tier](#default-model-setting).

82 

83Even with `availableModels: []`, users can still use Claude Code with the Default model for their tier.

84 

85### Control the model users run on

86 

87To fully control the model experience, use `availableModels` together with the `model` setting:

88 

89* **availableModels**: restricts what users can switch to

90* **model**: sets the explicit model override, taking precedence over the Default

91 

92This example ensures all users run Sonnet 4.6 and can only choose between Sonnet and Haiku:

93 

94```json theme={null}

95{

96 "model": "sonnet",

97 "availableModels": ["sonnet", "haiku"]

98}

99```

100 

101### Merge behavior

102 

103When `availableModels` is set at multiple levels, such as user settings and project settings, arrays are merged and deduplicated. To enforce a strict allowlist, set `availableModels` in managed or policy settings which take highest priority.

104 

67## Special model behavior105## Special model behavior

68 106 

69### `default` model setting107### `default` model setting

70 108 

71The behavior of `default` depends on your account type:109The behavior of `default` depends on your account type:

72 110 

73* **Max and Teams**: defaults to Opus 4.6111* **Max and Team Premium**: defaults to Opus 4.6

74* **Pro**: defaults to Opus 4.6 in Claude Code112* **Pro and Team Standard**: defaults to Sonnet 4.6

75* **Enterprise**: Opus 4.6 is available but not the default113* **Enterprise**: Opus 4.6 is available but not the default

76 114 

77Claude Code may automatically fall back to Sonnet if you hit a usage threshold with Opus.115Claude Code may automatically fall back to Sonnet if you hit a usage threshold with Opus.


102 140 

103Effort is currently supported on Opus 4.6. The effort slider appears in `/model` when a supported model is selected.141Effort is currently supported on Opus 4.6. The effort slider appears in `/model` when a supported model is selected.

104 142 

105### Extended context with \[1m]143To disable adaptive reasoning on Opus 4.6 and Sonnet 4.6 and revert to the previous fixed thinking budget, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1`. When disabled, these models use the fixed budget controlled by `MAX_THINKING_TOKENS`. See [environment variables](/en/settings#environment-variables).

144 

145### Extended context

106 146 

107The `[1m]` suffix enables a [1 million token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window) for long sessions.147Opus 4.6 and Sonnet 4.6 support a [1 million token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows#1m-token-context-window) for long sessions with large codebases.

108 148 

109<Note>149<Note>

110 For Opus 4.6, the 1M context window is available for API and Claude Code pay-as-you-go users. Pro, Max, Teams, and Enterprise subscription users do not have access to Opus 4.6 1M context at launch.150 The 1M context window is currently in beta. Features, pricing, and availability may change.

111</Note>151</Note>

112 152 

113You can use the `[1m]` suffix with model aliases or full model names:153Extended context is available for:

154 

155* **API and pay-as-you-go users**: full access to 1M context

156* **Pro, Max, Teams, and Enterprise subscribers**: available with [extra usage](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) enabled

157 

158To disable 1M context entirely, set `CLAUDE_CODE_DISABLE_1M_CONTEXT=1`. This removes 1M model variants from the model picker. See [environment variables](/en/settings#environment-variables).

159 

160Selecting a 1M model does not immediately change billing. Your session uses standard rates until it exceeds 200K tokens of context. Beyond 200K tokens, requests are charged at [long-context pricing](https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing) with dedicated [rate limits](https://platform.claude.com/docs/en/api/rate-limits#long-context-rate-limits). For subscribers, tokens beyond 200K are billed as extra usage rather than through the subscription.

161 

162If your account supports 1M context, the option appears in the model picker (`/model`) in the latest versions of Claude Code. If you don't see it, try restarting your session.

163 

164You can also use the `[1m]` suffix with model aliases or full model names:

114 165 

115```bash theme={null}166```bash theme={null}

116# Use the sonnet[1m] alias167# Use the sonnet[1m] alias

117/model sonnet[1m]168/model sonnet[1m]

118 169 

119# Or append [1m] to a full model name170# Or append [1m] to a full model name

120/model claude-sonnet-4-5-20250929[1m]171/model claude-sonnet-4-6[1m]

121```172```

122 173 

123Note: Extended context models have

124[different pricing](https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing).

125 

126## Checking your current model174## Checking your current model

127 175 

128You can see which model you're currently using in several ways:176You can see which model you're currently using in several ways:


145Note: `ANTHROPIC_SMALL_FAST_MODEL` is deprecated in favor of193Note: `ANTHROPIC_SMALL_FAST_MODEL` is deprecated in favor of

146`ANTHROPIC_DEFAULT_HAIKU_MODEL`.194`ANTHROPIC_DEFAULT_HAIKU_MODEL`.

147 195 

196### Pin models for third-party deployments

197 

198When deploying Claude Code through [Bedrock](/en/amazon-bedrock), [Vertex AI](/en/google-vertex-ai), or [Foundry](/en/microsoft-foundry), pin model versions before rolling out to users.

199 

200Without pinning, Claude Code uses model aliases (`sonnet`, `opus`, `haiku`) that resolve to the latest version. When Anthropic releases a new model, users whose accounts don't have the new version enabled will break silently.

201 

202<Warning>

203 Set all three model environment variables to specific version IDs as part of your initial setup. Skipping this step means a Claude Code update can break your users without any action on your part.

204</Warning>

205 

206Use the following environment variables with version-specific model IDs for your provider:

207 

208| Provider | Example |

209| :-------- | :---------------------------------------------------------------------- |

210| Bedrock | `export ANTHROPIC_DEFAULT_OPUS_MODEL='us.anthropic.claude-opus-4-6-v1'` |

211| Vertex AI | `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'` |

212| Foundry | `export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-6'` |

213 

214Apply the same pattern for `ANTHROPIC_DEFAULT_SONNET_MODEL` and `ANTHROPIC_DEFAULT_HAIKU_MODEL`. For current and legacy model IDs across all providers, see [Models overview](https://platform.claude.com/docs/en/about-claude/models/overview). To upgrade users to a new model version, update these environment variables and redeploy.

215 

216<Note>

217 The `settings.availableModels` allowlist still applies when using third-party providers. Filtering matches on the model alias (`opus`, `sonnet`, `haiku`), not the provider-specific model ID.

218</Note>

219 

148### Prompt caching configuration220### Prompt caching configuration

149 221 

150Claude Code automatically uses [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) to optimize performance and reduce costs. You can disable prompt caching globally or for specific model tiers:222Claude Code automatically uses [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) to optimize performance and reduce costs. You can disable prompt caching globally or for specific model tiers:

Details

6 6 

7> Learn how to enable and configure OpenTelemetry for Claude Code.7> Learn how to enable and configure OpenTelemetry for Claude Code.

8 8 

9Claude Code supports OpenTelemetry (OTel) metrics and events for monitoring and observability.9Track Claude Code usage, costs, and tool activity across your organization by exporting telemetry data through OpenTelemetry (OTel). Claude Code exports metrics as time series data via the standard metrics protocol, and events via the logs/events protocol. Configure your metrics and logs backends to match your monitoring requirements.

10 

11All metrics are time series data exported via OpenTelemetry's standard metrics protocol, and events are exported via OpenTelemetry's logs/events protocol. It is the user's responsibility to ensure their metrics and logs backends are properly configured and that the aggregation granularity meets their monitoring requirements.

12 10 

13## Quick start11## Quick start

14 12 


56 "OTEL_METRICS_EXPORTER": "otlp",54 "OTEL_METRICS_EXPORTER": "otlp",

57 "OTEL_LOGS_EXPORTER": "otlp",55 "OTEL_LOGS_EXPORTER": "otlp",

58 "OTEL_EXPORTER_OTLP_PROTOCOL": "grpc",56 "OTEL_EXPORTER_OTLP_PROTOCOL": "grpc",

59 "OTEL_EXPORTER_OTLP_ENDPOINT": "http://collector.company.com:4317",57 "OTEL_EXPORTER_OTLP_ENDPOINT": "http://collector.example.com:4317",

60 "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer company-token"58 "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer example-token"

61 }59 }

62}60}

63```61```


71### Common configuration variables69### Common configuration variables

72 70 

73| Environment Variable | Description | Example Values |71| Environment Variable | Description | Example Values |

74| ----------------------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------ |72| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |

75| `CLAUDE_CODE_ENABLE_TELEMETRY` | Enables telemetry collection (required) | `1` |73| `CLAUDE_CODE_ENABLE_TELEMETRY` | Enables telemetry collection (required) | `1` |

76| `OTEL_METRICS_EXPORTER` | Metrics exporter type(s) (comma-separated) | `console`, `otlp`, `prometheus` |74| `OTEL_METRICS_EXPORTER` | Metrics exporter types, comma-separated | `console`, `otlp`, `prometheus` |

77| `OTEL_LOGS_EXPORTER` | Logs/events exporter type(s) (comma-separated) | `console`, `otlp` |75| `OTEL_LOGS_EXPORTER` | Logs/events exporter types, comma-separated | `console`, `otlp` |

78| `OTEL_EXPORTER_OTLP_PROTOCOL` | Protocol for OTLP exporter (all signals) | `grpc`, `http/json`, `http/protobuf` |76| `OTEL_EXPORTER_OTLP_PROTOCOL` | Protocol for OTLP exporter, applies to all signals | `grpc`, `http/json`, `http/protobuf` |

79| `OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP collector endpoint (all signals) | `http://localhost:4317` |77| `OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP collector endpoint for all signals | `http://localhost:4317` |

80| `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL` | Protocol for metrics (overrides general) | `grpc`, `http/json`, `http/protobuf` |78| `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL` | Protocol for metrics, overrides general setting | `grpc`, `http/json`, `http/protobuf` |

81| `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | OTLP metrics endpoint (overrides general) | `http://localhost:4318/v1/metrics` |79| `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | OTLP metrics endpoint, overrides general setting | `http://localhost:4318/v1/metrics` |

82| `OTEL_EXPORTER_OTLP_LOGS_PROTOCOL` | Protocol for logs (overrides general) | `grpc`, `http/json`, `http/protobuf` |80| `OTEL_EXPORTER_OTLP_LOGS_PROTOCOL` | Protocol for logs, overrides general setting | `grpc`, `http/json`, `http/protobuf` |

83| `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` | OTLP logs endpoint (overrides general) | `http://localhost:4318/v1/logs` |81| `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` | OTLP logs endpoint, overrides general setting | `http://localhost:4318/v1/logs` |

84| `OTEL_EXPORTER_OTLP_HEADERS` | Authentication headers for OTLP | `Authorization=Bearer token` |82| `OTEL_EXPORTER_OTLP_HEADERS` | Authentication headers for OTLP | `Authorization=Bearer token` |

85| `OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY` | Client key for mTLS authentication | Path to client key file |83| `OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY` | Client key for mTLS authentication | Path to client key file |

86| `OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE` | Client certificate for mTLS authentication | Path to client cert file |84| `OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE` | Client certificate for mTLS authentication | Path to client cert file |


88| `OTEL_LOGS_EXPORT_INTERVAL` | Logs export interval in milliseconds (default: 5000) | `1000`, `10000` |86| `OTEL_LOGS_EXPORT_INTERVAL` | Logs export interval in milliseconds (default: 5000) | `1000`, `10000` |

89| `OTEL_LOG_USER_PROMPTS` | Enable logging of user prompt content (default: disabled) | `1` to enable |87| `OTEL_LOG_USER_PROMPTS` | Enable logging of user prompt content (default: disabled) | `1` to enable |

90| `OTEL_LOG_TOOL_DETAILS` | Enable logging of MCP server/tool names and skill names in tool events (default: disabled) | `1` to enable |88| `OTEL_LOG_TOOL_DETAILS` | Enable logging of MCP server/tool names and skill names in tool events (default: disabled) | `1` to enable |

89| `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` | Metrics temporality preference (default: `delta`). Set to `cumulative` if your backend expects cumulative temporality | `delta`, `cumulative` |

91| `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS` | Interval for refreshing dynamic headers (default: 1740000ms / 29 minutes) | `900000` |90| `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS` | Interval for refreshing dynamic headers (default: 1740000ms / 29 minutes) | `900000` |

92 91 

93### Metrics cardinality control92### Metrics cardinality control


149<Warning>148<Warning>

150 **Important formatting requirements for OTEL\_RESOURCE\_ATTRIBUTES:**149 **Important formatting requirements for OTEL\_RESOURCE\_ATTRIBUTES:**

151 150 

152 The `OTEL_RESOURCE_ATTRIBUTES` environment variable follows the [W3C Baggage specification](https://www.w3.org/TR/baggage/), which has strict formatting requirements:151 The `OTEL_RESOURCE_ATTRIBUTES` environment variable uses comma-separated key=value pairs with strict formatting requirements:

153 152 

154 * **No spaces allowed**: Values cannot contain spaces. For example, `user.organizationName=My Company` is invalid153 * **No spaces allowed**: Values cannot contain spaces. For example, `user.organizationName=My Company` is invalid

155 * **Format**: Must be comma-separated key=value pairs: `key1=value1,key2=value2`154 * **Format**: Must be comma-separated key=value pairs: `key1=value1,key2=value2`


175 174 

176### Example configurations175### Example configurations

177 176 

177Set these environment variables before running `claude`. Each block shows a complete configuration for a different exporter or deployment scenario:

178 

178```bash theme={null}179```bash theme={null}

179# Console debugging (1-second intervals)180# Console debugging (1-second intervals)

180export CLAUDE_CODE_ENABLE_TELEMETRY=1181export CLAUDE_CODE_ENABLE_TELEMETRY=1


201export OTEL_METRICS_EXPORTER=otlp202export OTEL_METRICS_EXPORTER=otlp

202export OTEL_LOGS_EXPORTER=otlp203export OTEL_LOGS_EXPORTER=otlp

203export OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/protobuf204export OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/protobuf

204export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://metrics.company.com:4318205export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://metrics.example.com:4318

205export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=grpc206export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=grpc

206export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=http://logs.company.com:4317207export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=http://logs.example.com:4317

207 208 

208# Metrics only (no events/logs)209# Metrics only (no events/logs)

209export CLAUDE_CODE_ENABLE_TELEMETRY=1210export CLAUDE_CODE_ENABLE_TELEMETRY=1


225All metrics and events share these standard attributes:226All metrics and events share these standard attributes:

226 227 

227| Attribute | Description | Controlled By |228| Attribute | Description | Controlled By |

228| ------------------- | -------------------------------------------------------------------- | --------------------------------------------------- |229| ------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------- |

229| `session.id` | Unique session identifier | `OTEL_METRICS_INCLUDE_SESSION_ID` (default: true) |230| `session.id` | Unique session identifier | `OTEL_METRICS_INCLUDE_SESSION_ID` (default: true) |

230| `app.version` | Current Claude Code version | `OTEL_METRICS_INCLUDE_VERSION` (default: false) |231| `app.version` | Current Claude Code version | `OTEL_METRICS_INCLUDE_VERSION` (default: false) |

231| `organization.id` | Organization UUID (when authenticated) | Always included when available |232| `organization.id` | Organization UUID (when authenticated) | Always included when available |

232| `user.account_uuid` | Account UUID (when authenticated) | `OTEL_METRICS_INCLUDE_ACCOUNT_UUID` (default: true) |233| `user.account_uuid` | Account UUID (when authenticated) | `OTEL_METRICS_INCLUDE_ACCOUNT_UUID` (default: true) |

233| `terminal.type` | Terminal type (for example, `iTerm.app`, `vscode`, `cursor`, `tmux`) | Always included when detected |234| `user.id` | Anonymous device/installation identifier, generated per Claude Code installation | Always included |

235| `user.email` | User email address (when authenticated via OAuth) | Always included when available |

236| `terminal.type` | Terminal type, such as `iTerm.app`, `vscode`, `cursor`, or `tmux` | Always included when detected |

234 237 

235### Metrics238### Metrics

236 239 


249 252 

250### Metric details253### Metric details

251 254 

255Each metric includes the standard attributes listed above. Metrics with additional context-specific attributes are noted below.

256 

252#### Session counter257#### Session counter

253 258 

254Incremented at the start of each session.259Incremented at the start of each session.


289**Attributes**:294**Attributes**:

290 295 

291* All [standard attributes](#standard-attributes)296* All [standard attributes](#standard-attributes)

292* `model`: Model identifier (for example, "claude-sonnet-4-5-20250929")297* `model`: Model identifier (for example, "claude-sonnet-4-6")

293 298 

294#### Token counter299#### Token counter

295 300 


299 304 

300* All [standard attributes](#standard-attributes)305* All [standard attributes](#standard-attributes)

301* `type`: (`"input"`, `"output"`, `"cacheRead"`, `"cacheCreation"`)306* `type`: (`"input"`, `"output"`, `"cacheRead"`, `"cacheCreation"`)

302* `model`: Model identifier (for example, "claude-sonnet-4-5-20250929")307* `model`: Model identifier (for example, "claude-sonnet-4-6")

303 308 

304#### Code edit tool decision counter309#### Code edit tool decision counter

305 310 


308**Attributes**:313**Attributes**:

309 314 

310* All [standard attributes](#standard-attributes)315* All [standard attributes](#standard-attributes)

311* `tool`: Tool name (`"Edit"`, `"Write"`, `"NotebookEdit"`)316* `tool_name`: Tool name (`"Edit"`, `"Write"`, `"NotebookEdit"`)

312* `decision`: User decision (`"accept"`, `"reject"`)317* `decision`: User decision (`"accept"`, `"reject"`)

313* `language`: Programming language of the edited file (for example, `"TypeScript"`, `"Python"`, `"JavaScript"`, `"Markdown"`). Returns `"unknown"` for unrecognized file extensions.318* `source`: Decision source - `"config"`, `"hook"`, `"user_permanent"`, `"user_temporary"`, `"user_abort"`, or `"user_reject"`

319* `language`: Programming language of the edited file, such as `"TypeScript"`, `"Python"`, `"JavaScript"`, or `"Markdown"`. Returns `"unknown"` for unrecognized file extensions.

314 320 

315#### Active time counter321#### Active time counter

316 322 

317Tracks actual time spent actively using Claude Code (not idle time). This metric is incremented during user interactions such as typing prompts or receiving responses.323Tracks actual time spent actively using Claude Code, excluding idle time. This metric is incremented during user interactions (typing, reading responses) and during CLI processing (tool execution, AI response generation).

318 324 

319**Attributes**:325**Attributes**:

320 326 

321* All [standard attributes](#standard-attributes)327* All [standard attributes](#standard-attributes)

328* `type`: `"user"` for keyboard interactions, `"cli"` for tool execution and AI responses

322 329 

323### Events330### Events

324 331 

325Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured):332Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured):

326 333 

334#### Event correlation attributes

335 

336When a user submits a prompt, Claude Code may make multiple API calls and run several tools. The `prompt.id` attribute lets you tie all of those events back to the single prompt that triggered them.

337 

338| Attribute | Description |

339| ----------- | ------------------------------------------------------------------------------------ |

340| `prompt.id` | UUID v4 identifier linking all events produced while processing a single user prompt |

341 

342To trace all activity triggered by a single prompt, filter your events by a specific `prompt.id` value. This returns the user\_prompt event, any api\_request events, and any tool\_result events that occurred while processing that prompt.

343 

344<Note>

345 `prompt.id` is intentionally excluded from metrics because each prompt generates a unique ID, which would create an ever-growing number of time series. Use it for event-level analysis and audit trails only.

346</Note>

347 

327#### User prompt event348#### User prompt event

328 349 

329Logged when a user submits a prompt.350Logged when a user submits a prompt.


355* `success`: `"true"` or `"false"`376* `success`: `"true"` or `"false"`

356* `duration_ms`: Execution time in milliseconds377* `duration_ms`: Execution time in milliseconds

357* `error`: Error message (if failed)378* `error`: Error message (if failed)

358* `decision`: Either `"accept"` or `"reject"`379* `decision_type`: Either `"accept"` or `"reject"`

359* `source`: Decision source - `"config"`, `"user_permanent"`, `"user_temporary"`, `"user_abort"`, or `"user_reject"`380* `decision_source`: Decision source - `"config"`, `"hook"`, `"user_permanent"`, `"user_temporary"`, `"user_abort"`, or `"user_reject"`

381* `tool_result_size_bytes`: Size of the tool result in bytes

382* `mcp_server_scope`: MCP server scope identifier (for MCP tools)

360* `tool_parameters`: JSON string containing tool-specific parameters (when available)383* `tool_parameters`: JSON string containing tool-specific parameters (when available)

361 * For Bash tool: includes `bash_command`, `full_command`, `timeout`, `description`, `sandbox`384 * For Bash tool: includes `bash_command`, `full_command`, `timeout`, `description`, `dangerouslyDisableSandbox`, and `git_commit_id` (the commit SHA, when a `git commit` command succeeds)

362 * For MCP tools (when `OTEL_LOG_TOOL_DETAILS=1`): includes `mcp_server_name`, `mcp_tool_name`385 * For MCP tools (when `OTEL_LOG_TOOL_DETAILS=1`): includes `mcp_server_name`, `mcp_tool_name`

363 * For Skill tool (when `OTEL_LOG_TOOL_DETAILS=1`): includes `skill_name`386 * For Skill tool (when `OTEL_LOG_TOOL_DETAILS=1`): includes `skill_name`

364 387 


374* `event.name`: `"api_request"`397* `event.name`: `"api_request"`

375* `event.timestamp`: ISO 8601 timestamp398* `event.timestamp`: ISO 8601 timestamp

376* `event.sequence`: monotonically increasing counter for ordering events within a session399* `event.sequence`: monotonically increasing counter for ordering events within a session

377* `model`: Model used (for example, "claude-sonnet-4-5-20250929")400* `model`: Model used (for example, "claude-sonnet-4-6")

378* `cost_usd`: Estimated cost in USD401* `cost_usd`: Estimated cost in USD

379* `duration_ms`: Request duration in milliseconds402* `duration_ms`: Request duration in milliseconds

380* `input_tokens`: Number of input tokens403* `input_tokens`: Number of input tokens

381* `output_tokens`: Number of output tokens404* `output_tokens`: Number of output tokens

382* `cache_read_tokens`: Number of tokens read from cache405* `cache_read_tokens`: Number of tokens read from cache

383* `cache_creation_tokens`: Number of tokens used for cache creation406* `cache_creation_tokens`: Number of tokens used for cache creation

407* `speed`: `"fast"` or `"normal"`, indicating whether fast mode was active

384 408 

385#### API error event409#### API error event

386 410 


394* `event.name`: `"api_error"`418* `event.name`: `"api_error"`

395* `event.timestamp`: ISO 8601 timestamp419* `event.timestamp`: ISO 8601 timestamp

396* `event.sequence`: monotonically increasing counter for ordering events within a session420* `event.sequence`: monotonically increasing counter for ordering events within a session

397* `model`: Model used (for example, "claude-sonnet-4-5-20250929")421* `model`: Model used (for example, "claude-sonnet-4-6")

398* `error`: Error message422* `error`: Error message

399* `status_code`: HTTP status code (if applicable)423* `status_code`: HTTP status code as a string, or `"undefined"` for non-HTTP errors

400* `duration_ms`: Request duration in milliseconds424* `duration_ms`: Request duration in milliseconds

401* `attempt`: Attempt number (for retried requests)425* `attempt`: Attempt number (for retried requests)

426* `speed`: `"fast"` or `"normal"`, indicating whether fast mode was active

402 427 

403#### Tool decision event428#### Tool decision event

404 429 


414* `event.sequence`: monotonically increasing counter for ordering events within a session439* `event.sequence`: monotonically increasing counter for ordering events within a session

415* `tool_name`: Name of the tool (for example, "Read", "Edit", "Write", "NotebookEdit")440* `tool_name`: Name of the tool (for example, "Read", "Edit", "Write", "NotebookEdit")

416* `decision`: Either `"accept"` or `"reject"`441* `decision`: Either `"accept"` or `"reject"`

417* `source`: Decision source - `"config"`, `"user_permanent"`, `"user_temporary"`, `"user_abort"`, or `"user_reject"`442* `source`: Decision source - `"config"`, `"hook"`, `"user_permanent"`, `"user_temporary"`, `"user_abort"`, or `"user_reject"`

418 443 

419## Interpreting metrics and events data444## Interpret metrics and events data

420 445 

421The metrics exported by Claude Code provide valuable insights into usage patterns and productivity. Here are some common visualizations and analyses you can create:446The exported metrics and events support a range of analyses:

422 447 

423### Usage monitoring448### Usage monitoring

424 449 


497 522 

498For a comprehensive guide on measuring return on investment for Claude Code, including telemetry setup, cost analysis, productivity metrics, and automated reporting, see the [Claude Code ROI Measurement Guide](https://github.com/anthropics/claude-code-monitoring-guide). This repository provides ready-to-use Docker Compose configurations, Prometheus and OpenTelemetry setups, and templates for generating productivity reports integrated with tools like Linear.523For a comprehensive guide on measuring return on investment for Claude Code, including telemetry setup, cost analysis, productivity metrics, and automated reporting, see the [Claude Code ROI Measurement Guide](https://github.com/anthropics/claude-code-monitoring-guide). This repository provides ready-to-use Docker Compose configurations, Prometheus and OpenTelemetry setups, and templates for generating productivity reports integrated with tools like Linear.

499 524 

500## Security/privacy considerations525## Security and privacy

501 526 

502* Telemetry is opt-in and requires explicit configuration527* Telemetry is opt-in and requires explicit configuration

503* Sensitive information like API keys or file contents are never included in metrics or events528* Raw file contents and code snippets are not included in metrics or events. Tool execution events include bash commands and file paths in the `tool_parameters` field, which may contain sensitive values. If your commands may include secrets, configure your telemetry backend to filter or redact `tool_parameters`

504* User prompt content is redacted by default, only prompt length is recorded. To enable user prompt logging, set `OTEL_LOG_USER_PROMPTS=1`529* When authenticated via OAuth, `user.email` is included in telemetry attributes. If this is a concern for your organization, work with your telemetry backend to filter or redact this field

505* MCP server/tool names and skill names are not logged by default because they can reveal user-specific configurations. To enable, set `OTEL_LOG_TOOL_DETAILS=1`530* User prompt content is not collected by default. Only prompt length is recorded. To include prompt content, set `OTEL_LOG_USER_PROMPTS=1`

531* MCP server/tool names and skill names are not logged by default because they can reveal user-specific configurations. To include them, set `OTEL_LOG_TOOL_DETAILS=1`

506 532 

507## Monitoring Claude Code on Amazon Bedrock533## Monitor Claude Code on Amazon Bedrock

508 534 

509For detailed Claude Code usage monitoring guidance for Amazon Bedrock, see [Claude Code Monitoring Implementation (Bedrock)](https://github.com/aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock/blob/main/assets/docs/MONITORING.md).535For detailed Claude Code usage monitoring guidance for Amazon Bedrock, see [Claude Code Monitoring Implementation (Bedrock)](https://github.com/aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock/blob/main/assets/docs/MONITORING.md).

Details

80 80 

81Claude Code requires access to the following URLs:81Claude Code requires access to the following URLs:

82 82 

83* `api.anthropic.com` - Claude API endpoints83* `api.anthropic.com`: Claude API endpoints

84* `claude.ai` - WebFetch safeguards84* `claude.ai`: authentication for claude.ai accounts

85* `statsig.anthropic.com` - Telemetry and metrics85* `platform.claude.com`: authentication for Anthropic Console accounts

86* `sentry.io` - Error reporting

87 86 

88Ensure these URLs are allowlisted in your proxy configuration and firewall rules. This is especially important when using Claude Code in containerized or restricted network environments.87Ensure these URLs are allowlisted in your proxy configuration and firewall rules. This is especially important when using Claude Code in containerized or restricted network environments.

89 88 

overview.md +14 −7

Details

6 6 

7> Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools. Available in your terminal, IDE, desktop app, and browser.7> Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools. Available in your terminal, IDE, desktop app, and browser.

8 8 

9Claude Code is an agentic coding tool that reads your codebase, edits files, and runs commands. It works in your terminal, IDE, browser, and as a desktop app.9Claude Code is an AI-powered coding assistant that helps you build features, fix bugs, and automate development tasks. It understands your entire codebase and can work across multiple files and tools to get things done.

10 10 

11## Get started11## Get started

12 12 


38 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd38 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

39 ```39 ```

40 40 

41 **Windows requires [Git for Windows](https://git-scm.com/downloads/win).** Install it first if you don't have it.

42 

41 <Info>43 <Info>

42 Native installations automatically update in the background to keep you on the latest version.44 Native installations automatically update in the background to keep you on the latest version.

43 </Info>45 </Info>

44 </Tab>46 </Tab>

45 47 

46 <Tab title="Homebrew">48 <Tab title="Homebrew">

47 ```sh theme={null}49 ```bash theme={null}

48 brew install --cask claude-code50 brew install --cask claude-code

49 ```51 ```

50 52 


96 98 

97 * [macOS](https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code\&utm_medium=docs) (Intel and Apple Silicon)99 * [macOS](https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code\&utm_medium=docs) (Intel and Apple Silicon)

98 * [Windows](https://claude.ai/api/desktop/win32/x64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs) (x64)100 * [Windows](https://claude.ai/api/desktop/win32/x64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs) (x64)

101 * [Windows ARM64](https://claude.ai/api/desktop/win32/arm64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs) (remote sessions only)

99 102 

100 After installing, launch Claude, sign in, and click the **Code** tab to start coding.103 After installing, launch Claude, sign in, and click the **Code** tab to start coding. A [paid subscription](https://claude.com/pricing) is required.

101 104 

102 [Learn more about the desktop app →](/en/desktop#installation-and-setup)105 [Learn more about the desktop app →](/en/desktop-quickstart)

103 </Tab>106 </Tab>

104 107 

105 <Tab title="Web">108 <Tab title="Web">


184 </Accordion>187 </Accordion>

185 188 

186 <Accordion title="Work from anywhere" icon="globe">189 <Accordion title="Work from anywhere" icon="globe">

187 Start a task on your laptop and pick it up on your phone. [Claude Code on the web](/en/claude-code-on-the-web) and the [Claude iOS app](https://apps.apple.com/app/claude-by-anthropic/id6473753684) run sessions on cloud infrastructure, so you can kick off work from anywhere without a local dev environment.190 Sessions aren't tied to a single surface. Move work between environments as your context changes:

188 191 

189 You can also route coding tasks straight from team chat: mention `@Claude` in [Slack](/en/slack) with a bug report or feature request, and get a pull request back.192 * Step away from your desk and keep working from your phone or any browser with [Remote Control](/en/remote-control)

193 * Kick off a long-running task on the [web](/en/claude-code-on-the-web) or [iOS app](https://apps.apple.com/app/claude-by-anthropic/id6473753684), then pull it into your terminal with `/teleport`

194 * Hand off a terminal session to the [Desktop app](/en/desktop) with `/desktop` for visual diff review

195 * Route tasks from team chat: mention `@Claude` in [Slack](/en/slack) with a bug report and get a pull request back

190 </Accordion>196 </Accordion>

191</AccordionGroup>197</AccordionGroup>

192 198 


197Beyond the [Terminal](/en/quickstart), [VS Code](/en/vs-code), [JetBrains](/en/jetbrains), [Desktop](/en/desktop), and [Web](/en/claude-code-on-the-web) environments above, Claude Code integrates with CI/CD, chat, and browser workflows:203Beyond the [Terminal](/en/quickstart), [VS Code](/en/vs-code), [JetBrains](/en/jetbrains), [Desktop](/en/desktop), and [Web](/en/claude-code-on-the-web) environments above, Claude Code integrates with CI/CD, chat, and browser workflows:

198 204 

199| I want to... | Best option |205| I want to... | Best option |

200| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |206| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |

207| Continue a local session from my phone or another device | [Remote Control](/en/remote-control) |

201| Start a task locally, continue on mobile | [Web](/en/claude-code-on-the-web) or [Claude iOS app](https://apps.apple.com/app/claude-by-anthropic/id6473753684) |208| Start a task locally, continue on mobile | [Web](/en/claude-code-on-the-web) or [Claude iOS app](https://apps.apple.com/app/claude-by-anthropic/id6473753684) |

202| Automate PR reviews and issue triage | [GitHub Actions](/en/github-actions) or [GitLab CI/CD](/en/gitlab-ci-cd) |209| Automate PR reviews and issue triage | [GitHub Actions](/en/github-actions) or [GitLab CI/CD](/en/gitlab-ci-cd) |

203| Route bug reports from Slack to pull requests | [Slack](/en/slack) |210| Route bug reports from Slack to pull requests | [Slack](/en/slack) |

permissions.md +11 −18

Details

33Claude Code supports several permission modes that control how tools are approved. Set the `defaultMode` in your [settings files](/en/settings#settings-files):33Claude Code supports several permission modes that control how tools are approved. Set the `defaultMode` in your [settings files](/en/settings#settings-files):

34 34 

35| Mode | Description |35| Mode | Description |

36| :------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |36| :------------------ | :------------------------------------------------------------------------------------ |

37| `default` | Standard behavior: prompts for permission on first use of each tool |37| `default` | Standard behavior: prompts for permission on first use of each tool |

38| `acceptEdits` | Automatically accepts file edit permissions for the session |38| `acceptEdits` | Automatically accepts file edit permissions for the session |

39| `plan` | Plan Mode: Claude can analyze but not modify files or execute commands |39| `plan` | Plan Mode: Claude can analyze but not modify files or execute commands |

40| `delegate` | Coordination-only mode for agent team leads. Restricts the lead to team management tools, so all implementation work happens through teammates. Only available when an agent team is active. See [delegate mode](/en/agent-teams#delegate-mode) for details. |

41| `dontAsk` | Auto-denies tools unless pre-approved via `/permissions` or `permissions.allow` rules |40| `dontAsk` | Auto-denies tools unless pre-approved via `/permissions` or `permissions.allow` rules |

42| `bypassPermissions` | Skips all permission prompts (requires safe environment, see warning below) |41| `bypassPermissions` | Skips all permission prompts (requires safe environment, see warning below) |

43 42 


137Read and Edit rules both follow the [gitignore](https://git-scm.com/docs/gitignore) specification with four distinct pattern types:136Read and Edit rules both follow the [gitignore](https://git-scm.com/docs/gitignore) specification with four distinct pattern types:

138 137 

139| Pattern | Meaning | Example | Matches |138| Pattern | Meaning | Example | Matches |

140| ------------------ | -------------------------------------- | -------------------------------- | ---------------------------------- |139| ------------------ | -------------------------------------- | -------------------------------- | ------------------------------ |

141| `//path` | **Absolute** path from filesystem root | `Read(//Users/alice/secrets/**)` | `/Users/alice/secrets/**` |140| `//path` | **Absolute** path from filesystem root | `Read(//Users/alice/secrets/**)` | `/Users/alice/secrets/**` |

142| `~/path` | Path from **home** directory | `Read(~/Documents/*.pdf)` | `/Users/alice/Documents/*.pdf` |141| `~/path` | Path from **home** directory | `Read(~/Documents/*.pdf)` | `/Users/alice/Documents/*.pdf` |

143| `/path` | Path **relative to settings file** | `Edit(/src/**/*.ts)` | `<settings file path>/src/**/*.ts` |142| `/path` | Path **relative to project root** | `Edit(/src/**/*.ts)` | `<project root>/src/**/*.ts` |

144| `path` or `./path` | Path **relative to current directory** | `Read(*.env)` | `<cwd>/*.env` |143| `path` or `./path` | Path **relative to current directory** | `Read(*.env)` | `<cwd>/*.env` |

145 144 

146<Warning>145<Warning>

147 A pattern like `/Users/alice/file` is NOT an absolute path. It's relative to your settings file. Use `//Users/alice/file` for absolute paths.146 A pattern like `/Users/alice/file` is NOT an absolute path. It's relative to the project root. Use `//Users/alice/file` for absolute paths.

148</Warning>147</Warning>

149 148 

150Examples:149Examples:

151 150 

152* `Edit(/docs/**)`: edits in `<project>/docs/` (NOT `/docs/`)151* `Edit(/docs/**)`: edits in `<project>/docs/` (NOT `/docs/` and NOT `<project>/.claude/docs/`)

153* `Read(~/.zshrc)`: reads your home directory's `.zshrc`152* `Read(~/.zshrc)`: reads your home directory's `.zshrc`

154* `Edit(//tmp/scratch.txt)`: edits the absolute path `/tmp/scratch.txt`153* `Edit(//tmp/scratch.txt)`: edits the absolute path `/tmp/scratch.txt`

155* `Read(src/**)`: reads from `<current-directory>/src/`154* `Read(src/**)`: reads from `<current-directory>/src/`


216 215 

217## Managed settings216## Managed settings

218 217 

219For organizations that need centralized control over Claude Code configuration, administrators can deploy `managed-settings.json` files to system directories. These policy files follow the same format as regular settings files and cannot be overridden by user or project settings. For organizations without device management infrastructure, [server-managed settings](/en/server-managed-settings) provide an alternative that delivers configurations from Anthropic's servers.218For organizations that need centralized control over Claude Code configuration, administrators can deploy managed settings that cannot be overridden by user or project settings. These policy settings follow the same format as regular settings files and can be delivered through MDM/OS-level policies, managed settings files, or [server-managed settings](/en/server-managed-settings). See [settings files](/en/settings#settings-files) for delivery mechanisms and file locations.

220 

221**Managed settings file locations**:

222 

223* **macOS**: `/Library/Application Support/ClaudeCode/managed-settings.json`

224* **Linux and WSL**: `/etc/claude-code/managed-settings.json`

225* **Windows**: `C:\Program Files\ClaudeCode\managed-settings.json`

226 

227<Note>

228 These are system-wide paths (not user home directories like `~/Library/...`) that require administrator privileges. They are designed to be deployed by IT administrators.

229</Note>

230 219 

231### Managed-only settings220### Managed-only settings

232 221 

233Some settings are only effective in managed settings:222Some settings are only effective in managed settings:

234 223 

235| Setting | Description |224| Setting | Description |

236| :-------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |225| :---------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

237| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode and the `--dangerously-skip-permissions` flag |226| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode and the `--dangerously-skip-permissions` flag |

238| `allowManagedPermissionRulesOnly` | When `true`, prevents user and project settings from defining `allow`, `ask`, or `deny` permission rules. Only rules in managed settings apply |227| `allowManagedPermissionRulesOnly` | When `true`, prevents user and project settings from defining `allow`, `ask`, or `deny` permission rules. Only rules in managed settings apply |

239| `allowManagedHooksOnly` | When `true`, prevents loading of user, project, and plugin hooks. Only managed hooks and SDK hooks are allowed |228| `allowManagedHooksOnly` | When `true`, prevents loading of user, project, and plugin hooks. Only managed hooks and SDK hooks are allowed |

229| `allowManagedMcpServersOnly` | When `true`, only `allowedMcpServers` from managed settings are respected. `deniedMcpServers` still merges from all sources. See [Managed MCP configuration](/en/mcp#managed-mcp-configuration) |

230| `blockedMarketplaces` | Blocklist of marketplace sources. Blocked sources are checked before downloading, so they never touch the filesystem. See [managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) |

231| `sandbox.network.allowManagedDomainsOnly` | When `true`, only `allowedDomains` and `WebFetch(domain:...)` allow rules from managed settings are respected. Denied domains still merge from all sources |

240| `strictKnownMarketplaces` | Controls which plugin marketplaces users can add. See [managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) |232| `strictKnownMarketplaces` | Controls which plugin marketplaces users can add. See [managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) |

233| `allow_remote_sessions` | When `true`, allows users to start [Remote Control](/en/remote-control) and [web sessions](/en/claude-code-on-the-web). Defaults to `true`. Set to `false` to prevent remote session access |

241 234 

242## Settings precedence235## Settings precedence

243 236 

Details

6 6 

7> Build and host plugin marketplaces to distribute Claude Code extensions across teams and communities.7> Build and host plugin marketplaces to distribute Claude Code extensions across teams and communities.

8 8 

9A plugin marketplace is a catalog that lets you distribute plugins to others. Marketplaces provide centralized discovery, version tracking, automatic updates, and support for multiple source types (git repositories, local paths, and more). This guide shows you how to create your own marketplace to share plugins with your team or community.9A **plugin marketplace** is a catalog that lets you distribute plugins to others. Marketplaces provide centralized discovery, version tracking, automatic updates, and support for multiple source types (git repositories, local paths, and more). This guide shows you how to create your own marketplace to share plugins with your team or community.

10 10 

11Looking to install plugins from an existing marketplace? See [Discover and install prebuilt plugins](/en/discover-plugins).11Looking to install plugins from an existing marketplace? See [Discover and install prebuilt plugins](/en/discover-plugins).

12 12 


108<Note>108<Note>

109 **How plugins are installed**: When users install a plugin, Claude Code copies the plugin directory to a cache location. This means plugins can't reference files outside their directory using paths like `../shared-utils`, because those files won't be copied.109 **How plugins are installed**: When users install a plugin, Claude Code copies the plugin directory to a cache location. This means plugins can't reference files outside their directory using paths like `../shared-utils`, because those files won't be copied.

110 110 

111 If you need to share files across plugins, use symlinks (which are followed during copying) or restructure your marketplace so the shared directory is inside the plugin source path. See [Plugin caching and file resolution](/en/plugins-reference#plugin-caching-and-file-resolution) for details.111 If you need to share files across plugins, use symlinks (which are followed during copying). See [Plugin caching and file resolution](/en/plugins-reference#plugin-caching-and-file-resolution) for details.

112</Note>112</Note>

113 113 

114## Create the marketplace file114## Create the marketplace file


191**Standard metadata fields:**191**Standard metadata fields:**

192 192 

193| Field | Type | Description |193| Field | Type | Description |

194| :------------ | :------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |194| :------------ | :------ | :-------------------------------------------------------------------------------------------------------------------------------- |

195| `description` | string | Brief plugin description |195| `description` | string | Brief plugin description |

196| `version` | string | Plugin version |196| `version` | string | Plugin version |

197| `author` | object | Plugin author information (`name` required, `email` optional) |197| `author` | object | Plugin author information (`name` required, `email` optional) |


201| `keywords` | array | Tags for plugin discovery and categorization |201| `keywords` | array | Tags for plugin discovery and categorization |

202| `category` | string | Plugin category for organization |202| `category` | string | Plugin category for organization |

203| `tags` | array | Tags for searchability |203| `tags` | array | Tags for searchability |

204| `strict` | boolean | When true (default), marketplace component fields merge with plugin.json. When false, the marketplace entry defines the plugin entirely, and plugin.json must not also declare components. |204| `strict` | boolean | Controls whether `plugin.json` is the authority for component definitions (default: true). See [Strict mode](#strict-mode) below. |

205 205 

206**Component configuration fields:**206**Component configuration fields:**

207 207 


215 215 

216## Plugin sources216## Plugin sources

217 217 

218Plugin sources tell Claude Code where to fetch each individual plugin listed in your marketplace. These are set in the `source` field of each plugin entry in `marketplace.json`.

219 

220Once a plugin is cloned or copied into the local machine, it is copied into the local versioned plugin cache at `~/.claude/plugins/cache`.

221 

222| Source | Type | Fields | Notes |

223| ------------- | ------------------------------- | ------------------------------------- | ----------------------------------------------------------------- |

224| Relative path | `string` (e.g. `"./my-plugin"`) | — | Local directory within the marketplace repo. Must start with `./` |

225| `github` | object | `repo`, `ref?`, `sha?` | |

226| `url` | object | `url` (must end .git), `ref?`, `sha?` | Git URL source |

227| `npm` | object | `package`, `version?`, `registry?` | Installed via `npm install` |

228| `pip` | object | `package`, `version?`, `registry?` | Installed via pip |

229 

230<Note>

231 **Marketplace sources vs plugin sources**: These are different concepts that control different things.

232 

233 * **Marketplace source** — where to fetch the `marketplace.json` catalog itself. Set when users run `/plugin marketplace add` or in `extraKnownMarketplaces` settings. Supports `ref` (branch/tag) but not `sha`.

234 * **Plugin source** — where to fetch an individual plugin listed in the marketplace. Set in the `source` field of each plugin entry inside `marketplace.json`. Supports both `ref` (branch/tag) and `sha` (exact commit).

235 

236 For example, a marketplace hosted at `acme-corp/plugin-catalog` (marketplace source) can list a plugin fetched from `acme-corp/code-formatter` (plugin source). The marketplace source and plugin source point to different repositories and are pinned independently.

237</Note>

238 

218### Relative paths239### Relative paths

219 240 

220For plugins in the same repository:241For plugins in the same repository:


294| `ref` | string | Optional. Git branch or tag (defaults to repository default branch) |315| `ref` | string | Optional. Git branch or tag (defaults to repository default branch) |

295| `sha` | string | Optional. Full 40-character git commit SHA to pin to an exact version |316| `sha` | string | Optional. Full 40-character git commit SHA to pin to an exact version |

296 317 

318### npm packages

319 

320Plugins distributed as npm packages are installed using `npm install`. This works with any package on the public npm registry or a private registry your team hosts.

321 

322```json theme={null}

323{

324 "name": "my-npm-plugin",

325 "source": {

326 "source": "npm",

327 "package": "@acme/claude-plugin"

328 }

329}

330```

331 

332To pin to a specific version, add the `version` field:

333 

334```json theme={null}

335{

336 "name": "my-npm-plugin",

337 "source": {

338 "source": "npm",

339 "package": "@acme/claude-plugin",

340 "version": "2.1.0"

341 }

342}

343```

344 

345To install from a private or internal registry, add the `registry` field:

346 

347```json theme={null}

348{

349 "name": "my-npm-plugin",

350 "source": {

351 "source": "npm",

352 "package": "@acme/claude-plugin",

353 "version": "^2.0.0",

354 "registry": "https://npm.example.com"

355 }

356}

357```

358 

359| Field | Type | Description |

360| :--------- | :----- | :------------------------------------------------------------------------------------------- |

361| `package` | string | Required. Package name or scoped package (for example, `@org/plugin`) |

362| `version` | string | Optional. Version or version range (for example, `2.1.0`, `^2.0.0`, `~1.5.0`) |

363| `registry` | string | Optional. Custom npm registry URL. Defaults to the system npm registry (typically npmjs.org) |

364 

297### Advanced plugin entries365### Advanced plugin entries

298 366 

299This example shows a plugin entry using many of the optional fields, including custom paths for commands, agents, hooks, and MCP servers:367This example shows a plugin entry using many of the optional fields, including custom paths for commands, agents, hooks, and MCP servers:


349 417 

350* **`commands` and `agents`**: You can specify multiple directories or individual files. Paths are relative to the plugin root.418* **`commands` and `agents`**: You can specify multiple directories or individual files. Paths are relative to the plugin root.

351* **`${CLAUDE_PLUGIN_ROOT}`**: Use this variable in hooks and MCP server configs to reference files within the plugin's installation directory. This is necessary because plugins are copied to a cache location when installed.419* **`${CLAUDE_PLUGIN_ROOT}`**: Use this variable in hooks and MCP server configs to reference files within the plugin's installation directory. This is necessary because plugins are copied to a cache location when installed.

352* **`strict: false`**: Since this is set to false, the plugin doesn't need its own `plugin.json`. The marketplace entry defines everything.420* **`strict: false`**: Since this is set to false, the plugin doesn't need its own `plugin.json`. The marketplace entry defines everything. See [Strict mode](#strict-mode) below.

421 

422### Strict mode

423 

424The `strict` field controls whether `plugin.json` is the authority for component definitions (commands, agents, hooks, skills, MCP servers, output styles).

425 

426| Value | Behavior |

427| :--------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |

428| `true` (default) | `plugin.json` is the authority. The marketplace entry can supplement it with additional components, and both sources are merged. |

429| `false` | The marketplace entry is the entire definition. If the plugin also has a `plugin.json` that declares components, that's a conflict and the plugin fails to load. |

430 

431**When to use each mode:**

432 

433* **`strict: true`**: the plugin has its own `plugin.json` and manages its own components. The marketplace entry can add extra commands or hooks on top. This is the default and works for most plugins.

434* **`strict: false`**: the marketplace operator wants full control. The plugin repo provides raw files, and the marketplace entry defines which of those files are exposed as commands, agents, hooks, etc. Useful when the marketplace restructures or curates a plugin's components differently than the plugin author intended.

353 435 

354## Host and distribute marketplaces436## Host and distribute marketplaces

355 437 


505 587 

506For complete configuration details including all supported source types and comparison with `extraKnownMarketplaces`, see the [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces).588For complete configuration details including all supported source types and comparison with `extraKnownMarketplaces`, see the [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces).

507 589 

590### Version resolution and release channels

591 

592Plugin versions determine cache paths and update detection. You can specify the version in the plugin manifest (`plugin.json`) or in the marketplace entry (`marketplace.json`).

593 

594<Warning>

595 When possible, avoid setting the version in both places. The plugin manifest always wins silently, which can cause the marketplace version to be ignored. For relative-path plugins, set the version in the marketplace entry. For all other plugin sources, set it in the plugin manifest.

596</Warning>

597 

598#### Set up release channels

599 

600To support "stable" and "latest" release channels for your plugins, you can set up two marketplaces that point to different refs or SHAs of the same repo. You can then assign the two marketplaces to different user groups through [managed settings](/en/settings#settings-files).

601 

602<Warning>

603 The plugin's `plugin.json` must declare a different `version` at each pinned ref or commit. If two refs or commits have the same manifest version, Claude Code treats them as identical and skips the update.

604</Warning>

605 

606##### Example

607 

608```json theme={null}

609{

610 "name": "stable-tools",

611 "plugins": [

612 {

613 "name": "code-formatter",

614 "source": {

615 "source": "github",

616 "repo": "acme-corp/code-formatter",

617 "ref": "stable"

618 }

619 }

620 ]

621}

622```

623 

624```json theme={null}

625{

626 "name": "latest-tools",

627 "plugins": [

628 {

629 "name": "code-formatter",

630 "source": {

631 "source": "github",

632 "repo": "acme-corp/code-formatter",

633 "ref": "latest"

634 }

635 }

636 ]

637}

638```

639 

640##### Assign channels to user groups

641 

642Assign each marketplace to the appropriate user group through managed settings. For example, the stable group receives:

643 

644```json theme={null}

645{

646 "extraKnownMarketplaces": {

647 "stable-tools": {

648 "source": {

649 "source": "github",

650 "repo": "acme-corp/stable-tools"

651 }

652 }

653 }

654}

655```

656 

657The early-access group receives `latest-tools` instead:

658 

659```json theme={null}

660{

661 "extraKnownMarketplaces": {

662 "latest-tools": {

663 "source": {

664 "source": "github",

665 "repo": "acme-corp/latest-tools"

666 }

667 }

668 }

669}

670```

671 

508## Validation and testing672## Validation and testing

509 673 

510Test your marketplace before sharing.674Test your marketplace before sharing.


563 727 

564* `Marketplace has no plugins defined`: add at least one plugin to the `plugins` array728* `Marketplace has no plugins defined`: add at least one plugin to the `plugins` array

565* `No marketplace description provided`: add `metadata.description` to help users understand your marketplace729* `No marketplace description provided`: add `metadata.description` to help users understand your marketplace

566* `Plugin "x" uses npm source which is not yet fully implemented`: use `github` or local path sources instead

567 730 

568### Plugin installation failures731### Plugin installation failures

569 732 


596* For GitLab, ensure the token has at least `read_repository` scope759* For GitLab, ensure the token has at least `read_repository` scope

597* Verify the token hasn't expired760* Verify the token hasn't expired

598 761 

762### Git operations time out

763 

764**Symptoms**: Plugin installation or marketplace updates fail with a timeout error like "Git clone timed out after 120s" or "Git pull timed out after 120s".

765 

766**Cause**: Claude Code uses a 120-second timeout for all git operations, including cloning plugin repositories and pulling marketplace updates. Large repositories or slow network connections may exceed this limit.

767 

768**Solution**: Increase the timeout using the `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS` environment variable. The value is in milliseconds:

769 

770```bash theme={null}

771export CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS=300000 # 5 minutes

772```

773 

599### Plugins with relative paths fail in URL-based marketplaces774### Plugins with relative paths fail in URL-based marketplaces

600 775 

601**Symptoms**: Added a marketplace via URL (such as `https://example.com/marketplace.json`), but plugins with relative path sources like `"./plugins/my-plugin"` fail to install with "path not found" errors.776**Symptoms**: Added a marketplace via URL (such as `https://example.com/marketplace.json`), but plugins with relative path sources like `"./plugins/my-plugin"` fail to install with "path not found" errors.

plugins.md +31 −9

Details

122 claude --plugin-dir ./my-first-plugin122 claude --plugin-dir ./my-first-plugin

123 ```123 ```

124 124 

125 Once Claude Code starts, try your new command:125 Once Claude Code starts, try your new skill:

126 126 

127 ```shell theme={null}127 ```shell theme={null}

128 /my-first-plugin:hello128 /my-first-plugin:hello

129 ```129 ```

130 130 

131 You'll see Claude respond with a greeting. Run `/help` to see your command listed under the plugin namespace.131 You'll see Claude respond with a greeting. Run `/help` to see your skill listed under the plugin namespace.

132 132 

133 <Note>133 <Note>

134 **Why namespacing?** Plugin skills are always namespaced (like `/greet:hello`) to prevent conflicts when multiple plugins have skills with the same name.134 **Why namespacing?** Plugin skills are always namespaced (like `/greet:hello`) to prevent conflicts when multiple plugins have skills with the same name.


140 <Step title="Add skill arguments">140 <Step title="Add skill arguments">

141 Make your skill dynamic by accepting user input. The `$ARGUMENTS` placeholder captures any text the user provides after the skill name.141 Make your skill dynamic by accepting user input. The `$ARGUMENTS` placeholder captures any text the user provides after the skill name.

142 142 

143 Update your `hello.md` file:143 Update your `SKILL.md` file:

144 144 

145 ```markdown my-first-plugin/commands/hello.md theme={null}145 ```markdown my-first-plugin/skills/hello/SKILL.md theme={null}

146 ---146 ---

147 description: Greet the user with a personalized message147 description: Greet the user with a personalized message

148 ---148 ---

149 149 

150 # Hello Command150 # Hello Skill

151 151 

152 Greet the user named "$ARGUMENTS" warmly and ask how you can help them today. Make the greeting personal and encouraging.152 Greet the user named "$ARGUMENTS" warmly and ask how you can help them today. Make the greeting personal and encouraging.

153 ```153 ```

154 154 

155 Restart Claude Code to pick up the changes, then try the command with your name:155 Restart Claude Code to pick up the changes, then try the skill with your name:

156 156 

157 ```shell theme={null}157 ```shell theme={null}

158 /my-first-plugin:hello Alex158 /my-first-plugin:hello Alex


165You've successfully created and tested a plugin with these key components:165You've successfully created and tested a plugin with these key components:

166 166 

167* **Plugin manifest** (`.claude-plugin/plugin.json`): describes your plugin's metadata167* **Plugin manifest** (`.claude-plugin/plugin.json`): describes your plugin's metadata

168* **Commands directory** (`commands/`): contains your custom skills168* **Skills directory** (`skills/`): contains your custom skills

169* **Skill arguments** (`$ARGUMENTS`): captures user input for dynamic behavior169* **Skill arguments** (`$ARGUMENTS`): captures user input for dynamic behavior

170 170 

171<Tip>171<Tip>


189| `hooks/` | Plugin root | Event handlers in `hooks.json` |189| `hooks/` | Plugin root | Event handlers in `hooks.json` |

190| `.mcp.json` | Plugin root | MCP server configurations |190| `.mcp.json` | Plugin root | MCP server configurations |

191| `.lsp.json` | Plugin root | LSP server configurations for code intelligence |191| `.lsp.json` | Plugin root | LSP server configurations for code intelligence |

192| `settings.json` | Plugin root | Default [settings](/en/settings) applied when the plugin is enabled |

192 193 

193<Note>194<Note>

194 **Next steps**: Ready to add more features? Jump to [Develop more complex plugins](#develop-more-complex-plugins) to add agents, hooks, MCP servers, and LSP servers. For complete technical specifications of all plugin components, see [Plugins reference](/en/plugins-reference).195 **Next steps**: Ready to add more features? Jump to [Develop more complex plugins](#develop-more-complex-plugins) to add agents, hooks, MCP servers, and LSP servers. For complete technical specifications of all plugin components, see [Plugins reference](/en/plugins-reference).


204 205 

205Add a `skills/` directory at your plugin root with Skill folders containing `SKILL.md` files:206Add a `skills/` directory at your plugin root with Skill folders containing `SKILL.md` files:

206 207 

207```208```text theme={null}

208my-plugin/209my-plugin/

209├── .claude-plugin/210├── .claude-plugin/

210│ └── plugin.json211│ └── plugin.json


254 255 

255For complete LSP configuration options, see [LSP servers](/en/plugins-reference#lsp-servers).256For complete LSP configuration options, see [LSP servers](/en/plugins-reference#lsp-servers).

256 257 

258### Ship default settings with your plugin

259 

260Plugins can include a `settings.json` file at the plugin root to apply default configuration when the plugin is enabled. Currently, only the `agent` key is supported.

261 

262Setting `agent` activates one of the plugin's [custom agents](/en/sub-agents) as the main thread, applying its system prompt, tool restrictions, and model. This lets a plugin change how Claude Code behaves by default when enabled.

263 

264```json settings.json theme={null}

265{

266 "agent": "security-reviewer"

267}

268```

269 

270This example activates the `security-reviewer` agent defined in the plugin's `agents/` directory. Settings from `settings.json` take priority over `settings` declared in `plugin.json`. Unknown keys are silently ignored.

271 

257### Organize complex plugins272### Organize complex plugins

258 273 

259For plugins with many components, organize your directory structure by functionality. For complete directory layouts and organization patterns, see [Plugin directory structure](/en/plugins-reference#plugin-directory-structure).274For plugins with many components, organize your directory structure by functionality. For complete directory layouts and organization patterns, see [Plugin directory structure](/en/plugins-reference#plugin-directory-structure).


268 283 

269As you make changes to your plugin, restart Claude Code to pick up the updates. Test your plugin components:284As you make changes to your plugin, restart Claude Code to pick up the updates. Test your plugin components:

270 285 

271* Try your commands with `/command-name`286* Try your skills with `/plugin-name:skill-name`

272* Check that agents appear in `/agents`287* Check that agents appear in `/agents`

273* Verify hooks work as expected288* Verify hooks work as expected

274 289 


299 314 

300Once your plugin is in a marketplace, others can install it using the instructions in [Discover and install plugins](/en/discover-plugins).315Once your plugin is in a marketplace, others can install it using the instructions in [Discover and install plugins](/en/discover-plugins).

301 316 

317### Submit your plugin to the official marketplace

318 

319To submit a plugin to the official Anthropic marketplace, use one of the in-app submission forms:

320 

321* **Claude.ai**: [claude.ai/settings/plugins/submit](https://claude.ai/settings/plugins/submit)

322* **Console**: [platform.claude.com/plugins/submit](https://platform.claude.com/plugins/submit)

323 

302<Note>324<Note>

303 For complete technical specifications, debugging techniques, and distribution strategies, see [Plugins reference](/en/plugins-reference).325 For complete technical specifications, debugging techniques, and distribution strategies, see [Plugins reference](/en/plugins-reference).

304</Note>326</Note>

Details

12 12 

13This reference provides complete technical specifications for the Claude Code plugin system, including component schemas, CLI commands, and development tools.13This reference provides complete technical specifications for the Claude Code plugin system, including component schemas, CLI commands, and development tools.

14 14 

15## Plugin components reference15A **plugin** is a self-contained directory of components that extends Claude Code with custom functionality. Plugin components include skills, agents, hooks, MCP servers, and LSP servers.

16 16 

17This section documents the types of components that plugins can provide.17## Plugin components reference

18 18 

19### Skills19### Skills

20 20 


26 26 

27**Skill structure**:27**Skill structure**:

28 28 

29```29```text theme={null}

30skills/30skills/

31├── pdf-processor/31├── pdf-processor/

32│ ├── SKILL.md32│ ├── SKILL.md


251When you install a plugin, you choose a **scope** that determines where the plugin is available and who else can use it:251When you install a plugin, you choose a **scope** that determines where the plugin is available and who else can use it:

252 252 

253| Scope | Settings file | Use case |253| Scope | Settings file | Use case |

254| :-------- | :---------------------------- | :------------------------------------------------------- |254| :-------- | :---------------------------------------------- | :------------------------------------------------------- |

255| `user` | `~/.claude/settings.json` | Personal plugins available across all projects (default) |255| `user` | `~/.claude/settings.json` | Personal plugins available across all projects (default) |

256| `project` | `.claude/settings.json` | Team plugins shared via version control |256| `project` | `.claude/settings.json` | Team plugins shared via version control |

257| `local` | `.claude/settings.local.json` | Project-specific plugins, gitignored |257| `local` | `.claude/settings.local.json` | Project-specific plugins, gitignored |

258| `managed` | `managed-settings.json` | Managed plugins (read-only, update only) |258| `managed` | [Managed settings](/en/settings#settings-files) | Managed plugins (read-only, update only) |

259 259 

260Plugins use the same scope system as other Claude Code configurations. For installation instructions and scope flags, see [Install plugins](/en/discover-plugins#install-plugins). For a complete explanation of scopes, see [Configuration scopes](/en/settings#configuration-scopes).260Plugins use the same scope system as other Claude Code configurations. For installation instructions and scope flags, see [Install plugins](/en/discover-plugins#install-plugins). For a complete explanation of scopes, see [Configuration scopes](/en/settings#configuration-scopes).

261 261 


378 378 

379## Plugin caching and file resolution379## Plugin caching and file resolution

380 380 

381For security and verification purposes, Claude Code copies plugins to a cache directory rather than using them in-place. Understanding this behavior is important when developing plugins that reference external files.

382 

383### How plugin caching works

384 

385Plugins are specified in one of two ways:381Plugins are specified in one of two ways:

386 382 

387* Through `claude --plugin-dir`, for the duration of a session.383* Through `claude --plugin-dir`, for the duration of a session.

388* Through a marketplace, installed to the local plugin cache.384* Through a marketplace, installed for future sessions.

389 

390When you install a plugin, Claude Code locates its marketplace and the plugin's `source` field within that marketplace.

391 

392The source can be one of five types:

393 385 

394* Relative path: copied recursively to the plugin cache. For example, if your marketplace entry specifies `"source": "./plugins/my-plugin"`, the entire `./plugins/my-plugin` directory is copied.386For security and verification purposes, Claude Code copies *marketplace* plugins to the user's local **plugin cache** (`~/.claude/plugins/cache`) rather than using them in-place. Understanding this behavior is important when developing plugins that reference external files.

395* npm - copied to the plugin cache from npm

396* pip - copied to the plugin cache from pip

397* url - any https\:// URL ending in .git

398* github - any owner/repo shorthand

399 387 

400### Path traversal limitations388### Path traversal limitations

401 389 

402Plugins cannot reference files outside their copied directory structure. Paths that traverse outside the plugin root (such as `../shared-utils`) will not work after installation because those external files are not copied to the cache.390Installed plugins cannot reference files outside their directory. Paths that traverse outside the plugin root (such as `../shared-utils`) will not work after installation because those external files are not copied to the cache.

403 391 

404### Working with external dependencies392### Working with external dependencies

405 393 

406If your plugin needs to access files outside its directory, you have two options:394If your plugin needs to access files outside its directory, you can create symbolic links to external files within your plugin directory. Symlinks are honored during the copy process:

407 

408**Option 1: Use symlinks**

409 

410Create symbolic links to external files within your plugin directory. Symlinks are honored during the copy process:

411 395 

412```bash theme={null}396```bash theme={null}

413# Inside your plugin directory397# Inside your plugin directory

414ln -s /path/to/shared-utils ./shared-utils398ln -s /path/to/shared-utils ./shared-utils

415```399```

416 400 

417The symlinked content will be copied into the plugin cache.401The symlinked content will be copied into the plugin cache. This provides flexibility while maintaining the security benefits of the caching system.

418 

419**Option 2: Restructure your marketplace**

420 

421Set the plugin path to a parent directory that contains all required files, then provide the rest of the plugin manifest directly in the marketplace entry:

422 

423```json theme={null}

424{

425 "name": "my-plugin",

426 "source": "./",

427 "description": "Plugin that needs root-level access",

428 "commands": ["./plugins/my-plugin/commands/"],

429 "agents": ["./plugins/my-plugin/agents/"],

430 "strict": false

431}

432```

433 

434This approach copies the entire marketplace root, giving your plugin access to sibling directories.

435 

436<Note>

437 Symlinks that point to locations outside the plugin's logical root are followed during copying. This provides flexibility while maintaining the security benefits of the caching system.

438</Note>

439 402 

440***403***

441 404 


445 408 

446A complete plugin follows this structure:409A complete plugin follows this structure:

447 410 

448```411```text theme={null}

449enterprise-plugin/412enterprise-plugin/

450├── .claude-plugin/ # Metadata directory (optional)413├── .claude-plugin/ # Metadata directory (optional)

451│ └── plugin.json # plugin manifest414│ └── plugin.json # plugin manifest


465├── hooks/ # Hook configurations428├── hooks/ # Hook configurations

466│ ├── hooks.json # Main hook config429│ ├── hooks.json # Main hook config

467│ └── security-hooks.json # Additional hooks430│ └── security-hooks.json # Additional hooks

431├── settings.json # Default settings for the plugin

468├── .mcp.json # MCP server definitions432├── .mcp.json # MCP server definitions

469├── .lsp.json # LSP server configurations433├── .lsp.json # LSP server configurations

470├── scripts/ # Hook and utility scripts434├── scripts/ # Hook and utility scripts


482### File locations reference446### File locations reference

483 447 

484| Component | Default Location | Purpose |448| Component | Default Location | Purpose |

485| :-------------- | :--------------------------- | :---------------------------------------------------------- |449| :-------------- | :--------------------------- | :------------------------------------------------------------------------------------------------------------------------ |

486| **Manifest** | `.claude-plugin/plugin.json` | Plugin metadata and configuration (optional) |450| **Manifest** | `.claude-plugin/plugin.json` | Plugin metadata and configuration (optional) |

487| **Commands** | `commands/` | Skill Markdown files (legacy; use `skills/` for new skills) |451| **Commands** | `commands/` | Skill Markdown files (legacy; use `skills/` for new skills) |

488| **Agents** | `agents/` | Subagent Markdown files |452| **Agents** | `agents/` | Subagent Markdown files |


490| **Hooks** | `hooks/hooks.json` | Hook configuration |454| **Hooks** | `hooks/hooks.json` | Hook configuration |

491| **MCP servers** | `.mcp.json` | MCP server definitions |455| **MCP servers** | `.mcp.json` | MCP server definitions |

492| **LSP servers** | `.lsp.json` | Language server configurations |456| **LSP servers** | `.lsp.json` | Language server configurations |

457| **Settings** | `settings.json` | Default configuration applied when the plugin is enabled. Only [`agent`](/en/sub-agents) settings are currently supported |

493 458 

494***459***

495 460 


685 650 

686**Correct structure**: Components must be at the plugin root, not inside `.claude-plugin/`. Only `plugin.json` belongs in `.claude-plugin/`.651**Correct structure**: Components must be at the plugin root, not inside `.claude-plugin/`. Only `plugin.json` belongs in `.claude-plugin/`.

687 652 

688```653```text theme={null}

689my-plugin/654my-plugin/

690├── .claude-plugin/655├── .claude-plugin/

691│ └── plugin.json ← Only manifest here656│ └── plugin.json ← Only manifest here


730* Document changes in a `CHANGELOG.md` file695* Document changes in a `CHANGELOG.md` file

731* Use pre-release versions like `2.0.0-beta.1` for testing696* Use pre-release versions like `2.0.0-beta.1` for testing

732 697 

698<Warning>

699 Claude Code uses the version to determine whether to update your plugin. If you change your plugin's code but don't bump the version in `plugin.json`, your plugin's existing users won't see your changes due to caching.

700 

701 If your plugin is within a [marketplace](/en/plugin-marketplaces) directory, you can manage the version through `marketplace.json` instead and omit the `version` field from `plugin.json`.

702</Warning>

703 

733***704***

734 705 

735## See also706## See also

quickstart.md +33 −30

Details

6 6 

7> Welcome to Claude Code!7> Welcome to Claude Code!

8 8 

9This quickstart guide will have you using AI-powered coding assistance in just a few minutes. By the end, you'll understand how to use Claude Code for common development tasks.9This quickstart guide will have you using AI-powered coding assistance in a few minutes. By the end, you'll understand how to use Claude Code for common development tasks.

10 10 

11## Before you begin11## Before you begin

12 12 

13Make sure you have:13Make sure you have:

14 14 

15* A terminal or command prompt open15* A terminal or command prompt open

16 * If you've never used the terminal before, check out the [terminal guide](/en/terminal-guide)

16* A code project to work with17* A code project to work with

17* A [Claude subscription](https://claude.com/pricing) (Pro, Max, Teams, or Enterprise), [Claude Console](https://console.anthropic.com/) account, or access through a [supported cloud provider](/en/third-party-integrations)18* A [Claude subscription](https://claude.com/pricing) (Pro, Max, Teams, or Enterprise), [Claude Console](https://console.anthropic.com/) account, or access through a [supported cloud provider](/en/third-party-integrations)

18 19 


28 <Tab title="Native Install (Recommended)">29 <Tab title="Native Install (Recommended)">

29 **macOS, Linux, WSL:**30 **macOS, Linux, WSL:**

30 31 

31 ```bash theme={null}32 ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

32 curl -fsSL https://claude.ai/install.sh | bash33 curl -fsSL https://claude.ai/install.sh | bash

33 ```34 ```

34 35 

35 **Windows PowerShell:**36 **Windows PowerShell:**

36 37 

37 ```powershell theme={null}38 ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

38 irm https://claude.ai/install.ps1 | iex39 irm https://claude.ai/install.ps1 | iex

39 ```40 ```

40 41 

41 **Windows CMD:**42 **Windows CMD:**

42 43 

43 ```batch theme={null}44 ```batch theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

44 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd45 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

45 ```46 ```

46 47 

48 **Windows requires [Git for Windows](https://git-scm.com/downloads/win).** Install it first if you don't have it.

49 

47 <Info>50 <Info>

48 Native installations automatically update in the background to keep you on the latest version.51 Native installations automatically update in the background to keep you on the latest version.

49 </Info>52 </Info>

50 </Tab>53 </Tab>

51 54 

52 <Tab title="Homebrew">55 <Tab title="Homebrew">

53 ```sh theme={null}56 ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

54 brew install --cask claude-code57 brew install --cask claude-code

55 ```58 ```

56 59 


60 </Tab>63 </Tab>

61 64 

62 <Tab title="WinGet">65 <Tab title="WinGet">

63 ```powershell theme={null}66 ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

64 winget install Anthropic.ClaudeCode67 winget install Anthropic.ClaudeCode

65 ```68 ```

66 69 


111 114 

112Let's start with understanding your codebase. Try one of these commands:115Let's start with understanding your codebase. Try one of these commands:

113 116 

114```117```text theme={null}

115what does this project do?118what does this project do?

116```119```

117 120 

118Claude will analyze your files and provide a summary. You can also ask more specific questions:121Claude will analyze your files and provide a summary. You can also ask more specific questions:

119 122 

120```123```text theme={null}

121what technologies does this project use?124what technologies does this project use?

122```125```

123 126 

124```127```text theme={null}

125where is the main entry point?128where is the main entry point?

126```129```

127 130 

128```131```text theme={null}

129explain the folder structure132explain the folder structure

130```133```

131 134 

132You can also ask Claude about its own capabilities:135You can also ask Claude about its own capabilities:

133 136 

134```137```text theme={null}

135what can Claude Code do?138what can Claude Code do?

136```139```

137 140 

138```141```text theme={null}

139how do I create custom skills in Claude Code?142how do I create custom skills in Claude Code?

140```143```

141 144 

142```145```text theme={null}

143can Claude Code work with Docker?146can Claude Code work with Docker?

144```147```

145 148 

146<Note>149<Note>

147 Claude Code reads your files as needed - you don't have to manually add context. Claude also has access to its own documentation and can answer questions about its features and capabilities.150 Claude Code reads your project files as needed. You don't have to manually add context.

148</Note>151</Note>

149 152 

150## Step 5: Make your first code change153## Step 5: Make your first code change

151 154 

152Now let's make Claude Code do some actual coding. Try a simple task:155Now let's make Claude Code do some actual coding. Try a simple task:

153 156 

154```157```text theme={null}

155add a hello world function to the main file158add a hello world function to the main file

156```159```

157 160 


170 173 

171Claude Code makes Git operations conversational:174Claude Code makes Git operations conversational:

172 175 

173```176```text theme={null}

174what files have I changed?177what files have I changed?

175```178```

176 179 

177```180```text theme={null}

178commit my changes with a descriptive message181commit my changes with a descriptive message

179```182```

180 183 

181You can also prompt for more complex Git operations:184You can also prompt for more complex Git operations:

182 185 

183```186```text theme={null}

184create a new branch called feature/quickstart187create a new branch called feature/quickstart

185```188```

186 189 

187```190```text theme={null}

188show me the last 5 commits191show me the last 5 commits

189```192```

190 193 

191```194```text theme={null}

192help me resolve merge conflicts195help me resolve merge conflicts

193```196```

194 197 


198 201 

199Describe what you want in natural language:202Describe what you want in natural language:

200 203 

201```204```text theme={null}

202add input validation to the user registration form205add input validation to the user registration form

203```206```

204 207 

205Or fix existing issues:208Or fix existing issues:

206 209 

207```210```text theme={null}

208there's a bug where users can submit empty forms - fix it211there's a bug where users can submit empty forms - fix it

209```212```

210 213 


221 224 

222**Refactor code**225**Refactor code**

223 226 

224```227```text theme={null}

225refactor the authentication module to use async/await instead of callbacks228refactor the authentication module to use async/await instead of callbacks

226```229```

227 230 

228**Write tests**231**Write tests**

229 232 

230```233```text theme={null}

231write unit tests for the calculator functions234write unit tests for the calculator functions

232```235```

233 236 

234**Update documentation**237**Update documentation**

235 238 

236```239```text theme={null}

237update the README with installation instructions240update the README with installation instructions

238```241```

239 242 

240**Code review**243**Code review**

241 244 

242```245```text theme={null}

243review my changes and suggest improvements246review my changes and suggest improvements

244```247```

245 248 

246<Tip>249<Tip>

247 **Remember**: Claude Code is your AI pair programmer. Talk to it like you would a helpful colleague - describe what you want to achieve, and it will help you get there.250 Talk to Claude like you would a helpful colleague. Describe what you want to achieve, and it will help you get there.

248</Tip>251</Tip>

249 252 

250## Essential commands253## Essential commands


279 <Accordion title="Use step-by-step instructions">282 <Accordion title="Use step-by-step instructions">

280 Break complex tasks into steps:283 Break complex tasks into steps:

281 284 

282 ```285 ```text theme={null}

283 1. create a new database table for user profiles286 1. create a new database table for user profiles

284 2. create an API endpoint to get and update user profiles287 2. create an API endpoint to get and update user profiles

285 3. build a webpage that allows users to see and edit their information288 3. build a webpage that allows users to see and edit their information


289 <Accordion title="Let Claude explore first">292 <Accordion title="Let Claude explore first">

290 Before making changes, let Claude understand your code:293 Before making changes, let Claude understand your code:

291 294 

292 ```295 ```text theme={null}

293 analyze the database schema296 analyze the database schema

294 ```297 ```

295 298 

296 ```299 ```text theme={null}

297 build a dashboard showing products that are most frequently returned by our UK customers300 build a dashboard showing products that are most frequently returned by our UK customers

298 ```301 ```

299 </Accordion>302 </Accordion>

remote-control.md +110 −0 added

Details

1> ## Documentation Index

2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt

3> Use this file to discover all available pages before exploring further.

4 

5# Continue local sessions from any device with Remote Control

6 

7> Continue a local Claude Code session from your phone, tablet, or any browser using Remote Control. Works with claude.ai/code and the Claude mobile app.

8 

9<Note>

10 Remote Control is available as a research preview on Max plans and will be rolling out to Pro plans soon. It is not available on Team or Enterprise plans.

11</Note>

12 

13Remote Control connects [claude.ai/code](https://claude.ai/code) or the Claude app for [iOS](https://apps.apple.com/us/app/claude-by-anthropic/id6473753684) and [Android](https://play.google.com/store/apps/details?id=com.anthropic.claude) to a Claude Code session running on your machine. Start a task at your desk, then pick it up from your phone on the couch or a browser on another computer.

14 

15When you start a Remote Control session on your machine, Claude keeps running locally the entire time, so nothing moves to the cloud. With Remote Control you can:

16 

17* **Use your full local environment remotely**: your filesystem, [MCP servers](/en/mcp), tools, and project configuration all stay available

18* **Work from both surfaces at once**: the conversation stays in sync across all connected devices, so you can send messages from your terminal, browser, and phone interchangeably

19* **Survive interruptions**: if your laptop sleeps or your network drops, the session reconnects automatically when your machine comes back online

20 

21Unlike [Claude Code on the web](/en/claude-code-on-the-web), which runs on cloud infrastructure, Remote Control sessions run directly on your machine and interact with your local filesystem. The web and mobile interfaces are just a window into that local session.

22 

23This page covers setup, how to start and connect to sessions, and how Remote Control compares to Claude Code on the web.

24 

25## Requirements

26 

27Before using Remote Control, confirm that your environment meets these conditions:

28 

29* **Subscription**: requires a Max plan. Pro plan support is coming soon. API keys are not supported.

30* **Authentication**: run `claude` and use `/login` to sign in through claude.ai if you haven't already.

31* **Workspace trust**: run `claude` in your project directory at least once to accept the workspace trust dialog.

32 

33## Start a Remote Control session

34 

35You can start a new session directly in Remote Control, or connect a session that's already running.

36 

37<Tabs>

38 <Tab title="New session">

39 Navigate to your project directory and run:

40 

41 ```bash theme={null}

42 claude remote-control

43 ```

44 

45 The process stays running in your terminal, waiting for remote connections. It displays a session URL you can use to [connect from another device](#connect-from-another-device), and you can press spacebar to show a QR code for quick access from your phone. While a remote session is active, the terminal shows connection status and tool activity.

46 

47 This command supports the following flags:

48 

49 * **`--verbose`**: show detailed connection and session logs

50 * **`--sandbox`** / **`--no-sandbox`**: enable or disable [sandboxing](/en/sandboxing) for filesystem and network isolation during the session. Sandboxing is off by default.

51 </Tab>

52 

53 <Tab title="From an existing session">

54 If you're already in a Claude Code session and want to continue it remotely, use the `/remote-control` (or `/rc`) command:

55 

56 ```

57 /remote-control

58 ```

59 

60 This starts a Remote Control session that carries over your current conversation history and displays a session URL and QR code you can use to [connect from another device](#connect-from-another-device). The `--verbose`, `--sandbox`, and `--no-sandbox` flags are not available with this command.

61 

62 <Tip>

63 Use `/rename` before running `/remote-control` to give the session a descriptive name. This makes it easier to find in the session list across devices.

64 </Tip>

65 </Tab>

66</Tabs>

67 

68### Connect from another device

69 

70Once a Remote Control session is active, you have a few ways to connect from another device:

71 

72* **Open the session URL** in any browser to go directly to the session on [claude.ai/code](https://claude.ai/code). Both `claude remote-control` and `/remote-control` display this URL in the terminal.

73* **Scan the QR code** shown alongside the session URL to open it directly in the Claude app. With `claude remote-control`, press spacebar to toggle the QR code display.

74* **Open [claude.ai/code](https://claude.ai/code) or the Claude app** and find the session by name in the session list. Remote Control sessions show a computer icon with a green status dot when online.

75 

76The remote session takes its name from your last message, your `/rename` value, or "Remote Control session" if there's no conversation history. If the environment already has an active session, you'll be asked whether to continue it or start a new one.

77 

78If you don't have the Claude app yet, use the `/mobile` command inside Claude Code to display a download QR code for [iOS](https://apps.apple.com/us/app/claude-by-anthropic/id6473753684) or [Android](https://play.google.com/store/apps/details?id=com.anthropic.claude).

79 

80### Enable Remote Control for all sessions

81 

82By default, Remote Control only activates when you explicitly run `claude remote-control` or `/remote-control`. To enable it automatically for every session, run `/config` inside Claude Code and set **Enable Remote Control for all sessions** to `true`. Set it back to `false` to disable.

83 

84Each Claude Code instance supports one remote session at a time. If you run multiple instances, each one gets its own environment and session.

85 

86## Connection and security

87 

88Your local Claude Code session makes outbound HTTPS requests only and never opens inbound ports on your machine. When you start Remote Control, it registers with the Anthropic API and polls for work. When you connect from another device, the server routes messages between the web or mobile client and your local session over a streaming connection.

89 

90All traffic travels through the Anthropic API over TLS, the same transport security as any Claude Code session. The connection uses multiple short-lived credentials, each scoped to a single purpose and expiring independently.

91 

92## Remote Control vs Claude Code on the web

93 

94Remote Control and [Claude Code on the web](/en/claude-code-on-the-web) both use the claude.ai/code interface. The key difference is where the session runs: Remote Control executes on your machine, so your local MCP servers, tools, and project configuration stay available. Claude Code on the web executes in Anthropic-managed cloud infrastructure.

95 

96Use Remote Control when you're in the middle of local work and want to keep going from another device. Use Claude Code on the web when you want to kick off a task without any local setup, work on a repo you don't have cloned, or run multiple tasks in parallel.

97 

98## Limitations

99 

100* **One remote session at a time**: each Claude Code session supports one remote connection.

101* **Terminal must stay open**: Remote Control runs as a local process. If you close the terminal or stop the `claude` process, the session ends. Run `claude remote-control` again to start a new one.

102* **Extended network outage**: if your machine is awake but unable to reach the network for more than roughly 10 minutes, the session times out and the process exits. Run `claude remote-control` again to start a new session.

103 

104## Related resources

105 

106* [Claude Code on the web](/en/claude-code-on-the-web): run sessions in Anthropic-managed cloud environments instead of on your machine

107* [Authentication](/en/authentication): set up `/login` and manage credentials for claude.ai

108* [CLI reference](/en/cli-reference): full list of flags and commands including `claude remote-control`

109* [Security](/en/security): how Remote Control sessions fit into the Claude Code security model

110* [Data usage](/en/data-usage): what data flows through the Anthropic API during local and remote sessions

sandboxing.md +1 −1

Details

89 89 

90You can enable sandboxing by running the `/sandbox` command:90You can enable sandboxing by running the `/sandbox` command:

91 91 

92```92```text theme={null}

93> /sandbox93> /sandbox

94```94```

95 95 

security.md +4 −1

Details

106 106 

107For more details on cloud execution, see [Claude Code on the web](/en/claude-code-on-the-web).107For more details on cloud execution, see [Claude Code on the web](/en/claude-code-on-the-web).

108 108 

109[Remote Control](/en/remote-control) sessions work differently: the web interface connects to a Claude Code process running on your local machine. All code execution and file access stays local, and the same data that flows during any local Claude Code session travels through the Anthropic API over TLS. No cloud VMs or sandboxing are involved. The connection uses multiple short-lived, narrowly scoped credentials, each limited to a specific purpose and expiring independently, to limit the blast radius of any single compromised credential.

110 

109## Security best practices111## Security best practices

110 112 

111### Working with sensitive code113### Working with sensitive code


117 119 

118### Team security120### Team security

119 121 

120* Use [managed settings](/en/permissions#managed-settings) to enforce organizational standards122* Use [managed settings](/en/settings#settings-files) to enforce organizational standards

121* Share approved permission configurations through version control123* Share approved permission configurations through version control

122* Train team members on security best practices124* Train team members on security best practices

123* Monitor Claude Code usage through [OpenTelemetry metrics](/en/monitoring-usage)125* Monitor Claude Code usage through [OpenTelemetry metrics](/en/monitoring-usage)

126* Audit or block settings changes during sessions with [`ConfigChange` hooks](/en/hooks#configchange)

124 127 

125### Reporting security issues128### Reporting security issues

126 129 

Details

19To use server-managed settings, you need:19To use server-managed settings, you need:

20 20 

21* Claude for Teams or Claude for Enterprise plan21* Claude for Teams or Claude for Enterprise plan

22* Claude Code version 2.1.30 or later22* Claude Code version 2.1.38 or later for Claude for Teams, or version 2.1.30 or later for Claude for Enterprise

23* Network access to `api.anthropic.com`23* Network access to `api.anthropic.com`

24 24 

25## Choose between server-managed and endpoint-managed settings25## Choose between server-managed and endpoint-managed settings

26 26 

27Claude Code supports two approaches for centralized configuration. Server-managed settings deliver configuration from Anthropic's servers. [Endpoint-managed settings](/en/permissions#managed-settings) deploy a `managed-settings.json` file to system directories via MDM (mobile device management).27Claude Code supports two approaches for centralized configuration. Server-managed settings deliver configuration from Anthropic's servers. [Endpoint-managed settings](/en/settings#settings-files) are deployed directly to devices through native OS policies (macOS managed preferences, Windows registry) or managed settings files.

28 28 

29| Approach | Best for | Security model |29| Approach | Best for | Security model |

30| :---------------------------------------------------------------- | :------------------------------------------------------- | :----------------------------------------------------------------- |30| :----------------------------------------------------------- | :------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------- |

31| **Server-managed settings** | Organizations without MDM, or users on unmanaged devices | Settings delivered from Anthropic's servers at authentication time |31| **Server-managed settings** | Organizations without MDM, or users on unmanaged devices | Settings delivered from Anthropic's servers at authentication time |

32| **[Endpoint-managed settings](/en/permissions#managed-settings)** | Organizations with MDM or endpoint management | Settings deployed to protected system directories by IT |32| **[Endpoint-managed settings](/en/settings#settings-files)** | Organizations with MDM or endpoint management | Settings deployed to devices via MDM configuration profiles, registry policies, or managed settings files |

33 33 

34If your devices are enrolled in an MDM or endpoint management solution, endpoint-managed settings provide stronger security guarantees because the settings file can be protected from user modification at the OS level.34If your devices are enrolled in an MDM or endpoint management solution, endpoint-managed settings provide stronger security guarantees because the settings file can be protected from user modification at the OS level.

35 35 


89 89 

90### Settings precedence90### Settings precedence

91 91 

92Server-managed settings and [endpoint-managed settings](/en/permissions#managed-settings) both occupy the highest tier in the Claude Code [settings hierarchy](/en/settings#settings-precedence), and user or project settings cannot override them. When both are present, server-managed settings take precedence and the local `managed-settings.json` file is not used.92Server-managed settings and [endpoint-managed settings](/en/settings#settings-files) both occupy the highest tier in the Claude Code [settings hierarchy](/en/settings#settings-precedence), and user or project settings cannot override them. When both are present, server-managed settings take precedence and endpoint-managed settings are not used.

93 93 

94### Fetch and caching behavior94### Fetch and caching behavior

95 95 


150| User authenticates with a different organization | Settings are not delivered for accounts outside the managed organization |150| User authenticates with a different organization | Settings are not delivered for accounts outside the managed organization |

151| User sets a non-default `ANTHROPIC_BASE_URL` | Server-managed settings are bypassed when using third-party API providers |151| User sets a non-default `ANTHROPIC_BASE_URL` | Server-managed settings are bypassed when using third-party API providers |

152 152 

153For stronger enforcement guarantees, use [endpoint-managed settings](/en/permissions#managed-settings) on devices enrolled in an MDM solution.153To detect runtime configuration changes, use [`ConfigChange` hooks](/en/hooks#configchange) to log modifications or block unauthorized changes before they take effect.

154 

155For stronger enforcement guarantees, use [endpoint-managed settings](/en/settings#settings-files) on devices enrolled in an MDM solution.

154 156 

155## See also157## See also

156 158 

157Related pages for managing Claude Code configuration:159Related pages for managing Claude Code configuration:

158 160 

159* [Settings](/en/settings): complete configuration reference including all available settings161* [Settings](/en/settings): complete configuration reference including all available settings

160* [Endpoint-managed settings](/en/permissions#managed-settings): file-based managed settings deployed by IT162* [Endpoint-managed settings](/en/settings#settings-files): managed settings deployed to devices by IT

161* [Authentication](/en/authentication): set up user access to Claude Code163* [Authentication](/en/authentication): set up user access to Claude Code

162* [Security](/en/security): security safeguards and best practices164* [Security](/en/security): security safeguards and best practices

settings.md +48 −29

Details

15### Available scopes15### Available scopes

16 16 

17| Scope | Location | Who it affects | Shared with team? |17| Scope | Location | Who it affects | Shared with team? |

18| :---------- | :----------------------------------- | :----------------------------------- | :--------------------- |18| :---------- | :--------------------------------------------------------------------------------- | :----------------------------------- | :--------------------- |

19| **Managed** | System-level `managed-settings.json` | All users on the machine | Yes (deployed by IT) |19| **Managed** | Server-managed settings, plist / registry, or system-level `managed-settings.json` | All users on the machine | Yes (deployed by IT) |

20| **User** | `~/.claude/` directory | You, across all projects | No |20| **User** | `~/.claude/` directory | You, across all projects | No |

21| **Project** | `.claude/` in repository | All collaborators on this repository | Yes (committed to git) |21| **Project** | `.claude/` in repository | All collaborators on this repository | Yes (committed to git) |

22| **Local** | `.claude/*.local.*` files | You, in this repository only | No (gitignored) |22| **Local** | `.claude/*.local.*` files | You, in this repository only | No (gitignored) |


83* **Project settings** are saved in your project directory:83* **Project settings** are saved in your project directory:

84 * `.claude/settings.json` for settings that are checked into source control and shared with your team84 * `.claude/settings.json` for settings that are checked into source control and shared with your team

85 * `.claude/settings.local.json` for settings that are not checked in, useful for personal preferences and experimentation. Claude Code will configure git to ignore `.claude/settings.local.json` when it is created.85 * `.claude/settings.local.json` for settings that are not checked in, useful for personal preferences and experimentation. Claude Code will configure git to ignore `.claude/settings.local.json` when it is created.

86* **Managed settings**: For organizations that need centralized control, Claude Code supports `managed-settings.json` and `managed-mcp.json` files that can be deployed to system directories:86* **Managed settings**: For organizations that need centralized control, Claude Code supports multiple delivery mechanisms for managed settings. All use the same JSON format and cannot be overridden by user or project settings:

87 87 

88 * **Server-managed settings**: delivered from Anthropic's servers via the Claude.ai admin console. See [server-managed settings](/en/server-managed-settings).

89 * **MDM/OS-level policies**: delivered through native device management on macOS and Windows:

90 * macOS: `com.anthropic.claudecode` managed preferences domain (deployed via configuration profiles in Jamf, Kandji, or other MDM tools)

91 * Windows: `HKLM\SOFTWARE\Policies\ClaudeCode` registry key with a `Settings` value (REG\_SZ or REG\_EXPAND\_SZ) containing JSON (deployed via Group Policy or Intune)

92 * Windows (user-level): `HKCU\SOFTWARE\Policies\ClaudeCode` (lowest policy priority, only used when no admin-level source exists)

93 * **File-based**: `managed-settings.json` and `managed-mcp.json` deployed to system directories:

88 * macOS: `/Library/Application Support/ClaudeCode/`94 * macOS: `/Library/Application Support/ClaudeCode/`

89 * Linux and WSL: `/etc/claude-code/`95 * Linux and WSL: `/etc/claude-code/`

90 * Windows: `C:\Program Files\ClaudeCode\`96 * Windows: `C:\Program Files\ClaudeCode\`

91 97 

92 <Note>98 See [managed settings](/en/permissions#managed-only-settings) and [Managed MCP configuration](/en/mcp#managed-mcp-configuration) for details.

93 These are system-wide paths (not user home directories like `~/Library/...`) that require administrator privileges. They are designed to be deployed by IT administrators.

94 </Note>

95 

96 See [Managed settings](/en/permissions#managed-settings) and [Managed MCP configuration](/en/mcp#managed-mcp-configuration) for details. For organizations without device management infrastructure, see [server-managed settings](/en/server-managed-settings).

97 99 

98 <Note>100 <Note>

99 Managed deployments can also restrict **plugin marketplace additions** using101 Managed deployments can also restrict **plugin marketplace additions** using


140`settings.json` supports a number of options:142`settings.json` supports a number of options:

141 143 

142| Key | Description | Example |144| Key | Description | Example |

143| :-------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------- |145| :-------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------- |

144| `apiKeyHelper` | Custom script, to be executed in `/bin/sh`, to generate an auth value. This value will be sent as `X-Api-Key` and `Authorization: Bearer` headers for model requests | `/bin/generate_temp_api_key.sh` |146| `apiKeyHelper` | Custom script, to be executed in `/bin/sh`, to generate an auth value. This value will be sent as `X-Api-Key` and `Authorization: Bearer` headers for model requests | `/bin/generate_temp_api_key.sh` |

145| `cleanupPeriodDays` | Sessions inactive for longer than this period are deleted at startup. Setting to `0` immediately deletes all sessions. (default: 30 days) | `20` |147| `cleanupPeriodDays` | Sessions inactive for longer than this period are deleted at startup. Setting to `0` immediately deletes all sessions. (default: 30 days) | `20` |

146| `companyAnnouncements` | Announcement to display to users at startup. If multiple announcements are provided, they will be cycled through at random. | `["Welcome to Acme Corp! Review our code guidelines at docs.acme.com"]` |148| `companyAnnouncements` | Announcement to display to users at startup. If multiple announcements are provided, they will be cycled through at random. | `["Welcome to Acme Corp! Review our code guidelines at docs.acme.com"]` |


152| `disableAllHooks` | Disable all [hooks](/en/hooks) and any custom [status line](/en/statusline) | `true` |154| `disableAllHooks` | Disable all [hooks](/en/hooks) and any custom [status line](/en/statusline) | `true` |

153| `allowManagedHooksOnly` | (Managed settings only) Prevent loading of user, project, and plugin hooks. Only allows managed hooks and SDK hooks. See [Hook configuration](#hook-configuration) | `true` |155| `allowManagedHooksOnly` | (Managed settings only) Prevent loading of user, project, and plugin hooks. Only allows managed hooks and SDK hooks. See [Hook configuration](#hook-configuration) | `true` |

154| `allowManagedPermissionRulesOnly` | (Managed settings only) Prevent user and project settings from defining `allow`, `ask`, or `deny` permission rules. Only rules in managed settings apply. See [Managed-only settings](/en/permissions#managed-only-settings) | `true` |156| `allowManagedPermissionRulesOnly` | (Managed settings only) Prevent user and project settings from defining `allow`, `ask`, or `deny` permission rules. Only rules in managed settings apply. See [Managed-only settings](/en/permissions#managed-only-settings) | `true` |

155| `model` | Override the default model to use for Claude Code | `"claude-sonnet-4-5-20250929"` |157| `allowManagedMcpServersOnly` | (Managed settings only) Only `allowedMcpServers` from managed settings are respected. `deniedMcpServers` still merges from all sources. Users can still add MCP servers, but only the admin-defined allowlist applies. See [Managed MCP configuration](/en/mcp#managed-mcp-configuration) | `true` |

158| `model` | Override the default model to use for Claude Code | `"claude-sonnet-4-6"` |

159| `availableModels` | Restrict which models users can select via `/model`, `--model`, Config tool, or `ANTHROPIC_MODEL`. Does not affect the Default option. See [Restrict model selection](/en/model-config#restrict-model-selection) | `["sonnet", "haiku"]` |

156| `otelHeadersHelper` | Script to generate dynamic OpenTelemetry headers. Runs at startup and periodically (see [Dynamic headers](/en/monitoring-usage#dynamic-headers)) | `/bin/generate_otel_headers.sh` |160| `otelHeadersHelper` | Script to generate dynamic OpenTelemetry headers. Runs at startup and periodically (see [Dynamic headers](/en/monitoring-usage#dynamic-headers)) | `/bin/generate_otel_headers.sh` |

157| `statusLine` | Configure a custom status line to display context. See [`statusLine` documentation](/en/statusline) | `{"type": "command", "command": "~/.claude/statusline.sh"}` |161| `statusLine` | Configure a custom status line to display context. See [`statusLine` documentation](/en/statusline) | `{"type": "command", "command": "~/.claude/statusline.sh"}` |

158| `fileSuggestion` | Configure a custom script for `@` file autocomplete. See [File suggestion settings](#file-suggestion-settings) | `{"type": "command", "command": "~/.claude/file-suggestion.sh"}` |162| `fileSuggestion` | Configure a custom script for `@` file autocomplete. See [File suggestion settings](#file-suggestion-settings) | `{"type": "command", "command": "~/.claude/file-suggestion.sh"}` |


166| `allowedMcpServers` | When set in managed-settings.json, allowlist of MCP servers users can configure. Undefined = no restrictions, empty array = lockdown. Applies to all scopes. Denylist takes precedence. See [Managed MCP configuration](/en/mcp#managed-mcp-configuration) | `[{ "serverName": "github" }]` |170| `allowedMcpServers` | When set in managed-settings.json, allowlist of MCP servers users can configure. Undefined = no restrictions, empty array = lockdown. Applies to all scopes. Denylist takes precedence. See [Managed MCP configuration](/en/mcp#managed-mcp-configuration) | `[{ "serverName": "github" }]` |

167| `deniedMcpServers` | When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including managed servers. Denylist takes precedence over allowlist. See [Managed MCP configuration](/en/mcp#managed-mcp-configuration) | `[{ "serverName": "filesystem" }]` |171| `deniedMcpServers` | When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including managed servers. Denylist takes precedence over allowlist. See [Managed MCP configuration](/en/mcp#managed-mcp-configuration) | `[{ "serverName": "filesystem" }]` |

168| `strictKnownMarketplaces` | When set in managed-settings.json, allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Applies to marketplace additions only. See [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) | `[{ "source": "github", "repo": "acme-corp/plugins" }]` |172| `strictKnownMarketplaces` | When set in managed-settings.json, allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Applies to marketplace additions only. See [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) | `[{ "source": "github", "repo": "acme-corp/plugins" }]` |

173| `blockedMarketplaces` | (Managed settings only) Blocklist of marketplace sources. Blocked sources are checked before downloading, so they never touch the filesystem. See [Managed marketplace restrictions](/en/plugin-marketplaces#managed-marketplace-restrictions) | `[{ "source": "github", "repo": "untrusted/plugins" }]` |

169| `awsAuthRefresh` | Custom script that modifies the `.aws` directory (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `aws sso login --profile myprofile` |174| `awsAuthRefresh` | Custom script that modifies the `.aws` directory (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `aws sso login --profile myprofile` |

170| `awsCredentialExport` | Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `/bin/generate_aws_grant.sh` |175| `awsCredentialExport` | Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `/bin/generate_aws_grant.sh` |

171| `alwaysThinkingEnabled` | Enable [extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) by default for all sessions. Typically configured via the `/config` command rather than editing directly | `true` |176| `alwaysThinkingEnabled` | Enable [extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) by default for all sessions. Typically configured via the `/config` command rather than editing directly | `true` |


175| `language` | Configure Claude's preferred response language (e.g., `"japanese"`, `"spanish"`, `"french"`). Claude will respond in this language by default | `"japanese"` |180| `language` | Configure Claude's preferred response language (e.g., `"japanese"`, `"spanish"`, `"french"`). Claude will respond in this language by default | `"japanese"` |

176| `autoUpdatesChannel` | Release channel to follow for updates. Use `"stable"` for a version that is typically about one week old and skips versions with major regressions, or `"latest"` (default) for the most recent release | `"stable"` |181| `autoUpdatesChannel` | Release channel to follow for updates. Use `"stable"` for a version that is typically about one week old and skips versions with major regressions, or `"latest"` (default) for the most recent release | `"stable"` |

177| `spinnerTipsEnabled` | Show tips in the spinner while Claude is working. Set to `false` to disable tips (default: `true`) | `false` |182| `spinnerTipsEnabled` | Show tips in the spinner while Claude is working. Set to `false` to disable tips (default: `true`) | `false` |

183| `spinnerTipsOverride` | Override spinner tips with custom strings. `tips`: array of tip strings. `excludeDefault`: if `true`, only show custom tips; if `false` or absent, custom tips are merged with built-in tips | `{ "excludeDefault": true, "tips": ["Use our internal tool X"] }` |

178| `terminalProgressBarEnabled` | Enable the terminal progress bar that shows progress in supported terminals like Windows Terminal and iTerm2 (default: `true`) | `false` |184| `terminalProgressBarEnabled` | Enable the terminal progress bar that shows progress in supported terminals like Windows Terminal and iTerm2 (default: `true`) | `false` |

179| `prefersReducedMotion` | Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility | `true` |185| `prefersReducedMotion` | Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility | `true` |

180| `teammateMode` | How [agent team](/en/agent-teams) teammates display: `auto` (picks split panes in tmux or iTerm2, in-process otherwise), `in-process`, or `tmux`. See [set up agent teams](/en/agent-teams#set-up-agent-teams) | `"in-process"` |186| `teammateMode` | How [agent team](/en/agent-teams) teammates display: `auto` (picks split panes in tmux or iTerm2, in-process otherwise), `in-process`, or `tmux`. See [set up agent teams](/en/agent-teams#set-up-agent-teams) | `"in-process"` |


188| `deny` | Array of permission rules to deny tool use. Use this to exclude sensitive files from Claude Code access. See [Permission rule syntax](#permission-rule-syntax) and [Bash permission limitations](/en/permissions#tool-specific-permission-rules) | `[ "WebFetch", "Bash(curl *)", "Read(./.env)", "Read(./secrets/**)" ]` |194| `deny` | Array of permission rules to deny tool use. Use this to exclude sensitive files from Claude Code access. See [Permission rule syntax](#permission-rule-syntax) and [Bash permission limitations](/en/permissions#tool-specific-permission-rules) | `[ "WebFetch", "Bash(curl *)", "Read(./.env)", "Read(./secrets/**)" ]` |

189| `additionalDirectories` | Additional [working directories](/en/permissions#working-directories) that Claude has access to | `[ "../docs/" ]` |195| `additionalDirectories` | Additional [working directories](/en/permissions#working-directories) that Claude has access to | `[ "../docs/" ]` |

190| `defaultMode` | Default [permission mode](/en/permissions#permission-modes) when opening Claude Code | `"acceptEdits"` |196| `defaultMode` | Default [permission mode](/en/permissions#permission-modes) when opening Claude Code | `"acceptEdits"` |

191| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode from being activated. This disables the `--dangerously-skip-permissions` command-line flag. See [managed settings](/en/permissions#managed-settings) | `"disable"` |197| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode from being activated. This disables the `--dangerously-skip-permissions` command-line flag. See [managed settings](/en/permissions#managed-only-settings) | `"disable"` |

192 198 

193### Permission rule syntax199### Permission rule syntax

194 200 


212**Filesystem and network restrictions** are configured via Read, Edit, and WebFetch permission rules, not via these sandbox settings.218**Filesystem and network restrictions** are configured via Read, Edit, and WebFetch permission rules, not via these sandbox settings.

213 219 

214| Keys | Description | Example |220| Keys | Description | Example |

215| :---------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------ |221| :-------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------ |

216| `enabled` | Enable bash sandboxing (macOS, Linux, and WSL2). Default: false | `true` |222| `enabled` | Enable bash sandboxing (macOS, Linux, and WSL2). Default: false | `true` |

217| `autoAllowBashIfSandboxed` | Auto-approve bash commands when sandboxed. Default: true | `true` |223| `autoAllowBashIfSandboxed` | Auto-approve bash commands when sandboxed. Default: true | `true` |

218| `excludedCommands` | Commands that should run outside of the sandbox | `["git", "docker"]` |224| `excludedCommands` | Commands that should run outside of the sandbox | `["git", "docker"]` |


221| `network.allowAllUnixSockets` | Allow all Unix socket connections in sandbox. Default: false | `true` |227| `network.allowAllUnixSockets` | Allow all Unix socket connections in sandbox. Default: false | `true` |

222| `network.allowLocalBinding` | Allow binding to localhost ports (macOS only). Default: false | `true` |228| `network.allowLocalBinding` | Allow binding to localhost ports (macOS only). Default: false | `true` |

223| `network.allowedDomains` | Array of domains to allow for outbound network traffic. Supports wildcards (e.g., `*.example.com`). | `["github.com", "*.npmjs.org"]` |229| `network.allowedDomains` | Array of domains to allow for outbound network traffic. Supports wildcards (e.g., `*.example.com`). | `["github.com", "*.npmjs.org"]` |

230| `network.allowManagedDomainsOnly` | (Managed settings only) Only `allowedDomains` and `WebFetch(domain:...)` allow rules from managed settings are respected. Domains from user, project, and local settings are ignored. Denied domains are still respected from all sources. Default: false | `true` |

224| `network.httpProxyPort` | HTTP proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy. | `8080` |231| `network.httpProxyPort` | HTTP proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy. | `8080` |

225| `network.socksProxyPort` | SOCKS5 proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy. | `8081` |232| `network.socksProxyPort` | SOCKS5 proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy. | `8081` |

226| `enableWeakerNestedSandbox` | Enable weaker sandbox for unprivileged Docker environments (Linux and WSL2 only). **Reduces security.** Default: false | `true` |233| `enableWeakerNestedSandbox` | Enable weaker sandbox for unprivileged Docker environments (Linux and WSL2 only). **Reduces security.** Default: false | `true` |


271 278 

272**Default commit attribution:**279**Default commit attribution:**

273 280 

274```281```text theme={null}

275🤖 Generated with [Claude Code](https://claude.com/claude-code)282🤖 Generated with [Claude Code](https://claude.com/claude-code)

276 283 

277 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>284 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

278```285```

279 286 

280**Default pull request attribution:**287**Default pull request attribution:**

281 288 

282```289```text theme={null}

283🤖 Generated with [Claude Code](https://claude.com/claude-code)290🤖 Generated with [Claude Code](https://claude.com/claude-code)

284```291```

285 292 


319 326 

320Output newline-separated file paths to stdout (currently limited to 15):327Output newline-separated file paths to stdout (currently limited to 15):

321 328 

322```329```text theme={null}

323src/components/Button.tsx330src/components/Button.tsx

324src/components/Modal.tsx331src/components/Modal.tsx

325src/components/Form.tsx332src/components/Form.tsx


354 361 

355Settings apply in order of precedence. From highest to lowest:362Settings apply in order of precedence. From highest to lowest:

356 363 

3571. **Managed settings** ([`managed-settings.json`](/en/permissions#managed-settings) or [server-managed settings](/en/server-managed-settings))3641. **Managed settings** ([server-managed](/en/server-managed-settings), [MDM/OS-level policies](#configuration-scopes), or [managed settings](/en/settings#settings-files))

358 * Policies deployed by IT/DevOps to system directories, or delivered from Anthropic's servers for Claude for Enterprise customers365 * Policies deployed by IT through server delivery, MDM configuration profiles, registry policies, or managed settings files

359 * Cannot be overridden by user or project settings366 * Cannot be overridden by user or project settings

367 * Within the managed tier, precedence is: server-managed > MDM/OS-level policies > `managed-settings.json` > HKCU registry (Windows only). Only one managed source is used; sources do not merge.

360 368 

3612. **Command line arguments**3692. **Command line arguments**

362 * Temporary overrides for a specific session370 * Temporary overrides for a specific session


374 382 

375For example, if your user settings allow `Bash(npm run *)` but a project's shared settings deny it, the project setting takes precedence and the command is blocked.383For example, if your user settings allow `Bash(npm run *)` but a project's shared settings deny it, the project setting takes precedence and the command is blocked.

376 384 

385### Verify active settings

386 

387Run `/status` inside Claude Code to see which settings sources are active and where they come from. The output shows each configuration layer (managed, user, project) along with its origin, such as `Enterprise managed settings (remote)`, `Enterprise managed settings (plist)`, `Enterprise managed settings (HKLM)`, or `Enterprise managed settings (file)`. If a settings file contains errors, `/status` reports the issue so you can fix it.

388 

377### Key points about the configuration system389### Key points about the configuration system

378 390 

379* **Memory files (`CLAUDE.md`)**: Contain instructions and context that Claude loads at startup391* **Memory files (`CLAUDE.md`)**: Contain instructions and context that Claude loads at startup


503 515 

504#### `strictKnownMarketplaces`516#### `strictKnownMarketplaces`

505 517 

506**Managed settings only**: Controls which plugin marketplaces users are allowed to add. This setting can only be configured in [`managed-settings.json`](/en/permissions#managed-settings) and provides administrators with strict control over marketplace sources.518**Managed settings only**: Controls which plugin marketplaces users are allowed to add. This setting can only be configured in [managed settings](/en/settings#settings-files) and provides administrators with strict control over marketplace sources.

507 519 

508**Managed settings file locations**:520**Managed settings file locations**:

509 521 


760| `BASH_MAX_TIMEOUT_MS` | Maximum timeout the model can set for long-running bash commands | |772| `BASH_MAX_TIMEOUT_MS` | Maximum timeout the model can set for long-running bash commands | |

761| `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` | Set the percentage of context capacity (1-100) at which auto-compaction triggers. By default, auto-compaction triggers at approximately 95% capacity. Use lower values like `50` to compact earlier. Values above the default threshold have no effect. Applies to both main conversations and subagents. This percentage aligns with the `context_window.used_percentage` field available in [status line](/en/statusline) | |773| `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` | Set the percentage of context capacity (1-100) at which auto-compaction triggers. By default, auto-compaction triggers at approximately 95% capacity. Use lower values like `50` to compact earlier. Values above the default threshold have no effect. Applies to both main conversations and subagents. This percentage aligns with the `context_window.used_percentage` field available in [status line](/en/statusline) | |

762| `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR` | Return to the original working directory after each Bash command | |774| `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR` | Return to the original working directory after each Bash command | |

775| `CLAUDE_CODE_ACCOUNT_UUID` | Account UUID for the authenticated user. Used by SDK callers to provide account information synchronously, avoiding a race condition where early telemetry events lack account metadata. Requires `CLAUDE_CODE_USER_EMAIL` and `CLAUDE_CODE_ORGANIZATION_UUID` to also be set | |

763| `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD` | Set to `1` to load CLAUDE.md files from directories specified with `--add-dir`. By default, additional directories do not load memory files | `1` |776| `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD` | Set to `1` to load CLAUDE.md files from directories specified with `--add-dir`. By default, additional directories do not load memory files | `1` |

764| `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` | Set to `1` to enable [agent teams](/en/agent-teams). Agent teams are experimental and disabled by default | |

765| `CLAUDE_CODE_API_KEY_HELPER_TTL_MS` | Interval in milliseconds at which credentials should be refreshed (when using `apiKeyHelper`) | |777| `CLAUDE_CODE_API_KEY_HELPER_TTL_MS` | Interval in milliseconds at which credentials should be refreshed (when using `apiKeyHelper`) | |

766| `CLAUDE_CODE_CLIENT_CERT` | Path to client certificate file for mTLS authentication | |778| `CLAUDE_CODE_CLIENT_CERT` | Path to client certificate file for mTLS authentication | |

767| `CLAUDE_CODE_CLIENT_KEY_PASSPHRASE` | Passphrase for encrypted CLAUDE\_CODE\_CLIENT\_KEY (optional) | |

768| `CLAUDE_CODE_CLIENT_KEY` | Path to client private key file for mTLS authentication | |779| `CLAUDE_CODE_CLIENT_KEY` | Path to client private key file for mTLS authentication | |

769| `CLAUDE_CODE_EFFORT_LEVEL` | Set the effort level for supported models. Values: `low`, `medium`, `high` (default). Lower effort is faster and cheaper, higher effort provides deeper reasoning. Currently supported with Opus 4.6 only. See [Adjust effort level](/en/model-config#adjust-effort-level) | |780| `CLAUDE_CODE_CLIENT_KEY_PASSPHRASE` | Passphrase for encrypted CLAUDE\_CODE\_CLIENT\_KEY (optional) | |

770| `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` | Set to `1` to disable Anthropic API-specific `anthropic-beta` headers. Use this if experiencing issues like "Unexpected value(s) for the `anthropic-beta` header" when using an LLM gateway with third-party providers | |781| `CLAUDE_CODE_DISABLE_1M_CONTEXT` | Set to `1` to disable [1M context window](/en/model-config#extended-context) support. When set, 1M model variants are unavailable in the model picker. Useful for enterprise environments with compliance requirements | |

782| `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` | Set to `1` to disable [adaptive reasoning](/en/model-config#adjust-effort-level) for Opus 4.6 and Sonnet 4.6. When disabled, these models fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS` | |

771| `CLAUDE_CODE_DISABLE_AUTO_MEMORY` | Set to `1` to disable [auto memory](/en/memory#auto-memory). Set to `0` to force auto memory on during the gradual rollout. When disabled, Claude does not create or load auto memory files | |783| `CLAUDE_CODE_DISABLE_AUTO_MEMORY` | Set to `1` to disable [auto memory](/en/memory#auto-memory). Set to `0` to force auto memory on during the gradual rollout. When disabled, Claude does not create or load auto memory files | |

772| `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` | Set to `1` to disable all background task functionality, including the `run_in_background` parameter on Bash and subagent tools, auto-backgrounding, and the Ctrl+B shortcut | |784| `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` | Set to `1` to disable all background task functionality, including the `run_in_background` parameter on Bash and subagent tools, auto-backgrounding, and the Ctrl+B shortcut | |

785| `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` | Set to `1` to disable Anthropic API-specific `anthropic-beta` headers. Use this if experiencing issues like "Unexpected value(s) for the `anthropic-beta` header" when using an LLM gateway with third-party providers | |

773| `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY` | Set to `1` to disable the "How is Claude doing?" session quality surveys. Also disabled when using third-party providers or when telemetry is disabled. See [Session quality surveys](/en/data-usage#session-quality-surveys) | |786| `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY` | Set to `1` to disable the "How is Claude doing?" session quality surveys. Also disabled when using third-party providers or when telemetry is disabled. See [Session quality surveys](/en/data-usage#session-quality-surveys) | |

774| `CLAUDE_CODE_EXIT_AFTER_STOP_DELAY` | Time in milliseconds to wait after the query loop becomes idle before automatically exiting. Useful for automated workflows and scripts using SDK mode | |

775| `CLAUDE_CODE_PROXY_RESOLVES_HOSTS` | Set to `true` to allow the proxy to perform DNS resolution instead of the caller. Opt-in for environments where the proxy should handle hostname resolution | |

776| `CLAUDE_CODE_TASK_LIST_ID` | Share a task list across sessions. Set the same ID in multiple Claude Code instances to coordinate on a shared task list. See [Task list](/en/interactive-mode#task-list) | |

777| `CLAUDE_CODE_TEAM_NAME` | Name of the agent team this teammate belongs to. Set automatically on [agent team](/en/agent-teams) members | |

778| `CLAUDE_CODE_TMPDIR` | Override the temp directory used for internal temp files. Claude Code appends `/claude/` to this path. Default: `/tmp` on Unix/macOS, `os.tmpdir()` on Windows | |

779| `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_BUG_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY` | |787| `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_BUG_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY` | |

780| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context | |788| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context | |

789| `CLAUDE_CODE_EFFORT_LEVEL` | Set the effort level for supported models. Values: `low`, `medium`, `high` (default). Lower effort is faster and cheaper, higher effort provides deeper reasoning. Currently supported with Opus 4.6 only. See [Adjust effort level](/en/model-config#adjust-effort-level) | |

781| `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` | Set to `false` to disable prompt suggestions (the "Prompt suggestions" toggle in `/config`). These are the grayed-out predictions that appear in your prompt input after Claude responds. See [Prompt suggestions](/en/interactive-mode#prompt-suggestions) | |790| `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` | Set to `false` to disable prompt suggestions (the "Prompt suggestions" toggle in `/config`). These are the grayed-out predictions that appear in your prompt input after Claude responds. See [Prompt suggestions](/en/interactive-mode#prompt-suggestions) | |

782| `CLAUDE_CODE_ENABLE_TASKS` | Set to `false` to temporarily revert to the previous TODO list instead of the task tracking system. Default: `true`. See [Task list](/en/interactive-mode#task-list) | |791| `CLAUDE_CODE_ENABLE_TASKS` | Set to `false` to temporarily revert to the previous TODO list instead of the task tracking system. Default: `true`. See [Task list](/en/interactive-mode#task-list) | |

783| `CLAUDE_CODE_ENABLE_TELEMETRY` | Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See [Monitoring](/en/monitoring-usage) | |792| `CLAUDE_CODE_ENABLE_TELEMETRY` | Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See [Monitoring](/en/monitoring-usage) | |

793| `CLAUDE_CODE_EXIT_AFTER_STOP_DELAY` | Time in milliseconds to wait after the query loop becomes idle before automatically exiting. Useful for automated workflows and scripts using SDK mode | |

794| `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` | Set to `1` to enable [agent teams](/en/agent-teams). Agent teams are experimental and disabled by default | |

784| `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS` | Override the default token limit for file reads. Useful when you need to read larger files in full | |795| `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS` | Override the default token limit for file reads. Useful when you need to read larger files in full | |

785| `CLAUDE_CODE_HIDE_ACCOUNT_INFO` | Set to `1` to hide your email address and organization name from the Claude Code UI. Useful when streaming or recording | |796| `CLAUDE_CODE_HIDE_ACCOUNT_INFO` | Set to `1` to hide your email address and organization name from the Claude Code UI. Useful when streaming or recording | |

786| `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` | Skip auto-installation of IDE extensions | |797| `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` | Skip auto-installation of IDE extensions | |

787| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests. Default: 32,000. Maximum: 64,000. Increasing this value reduces the effective context window available before [auto-compaction](/en/costs#reduce-token-usage) triggers. | |798| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests. Default: 32,000. Maximum: 64,000. Increasing this value reduces the effective context window available before [auto-compaction](/en/costs#reduce-token-usage) triggers. | |

799| `CLAUDE_CODE_ORGANIZATION_UUID` | Organization UUID for the authenticated user. Used by SDK callers to provide account information synchronously. Requires `CLAUDE_CODE_ACCOUNT_UUID` and `CLAUDE_CODE_USER_EMAIL` to also be set | |

788| `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS` | Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See [Dynamic headers](/en/monitoring-usage#dynamic-headers) | |800| `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS` | Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See [Dynamic headers](/en/monitoring-usage#dynamic-headers) | |

789| `CLAUDE_CODE_PLAN_MODE_REQUIRED` | Auto-set to `true` on [agent team](/en/agent-teams) teammates that require plan approval. Read-only: set by Claude Code when spawning teammates. See [require plan approval](/en/agent-teams#require-plan-approval-for-teammates) | |801| `CLAUDE_CODE_PLAN_MODE_REQUIRED` | Auto-set to `true` on [agent team](/en/agent-teams) teammates that require plan approval. Read-only: set by Claude Code when spawning teammates. See [require plan approval](/en/agent-teams#require-plan-approval-for-teammates) | |

802| `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS` | Timeout in milliseconds for git operations when installing or updating plugins (default: 120000). Increase this value for large repositories or slow network connections. See [Git operations time out](/en/plugin-marketplaces#git-operations-time-out) | |

803| `CLAUDE_CODE_PROXY_RESOLVES_HOSTS` | Set to `true` to allow the proxy to perform DNS resolution instead of the caller. Opt-in for environments where the proxy should handle hostname resolution | |

790| `CLAUDE_CODE_SHELL` | Override automatic shell detection. Useful when your login shell differs from your preferred working shell (for example, `bash` vs `zsh`) | |804| `CLAUDE_CODE_SHELL` | Override automatic shell detection. Useful when your login shell differs from your preferred working shell (for example, `bash` vs `zsh`) | |

791| `CLAUDE_CODE_SHELL_PREFIX` | Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>` | |805| `CLAUDE_CODE_SHELL_PREFIX` | Command prefix to wrap all bash commands (for example, for logging or auditing). Example: `/path/to/logger.sh` will execute `/path/to/logger.sh <command>` | |

806| `CLAUDE_CODE_SIMPLE` | Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools. Disables MCP tools, attachments, hooks, and CLAUDE.md files | |

792| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (for example, when using an LLM gateway) | |807| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (for example, when using an LLM gateway) | |

793| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) | |808| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) | |

794| `CLAUDE_CODE_SKIP_VERTEX_AUTH` | Skip Google authentication for Vertex (for example, when using an LLM gateway) | |809| `CLAUDE_CODE_SKIP_VERTEX_AUTH` | Skip Google authentication for Vertex (for example, when using an LLM gateway) | |

795| `CLAUDE_CODE_SUBAGENT_MODEL` | See [Model configuration](/en/model-config) | |810| `CLAUDE_CODE_SUBAGENT_MODEL` | See [Model configuration](/en/model-config) | |

811| `CLAUDE_CODE_TASK_LIST_ID` | Share a task list across sessions. Set the same ID in multiple Claude Code instances to coordinate on a shared task list. See [Task list](/en/interactive-mode#task-list) | |

812| `CLAUDE_CODE_TEAM_NAME` | Name of the agent team this teammate belongs to. Set automatically on [agent team](/en/agent-teams) members | |

813| `CLAUDE_CODE_TMPDIR` | Override the temp directory used for internal temp files. Claude Code appends `/claude/` to this path. Default: `/tmp` on Unix/macOS, `os.tmpdir()` on Windows | |

814| `CLAUDE_CODE_USER_EMAIL` | Email address for the authenticated user. Used by SDK callers to provide account information synchronously. Requires `CLAUDE_CODE_ACCOUNT_UUID` and `CLAUDE_CODE_ORGANIZATION_UUID` to also be set | |

796| `CLAUDE_CODE_USE_BEDROCK` | Use [Bedrock](/en/amazon-bedrock) | |815| `CLAUDE_CODE_USE_BEDROCK` | Use [Bedrock](/en/amazon-bedrock) | |

797| `CLAUDE_CODE_USE_FOUNDRY` | Use [Microsoft Foundry](/en/microsoft-foundry) | |816| `CLAUDE_CODE_USE_FOUNDRY` | Use [Microsoft Foundry](/en/microsoft-foundry) | |

798| `CLAUDE_CODE_USE_VERTEX` | Use [Vertex](/en/google-vertex-ai) | |817| `CLAUDE_CODE_USE_VERTEX` | Use [Vertex](/en/google-vertex-ai) | |

setup.md +196 −153

Details

2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt

3> Use this file to discover all available pages before exploring further.3> Use this file to discover all available pages before exploring further.

4 4 

5# Set up Claude Code5# Advanced setup

6 6 

7> Install, authenticate, and start using Claude Code on your development machine.7> System requirements, platform-specific installation, version management, and uninstallation for Claude Code.

8 

9This page covers system requirements, platform-specific installation details, updates, and uninstallation. For a guided walkthrough of your first session, see the [quickstart](/en/quickstart). If you've never used a terminal before, see the [terminal guide](/en/terminal-guide).

8 10 

9## System requirements11## System requirements

10 12 

11* **Operating System**:13Claude Code runs on the following platforms and configurations:

14 

15* **Operating system**:

12 * macOS 13.0+16 * macOS 13.0+

13 * Windows 10 1809+ or Windows Server 2019+ ([see setup notes](#platform-specific-setup))17 * Windows 10 1809+ or Windows Server 2019+

14 * Ubuntu 20.04+18 * Ubuntu 20.04+

15 * Debian 10+19 * Debian 10+

16 * Alpine Linux 3.19+ ([additional dependencies required](#platform-specific-setup))20 * Alpine Linux 3.19+

17* **Hardware**: 4 GB+ RAM21* **Hardware**: 4 GB+ RAM

18* **Network**: Internet connection required (see [network configuration](/en/network-config#network-access-requirements))22* **Network**: internet connection required. See [network configuration](/en/network-config#network-access-requirements).

19* **Shell**: Works best in Bash or Zsh23* **Shell**: Bash, Zsh, PowerShell, or CMD. On Windows, [Git for Windows](https://git-scm.com/downloads/win) is required.

20* **Location**: [Anthropic supported countries](https://www.anthropic.com/supported-countries)24* **Location**: [Anthropic supported countries](https://www.anthropic.com/supported-countries)

21 25 

22### Additional dependencies26### Additional dependencies

23 27 

24* **ripgrep**: Usually included with Claude Code. If search fails, see [search troubleshooting](/en/troubleshooting#search-and-discovery-issues).28* **ripgrep**: usually included with Claude Code. If search fails, see [search troubleshooting](/en/troubleshooting#search-and-discovery-issues).

25* **[Node.js 18+](https://nodejs.org/en/download)**: Only required for [deprecated npm installation](#npm-installation-deprecated)29 

30## Install Claude Code

26 31 

27## Installation32<Tip>

33 Prefer a graphical interface? The [Desktop app](/en/desktop-quickstart) lets you use Claude Code without the terminal. Download it for [macOS](https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code\&utm_medium=docs) or [Windows](https://claude.ai/api/desktop/win32/x64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs).

34 

35 New to the terminal? See the [terminal guide](/en/terminal-guide) for step-by-step instructions.

36</Tip>

28 37 

29To install Claude Code, use one of the following methods:38To install Claude Code, use one of the following methods:

30 39 


48 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd57 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

49 ```58 ```

50 59 

60 **Windows requires [Git for Windows](https://git-scm.com/downloads/win).** Install it first if you don't have it.

61 

51 <Info>62 <Info>

52 Native installations automatically update in the background to keep you on the latest version.63 Native installations automatically update in the background to keep you on the latest version.

53 </Info>64 </Info>

54 </Tab>65 </Tab>

55 66 

56 <Tab title="Homebrew">67 <Tab title="Homebrew">

57 ```sh theme={null}68 ```bash theme={null}

58 brew install --cask claude-code69 brew install --cask claude-code

59 ```70 ```

60 71 


74 </Tab>85 </Tab>

75</Tabs>86</Tabs>

76 87 

77After the installation process completes, navigate to your project and start Claude Code:88After installation completes, open a terminal in the project you want to work in and start Claude Code:

78 89 

79```bash theme={null}90```bash theme={null}

80cd your-awesome-project

81claude91claude

82```92```

83 93 

84If you encounter any issues during installation, consult the [troubleshooting guide](/en/troubleshooting).94If you encounter any issues during installation, see the [troubleshooting guide](/en/troubleshooting).

85 95 

86<Tip>96### Set up on Windows

87 Run `claude doctor` after installation to check your installation type and version.97 

88</Tip>98Claude Code on Windows requires [Git for Windows](https://git-scm.com/downloads/win) or WSL. You can launch `claude` from PowerShell, CMD, or Git Bash. Claude Code uses Git Bash internally to run commands. You do not need to run PowerShell as Administrator.

89 99 

90### Platform-specific setup100**Option 1: Native Windows with Git Bash**

91 101 

92**Windows**: Run Claude Code natively (requires [Git Bash](https://git-scm.com/downloads/win)) or inside WSL. Both WSL 1 and WSL 2 are supported, but WSL 1 has limited support and does not support features like Bash tool sandboxing.102Install [Git for Windows](https://git-scm.com/downloads/win), then run the install command from PowerShell or CMD.

93 103 

94**Alpine Linux and other musl/uClibc-based distributions**:104If Claude Code can't find your Git Bash installation, set the path in your [settings.json file](/en/settings):

105 

106```json theme={null}

107{

108 "env": {

109 "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"

110 }

111}

112```

113 

114**Option 2: WSL**

115 

116Both WSL 1 and WSL 2 are supported. WSL 2 supports [sandboxing](/en/sandboxing) for enhanced security. WSL 1 does not support sandboxing.

117 

118### Alpine Linux and musl-based distributions

95 119 

96The native installer on Alpine and other musl/uClibc-based distributions requires `libgcc`, `libstdc++`, and `ripgrep`. Install these using your distribution's package manager, then set `USE_BUILTIN_RIPGREP=0`.120The native installer on Alpine and other musl/uClibc-based distributions requires `libgcc`, `libstdc++`, and `ripgrep`. Install these using your distribution's package manager, then set `USE_BUILTIN_RIPGREP=0`.

97 121 

98On Alpine:122This example installs the required packages on Alpine:

99 123 

100```bash theme={null}124```bash theme={null}

101apk add libgcc libstdc++ ripgrep125apk add libgcc libstdc++ ripgrep

102```126```

103 127 

104### Authentication128Then set `USE_BUILTIN_RIPGREP` to `0` in your [settings.json file](/en/settings#environment-variables):

129 

130```json theme={null}

131{

132 "env": {

133 "USE_BUILTIN_RIPGREP": "0"

134 }

135}

136```

137 

138## Verify your installation

139 

140After installing, confirm Claude Code is working:

105 141 

106#### For individuals142```bash theme={null}

143claude --version

144```

145 

146For a more detailed check of your installation and configuration, run [`claude doctor`](/en/troubleshooting#get-more-help):

147 

148```bash theme={null}

149claude doctor

150```

107 151 

1081. **Claude Pro or Max plan** (recommended): Subscribe to Claude's [Pro or Max plan](https://claude.ai/pricing) for a unified subscription that includes both Claude Code and Claude on the web. Manage your account in one place and log in with your Claude.ai account.152## Authenticate

1092. **Claude Console**: Connect through the [Claude Console](https://console.anthropic.com) and complete the OAuth process. Requires active billing in the Anthropic Console. A "Claude Code" workspace is automatically created for usage tracking and cost management. You can't create API keys for the Claude Code workspace; it's dedicated exclusively for Claude Code usage.

110 153 

111#### For teams and organizations154Claude Code requires a Pro, Max, Teams, Enterprise, or Console account. The free Claude.ai plan does not include Claude Code access. You can also use Claude Code with a third-party API provider like [Amazon Bedrock](/en/amazon-bedrock), [Google Vertex AI](/en/google-vertex-ai), or [Microsoft Foundry](/en/microsoft-foundry).

112 155 

1131. **Claude for Teams or Enterprise** (recommended): Subscribe to [Claude for Teams](https://claude.com/pricing#team-&-enterprise) or [Claude for Enterprise](https://anthropic.com/contact-sales) for centralized billing, team management, and access to both Claude Code and Claude on the web. Team members log in with their Claude.ai accounts.156After installing, log in by running `claude` and following the browser prompts. See [Authentication](/en/authentication) for all account types and team setup options.

1142. **Claude Console with team billing**: Set up a shared [Claude Console](https://console.anthropic.com) organization with team billing. Invite team members and assign roles for usage tracking.157 

1153. **Cloud providers**: Configure Claude Code to use [Amazon Bedrock, Google Vertex AI, or Microsoft Foundry](/en/third-party-integrations) for deployments with your existing cloud infrastructure.158## Update Claude Code

159 

160Native installations automatically update in the background. You can [configure the release channel](#configure-release-channel) to control whether you receive updates immediately or on a delayed stable schedule, or [disable auto-updates](#disable-auto-updates) entirely. Homebrew and WinGet installations require manual updates.

161 

162### Auto-updates

163 

164Claude Code checks for updates on startup and periodically while running. Updates download and install in the background, then take effect the next time you start Claude Code.

165 

166<Note>

167 Homebrew and WinGet installations do not auto-update. Use `brew upgrade claude-code` or `winget upgrade Anthropic.ClaudeCode` to update manually.

168 

169 **Known issue:** Claude Code may notify you of updates before the new version is available in these package managers. If an upgrade fails, wait and try again later.

170 

171 Homebrew keeps old versions on disk after upgrades. Run `brew cleanup claude-code` periodically to reclaim disk space.

172</Note>

173 

174### Configure release channel

175 

176Control which release channel Claude Code follows for auto-updates and `claude update` with the `autoUpdatesChannel` setting:

177 

178* `"latest"`, the default: receive new features as soon as they're released

179* `"stable"`: use a version that is typically about one week old, skipping releases with major regressions

180 

181Configure this via `/config` → **Auto-update channel**, or add it to your [settings.json file](/en/settings):

182 

183```json theme={null}

184{

185 "autoUpdatesChannel": "stable"

186}

187```

188 

189For enterprise deployments, you can enforce a consistent release channel across your organization using [managed settings](/en/permissions#managed-settings).

190 

191### Disable auto-updates

192 

193Set `DISABLE_AUTOUPDATER` to `"1"` in the `env` key of your [settings.json file](/en/settings#environment-variables):

194 

195```json theme={null}

196{

197 "env": {

198 "DISABLE_AUTOUPDATER": "1"

199 }

200}

201```

202 

203### Update manually

204 

205To apply an update immediately without waiting for the next background check, run:

206 

207```bash theme={null}

208claude update

209```

210 

211## Advanced installation options

212 

213These options are for version pinning, migrating from npm, and verifying binary integrity.

116 214 

117### Install a specific version215### Install a specific version

118 216 

119The native installer accepts either a specific version number or a release channel (`latest` or `stable`). The channel you choose at install time becomes your default for auto-updates. See [Configure release channel](#configure-release-channel) for more information.217The native installer accepts either a specific version number or a release channel (`latest` or `stable`). The channel you choose at install time becomes your default for auto-updates. See [configure release channel](#configure-release-channel) for more information.

120 218 

121To install the latest version (default):219To install the latest version (default):

122 220 


184 </Tab>282 </Tab>

185</Tabs>283</Tabs>

186 284 

187### Binary integrity and code signing285### Deprecated npm installation

188 286 

189* SHA256 checksums for all platforms are published in the release manifests, currently located at `https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/{VERSION}/manifest.json` (example: replace `{VERSION}` with `2.0.30`)287npm installation is deprecated. The native installer is faster, requires no dependencies, and auto-updates in the background. Use the [native installation](#install-claude-code) method when possible.

190* Signed binaries are distributed for the following platforms:

191 * macOS: Signed by "Anthropic PBC" and notarized by Apple

192 * Windows: Signed by "Anthropic, PBC"

193 288 

194## NPM installation (deprecated)289#### Migrate from npm to native

195 290 

196NPM installation is deprecated. Use the [native installation](#installation) method when possible. To migrate an existing npm installation to native, run `claude install`.291If you previously installed Claude Code with npm, switch to the native installer:

197 292 

198**Global npm installation**293```bash theme={null}

294# Install the native binary

295curl -fsSL https://claude.ai/install.sh | bash

199 296 

200```sh theme={null}297# Remove the old npm installation

201npm install -g @anthropic-ai/claude-code298npm uninstall -g @anthropic-ai/claude-code

202```299```

203 300 

204<Warning>301You can also run `claude install` from an existing npm installation to install the native binary alongside it, then remove the npm version.

205 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks.

206 If you encounter permission errors, see [troubleshooting permission errors](/en/troubleshooting#command-not-found-claude-or-permission-errors) for recommended solutions.

207</Warning>

208 

209## Windows setup

210 302 

211**Option 1: Claude Code within WSL**303#### Install with npm

212 304 

213* Both WSL 1 and WSL 2 are supported305If you need npm installation for compatibility reasons, you must have [Node.js 18+](https://nodejs.org/en/download) installed. Install the package globally:

214* WSL 2 supports [sandboxing](/en/sandboxing) for enhanced security. WSL 1 does not support sandboxing.

215 306 

216**Option 2: Claude Code on native Windows with Git Bash**307```bash theme={null}

217 308npm install -g @anthropic-ai/claude-code

218* Requires [Git for Windows](https://git-scm.com/downloads/win)

219* For portable Git installations, specify the path to your `bash.exe`:

220 ```powershell theme={null}

221 $env:CLAUDE_CODE_GIT_BASH_PATH="C:\Program Files\Git\bin\bash.exe"

222 ```

223 

224## Update Claude Code

225 

226### Auto updates

227 

228Claude Code automatically keeps itself up to date to ensure you have the latest features and security fixes.

229 

230* **Update checks**: Performed on startup and periodically while running

231* **Update process**: Downloads and installs automatically in the background

232* **Notifications**: You'll see a notification when updates are installed

233* **Applying updates**: Updates take effect the next time you start Claude Code

234 

235<Note>

236 Homebrew and WinGet installations do not auto-update. Use `brew upgrade claude-code` or `winget upgrade Anthropic.ClaudeCode` to update manually.

237 

238 **Known issue:** Claude Code may notify you of updates before the new version is available in these package managers. If an upgrade fails, wait and try again later.

239</Note>

240 

241### Configure release channel

242 

243Configure which release channel Claude Code follows for both auto-updates and `claude update` with the `autoUpdatesChannel` setting:

244 

245* `"latest"` (default): Receive new features as soon as they're released

246* `"stable"`: Use a version that is typically about one week old, skipping releases with major regressions

247 

248Configure this via `/config` → **Auto-update channel**, or add it to your [settings.json file](/en/settings):

249 

250```json theme={null}

251{

252 "autoUpdatesChannel": "stable"

253}

254```309```

255 310 

256For enterprise deployments, you can enforce a consistent release channel across your organization using [managed settings](/en/permissions#managed-settings).311<Warning>

257 312 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks. If you encounter permission errors, see [troubleshooting permission errors](/en/troubleshooting#permission-errors-during-installation).

258### Disable auto-updates313</Warning>

259 

260Set the `DISABLE_AUTOUPDATER` environment variable in your shell or [settings.json file](/en/settings):

261 314 

262```bash theme={null}315### Binary integrity and code signing

263export DISABLE_AUTOUPDATER=1

264```

265 316 

266### Update manually317You can verify the integrity of Claude Code binaries using SHA256 checksums and code signatures.

267 318 

268```bash theme={null}319* SHA256 checksums for all platforms are published in the release manifests at `https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/{VERSION}/manifest.json`. Replace `{VERSION}` with a version number such as `2.0.30`.

269claude update320* Signed binaries are distributed for the following platforms:

270```321 * **macOS**: signed by "Anthropic PBC" and notarized by Apple

322 * **Windows**: signed by "Anthropic, PBC"

271 323 

272## Uninstall Claude Code324## Uninstall Claude Code

273 325 

274If you need to uninstall Claude Code, follow the instructions for your installation method.326To remove Claude Code, follow the instructions for your installation method.

275 327 

276### Native installation328### Native installation

277 329 

278Remove the Claude Code binary and version files:330Remove the Claude Code binary and version files:

279 331 

280**macOS, Linux, WSL:**332<Tabs>

281 333 <Tab title="macOS, Linux, WSL">

282```bash theme={null}334 ```bash theme={null}

283rm -f ~/.local/bin/claude335 rm -f ~/.local/bin/claude

284rm -rf ~/.local/share/claude336 rm -rf ~/.local/share/claude

285```337 ```

286 338 </Tab>

287**Windows PowerShell:**

288 

289```powershell theme={null}

290Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force

291Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force

292```

293 

294**Windows CMD:**

295 339 

296```batch theme={null}340 <Tab title="Windows PowerShell">

297del "%USERPROFILE%\.local\bin\claude.exe"341 ```powershell theme={null}

298rmdir /s /q "%USERPROFILE%\.local\share\claude"342 Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force

299```343 Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force

344 ```

345 </Tab>

346</Tabs>

300 347 

301### Homebrew installation348### Homebrew installation

302 349 

350Remove the Homebrew cask:

351 

303```bash theme={null}352```bash theme={null}

304brew uninstall --cask claude-code353brew uninstall --cask claude-code

305```354```

306 355 

307### WinGet installation356### WinGet installation

308 357 

358Remove the WinGet package:

359 

309```powershell theme={null}360```powershell theme={null}

310winget uninstall Anthropic.ClaudeCode361winget uninstall Anthropic.ClaudeCode

311```362```

312 363 

313### NPM installation364### npm

365 

366Remove the global npm package:

314 367 

315```bash theme={null}368```bash theme={null}

316npm uninstall -g @anthropic-ai/claude-code369npm uninstall -g @anthropic-ai/claude-code

317```370```

318 371 

319### Clean up configuration files (optional)372### Remove configuration files

320 373 

321<Warning>374<Warning>

322 Removing configuration files will delete all your settings, allowed tools, MCP server configurations, and session history.375 Removing configuration files will delete all your settings, allowed tools, MCP server configurations, and session history.


324 377 

325To remove Claude Code settings and cached data:378To remove Claude Code settings and cached data:

326 379 

327**macOS, Linux, WSL:**380<Tabs>

328 381 <Tab title="macOS, Linux, WSL">

329```bash theme={null}382 ```bash theme={null}

330# Remove user settings and state383 # Remove user settings and state

331rm -rf ~/.claude384 rm -rf ~/.claude

332rm ~/.claude.json385 rm ~/.claude.json

333 

334# Remove project-specific settings (run from your project directory)

335rm -rf .claude

336rm -f .mcp.json

337```

338 

339**Windows PowerShell:**

340 

341```powershell theme={null}

342# Remove user settings and state

343Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force

344Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force

345 

346# Remove project-specific settings (run from your project directory)

347Remove-Item -Path ".claude" -Recurse -Force

348Remove-Item -Path ".mcp.json" -Force

349```

350 386 

351**Windows CMD:**387 # Remove project-specific settings (run from your project directory)

388 rm -rf .claude

389 rm -f .mcp.json

390 ```

391 </Tab>

352 392 

353```batch theme={null}393 <Tab title="Windows PowerShell">

354REM Remove user settings and state394 ```powershell theme={null}

355rmdir /s /q "%USERPROFILE%\.claude"395 # Remove user settings and state

356del "%USERPROFILE%\.claude.json"396 Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force

397 Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force

357 398 

358REM Remove project-specific settings (run from your project directory)399 # Remove project-specific settings (run from your project directory)

359rmdir /s /q ".claude"400 Remove-Item -Path ".claude" -Recurse -Force

360del ".mcp.json"401 Remove-Item -Path ".mcp.json" -Force

361```402 ```

403 </Tab>

404</Tabs>

skills.md +10 −10

Details

58 58 

59 **Let Claude invoke it automatically** by asking something that matches the description:59 **Let Claude invoke it automatically** by asking something that matches the description:

60 60 

61 ```61 ```text theme={null}

62 How does this code work?62 How does this code work?

63 ```63 ```

64 64 

65 **Or invoke it directly** with the skill name:65 **Or invoke it directly** with the skill name:

66 66 

67 ```67 ```text theme={null}

68 /explain-code src/auth/login.ts68 /explain-code src/auth/login.ts

69 ```69 ```

70 70 


77Where you store a skill determines who can use it:77Where you store a skill determines who can use it:

78 78 

79| Location | Path | Applies to |79| Location | Path | Applies to |

80| :--------- | :------------------------------------------------------- | :----------------------------- |80| :--------- | :-------------------------------------------------- | :----------------------------- |

81| Enterprise | See [managed settings](/en/permissions#managed-settings) | All users in your organization |81| Enterprise | See [managed settings](/en/settings#settings-files) | All users in your organization |

82| Personal | `~/.claude/skills/<skill-name>/SKILL.md` | All your projects |82| Personal | `~/.claude/skills/<skill-name>/SKILL.md` | All your projects |

83| Project | `.claude/skills/<skill-name>/SKILL.md` | This project only |83| Project | `.claude/skills/<skill-name>/SKILL.md` | This project only |

84| Plugin | `<plugin>/skills/<skill-name>/SKILL.md` | Where plugin is enabled |84| Plugin | `<plugin>/skills/<skill-name>/SKILL.md` | Where plugin is enabled |


91 91 

92Each skill is a directory with `SKILL.md` as the entrypoint:92Each skill is a directory with `SKILL.md` as the entrypoint:

93 93 

94```94```text theme={null}

95my-skill/95my-skill/

96├── SKILL.md # Main instructions (required)96├── SKILL.md # Main instructions (required)

97├── template.md # Template for Claude to fill in97├── template.md # Template for Claude to fill in


213 213 

214Skills can include multiple files in their directory. This keeps `SKILL.md` focused on the essentials while letting Claude access detailed reference material only when needed. Large reference docs, API specifications, or example collections don't need to load into context every time the skill runs.214Skills can include multiple files in their directory. This keeps `SKILL.md` focused on the essentials while letting Claude access detailed reference material only when needed. Large reference docs, API specifications, or example collections don't need to load into context every time the skill runs.

215 215 

216```216```text theme={null}

217my-skill/217my-skill/

218├── SKILL.md (required - overview and navigation)218├── SKILL.md (required - overview and navigation)

219├── reference.md (detailed API docs - loaded when needed)219├── reference.md (detailed API docs - loaded when needed)


423 423 

424**Disable all skills** by denying the Skill tool in `/permissions`:424**Disable all skills** by denying the Skill tool in `/permissions`:

425 425 

426```426```text theme={null}

427# Add to deny rules:427# Add to deny rules:

428Skill428Skill

429```429```

430 430 

431**Allow or deny specific skills** using [permission rules](/en/permissions):431**Allow or deny specific skills** using [permission rules](/en/permissions):

432 432 

433```433```text theme={null}

434# Allow only specific skills434# Allow only specific skills

435Skill(commit)435Skill(commit)

436Skill(review-pr *)436Skill(review-pr *)


453 453 

454* **Project skills**: Commit `.claude/skills/` to version control454* **Project skills**: Commit `.claude/skills/` to version control

455* **Plugins**: Create a `skills/` directory in your [plugin](/en/plugins)455* **Plugins**: Create a `skills/` directory in your [plugin](/en/plugins)

456* **Managed**: Deploy organization-wide through [managed settings](/en/permissions#managed-settings)456* **Managed**: Deploy organization-wide through [managed settings](/en/settings#settings-files)

457 457 

458### Generate visual output458### Generate visual output

459 459 


486 486 

487```bash487```bash

488python ~/.claude/skills/codebase-visualizer/scripts/visualize.py .488python ~/.claude/skills/codebase-visualizer/scripts/visualize.py .

489```489```text

490 490 

491This creates `codebase-map.html` in the current directory and opens it in your default browser.491This creates `codebase-map.html` in the current directory and opens it in your default browser.

492 492 

slack.md +1 −1

Details

23 23 

24| Requirement | Details |24| Requirement | Details |

25| :--------------------- | :----------------------------------------------------------------------------- |25| :--------------------- | :----------------------------------------------------------------------------- |

26| Claude Plan | Pro, Max, Team, or Enterprise with Claude Code access (premium seats) |26| Claude Plan | Pro, Max, Teams, or Enterprise with Claude Code access (premium seats) |

27| Claude Code on the web | Access to [Claude Code on the web](/en/claude-code-on-the-web) must be enabled |27| Claude Code on the web | Access to [Claude Code on the web](/en/claude-code-on-the-web) must be enabled |

28| GitHub Account | Connected to Claude Code on the web with at least one repository authenticated |28| GitHub Account | Connected to Claude Code on the web with at least one repository authenticated |

29| Slack Authentication | Your Slack account linked to your Claude account via the Claude app |29| Slack Authentication | Your Slack account linked to your Claude account via the Claude app |

statusline.md +1 −1

Details

31 31 

32The `/statusline` command accepts natural language instructions describing what you want displayed. Claude Code generates a script file in `~/.claude/` and updates your settings automatically:32The `/statusline` command accepts natural language instructions describing what you want displayed. Claude Code generates a script file in `~/.claude/` and updates your settings automatically:

33 33 

34```34```text theme={null}

35/statusline show model name and context percentage with a progress bar35/statusline show model name and context percentage with a progress bar

36```36```

37 37 

sub-agents.md +15 −12

Details

84 <Step title="Open the subagents interface">84 <Step title="Open the subagents interface">

85 In Claude Code, run:85 In Claude Code, run:

86 86 

87 ```87 ```text theme={null}

88 /agents88 /agents

89 ```89 ```

90 </Step>90 </Step>


96 <Step title="Generate with Claude">96 <Step title="Generate with Claude">

97 Select **Generate with Claude**. When prompted, describe the subagent:97 Select **Generate with Claude**. When prompted, describe the subagent:

98 98 

99 ```99 ```text theme={null}

100 A code improvement agent that scans files and suggests improvements100 A code improvement agent that scans files and suggests improvements

101 for readability, performance, and best practices. It should explain101 for readability, performance, and best practices. It should explain

102 each issue, show the current code, and provide an improved version.102 each issue, show the current code, and provide an improved version.


120 <Step title="Save and try it out">120 <Step title="Save and try it out">

121 Save the subagent. It's available immediately (no restart needed). Try it:121 Save the subagent. It's available immediately (no restart needed). Try it:

122 122 

123 ```123 ```text theme={null}

124 Use the code-improver agent to suggest improvements in this project124 Use the code-improver agent to suggest improvements in this project

125 ```125 ```

126 126 


146 146 

147This is the recommended way to create and manage subagents. For manual creation or automation, you can also add subagent files directly.147This is the recommended way to create and manage subagents. For manual creation or automation, you can also add subagent files directly.

148 148 

149To list all configured subagents from the command line without starting an interactive session, run `claude agents`. This shows agents grouped by source and indicates which are overridden by higher-priority definitions.

150 

149### Choose the subagent scope151### Choose the subagent scope

150 152 

151Subagents are Markdown files with YAML frontmatter. Store them in different locations depending on scope. When multiple subagents share the same name, the higher-priority location wins.153Subagents are Markdown files with YAML frontmatter. Store them in different locations depending on scope. When multiple subagents share the same name, the higher-priority location wins.


211| `tools` | No | [Tools](#available-tools) the subagent can use. Inherits all tools if omitted |213| `tools` | No | [Tools](#available-tools) the subagent can use. Inherits all tools if omitted |

212| `disallowedTools` | No | Tools to deny, removed from inherited or specified list |214| `disallowedTools` | No | Tools to deny, removed from inherited or specified list |

213| `model` | No | [Model](#choose-a-model) to use: `sonnet`, `opus`, `haiku`, or `inherit`. Defaults to `inherit` |215| `model` | No | [Model](#choose-a-model) to use: `sonnet`, `opus`, `haiku`, or `inherit`. Defaults to `inherit` |

214| `permissionMode` | No | [Permission mode](#permission-modes): `default`, `acceptEdits`, `delegate`, `dontAsk`, `bypassPermissions`, or `plan` |216| `permissionMode` | No | [Permission mode](#permission-modes): `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, or `plan` |

215| `maxTurns` | No | Maximum number of agentic turns before the subagent stops |217| `maxTurns` | No | Maximum number of agentic turns before the subagent stops |

216| `skills` | No | [Skills](/en/skills) to load into the subagent's context at startup. The full skill content is injected, not just made available for invocation. Subagents don't inherit skills from the parent conversation |218| `skills` | No | [Skills](/en/skills) to load into the subagent's context at startup. The full skill content is injected, not just made available for invocation. Subagents don't inherit skills from the parent conversation |

217| `mcpServers` | No | [MCP servers](/en/mcp) available to this subagent. Each entry is either a server name referencing an already-configured server (e.g., `"slack"`) or an inline definition with the server name as key and a full [MCP server config](/en/mcp#configure-mcp-servers) as value |219| `mcpServers` | No | [MCP servers](/en/mcp) available to this subagent. Each entry is either a server name referencing an already-configured server (e.g., `"slack"`) or an inline definition with the server name as key and a full [MCP server config](/en/mcp#configure-mcp-servers) as value |

218| `hooks` | No | [Lifecycle hooks](#define-hooks-for-subagents) scoped to this subagent |220| `hooks` | No | [Lifecycle hooks](#define-hooks-for-subagents) scoped to this subagent |

219| `memory` | No | [Persistent memory scope](#enable-persistent-memory): `user`, `project`, or `local`. Enables cross-session learning |221| `memory` | No | [Persistent memory scope](#enable-persistent-memory): `user`, `project`, or `local`. Enables cross-session learning |

222| `background` | No | Set to `true` to always run this subagent as a [background task](#run-subagents-in-foreground-or-background). Default: `false` |

223| `isolation` | No | Set to `worktree` to run the subagent in a temporary [git worktree](/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees), giving it an isolated copy of the repository. The worktree is automatically cleaned up if the subagent makes no changes |

220 224 

221### Choose a model225### Choose a model

222 226 


272The `permissionMode` field controls how the subagent handles permission prompts. Subagents inherit the permission context from the main conversation but can override the mode.276The `permissionMode` field controls how the subagent handles permission prompts. Subagents inherit the permission context from the main conversation but can override the mode.

273 277 

274| Mode | Behavior |278| Mode | Behavior |

275| :------------------ | :------------------------------------------------------------------------------------------------------------------- |279| :------------------ | :----------------------------------------------------------------- |

276| `default` | Standard permission checking with prompts |280| `default` | Standard permission checking with prompts |

277| `acceptEdits` | Auto-accept file edits |281| `acceptEdits` | Auto-accept file edits |

278| `dontAsk` | Auto-deny permission prompts (explicitly allowed tools still work) |282| `dontAsk` | Auto-deny permission prompts (explicitly allowed tools still work) |

279| `delegate` | Coordination-only mode for [agent team](/en/agent-teams#use-delegate-mode) leads. Restricts to team management tools |

280| `bypassPermissions` | Skip all permission checks |283| `bypassPermissions` | Skip all permission checks |

281| `plan` | Plan mode (read-only exploration) |284| `plan` | Plan mode (read-only exploration) |

282 285 


495 498 

496You can also request a specific subagent explicitly:499You can also request a specific subagent explicitly:

497 500 

498```501```text theme={null}

499Use the test-runner subagent to fix failing tests502Use the test-runner subagent to fix failing tests

500Have the code-reviewer subagent look at my recent changes503Have the code-reviewer subagent look at my recent changes

501```504```


505Subagents can run in the foreground (blocking) or background (concurrent):508Subagents can run in the foreground (blocking) or background (concurrent):

506 509 

507* **Foreground subagents** block the main conversation until complete. Permission prompts and clarifying questions (like [`AskUserQuestion`](/en/settings#tools-available-to-claude)) are passed through to you.510* **Foreground subagents** block the main conversation until complete. Permission prompts and clarifying questions (like [`AskUserQuestion`](/en/settings#tools-available-to-claude)) are passed through to you.

508* **Background subagents** run concurrently while you continue working. Before launching, Claude Code prompts for any tool permissions the subagent will need, ensuring it has the necessary approvals upfront. Once running, the subagent inherits these permissions and auto-denies anything not pre-approved. If a background subagent needs to ask clarifying questions, that tool call fails but the subagent continues. MCP tools are not available in background subagents.511* **Background subagents** run concurrently while you continue working. Before launching, Claude Code prompts for any tool permissions the subagent will need, ensuring it has the necessary approvals upfront. Once running, the subagent inherits these permissions and auto-denies anything not pre-approved. If a background subagent needs to ask clarifying questions, that tool call fails but the subagent continues.

509 512 

510If a background subagent fails due to missing permissions, you can [resume it](#resume-subagents) in the foreground to retry with interactive prompts.513If a background subagent fails due to missing permissions, you can [resume it](#resume-subagents) in the foreground to retry with interactive prompts.

511 514 


522 525 

523One of the most effective uses for subagents is isolating operations that produce large amounts of output. Running tests, fetching documentation, or processing log files can consume significant context. By delegating these to a subagent, the verbose output stays in the subagent's context while only the relevant summary returns to your main conversation.526One of the most effective uses for subagents is isolating operations that produce large amounts of output. Running tests, fetching documentation, or processing log files can consume significant context. By delegating these to a subagent, the verbose output stays in the subagent's context while only the relevant summary returns to your main conversation.

524 527 

525```528```text theme={null}

526Use a subagent to run the test suite and report only the failing tests with their error messages529Use a subagent to run the test suite and report only the failing tests with their error messages

527```530```

528 531 


530 533 

531For independent investigations, spawn multiple subagents to work simultaneously:534For independent investigations, spawn multiple subagents to work simultaneously:

532 535 

533```536```text theme={null}

534Research the authentication, database, and API modules in parallel using separate subagents537Research the authentication, database, and API modules in parallel using separate subagents

535```538```

536 539 


546 549 

547For multi-step workflows, ask Claude to use subagents in sequence. Each subagent completes its task and returns results to Claude, which then passes relevant context to the next subagent.550For multi-step workflows, ask Claude to use subagents in sequence. Each subagent completes its task and returns results to Claude, which then passes relevant context to the next subagent.

548 551 

549```552```text theme={null}

550Use the code-reviewer subagent to find performance issues, then use the optimizer subagent to fix them553Use the code-reviewer subagent to find performance issues, then use the optimizer subagent to fix them

551```554```

552 555 


581 584 

582When a subagent completes, Claude receives its agent ID. To resume a subagent, ask Claude to continue the previous work:585When a subagent completes, Claude receives its agent ID. To resume a subagent, ask Claude to continue the previous work:

583 586 

584```587```text theme={null}

585Use the code-reviewer subagent to review the authentication module588Use the code-reviewer subagent to review the authentication module

586[Agent completes]589[Agent completes]

587 590 

terminal-config.md +11 −10

Details

42 42 

43### Notification setup43### Notification setup

44 44 

45Never miss when Claude completes a task with proper notification configuration:45When Claude finishes working and is waiting for your input, it fires a notification event. You can surface this event as a desktop notification through your terminal or run custom logic with [notification hooks](/en/hooks#notification).

46 46 

47#### iTerm 2 system notifications47#### Terminal notifications

48 48 

49For iTerm 2 alerts when tasks complete:49Kitty and Ghostty support desktop notifications without additional configuration. iTerm 2 requires setup:

50 50 

511. Open iTerm 2 Preferences511. Open iTerm 2 Settings → Profiles → Terminal

522. Navigate to Profiles Terminal522. Enable "Notification Center Alerts"

533. Enable "Silence bell" and Filter Alerts → "Send escape sequence-generated alerts"533. Click "Filter Alerts" and check "Send escape sequence-generated alerts"

544. Set your preferred notification delay

55 54 

56Note that these notifications are specific to iTerm 2 and not available in the default macOS Terminal.55If notifications aren't appearing, verify that your terminal app has notification permissions in your OS settings.

57 56 

58#### Custom notification hooks57Other terminals, including the default macOS Terminal, do not support native notifications. Use [notification hooks](/en/hooks#notification) instead.

59 58 

60For advanced notification handling, you can create [notification hooks](/en/hooks#notification) to run your own logic.59#### Notification hooks

60 

61To add custom behavior when notifications fire, such as playing a sound or sending a message, configure a [notification hook](/en/hooks#notification). Hooks run alongside terminal notifications, not as a replacement.

61 62 

62### Handling large inputs63### Handling large inputs

63 64 

Details

239 239 

240Encourage new users to try Claude Code for codebase Q\&A, or on smaller bug fixes or feature requests. Ask Claude Code to make a plan. Check Claude's suggestions and give feedback if it's off-track. Over time, as users understand this new paradigm better, then they'll be more effective at letting Claude Code run more agentically.240Encourage new users to try Claude Code for codebase Q\&A, or on smaller bug fixes or feature requests. Ask Claude Code to make a plan. Check Claude's suggestions and give feedback if it's off-track. Over time, as users understand this new paradigm better, then they'll be more effective at letting Claude Code run more agentically.

241 241 

242### Pin model versions for cloud providers

243 

244If you deploy through [Bedrock](/en/amazon-bedrock), [Vertex AI](/en/google-vertex-ai), or [Foundry](/en/microsoft-foundry), pin specific model versions using `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`, and `ANTHROPIC_DEFAULT_HAIKU_MODEL`. Without pinning, Claude Code aliases resolve to the latest version, which can break users when Anthropic releases a new model that isn't yet enabled in your account. See [Model configuration](/en/model-config#pin-models-for-third-party-deployments) for details.

245 

242### Configure security policies246### Configure security policies

243 247 

244Security teams can configure managed permissions for what Claude Code is and is not allowed to do, which cannot be overwritten by local configuration. [Learn more](/en/security).248Security teams can configure managed permissions for what Claude Code is and is not allowed to do, which cannot be overwritten by local configuration. [Learn more](/en/security).

troubleshooting.md +583 −116

Details

6 6 

7> Discover solutions to common issues with Claude Code installation and usage.7> Discover solutions to common issues with Claude Code installation and usage.

8 8 

9## Troubleshoot installation issues

10 

11<Tip>

12 If you'd rather skip the terminal entirely, the [Claude Code Desktop app](/en/desktop-quickstart) lets you install and use Claude Code through a graphical interface. Download it for [macOS](https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code\&utm_medium=docs) or [Windows](https://claude.ai/api/desktop/win32/x64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs) and start coding without any command-line setup.

13</Tip>

14 

15Find the error message or symptom you're seeing:

16 

17| What you see | Solution |

18| :---------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------- |

19| `command not found: claude` or `'claude' is not recognized` | [Fix your PATH](#command-not-found-claude-after-installation) |

20| `syntax error near unexpected token '<'` | [Install script returns HTML](#install-script-returns-html-instead-of-a-shell-script) |

21| `curl: (56) Failure writing output to destination` | [Download script first, then run it](#curl-56-failure-writing-output-to-destination) |

22| `Killed` during install on Linux | [Add swap space for low-memory servers](#install-killed-on-low-memory-linux-servers) |

23| `TLS connect error` or `SSL/TLS secure channel` | [Update CA certificates](#tls-or-ssl-connection-errors) |

24| `Failed to fetch version` or can't reach download server | [Check network and proxy settings](#check-network-connectivity) |

25| `irm is not recognized` or `&& is not valid` | [Use the right command for your shell](#windows-irm-or--not-recognized) |

26| `Claude Code on Windows requires git-bash` | [Install or configure Git Bash](#windows-claude-code-on-windows-requires-git-bash) |

27| `Error loading shared library` | [Wrong binary variant for your system](#linux-wrong-binary-variant-installed-muslglibc-mismatch) |

28| `Illegal instruction` on Linux | [Architecture mismatch](#illegal-instruction-on-linux) |

29| `dyld: cannot load` or `Abort trap` on macOS | [Binary incompatibility](#dyld-cannot-load-on-macos) |

30| `Invoke-Expression: Missing argument in parameter list` | [Install script returns HTML](#install-script-returns-html-instead-of-a-shell-script) |

31| `App unavailable in region` | Claude Code is not available in your country. See [supported countries](https://www.anthropic.com/supported-countries). |

32| `unable to get local issuer certificate` | [Configure corporate CA certificates](#tls-or-ssl-connection-errors) |

33| `OAuth error` or `403 Forbidden` | [Fix authentication](#authentication-issues) |

34 

35If your issue isn't listed, work through these diagnostic steps.

36 

37## Debug installation problems

38 

39### Check network connectivity

40 

41The installer downloads from `storage.googleapis.com`. Verify you can reach it:

42 

43```bash theme={null}

44curl -sI https://storage.googleapis.com

45```

46 

47If this fails, your network may be blocking the connection. Common causes:

48 

49* Corporate firewalls or proxies blocking Google Cloud Storage

50* Regional network restrictions: try a VPN or alternative network

51* TLS/SSL issues: update your system's CA certificates, or check if `HTTPS_PROXY` is configured

52 

53If you're behind a corporate proxy, set `HTTPS_PROXY` and `HTTP_PROXY` to your proxy's address before installing. Ask your IT team for the proxy URL if you don't know it, or check your browser's proxy settings.

54 

55This example sets both proxy variables, then runs the installer through your proxy:

56 

57```bash theme={null}

58export HTTP_PROXY=http://proxy.example.com:8080

59export HTTPS_PROXY=http://proxy.example.com:8080

60curl -fsSL https://claude.ai/install.sh | bash

61```

62 

63### Verify your PATH

64 

65If installation succeeded but you get a `command not found` or `not recognized` error when running `claude`, the install directory isn't in your PATH. Your shell searches for programs in directories listed in PATH, and the installer places `claude` at `~/.local/bin/claude` on macOS/Linux or `%USERPROFILE%\.local\bin\claude.exe` on Windows.

66 

67Check if the install directory is in your PATH by listing your PATH entries and filtering for `local/bin`:

68 

69<Tabs>

70 <Tab title="macOS/Linux">

71 ```bash theme={null}

72 echo $PATH | tr ':' '\n' | grep local/bin

73 ```

74 

75 If there's no output, the directory is missing. Add it to your shell configuration:

76 

77 ```bash theme={null}

78 # Zsh (macOS default)

79 echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc

80 source ~/.zshrc

81 

82 # Bash (Linux default)

83 echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc

84 source ~/.bashrc

85 ```

86 

87 Alternatively, close and reopen your terminal.

88 

89 Verify the fix worked:

90 

91 ```bash theme={null}

92 claude --version

93 ```

94 </Tab>

95 

96 <Tab title="Windows PowerShell">

97 ```powershell theme={null}

98 $env:PATH -split ';' | Select-String 'local\\bin'

99 ```

100 

101 If there's no output, add the install directory to your User PATH:

102 

103 ```powershell theme={null}

104 $currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')

105 [Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')

106 ```

107 

108 Restart your terminal for the change to take effect.

109 

110 Verify the fix worked:

111 

112 ```powershell theme={null}

113 claude --version

114 ```

115 </Tab>

116 

117 <Tab title="Windows CMD">

118 ```batch theme={null}

119 echo %PATH% | findstr /i "local\bin"

120 ```

121 

122 If there's no output, open System Settings, go to Environment Variables, and add `%USERPROFILE%\.local\bin` to your User PATH variable. Restart your terminal.

123 

124 Verify the fix worked:

125 

126 ```batch theme={null}

127 claude --version

128 ```

129 </Tab>

130</Tabs>

131 

132### Check for conflicting installations

133 

134Multiple Claude Code installations can cause version mismatches or unexpected behavior. Check what's installed:

135 

136<Tabs>

137 <Tab title="macOS/Linux">

138 List all `claude` binaries found in your PATH:

139 

140 ```bash theme={null}

141 which -a claude

142 ```

143 

144 Check whether the native installer and npm versions are present:

145 

146 ```bash theme={null}

147 ls -la ~/.local/bin/claude

148 ```

149 

150 ```bash theme={null}

151 ls -la ~/.claude/local/

152 ```

153 

154 ```bash theme={null}

155 npm -g ls @anthropic-ai/claude-code 2>/dev/null

156 ```

157 </Tab>

158 

159 <Tab title="Windows PowerShell">

160 ```powershell theme={null}

161 where.exe claude

162 Test-Path "$env:LOCALAPPDATA\Claude Code\claude.exe"

163 ```

164 </Tab>

165</Tabs>

166 

167If you find multiple installations, keep only one. The native install at `~/.local/bin/claude` is recommended. Remove any extra installations:

168 

169Uninstall an npm global install:

170 

171```bash theme={null}

172npm uninstall -g @anthropic-ai/claude-code

173```

174 

175Remove a Homebrew install on macOS:

176 

177```bash theme={null}

178brew uninstall --cask claude-code

179```

180 

181### Check directory permissions

182 

183The installer needs write access to `~/.local/bin/` and `~/.claude/`. If installation fails with permission errors, check whether these directories are writable:

184 

185```bash theme={null}

186test -w ~/.local/bin && echo "writable" || echo "not writable"

187test -w ~/.claude && echo "writable" || echo "not writable"

188```

189 

190If either directory isn't writable, create the install directory and set your user as the owner:

191 

192```bash theme={null}

193sudo mkdir -p ~/.local/bin

194sudo chown -R $(whoami) ~/.local

195```

196 

197### Verify the binary works

198 

199If `claude` is installed but crashes or hangs on startup, run these checks to narrow down the cause.

200 

201Confirm the binary exists and is executable:

202 

203```bash theme={null}

204ls -la $(which claude)

205```

206 

207On Linux, check for missing shared libraries. If `ldd` shows missing libraries, you may need to install system packages. On Alpine Linux and other musl-based distributions, see [Alpine Linux setup](/en/setup#alpine-linux-and-musl-based-distributions).

208 

209```bash theme={null}

210ldd $(which claude) | grep "not found"

211```

212 

213Run a quick sanity check that the binary can execute:

214 

215```bash theme={null}

216claude --version

217```

218 

9## Common installation issues219## Common installation issues

10 220 

221These are the most frequently encountered installation problems and their solutions.

222 

223### Install script returns HTML instead of a shell script

224 

225When running the install command, you may see one of these errors:

226 

227```

228bash: line 1: syntax error near unexpected token `<'

229bash: line 1: `<!DOCTYPE html>'

230```

231 

232On PowerShell, the same problem appears as:

233 

234```

235Invoke-Expression: Missing argument in parameter list.

236```

237 

238This means the install URL returned an HTML page instead of the install script. If the HTML page says "App unavailable in region," Claude Code is not available in your country. See [supported countries](https://www.anthropic.com/supported-countries).

239 

240Otherwise, this can happen due to network issues, regional routing, or a temporary service disruption.

241 

242**Solutions:**

243 

2441. **Use an alternative install method**:

245 

246 On macOS or Linux, install via Homebrew:

247 

248 ```bash theme={null}

249 brew install --cask claude-code

250 ```

251 

252 On Windows, install via WinGet:

253 

254 ```powershell theme={null}

255 winget install Anthropic.ClaudeCode

256 ```

257 

2582. **Retry after a few minutes**: the issue is often temporary. Wait and try the original command again.

259 

260### `command not found: claude` after installation

261 

262The install finished but `claude` doesn't work. The exact error varies by platform:

263 

264| Platform | Error message |

265| :---------- | :--------------------------------------------------------------------- |

266| macOS | `zsh: command not found: claude` |

267| Linux | `bash: claude: command not found` |

268| Windows CMD | `'claude' is not recognized as an internal or external command` |

269| PowerShell | `claude : The term 'claude' is not recognized as the name of a cmdlet` |

270 

271This means the install directory isn't in your shell's search path. See [Verify your PATH](#verify-your-path) for the fix on each platform.

272 

273### `curl: (56) Failure writing output to destination`

274 

275The `curl ... | bash` command downloads the script and passes it directly to Bash for execution using a pipe (`|`). This error means the connection broke before the script finished downloading. Common causes include network interruptions, the download being blocked mid-stream, or system resource limits.

276 

277**Solutions:**

278 

2791. **Check network stability**: Claude Code binaries are hosted on Google Cloud Storage. Test that you can reach it:

280 ```bash theme={null}

281 curl -fsSL https://storage.googleapis.com -o /dev/null

282 ```

283 If the command completes silently, your connection is fine and the issue is likely intermittent. Retry the install command. If you see an error, your network may be blocking the download.

284 

2852. **Try an alternative install method**:

286 

287 On macOS or Linux:

288 

289 ```bash theme={null}

290 brew install --cask claude-code

291 ```

292 

293 On Windows:

294 

295 ```powershell theme={null}

296 winget install Anthropic.ClaudeCode

297 ```

298 

299### TLS or SSL connection errors

300 

301Errors like `curl: (35) TLS connect error`, `schannel: next InitializeSecurityContext failed`, or PowerShell's `Could not establish trust relationship for the SSL/TLS secure channel` indicate TLS handshake failures.

302 

303**Solutions:**

304 

3051. **Update your system CA certificates**:

306 

307 On Ubuntu/Debian:

308 

309 ```bash theme={null}

310 sudo apt-get update && sudo apt-get install ca-certificates

311 ```

312 

313 On macOS via Homebrew:

314 

315 ```bash theme={null}

316 brew install ca-certificates

317 ```

318 

3192. **On Windows, enable TLS 1.2** in PowerShell before running the installer:

320 ```powershell theme={null}

321 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

322 irm https://claude.ai/install.ps1 | iex

323 ```

324 

3253. **Check for proxy or firewall interference**: corporate proxies that perform TLS inspection can cause these errors, including `unable to get local issuer certificate`. Set `NODE_EXTRA_CA_CERTS` to your corporate CA certificate bundle:

326 ```bash theme={null}

327 export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem

328 ```

329 Ask your IT team for the certificate file if you don't have it. You can also try on a direct connection to confirm the proxy is the cause.

330 

331### `Failed to fetch version from storage.googleapis.com`

332 

333The installer couldn't reach the download server. This typically means `storage.googleapis.com` is blocked on your network.

334 

335**Solutions:**

336 

3371. **Test connectivity directly**:

338 ```bash theme={null}

339 curl -sI https://storage.googleapis.com

340 ```

341 

3422. **If behind a proxy**, set `HTTPS_PROXY` so the installer can route through it. See [proxy configuration](/en/network-config#proxy-configuration) for details.

343 ```bash theme={null}

344 export HTTPS_PROXY=http://proxy.example.com:8080

345 curl -fsSL https://claude.ai/install.sh | bash

346 ```

347 

3483. **If on a restricted network**, try a different network or VPN, or use an alternative install method:

349 

350 On macOS or Linux:

351 

352 ```bash theme={null}

353 brew install --cask claude-code

354 ```

355 

356 On Windows:

357 

358 ```powershell theme={null}

359 winget install Anthropic.ClaudeCode

360 ```

361 

362### Windows: `irm` or `&&` not recognized

363 

364If you see `'irm' is not recognized` or `The token '&&' is not valid`, you're running the wrong command for your shell.

365 

366* **`irm` not recognized**: you're in CMD, not PowerShell. You have two options:

367 

368 Open PowerShell by searching for "PowerShell" in the Start menu, then run the original install command:

369 

370 ```powershell theme={null}

371 irm https://claude.ai/install.ps1 | iex

372 ```

373 

374 Or stay in CMD and use the CMD installer instead:

375 

376 ```batch theme={null}

377 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

378 ```

379 

380* **`&&` not valid**: you're in PowerShell but ran the CMD installer command. Use the PowerShell installer:

381 ```powershell theme={null}

382 irm https://claude.ai/install.ps1 | iex

383 ```

384 

385### Install killed on low-memory Linux servers

386 

387If you see `Killed` during installation on a VPS or cloud instance:

388 

389```

390Setting up Claude Code...

391Installing Claude Code native build latest...

392bash: line 142: 34803 Killed "$binary_path" install ${TARGET:+"$TARGET"}

393```

394 

395The Linux OOM killer terminated the process because the system ran out of memory. Claude Code requires at least 4 GB of available RAM.

396 

397**Solutions:**

398 

3991. **Add swap space** if your server has limited RAM. Swap uses disk space as overflow memory, letting the install complete even with low physical RAM.

400 

401 Create a 2 GB swap file and enable it:

402 

403 ```bash theme={null}

404 sudo fallocate -l 2G /swapfile

405 sudo chmod 600 /swapfile

406 sudo mkswap /swapfile

407 sudo swapon /swapfile

408 ```

409 

410 Then retry the installation:

411 

412 ```bash theme={null}

413 curl -fsSL https://claude.ai/install.sh | bash

414 ```

415 

4162. **Close other processes** to free memory before installing.

417 

4183. **Use a larger instance** if possible. Claude Code requires at least 4 GB of RAM.

419 

420### Install hangs in Docker

421 

422When installing Claude Code in a Docker container, installing as root into `/` can cause hangs.

423 

424**Solutions:**

425 

4261. **Set a working directory** before running the installer. When run from `/`, the installer scans the entire filesystem, which causes excessive memory usage. Setting `WORKDIR` limits the scan to a small directory:

427 ```dockerfile theme={null}

428 WORKDIR /tmp

429 RUN curl -fsSL https://claude.ai/install.sh | bash

430 ```

431 

4322. **Increase Docker memory limits** if using Docker Desktop:

433 ```bash theme={null}

434 docker build --memory=4g .

435 ```

436 

437### Windows: Claude Desktop overrides `claude` CLI command

438 

439If you installed an older version of Claude Desktop, it may register a `Claude.exe` in the `WindowsApps` directory that takes PATH priority over Claude Code CLI. Running `claude` opens the Desktop app instead of the CLI.

440 

441Update Claude Desktop to the latest version to fix this issue.

442 

443### Windows: "Claude Code on Windows requires git-bash"

444 

445Claude Code on native Windows needs [Git for Windows](https://git-scm.com/downloads/win), which includes Git Bash.

446 

447**If Git is not installed**, download and install it from [git-scm.com/downloads/win](https://git-scm.com/downloads/win). During setup, select "Add to PATH." Restart your terminal after installing.

448 

449**If Git is already installed** but Claude Code still can't find it, set the path in your [settings.json file](/en/settings):

450 

451```json theme={null}

452{

453 "env": {

454 "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"

455 }

456}

457```

458 

459If your Git is installed somewhere else, find the path by running `where.exe git` in PowerShell and use the `bin\bash.exe` path from that directory.

460 

461### Linux: wrong binary variant installed (musl/glibc mismatch)

462 

463If you see errors about missing shared libraries like `libstdc++.so.6` or `libgcc_s.so.1` after installation, the installer may have downloaded the wrong binary variant for your system.

464 

465```

466Error loading shared library libstdc++.so.6: No such file or directory

467```

468 

469This can happen on glibc-based systems that have musl cross-compilation packages installed, causing the installer to misdetect the system as musl.

470 

471**Solutions:**

472 

4731. **Check which libc your system uses**:

474 ```bash theme={null}

475 ldd /bin/ls | head -1

476 ```

477 If it shows `linux-vdso.so` or references to `/lib/x86_64-linux-gnu/`, you're on glibc. If it shows `musl`, you're on musl.

478 

4792. **If you're on glibc but got the musl binary**, remove the installation and reinstall. You can also manually download the correct binary from the GCS bucket at `https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/{VERSION}/manifest.json`. File a [GitHub issue](https://github.com/anthropics/claude-code/issues) with the output of `ldd /bin/ls` and `ls /lib/libc.musl*`.

480 

4813. **If you're actually on musl** (Alpine Linux), install the required packages:

482 ```bash theme={null}

483 apk add libgcc libstdc++ ripgrep

484 ```

485 

486### `Illegal instruction` on Linux

487 

488If the installer prints `Illegal instruction` instead of the OOM `Killed` message, the downloaded binary doesn't match your CPU architecture. This commonly happens on ARM servers that receive an x86 binary, or on older CPUs that lack required instruction sets.

489 

490```

491bash: line 142: 2238232 Illegal instruction "$binary_path" install ${TARGET:+"$TARGET"}

492```

493 

494**Solutions:**

495 

4961. **Verify your architecture**:

497 ```bash theme={null}

498 uname -m

499 ```

500 `x86_64` means 64-bit Intel/AMD, `aarch64` means ARM64. If the binary doesn't match, [file a GitHub issue](https://github.com/anthropics/claude-code/issues) with the output.

501 

5022. **Try an alternative install method** while the architecture issue is resolved:

503 ```bash theme={null}

504 brew install --cask claude-code

505 ```

506 

507### `dyld: cannot load` on macOS

508 

509If you see `dyld: cannot load` or `Abort trap: 6` during installation, the binary is incompatible with your macOS version or hardware.

510 

511```

512dyld: cannot load 'claude-2.1.42-darwin-x64' (load command 0x80000034 is unknown)

513Abort trap: 6

514```

515 

516**Solutions:**

517 

5181. **Check your macOS version**: Claude Code requires macOS 13.0 or later. Open the Apple menu and select About This Mac to check your version.

519 

5202. **Update macOS** if you're on an older version. The binary uses load commands that older macOS versions don't support.

521 

5223. **Try Homebrew** as an alternative install method:

523 ```bash theme={null}

524 brew install --cask claude-code

525 ```

526 

11### Windows installation issues: errors in WSL527### Windows installation issues: errors in WSL

12 528 

13You might encounter the following issues in WSL:529You might encounter the following issues in WSL:

14 530 

15**OS/platform detection issues**: If you receive an error during installation, WSL may be using Windows `npm`. Try:531**OS/platform detection issues**: if you receive an error during installation, WSL may be using Windows `npm`. Try:

16 532 

17* Run `npm config set os linux` before installation533* Run `npm config set os linux` before installation

18* Install with `npm install -g @anthropic-ai/claude-code --force --no-os-check` (Do NOT use `sudo`)534* Install with `npm install -g @anthropic-ai/claude-code --force --no-os-check`. Do not use `sudo`.

19 535 

20**Node not found errors**: If you see `exec: node: not found` when running `claude`, your WSL environment may be using a Windows installation of Node.js. You can confirm this with `which npm` and `which node`, which should point to Linux paths starting with `/usr/` rather than `/mnt/c/`. To fix this, try installing Node via your Linux distribution's package manager or via [`nvm`](https://github.com/nvm-sh/nvm).536**Node not found errors**: if you see `exec: node: not found` when running `claude`, your WSL environment may be using a Windows installation of Node.js. You can confirm this with `which npm` and `which node`, which should point to Linux paths starting with `/usr/` rather than `/mnt/c/`. To fix this, try installing Node via your Linux distribution's package manager or via [`nvm`](https://github.com/nvm-sh/nvm).

21 537 

22**nvm version conflicts**: If you have nvm installed in both WSL and Windows, you may experience version conflicts when switching Node versions in WSL. This happens because WSL imports the Windows PATH by default, causing Windows nvm/npm to take priority over the WSL installation.538**nvm version conflicts**: if you have nvm installed in both WSL and Windows, you may experience version conflicts when switching Node versions in WSL. This happens because WSL imports the Windows PATH by default, causing Windows nvm/npm to take priority over the WSL installation.

23 539 

24You can identify this issue by:540You can identify this issue by:

25 541 


54```570```

55 571 

56<Warning>572<Warning>

57 Avoid disabling Windows PATH importing (`appendWindowsPath = false`) as this breaks the ability to call Windows executables from WSL. Similarly, avoid uninstalling Node.js from Windows if you use it for Windows development.573 Avoid disabling Windows PATH importing via `appendWindowsPath = false` as this breaks the ability to call Windows executables from WSL. Similarly, avoid uninstalling Node.js from Windows if you use it for Windows development.

58</Warning>574</Warning>

59 575 

60### WSL2 sandbox setup576### WSL2 sandbox setup


77 593 

78WSL1 does not support sandboxing. If you see "Sandboxing requires WSL2", you need to upgrade to WSL2 or run Claude Code without sandboxing.594WSL1 does not support sandboxing. If you see "Sandboxing requires WSL2", you need to upgrade to WSL2 or run Claude Code without sandboxing.

79 595 

80### Linux and Mac installation issues: permission or command not found errors596### Permission errors during installation

81 597 

82When installing Claude Code with npm, `PATH` problems may prevent access to `claude`.598If the native installer fails with permission errors, the target directory may not be writable. See [Check directory permissions](#check-directory-permissions).

83You may also encounter permission errors if your npm global prefix is not user writable (for example, `/usr`, or `/usr/local`).

84 599 

85#### Recommended solution: Native Claude Code installation600If you previously installed with npm and are hitting npm-specific permission errors, switch to the native installer:

86 

87Claude Code has a native installation that doesn't depend on npm or Node.js.

88 

89Use the following command to run the native installer.

90 

91**macOS, Linux, WSL:**

92 601 

93```bash theme={null}602```bash theme={null}

94# Install stable version (default)

95curl -fsSL https://claude.ai/install.sh | bash603curl -fsSL https://claude.ai/install.sh | bash

96 

97# Install latest version

98curl -fsSL https://claude.ai/install.sh | bash -s latest

99 

100# Install specific version number

101curl -fsSL https://claude.ai/install.sh | bash -s 1.0.58

102```604```

103 605 

104**Windows PowerShell:**606## Permissions and authentication

105 

106```powershell theme={null}

107# Install stable version (default)

108irm https://claude.ai/install.ps1 | iex

109 

110# Install latest version

111& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) latest

112 607 

113# Install specific version number608These sections address login failures, token issues, and permission prompt behavior.

114& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 1.0.58

115 609 

116```610### Repeated permission prompts

117 611 

118This command installs the appropriate build of Claude Code for your operating system and architecture and adds a symlink to the installation at `~/.local/bin/claude` (or `%USERPROFILE%\.local\bin\claude.exe` on Windows).612If you find yourself repeatedly approving the same commands, you can allow specific tools

613to run without approval using the `/permissions` command. See [Permissions docs](/en/permissions#manage-permissions).

119 614 

120<Tip>615### Authentication issues

121 Make sure that you have the installation directory in your system PATH.

122</Tip>

123 616 

124### Windows: "Claude Code on Windows requires git-bash"617If you're experiencing authentication problems:

125 618 

126Claude Code on native Windows requires [Git for Windows](https://git-scm.com/downloads/win) which includes Git Bash. If Git is installed but not detected:6191. Run `/logout` to sign out completely

6202. Close Claude Code

6213. Restart with `claude` and complete the authentication process again

127 622 

1281. Set the path explicitly in PowerShell before running Claude:623If the browser doesn't open automatically during login, press `c` to copy the OAuth URL to your clipboard, then paste it into your browser manually.

129 ```powershell theme={null}

130 $env:CLAUDE_CODE_GIT_BASH_PATH="C:\Program Files\Git\bin\bash.exe"

131 ```

132 624 

1332. Or add it to your system environment variables permanently through System Properties Environment Variables.625### OAuth error: Invalid code

134 626 

135If Git is installed in a non-standard location, adjust the path accordingly.627If you see `OAuth error: Invalid code. Please make sure the full code was copied`, the login code expired or was truncated during copy-paste.

136 628 

137### Windows: "installMethod is native, but claude command not found"629**Solutions:**

138 630 

139If you see this error after installation, the `claude` command isn't in your PATH. Add it manually:631* Press Enter to retry and complete the login quickly after the browser opens

632* Type `c` to copy the full URL if the browser doesn't open automatically

633* If using a remote/SSH session, the browser may open on the wrong machine. Copy the URL displayed in the terminal and open it in your local browser instead.

140 634 

141<Steps>635### 403 Forbidden after login

142 <Step title="Open Environment Variables">

143 Press `Win + R`, type `sysdm.cpl`, and press Enter. Click **Advanced** → **Environment Variables**.

144 </Step>

145 636 

146 <Step title="Edit User PATH">637If you see `API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}}` after logging in:

147 Under "User variables", select **Path** and click **Edit**. Click **New** and add:

148 638 

149 ```639* **Claude Pro/Max users**: verify your subscription is active at [claude.ai/settings](https://claude.ai/settings)

150 %USERPROFILE%\.local\bin640* **Console users**: confirm your account has the "Claude Code" or "Developer" role assigned by your admin

151 ```641* **Behind a proxy**: corporate proxies can interfere with API requests. See [network configuration](/en/network-config) for proxy setup.

152 </Step>

153 642 

154 <Step title="Restart your terminal">643### OAuth login fails in WSL2

155 Close and reopen PowerShell or CMD for changes to take effect.

156 </Step>

157</Steps>

158 644 

159Verify installation:645Browser-based login in WSL2 may fail if WSL can't open your Windows browser. Set the `BROWSER` environment variable:

160 646 

161```bash theme={null}647```bash theme={null}

162claude doctor # Check installation health648export BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"

649claude

163```650```

164 651 

165## Permissions and authentication652Or copy the URL manually: when the login prompt appears, press `c` to copy the OAuth URL, then paste it into your Windows browser.

166 

167### Repeated permission prompts

168 

169If you find yourself repeatedly approving the same commands, you can allow specific tools

170to run without approval using the `/permissions` command. See [Permissions docs](/en/permissions#manage-permissions).

171 653 

172### Authentication issues654### "Not logged in" or token expired

173 655 

174If you're experiencing authentication problems:656If Claude Code prompts you to log in again after a session, your OAuth token may have expired.

175 657 

1761. Run `/logout` to sign out completely658Run `/login` to re-authenticate. If this happens frequently, check that your system clock is accurate, as token validation depends on correct timestamps.

1772. Close Claude Code

1783. Restart with `claude` and complete the authentication process again

179 

180If the browser doesn't open automatically during login, press `c` to copy the OAuth URL to your clipboard, then paste it into your browser manually.

181 

182If problems persist, try:

183 

184```bash theme={null}

185rm -rf ~/.config/claude-code/auth.json

186claude

187```

188 

189This removes your stored authentication information and forces a clean login.

190 659 

191## Configuration file locations660## Configuration file locations

192 661 

193Claude Code stores configuration in several locations:662Claude Code stores configuration in several locations:

194 663 

195| File | Purpose |664| File | Purpose |

196| :---------------------------- | :------------------------------------------------------- |665| :---------------------------- | :----------------------------------------------------------------------------------------------------- |

197| `~/.claude/settings.json` | User settings (permissions, hooks, model overrides) |666| `~/.claude/settings.json` | User settings (permissions, hooks, model overrides) |

198| `.claude/settings.json` | Project settings (checked into source control) |667| `.claude/settings.json` | Project settings (checked into source control) |

199| `.claude/settings.local.json` | Local project settings (not committed) |668| `.claude/settings.local.json` | Local project settings (not committed) |

200| `~/.claude.json` | Global state (theme, OAuth, MCP servers) |669| `~/.claude.json` | Global state (theme, OAuth, MCP servers) |

201| `.mcp.json` | Project MCP servers (checked into source control) |670| `.mcp.json` | Project MCP servers (checked into source control) |

202| `managed-settings.json` | [Managed settings](/en/settings#settings-files) |

203| `managed-mcp.json` | [Managed MCP servers](/en/mcp#managed-mcp-configuration) |671| `managed-mcp.json` | [Managed MCP servers](/en/mcp#managed-mcp-configuration) |

672| Managed settings | [Managed settings](/en/settings#settings-files) (server-managed, MDM/OS-level policies, or file-based) |

204 673 

205On Windows, `~` refers to your user home directory, such as `C:\Users\YourName`.674On Windows, `~` refers to your user home directory, such as `C:\Users\YourName`.

206 675 

207**Managed file locations:**

208 

209* macOS: `/Library/Application Support/ClaudeCode/`

210* Linux/WSL: `/etc/claude-code/`

211* Windows: `C:\Program Files\ClaudeCode\`

212 

213For details on configuring these files, see [Settings](/en/settings) and [MCP](/en/mcp).676For details on configuring these files, see [Settings](/en/settings) and [MCP](/en/mcp).

214 677 

215### Resetting configuration678### Resetting configuration


232 695 

233## Performance and stability696## Performance and stability

234 697 

698These sections cover issues related to resource usage, responsiveness, and search behavior.

699 

235### High CPU or memory usage700### High CPU or memory usage

236 701 

237Claude Code is designed to work with most development environments, but may consume significant resources when processing large codebases. If you're experiencing performance issues:702Claude Code is designed to work with most development environments, but may consume significant resources when processing large codebases. If you're experiencing performance issues:


272 737 

273### Slow or incomplete search results on WSL738### Slow or incomplete search results on WSL

274 739 

275Disk read performance penalties when [working across file systems on WSL](https://learn.microsoft.com/en-us/windows/wsl/filesystems) may result in fewer-than-expected matches (but not a complete lack of search functionality) when using Claude Code on WSL.740Disk read performance penalties when [working across file systems on WSL](https://learn.microsoft.com/en-us/windows/wsl/filesystems) may result in fewer-than-expected matches when using Claude Code on WSL. Search still functions, but returns fewer results than on a native filesystem.

276 741 

277<Note>742<Note>

278 `/doctor` will show Search as OK in this case.743 `/doctor` will show Search as OK in this case.


280 745 

281**Solutions:**746**Solutions:**

282 747 

2831. **Submit more specific searches**: Reduce the number of files searched by specifying directories or file types: "Search for JWT validation logic in the auth-service package" or "Find use of md5 hash in JS files".7481. **Submit more specific searches**: reduce the number of files searched by specifying directories or file types: "Search for JWT validation logic in the auth-service package" or "Find use of md5 hash in JS files".

284 749 

2852. **Move project to Linux filesystem**: If possible, ensure your project is located on the Linux filesystem (`/home/`) rather than the Windows filesystem (`/mnt/c/`).7502. **Move project to Linux filesystem**: if possible, ensure your project is located on the Linux filesystem (`/home/`) rather than the Windows filesystem (`/mnt/c/`).

286 751 

2873. **Use native Windows instead**: Consider running Claude Code natively on Windows instead of through WSL, for better file system performance.7523. **Use native Windows instead**: consider running Claude Code natively on Windows instead of through WSL, for better file system performance.

288 753 

289## IDE integration issues754## IDE integration issues

290 755 

756If Claude Code does not connect to your IDE or behaves unexpectedly within an IDE terminal, try the solutions below.

757 

291### JetBrains IDE not detected on WSL2758### JetBrains IDE not detected on WSL2

292 759 

293If you're using Claude Code on WSL2 with JetBrains IDEs and getting "No available IDEs detected" errors, this is likely due to WSL2's networking configuration or Windows Firewall blocking the connection.760If you're using Claude Code on WSL2 with JetBrains IDEs and getting "No available IDEs detected" errors, this is likely due to WSL2's networking configuration or Windows Firewall blocking the connection.


3011. Find your WSL2 IP address:7681. Find your WSL2 IP address:

302 ```bash theme={null}769 ```bash theme={null}

303 wsl hostname -I770 wsl hostname -I

304 # Example output: 172.21.123.456771 # Example output: 172.21.123.45

305 ```772 ```

306 773 

3072. Open PowerShell as Administrator and create a firewall rule:7742. Open PowerShell as Administrator and create a firewall rule:

308 ```powershell theme={null}775 ```powershell theme={null}

309 New-NetFirewallRule -DisplayName "Allow WSL2 Internal Traffic" -Direction Inbound -Protocol TCP -Action Allow -RemoteAddress 172.21.0.0/16 -LocalAddress 172.21.0.0/16776 New-NetFirewallRule -DisplayName "Allow WSL2 Internal Traffic" -Direction Inbound -Protocol TCP -Action Allow -RemoteAddress 172.21.0.0/16 -LocalAddress 172.21.0.0/16

310 ```777 ```

311 (Adjust the IP range based on your WSL2 subnet from step 1)778 Adjust the IP range based on your WSL2 subnet from step 1.

312 779 

3133. Restart both your IDE and Claude Code7803. Restart both your IDE and Claude Code

314 781 


327 These networking issues only affect WSL2. WSL1 uses the host's network directly and doesn't require these configurations.794 These networking issues only affect WSL2. WSL1 uses the host's network directly and doesn't require these configurations.

328</Note>795</Note>

329 796 

330For additional JetBrains configuration tips, see our [JetBrains IDE guide](/en/jetbrains#plugin-settings).797For additional JetBrains configuration tips, see the [JetBrains IDE guide](/en/jetbrains#plugin-settings).

331 798 

332### Reporting Windows IDE integration issues (both native and WSL)799### Report Windows IDE integration issues

333 800 

334If you're experiencing IDE integration problems on Windows, [create an issue](https://github.com/anthropics/claude-code/issues) with the following information:801If you're experiencing IDE integration problems on Windows, [create an issue](https://github.com/anthropics/claude-code/issues) with the following information:

335 802 

336* Environment type: native Windows (Git Bash) or WSL1/WSL2803* Environment type: native Windows (Git Bash) or WSL1/WSL2

337* WSL networking mode (if applicable): NAT or mirrored804* WSL networking mode, if applicable: NAT or mirrored

338* IDE name and version805* IDE name and version

339* Claude Code extension/plugin version806* Claude Code extension/plugin version

340* Shell type: Bash, Zsh, PowerShell, etc.807* Shell type: Bash, Zsh, PowerShell, etc.

341 808 

342### Escape key not working in JetBrains (IntelliJ, PyCharm, etc.) terminals809### Escape key not working in JetBrains IDE terminals

343 810 

344If you're using Claude Code in JetBrains terminals and the `Esc` key doesn't interrupt the agent as expected, this is likely due to a keybinding clash with JetBrains' default shortcuts.811If you're using Claude Code in JetBrains terminals and the `Esc` key doesn't interrupt the agent as expected, this is likely due to a keybinding clash with JetBrains' default shortcuts.

345 812 


366function example() {833function example() {

367 return "hello";834 return "hello";

368}835}

369```836```text

370````837````

371 838 

372Instead of properly tagged blocks like:839Instead of properly tagged blocks like:


376function example() {843function example() {

377 return "hello";844 return "hello";

378}845}

379```846```text

380````847````

381 848 

382**Solutions:**849**Solutions:**

383 850 

3841. **Ask Claude to add language tags**: Request "Add appropriate language tags to all code blocks in this markdown file."8511. **Ask Claude to add language tags**: request "Add appropriate language tags to all code blocks in this markdown file."

385 852 

3862. **Use post-processing hooks**: Set up automatic formatting hooks to detect and add missing language tags. See [Auto-format code after edits](/en/hooks-guide#auto-format-code-after-edits) for an example of a PostToolUse formatting hook.8532. **Use post-processing hooks**: set up automatic formatting hooks to detect and add missing language tags. See [Auto-format code after edits](/en/hooks-guide#auto-format-code-after-edits) for an example of a PostToolUse formatting hook.

387 854 

3883. **Manual verification**: After generating markdown files, review them for proper code block formatting and request corrections if needed.8553. **Manual verification**: after generating markdown files, review them for proper code block formatting and request corrections if needed.

389 856 

390### Inconsistent spacing and formatting857### Inconsistent spacing and formatting

391 858 


393 860 

394**Solutions:**861**Solutions:**

395 862 

3961. **Request formatting corrections**: Ask Claude to "Fix spacing and formatting issues in this markdown file."8631. **Request formatting corrections**: ask Claude to "Fix spacing and formatting issues in this markdown file."

397 864 

3982. **Use formatting tools**: Set up hooks to run markdown formatters like `prettier` or custom formatting scripts on generated markdown files.8652. **Use formatting tools**: set up hooks to run markdown formatters like `prettier` or custom formatting scripts on generated markdown files.

399 866 

4003. **Specify formatting preferences**: Include formatting requirements in your prompts or project [memory](/en/memory) files.8673. **Specify formatting preferences**: include formatting requirements in your prompts or project [memory](/en/memory) files.

401 868 

402### Best practices for markdown generation869### Reduce markdown formatting issues

403 870 

404To minimize formatting issues:871To minimize formatting issues:

405 872 

406* **Be explicit in requests**: Ask for "properly formatted markdown with language-tagged code blocks"873* **Be explicit in requests**: ask for "properly formatted markdown with language-tagged code blocks"

407* **Use project conventions**: Document your preferred markdown style in [`CLAUDE.md`](/en/memory)874* **Use project conventions**: document your preferred markdown style in [`CLAUDE.md`](/en/memory)

408* **Set up validation hooks**: Use post-processing hooks to automatically verify and fix common formatting issues875* **Set up validation hooks**: use post-processing hooks to automatically verify and fix common formatting issues

409 876 

410## Getting more help877## Get more help

411 878 

412If you're experiencing issues not covered here:879If you're experiencing issues not covered here:

413 880 

vs-code.md +21 −25

Details

14 14 

15## Prerequisites15## Prerequisites

16 16 

17Before installing, make sure you have:

18 

17* VS Code 1.98.0 or higher19* VS Code 1.98.0 or higher

18* An Anthropic account (you'll sign in when you first open the extension). If you're using a third-party provider like Amazon Bedrock or Google Vertex AI, see [Use third-party providers](#use-third-party-providers) instead.20* An Anthropic account (you'll sign in when you first open the extension). If you're using a third-party provider like Amazon Bedrock or Google Vertex AI, see [Use third-party providers](#use-third-party-providers) instead.

19 21 


47 Other ways to open Claude Code:49 Other ways to open Claude Code:

48 50 

49 * **Command Palette**: `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type "Claude Code", and select an option like "Open in New Tab"51 * **Command Palette**: `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type "Claude Code", and select an option like "Open in New Tab"

50 * **Status Bar**: Click **✱ Claude Code** in the bottom-right corner of the window. This works even when no file is open.52 * **Status Bar**: click **✱ Claude Code** in the bottom-right corner of the window. This works even when no file is open.

51 53 

52 When you first open the panel, a **Learn Claude Code** checklist appears. Work through each item by clicking **Show me**, or dismiss it with the X. To reopen it later, uncheck **Hide Onboarding** in VS Code settings under Extensions → Claude Code.54 When you first open the panel, a **Learn Claude Code** checklist appears. Work through each item by clicking **Show me**, or dismiss it with the X. To reopen it later, uncheck **Hide Onboarding** in VS Code settings under Extensions → Claude Code.

53 55 


81 83 

82The prompt box supports several features:84The prompt box supports several features:

83 85 

84* **Permission modes**: Click the mode indicator at the bottom of the prompt box to switch modes. In normal mode, Claude asks permission before each action. In Plan mode, Claude describes what it will do and waits for approval before making changes. In auto-accept mode, Claude makes edits without asking. Set the default in VS Code settings under `claudeCode.initialPermissionMode`.86* **Permission modes**: click the mode indicator at the bottom of the prompt box to switch modes. In normal mode, Claude asks permission before each action. In Plan mode, Claude describes what it will do and waits for approval before making changes. In auto-accept mode, Claude makes edits without asking. Set the default in VS Code settings under `claudeCode.initialPermissionMode`.

85* **Command menu**: Click `/` or type `/` to open the command menu. Options include attaching files, switching models, toggling extended thinking, and viewing plan usage (`/usage`). The Customize section provides access to MCP servers, hooks, memory, permissions, and plugins. Items with a terminal icon open in the integrated terminal.87* **Command menu**: click `/` or type `/` to open the command menu. Options include attaching files, switching models, toggling extended thinking, and viewing plan usage (`/usage`). The Customize section provides access to MCP servers, hooks, memory, permissions, and plugins. Items with a terminal icon open in the integrated terminal.

86* **Context indicator**: The prompt box shows how much of Claude's context window you're using. Claude automatically compacts when needed, or you can run `/compact` manually.88* **Context indicator**: the prompt box shows how much of Claude's context window you're using. Claude automatically compacts when needed, or you can run `/compact` manually.

87* **Extended thinking**: Lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). See [Extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) for details.89* **Extended thinking**: lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). See [Extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) for details.

88* **Multi-line input**: Press `Shift+Enter` to add a new line without sending. This also works in the "Other" free-text input of question dialogs.90* **Multi-line input**: press `Shift+Enter` to add a new line without sending. This also works in the "Other" free-text input of question dialogs.

89 91 

90### Reference files and folders92### Reference files and folders

91 93 

92Use @-mentions to give Claude context about specific files or folders. When you type `@` followed by a file or folder name, Claude reads that content and can answer questions about it or make changes to it. Claude Code supports fuzzy matching, so you can type partial names to find what you need:94Use @-mentions to give Claude context about specific files or folders. When you type `@` followed by a file or folder name, Claude reads that content and can answer questions about it or make changes to it. Claude Code supports fuzzy matching, so you can type partial names to find what you need:

93 95 

94```96```text theme={null}

95> Explain the logic in @auth (fuzzy matches auth.js, AuthService.ts, etc.)97> Explain the logic in @auth (fuzzy matches auth.js, AuthService.ts, etc.)

96> What's in @src/components/ (include a trailing slash for folders)98> What's in @src/components/ (include a trailing slash for folders)

97```99```


136 138 

137You can drag the Claude panel to reposition it anywhere in VS Code. Grab the panel's tab or title bar and drag it to:139You can drag the Claude panel to reposition it anywhere in VS Code. Grab the panel's tab or title bar and drag it to:

138 140 

139* **Secondary sidebar**: The right side of the window. Keeps Claude visible while you code.141* **Secondary sidebar**: the right side of the window. Keeps Claude visible while you code.

140* **Primary sidebar**: The left sidebar with icons for Explorer, Search, etc.142* **Primary sidebar**: the left sidebar with icons for Explorer, Search, etc.

141* **Editor area**: Opens Claude as a tab alongside your files. Useful for side tasks.143* **Editor area**: opens Claude as a tab alongside your files. Useful for side tasks.

142 144 

143<Tip>145<Tip>

144 Use the sidebar for your main Claude session and open additional tabs for side tasks. Claude remembers your preferred location. Note that the Spark icon only appears in the Activity Bar when the Claude panel is docked to the left. Since Claude defaults to the right side, use the Editor Toolbar icon to open Claude.146 Use the sidebar for your main Claude session and open additional tabs for side tasks. Claude remembers your preferred location. Note that the Spark icon only appears in the Activity Bar when the Claude panel is docked to the left. Since Claude defaults to the right side, use the Editor Toolbar icon to open Claude.


173 175 

174When you install a plugin, choose the installation scope:176When you install a plugin, choose the installation scope:

175 177 

176* **Install for you**: Available in all your projects (user scope)178* **Install for you**: available in all your projects (user scope)

177* **Install for this project**: Shared with project collaborators (project scope)179* **Install for this project**: shared with project collaborators (project scope)

178* **Install locally**: Only for you, only in this repository (local scope)180* **Install locally**: only for you, only in this repository (local scope)

179 181 

180### Manage marketplaces182### Manage marketplaces

181 183 


235 237 

236The extension has two types of settings:238The extension has two types of settings:

237 239 

238* **Extension settings** in VS Code: Control the extension's behavior within VS Code. Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code. You can also type `/` and select **General Config** to open settings.240* **Extension settings** in VS Code: control the extension's behavior within VS Code. Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code. You can also type `/` and select **General Config** to open settings.

239* **Claude Code settings** in `~/.claude/settings.json`: Shared between the extension and CLI. Use for allowed commands, environment variables, hooks, and MCP servers. See [Settings](/en/settings) for details.241* **Claude Code settings** in `~/.claude/settings.json`: shared between the extension and CLI. Use for allowed commands, environment variables, hooks, and MCP servers. See [Settings](/en/settings) for details.

240 242 

241<Tip>243<Tip>

242 Add `"$schema": "https://json.schemastore.org/claude-code-settings.json"` to your `settings.json` to get autocomplete and inline validation for all available settings directly in VS Code.244 Add `"$schema": "https://json.schemastore.org/claude-code-settings.json"` to your `settings.json` to get autocomplete and inline validation for all available settings directly in VS Code.


320 322 

321Claude can stage changes, write commit messages, and create pull requests based on your work:323Claude can stage changes, write commit messages, and create pull requests based on your work:

322 324 

323```325```text theme={null}

324> commit my changes with a descriptive message326> commit my changes with a descriptive message

325> create a pr for this feature327> create a pr for this feature

326> summarize the changes I've made to the auth module328> summarize the changes I've made to the auth module


330 332 

331### Use git worktrees for parallel tasks333### Use git worktrees for parallel tasks

332 334 

333Git worktrees allow multiple Claude Code sessions to work on separate branches simultaneously, each with isolated files:335Use the `--worktree` (`-w`) flag to start Claude in an isolated worktree with its own files and branch:

334 336 

335```bash theme={null}337```bash theme={null}

336# Create a worktree for a new feature338claude --worktree feature-auth

337git worktree add ../project-feature-a -b feature-a

338 

339# Run Claude Code in each worktree

340cd ../project-feature-a && claude

341```339```

342 340 

343Each worktree maintains independent file state while sharing git history. This prevents Claude instances from interfering with each other when working on different tasks.341Each worktree maintains independent file state while sharing git history. This prevents Claude instances from interfering with each other when working on different tasks. For more details, see [Run parallel sessions with Git worktrees](/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees).

344 

345For detailed git workflows including PR reviews and branch management, see [Common workflows](/en/common-workflows#create-pull-requests).

346 342 

347## Use third-party providers343## Use third-party providers

348 344