SpyBara
Go Premium Account
2025
17 Nov 2025, 03:24
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
18 Dec 2025, 15:02
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
Mon 1 03:31 Tue 2 00:04 Tue 2 21:01 Wed 3 00:04 Thu 4 03:26 Thu 4 06:02 Thu 4 18:02 Thu 4 21:02 Fri 5 00:04 Sat 6 18:02 Mon 8 00:05 Mon 8 06:02 Mon 8 21:01 Tue 9 03:25 Tue 9 06:02 Tue 9 18:01 Wed 10 09:03 Thu 11 06:02 Thu 11 18:01 Thu 11 21:02 Fri 12 00:05 Fri 12 21:01 Sat 13 06:02 Mon 15 18:02 Mon 15 21:01 Tue 16 00:05 Tue 16 18:02 Tue 16 21:01 Wed 17 03:27 Wed 17 15:02 Thu 18 15:02 Thu 18 18:02 Thu 18 21:01 Fri 19 00:05 Fri 19 18:02 Fri 19 21:01 Sat 20 00:04 Tue 23 18:02 Sat 27 03:28 Sat 27 06:02

amazon-bedrock.md +21 −12

Details

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

8 8 

9* An AWS account with Bedrock access enabled9* An AWS account with Bedrock access enabled

10* Access to desired Claude models (e.g., Claude Sonnet 4.5) in Bedrock10* Access to desired Claude models (for example, Claude Sonnet 4.5) in Bedrock

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

12* Appropriate IAM permissions12* Appropriate IAM permissions

13 13 


48export AWS_PROFILE=your-profile-name48export AWS_PROFILE=your-profile-name

49```49```

50 50 

51**Option D: Bedrock API keys**51**Option D: AWS Management Console credentials**

52 

53```bash theme={null}

54aws login

55```

56 

57[Learn more](https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html) about `aws login`.

58 

59**Option E: Bedrock API keys**

52 60 

53```bash theme={null}61```bash theme={null}

54export AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key62export AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key


75 83 

76##### Configuration settings explained84##### Configuration settings explained

77 85 

78**`awsAuthRefresh`**: Use this for commands that modify the `.aws` directory (e.g., updating credentials, SSO cache, or config files). Output is shown to the user (but user input is not supported), making it suitable for browser-based authentication flows where the CLI displays a code to enter in the browser.86**`awsAuthRefresh`**: Use this for commands that modify the `.aws` directory, such as updating credentials, SSO cache, or config files. The command's output is displayed to the user, but interactive input isn't supported. This works well for browser-based SSO flows where the CLI displays a URL or code and you complete authentication in the browser.

79 87 

80**`awsCredentialExport`**: Only use this if you cannot modify `.aws` and must directly return credentials. Output is captured silently (not shown to the user). The command must output JSON in this format:88**`awsCredentialExport`**: Only use this if you can't modify `.aws` and must directly return credentials. Output is captured silently and not shown to the user. The command must output JSON in this format:

81 89 

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

83{91{


102export ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION=us-west-2110export ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION=us-west-2

103```111```

104 112 

105**For VS Code Extension users**: Configure environment variables in the VS Code extension settings instead of exporting them in your shell. See [Using Third-Party Providers in VS Code](/en/vs-code#using-third-party-providers-vertex-and-bedrock) for detailed instructions. All environment variables shown in this guide should work when configured through the VS Code extension settings.

106 

107When enabling Bedrock for Claude Code, keep the following in mind:113When enabling Bedrock for Claude Code, keep the following in mind:

108 114 

109* `AWS_REGION` is a required environment variable. Claude Code does not read from the `.aws` config file for this setting.115* `AWS_REGION` is a required environment variable. Claude Code does not read from the `.aws` config file for this setting.


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

121 127 

122<Note>128<Note>

123 For Bedrock 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 (e.g., `us.anthropic.claude-haiku-4-5-20251001-v1:0`).129 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`).

124</Note>130</Note>

125 131 

126To customize models, use one of these methods:132To customize models, use one of these methods:


137export DISABLE_PROMPT_CACHING=1143export DISABLE_PROMPT_CACHING=1

138```144```

139 145 

140<Note>146<Note>[Prompt caching](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) may not be available in all regions.</Note>

141 [Prompt caching](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) may not be available in all regions

142</Note>

143 147 

144### 5. Output token configuration148### 5. Output token configuration

145 149 

146When using Claude Code with Amazon Bedrock, we recommend the following token settings:150These are the recommended token settings for Claude Code with Amazon Bedrock:

147 151 

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

149# Recommended output token settings for Bedrock153# Recommended output token settings for Bedrock


153 157 

154**Why these values:**158**Why these values:**

155 159 

156* **`CLAUDE_CODE_MAX_OUTPUT_TOKENS=4096`**: Bedrock's burndown throttling logic sets a minimum of 4096 tokens as the max\_token penalty. Setting this lower won't reduce costs but may cut off long tool uses, causing the Claude Code agent loop to fail persistently. Claude Code typically uses less than 4096 output tokens without extended thinking, but may need this headroom for tasks involving significant file creation or Write tool usage.160* **`CLAUDE_CODE_MAX_OUTPUT_TOKENS=4096`**: Bedrock's burndown throttling logic sets a minimum of 4096 tokens as the `max_token` penalty. Setting this lower won't reduce costs but may cut off long tool uses, causing the Claude Code agent loop to fail persistently. Claude Code typically uses less than 4096 output tokens without extended thinking, but may need this headroom for tasks involving significant file creation or Write tool usage.

157 161 

158* **`MAX_THINKING_TOKENS=1024`**: This provides space for extended thinking without cutting off tool use responses, while still maintaining focused reasoning chains. This balance helps prevent trajectory changes that aren't always helpful for coding tasks specifically.162* **`MAX_THINKING_TOKENS=1024`**: This provides space for extended thinking without cutting off tool use responses, while still maintaining focused reasoning chains. This balance helps prevent trajectory changes that aren't always helpful for coding tasks specifically.

159 163 


225* [Bedrock pricing](https://aws.amazon.com/bedrock/pricing/)229* [Bedrock pricing](https://aws.amazon.com/bedrock/pricing/)

226* [Bedrock inference profiles](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html)230* [Bedrock inference profiles](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html)

227* [Claude Code on Amazon Bedrock: Quick Setup Guide](https://community.aws/content/2tXkZKrZzlrlu0KfH8gST5Dkppq/claude-code-on-amazon-bedrock-quick-setup-guide)- [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)231* [Claude Code on Amazon Bedrock: Quick Setup Guide](https://community.aws/content/2tXkZKrZzlrlu0KfH8gST5Dkppq/claude-code-on-amazon-bedrock-quick-setup-guide)- [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)

232 

233 

234---

235 

236> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

analytics.md +5 −0

Details

85 85 

86* [Monitoring usage with OpenTelemetry](/en/monitoring-usage) for custom metrics and alerting86* [Monitoring usage with OpenTelemetry](/en/monitoring-usage) for custom metrics and alerting

87* [Identity and access management](/en/iam) for role configuration87* [Identity and access management](/en/iam) for role configuration

88 

89 

90---

91 

92> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

63* [Interactive mode](/en/interactive-mode) - Keyboard shortcuts and session controls63* [Interactive mode](/en/interactive-mode) - Keyboard shortcuts and session controls

64* [Slash commands](/en/slash-commands) - Accessing checkpoints using `/rewind`64* [Slash commands](/en/slash-commands) - Accessing checkpoints using `/rewind`

65* [CLI reference](/en/cli-reference) - Command-line options65* [CLI reference](/en/cli-reference) - Command-line options

66 

67 

68---

69 

70> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

11Claude Code on the web lets developers kick off Claude Code from the Claude app. This is perfect for:11Claude Code on the web lets developers kick off Claude Code from the Claude app. This is perfect for:

12 12 

13* **Answering questions**: Ask about code architecture and how features are implemented13* **Answering questions**: Ask about code architecture and how features are implemented

14* **Bugfixes and routine tasks**: Well-defined tasks that don't require frequent steering14* **Bug fixes and routine tasks**: Well-defined tasks that don't require frequent steering

15* **Parallel work**: Tackle multiple bug fixes in parallel15* **Parallel work**: Tackle multiple bug fixes in parallel

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

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


473 473 

474## Best practices474## Best practices

475 475 

4761. **Use Claude Code hooks**: Configure [sessionStart hooks](/en/hooks#sessionstart) to automate environment setup and dependency installation.4761. **Use Claude Code hooks**: Configure [SessionStart hooks](/en/hooks#sessionstart) to automate environment setup and dependency installation.

4772. **Document requirements**: Clearly specify dependencies and commands in your `CLAUDE.md` file. If you have an `AGENTS.md` file, you can source it in your `CLAUDE.md` using `@AGENTS.md` to maintain a single source of truth.4772. **Document requirements**: Clearly specify dependencies and commands in your `CLAUDE.md` file. If you have an `AGENTS.md` file, you can source it in your `CLAUDE.md` using `@AGENTS.md` to maintain a single source of truth.

478 478 

479## Related resources479## Related resources


482* [Settings reference](/en/settings)482* [Settings reference](/en/settings)

483* [Security](/en/security)483* [Security](/en/security)

484* [Data usage](/en/data-usage)484* [Data usage](/en/data-usage)

485 

486 

487---

488 

489> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

cli-reference.md +37 −17

Details

5## CLI commands5## CLI commands

6 6 

7| Command | Description | Example |7| Command | Description | Example |

8| :--------------------------------- | :--------------------------------------------- | :------------------------------------------------ |8| :------------------------------ | :--------------------------------------------- | :------------------------------------------------ |

9| `claude` | Start interactive REPL | `claude` |9| `claude` | Start interactive REPL | `claude` |

10| `claude "query"` | Start REPL with initial prompt | `claude "explain this project"` |10| `claude "query"` | Start REPL with initial prompt | `claude "explain this project"` |

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

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

13| `claude -c` | Continue most recent conversation | `claude -c` |13| `claude -c` | Continue most recent conversation | `claude -c` |

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

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

16| `claude update` | Update to latest version | `claude update` |16| `claude update` | Update to latest version | `claude update` |

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

18 18 


21Customize Claude Code's behavior with these command-line flags:21Customize Claude Code's behavior with these command-line flags:

22 22 

23| Flag | Description | Example |23| Flag | Description | Example |

24| :------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------- |24| :------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------- |

25| `--add-dir` | Add additional working directories for Claude to access (validates each path exists as a directory) | `claude --add-dir ../apps ../lib` |25| `--add-dir` | Add additional working directories for Claude to access (validates each path exists as a directory) | `claude --add-dir ../apps ../lib` |

26| `--agent` | Specify an agent for the current session (overrides the `agent` setting) | `claude --agent my-custom-agent` |

26| `--agents` | Define custom [subagents](/en/sub-agents) dynamically via JSON (see below for format) | `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'` |27| `--agents` | Define custom [subagents](/en/sub-agents) dynamically via JSON (see below for format) | `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'` |

27| `--allowedTools` | A list of tools that should be allowed without prompting the user for permission, in addition to [settings.json files](/en/settings) | `"Bash(git log:*)" "Bash(git diff:*)" "Read"` |28| `--allowedTools` | Tools that execute without prompting for permission. To restrict which tools are available, use `--tools` instead | `"Bash(git log:*)" "Bash(git diff:*)" "Read"` |

28| `--disallowedTools` | A list of tools that should be disallowed without prompting the user for permission, in addition to [settings.json files](/en/settings) | `"Bash(git log:*)" "Bash(git diff:*)" "Edit"` |29| `--append-system-prompt` | Append custom text to the end of the default system prompt (works in both interactive and print modes) | `claude --append-system-prompt "Always use TypeScript"` |

29| `--print`, `-p` | Print response without interactive mode (see [SDK documentation](https://docs.claude.com/en/docs/agent-sdk) for programmatic usage details) | `claude -p "query"` |30| `--betas` | Beta headers to include in API requests (API key users only) | `claude --betas interleaved-thinking` |

30| `--system-prompt` | Replace the entire system prompt with custom text (works in both interactive and print modes; added in v2.0.14) | `claude --system-prompt "You are a Python expert"` |31| `--continue`, `-c` | Load the most recent conversation in the current directory | `claude --continue` |

31| `--system-prompt-file` | Load system prompt from a file, replacing the default prompt (print mode only; added in v1.0.54) | `claude -p --system-prompt-file ./custom-prompt.txt "query"` |32| `--dangerously-skip-permissions` | Skip permission prompts (use with caution) | `claude --dangerously-skip-permissions` |

32| `--append-system-prompt` | Append custom text to the end of the default system prompt (works in both interactive and print modes; added in v1.0.55) | `claude --append-system-prompt "Always use TypeScript"` |33| `--debug` | Enable debug mode with optional category filtering (for example, `"api,hooks"` or `"!statsig,!file"`) | `claude --debug "api,mcp"` |

33| `--output-format` | Specify output format for print mode (options: `text`, `json`, `stream-json`) | `claude -p "query" --output-format json` |34| `--disallowedTools` | Tools that are removed from the model's context and cannot be used | `"Bash(git log:*)" "Bash(git diff:*)" "Edit"` |

34| `--input-format` | Specify input format for print mode (options: `text`, `stream-json`) | `claude -p --output-format json --input-format stream-json` |35| `--fallback-model` | Enable automatic fallback to specified model when default model is overloaded (print mode only) | `claude -p --fallback-model sonnet "query"` |

36| `--fork-session` | When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`) | `claude --resume abc123 --fork-session` |

37| `--ide` | Automatically connect to IDE on startup if exactly one valid IDE is available | `claude --ide` |

35| `--include-partial-messages` | Include partial streaming events in output (requires `--print` and `--output-format=stream-json`) | `claude -p --output-format stream-json --include-partial-messages "query"` |38| `--include-partial-messages` | Include partial streaming events in output (requires `--print` and `--output-format=stream-json`) | `claude -p --output-format stream-json --include-partial-messages "query"` |

36| `--verbose` | Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes) | `claude --verbose` |39| `--input-format` | Specify input format for print mode (options: `text`, `stream-json`) | `claude -p --output-format json --input-format stream-json` |

40| `--json-schema` | Get validated JSON output matching a JSON Schema after agent completes its workflow (print mode only, see [Agent SDK Structured Outputs](https://docs.claude.com/en/docs/agent-sdk/structured-outputs)) | `claude -p --json-schema '{"type":"object","properties":{...}}' "query"` |

37| `--max-turns` | Limit the number of agentic turns in non-interactive mode | `claude -p --max-turns 3 "query"` |41| `--max-turns` | Limit the number of agentic turns in non-interactive mode | `claude -p --max-turns 3 "query"` |

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

38| `--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` |43| `--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` |

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

39| `--permission-mode` | Begin in a specified [permission mode](/en/iam#permission-modes) | `claude --permission-mode plan` |45| `--permission-mode` | Begin in a specified [permission mode](/en/iam#permission-modes) | `claude --permission-mode plan` |

40| `--permission-prompt-tool` | Specify an MCP tool to handle permission prompts in non-interactive mode | `claude -p --permission-prompt-tool mcp_auth_tool "query"` |46| `--permission-prompt-tool` | Specify an MCP tool to handle permission prompts in non-interactive mode | `claude -p --permission-prompt-tool mcp_auth_tool "query"` |

41| `--resume` | Resume a specific session by ID, or by choosing in interactive mode | `claude --resume abc123 "query"` |47| `--plugin-dir` | Load plugins from directories for this session only (repeatable) | `claude --plugin-dir ./my-plugins` |

42| `--continue` | Load the most recent conversation in the current directory | `claude --continue` |48| `--print`, `-p` | Print response without interactive mode (see [SDK documentation](https://docs.claude.com/en/docs/agent-sdk) for programmatic usage details) | `claude -p "query"` |

43| `--dangerously-skip-permissions` | Skip permission prompts (use with caution) | `claude --dangerously-skip-permissions` |49| `--resume`, `-r` | Resume a specific session by ID or name, or show an interactive picker to choose a session | `claude --resume auth-refactor` |

50| `--session-id` | Use a specific session ID for the conversation (must be a valid UUID) | `claude --session-id "550e8400-e29b-41d4-a716-446655440000"` |

51| `--setting-sources` | Comma-separated list of setting sources to load (`user`, `project`, `local`) | `claude --setting-sources user,project` |

52| `--settings` | Path to a settings JSON file or a JSON string to load additional settings from | `claude --settings ./settings.json` |

53| `--strict-mcp-config` | Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations | `claude --strict-mcp-config --mcp-config ./mcp.json` |

54| `--system-prompt` | Replace the entire system prompt with custom text (works in both interactive and print modes) | `claude --system-prompt "You are a Python expert"` |

55| `--system-prompt-file` | Load system prompt from a file, replacing the default prompt (print mode only) | `claude -p --system-prompt-file ./custom-prompt.txt "query"` |

56| `--tools` | Specify the list of available tools from the built-in set (use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"`) | `claude -p --tools "Bash,Edit,Read" "query"` |

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

58| `--version`, `-v` | Output the version number | `claude -v` |

44 59 

45<Tip>60<Tip>

46 The `--output-format json` flag is particularly useful for scripting and61 The `--output-format json` flag is particularly useful for scripting and


52The `--agents` flag accepts a JSON object that defines one or more custom subagents. Each subagent requires a unique name (as the key) and a definition object with the following fields:67The `--agents` flag accepts a JSON object that defines one or more custom subagents. Each subagent requires a unique name (as the key) and a definition object with the following fields:

53 68 

54| Field | Required | Description |69| Field | Required | Description |

55| :------------ | :------- | :-------------------------------------------------------------------------------------------------------------- |70| :------------ | :------- | :--------------------------------------------------------------------------------------------------------------------- |

56| `description` | Yes | Natural language description of when the subagent should be invoked |71| `description` | Yes | Natural language description of when the subagent should be invoked |

57| `prompt` | Yes | The system prompt that guides the subagent's behavior |72| `prompt` | Yes | The system prompt that guides the subagent's behavior |

58| `tools` | No | Array of specific tools the subagent can use (e.g., `["Read", "Edit", "Bash"]`). If omitted, inherits all tools |73| `tools` | No | Array of specific tools the subagent can use (for example, `["Read", "Edit", "Bash"]`). If omitted, inherits all tools |

59| `model` | No | Model alias to use: `sonnet`, `opus`, or `haiku`. If omitted, uses the default subagent model |74| `model` | No | Model alias to use: `sonnet`, `opus`, or `haiku`. If omitted, uses the default subagent model |

60 75 

61Example:76Example:


124* [Common workflows](/en/common-workflows) - Advanced workflows and patterns139* [Common workflows](/en/common-workflows) - Advanced workflows and patterns

125* [Settings](/en/settings) - Configuration options140* [Settings](/en/settings) - Configuration options

126* [SDK documentation](https://docs.claude.com/en/docs/agent-sdk) - Programmatic usage and integrations141* [SDK documentation](https://docs.claude.com/en/docs/agent-sdk) - Programmatic usage and integrations

142 

143 

144---

145 

146> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

common-workflows.md +119 −97

Details

173 </Step>173 </Step>

174 174 

175 <Step title="Use subagents automatically">175 <Step title="Use subagents automatically">

176 Claude Code will automatically delegate appropriate tasks to specialized subagents:176 Claude Code automatically delegates appropriate tasks to specialized subagents:

177 177 

178 ```178 ```

179 > review my recent code changes for security issues179 > review my recent code changes for security issues


201 201 

202 Then select "Create New subagent" and follow the prompts to define:202 Then select "Create New subagent" and follow the prompts to define:

203 203 

204 * Subagent type (e.g., `api-designer`, `performance-optimizer`)204 * A unique identifier that describes the subagent's purpose (for example, `code-reviewer`, `api-designer`).

205 * When to use it205 * When Claude should use this agent

206 * Which tools it can access206 * Which tools it can access

207 * Its specialized system prompt207 * A system prompt describing the agent's role and behavior

208 </Step>208 </Step>

209</Steps>209</Steps>

210 210 


235 235 

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

237 237 

238If you are in Normal Mode, **Shift+Tab** will first switch 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`.238If 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`.

239 239 

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

241 241 


247 247 

248**Run "headless" queries in Plan Mode**248**Run "headless" queries in Plan Mode**

249 249 

250You can also run a query in Plan Mode directly with `-p` (i.e., in ["headless mode"](/en/headless)):250You can also run a query in Plan Mode directly with `-p` (that is, in ["headless mode"](/en/headless)):

251 251 

252```bash theme={null}252```bash theme={null}

253claude --permission-mode plan -p "Analyze the authentication system and suggest improvements"253claude --permission-mode plan -p "Analyze the authentication system and suggest improvements"


263> I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.263> I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.

264```264```

265 265 

266Claude will analyze the current implementation and create a comprehensive plan. Refine with follow-ups:266Claude analyzes the current implementation and create a comprehensive plan. Refine with follow-ups:

267 267 

268```268```

269> What about backward compatibility?269> What about backward compatibility?


315 </Step>315 </Step>

316</Steps>316</Steps>

317 317 

318<Tip>318Claude can generate tests that follow your project's existing patterns and conventions. When asking for tests, be specific about what behavior you want to verify. Claude examines your existing test files to match the style, frameworks, and assertion patterns already in use.

319 Tips:

320 319 

321 * Ask for tests that cover edge cases and error conditions320For comprehensive coverage, ask Claude to identify edge cases you might have missed. Claude can analyze your code paths and suggest tests for error conditions, boundary values, and unexpected inputs that are easy to overlook.

322 * Request both unit and integration tests when appropriate

323 * Have Claude explain the testing strategy

324</Tip>

325 321 

326***322***

327 323 


336 ```332 ```

337 </Step>333 </Step>

338 334 

339 <Step title="Generate a PR with Claude">335 <Step title="Generate a pull request with Claude">

340 ```336 ```

341 > create a pr 337 > create a pr

342 ```338 ```


496 Tips:492 Tips:

497 493 

498 * File paths can be relative or absolute494 * File paths can be relative or absolute

499 * @ file references add CLAUDE.md in the file's directory and parent directories to context495 * @ file references add `CLAUDE.md` in the file's directory and parent directories to context

500 * Directory references show file listings, not contents496 * Directory references show file listings, not contents

501 * You can reference multiple files in a single message (e.g., "@file1.js and @file2.js")497 * You can reference multiple files in a single message (for example, "@file1.js and @file2.js")

502</Tip>498</Tip>

503 499 

504***500***

505 501 

506## Use extended thinking502## Use extended thinking (thinking mode)

503 

504[Extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) reserves a portion of the total output token budget for Claude to reason through complex problems step-by-step. This reasoning is visible in verbose mode, which you can toggle on with `Ctrl+O`.

507 505 

508Suppose you're working on complex architectural decisions, challenging bugs, or planning multi-step implementations that require deep reasoning.506Extended thinking is particularly valuable for complex architectural decisions, challenging bugs, multi-step implementation planning, and evaluating tradeoffs between different approaches. It provides more space for exploring multiple solutions, analyzing edge cases, and self-correcting mistakes.

509 507 

510<Note>508<Note>

511 [Extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) is disabled by default in Claude Code. You can enable it on-demand by using `Tab` to toggle Thinking on, or by using prompts like "think" or "think hard". You can also enable it permanently by setting the [`MAX_THINKING_TOKENS` environment variable](/en/settings#environment-variables) in your settings.509 Sonnet 4.5 and Opus 4.5 have thinking enabled by default. All other models have thinking disabled by default. Use `/model` to view or switch your current model.

512</Note>510</Note>

513 511 

514<Steps>512You can configure thinking mode for Claude Code in two ways:

515 <Step title="Provide context and ask Claude to think">

516 ```

517 > I need to implement a new authentication system using OAuth2 for our API. Think deeply about the best approach for implementing this in our codebase.

518 ```

519 513 

520 Claude will gather relevant information from your codebase and514| Scope | How to enable | Details |

521 use extended thinking, which will be visible in the interface.515| --------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |

522 </Step>516| **Global default** | Use `/config` to toggle thinking mode on | Sets your default across all projects.<br />Saved as `alwaysThinkingEnabled` in `~/.claude/settings.json` |

517| **Environment variable override** | Set [`MAX_THINKING_TOKENS`](/en/settings#environment-variables) environment variable | When set, applies a custom token budget to all requests, overriding your thinking mode configuration. Example: `export MAX_THINKING_TOKENS=1024` |

523 518 

524 <Step title="Refine the thinking with follow-up prompts">519### Per-request thinking with `ultrathink`

525 ```

526 > think about potential security vulnerabilities in this approach

527 ```

528 520 

529 ```521You can include `ultrathink` as a keyword in your message to enable thinking for a single request:

530 > think hard about edge cases we should handle

531 ```

532 </Step>

533</Steps>

534 522 

535<Tip>523```

536 Tips to get the most value out of extended thinking:524> ultrathink: design a caching layer for our API

525```

537 526 

538 [Extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) is most valuable for complex tasks such as:527Note that `ultrathink` both allocates the thinking budget AND semantically signals to Claude to reason more thoroughly, which may result in deeper thinking than necessary for your task.

539 528 

540 * Planning complex architectural changes529The `ultrathink` keyword only works when `MAX_THINKING_TOKENS` is not set. When `MAX_THINKING_TOKENS` is configured, it takes priority and controls the thinking budget for all requests.

541 * Debugging intricate issues

542 * Creating implementation plans for new features

543 * Understanding complex codebases

544 * Evaluating tradeoffs between different approaches

545 530 

546 Use `Tab` to toggle Thinking on and off during a session.531Other phrases like "think", "think hard", and "think more" are interpreted as regular prompt instructions and don't allocate thinking tokens.

547 532 

548 The way you prompt for thinking results in varying levels of thinking depth:533To view Claude's thinking process, press `Ctrl+O` to toggle verbose mode and see the internal reasoning displayed as gray italic text.

549 534 

550 * "think" triggers basic extended thinking535See the [token budget section below](#how-extended-thinking-token-budgets-work) for detailed budget information and cost implications.

551 * intensifying phrases such as "keep hard", "think more", "think a lot", or "think longer" triggers deeper thinking

552 536 

553 For more extended thinking prompting tips, see [Extended thinking tips](https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/extended-thinking-tips).537### How extended thinking token budgets work

554</Tip>

555 538 

556<Note>539Extended thinking uses a **token budget** that controls how much internal reasoning Claude can perform before responding.

557 Claude will display its thinking process as italic gray text above the540 

558 response.541A larger thinking token budget provides:

559</Note>542 

543* More space to explore multiple solution approaches step-by-step

544* Room to analyze edge cases and evaluate tradeoffs thoroughly

545* Ability to revise reasoning and self-correct mistakes

546 

547Token budgets for thinking mode:

548 

549* When thinking is **enabled** (via `/config` or `ultrathink`), Claude can use up to **31,999 tokens** from your output budget for internal reasoning

550* When thinking is **disabled**, Claude uses **0 tokens** for thinking

551 

552**Custom token budgets:**

553 

554* You can set a custom thinking token budget using the [`MAX_THINKING_TOKENS` environment variable](/en/settings#environment-variables)

555* This takes highest priority and overrides the default 31,999 token budget

556* See the [extended thinking documentation](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for valid token ranges

557 

558<Warning>

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

560</Warning>

560 561 

561***562***

562 563 

563## Resume previous conversations564## Resume previous conversations

564 565 

565Suppose you've been working on a task with Claude Code and need to continue where you left off in a later session.566When starting Claude Code, you can resume a previous session:

567 

568* `claude --continue` continues the most recent conversation in the current directory

569* `claude --resume` opens a conversation picker or resumes by name

566 570 

567Claude Code provides two options for resuming previous conversations:571From inside an active session, use `/resume` to switch to a different conversation.

568 572 

569* `--continue` to automatically continue the most recent conversation573Sessions are stored per project directory. The `/resume` picker shows sessions from the same git repository, including worktrees.

570* `--resume` to display a conversation picker574 

575### Name your sessions

576 

577Give sessions descriptive names to find them later. This is a best practice when working on multiple tasks or features.

571 578 

572<Steps>579<Steps>

573 <Step title="Continue the most recent conversation">580 <Step title="Name the current session">

574 ```bash theme={null}581 Use `/rename` during a session to give it a memorable name:

575 claude --continue582 

583 ```

584 > /rename auth-refactor

576 ```585 ```

577 586 

578 This immediately resumes your most recent conversation without any prompts.587 You can also rename any session from the picker: run `/resume`, navigate to a session, and press `R`.

579 </Step>588 </Step>

580 589 

581 <Step title="Continue in non-interactive mode">590 <Step title="Resume by name later">

591 From the command line:

592 

582 ```bash theme={null}593 ```bash theme={null}

583 claude --continue --print "Continue with my task"594 claude --resume auth-refactor

584 ```595 ```

585 596 

586 Use `--print` with `--continue` to resume the most recent conversation in non-interactive mode, perfect for scripts or automation.597 Or from inside an active session:

587 </Step>

588 598 

589 <Step title="Show conversation picker">

590 ```bash theme={null}

591 claude --resume

592 ```599 ```

600 > /resume auth-refactor

601 ```

602 </Step>

603</Steps>

593 604 

594 This displays an interactive conversation selector with a clean list view showing:605### Use the session picker

595 606 

596 * Session summary (or initial prompt)607The `/resume` command (or `claude --resume` without arguments) opens an interactive session picker with these features:

597 * Metadata: time elapsed, message count, and git branch

598 608 

599 Use arrow keys to navigate and press Enter to select a conversation. Press Esc to exit.609**Keyboard shortcuts in the picker:**

600 </Step>610 

601</Steps>611| Shortcut | Action |

612| :-------- | :------------------------------------------------ |

613| `↑` / `↓` | Navigate between sessions |

614| `→` / `←` | Expand or collapse grouped sessions |

615| `Enter` | Select and resume the highlighted session |

616| `P` | Preview the session content |

617| `R` | Rename the highlighted session |

618| `/` | Search to filter sessions |

619| `A` | Toggle between current directory and all projects |

620| `B` | Filter to sessions from your current git branch |

621| `Esc` | Exit the picker or search mode |

622 

623**Session organization:**

624 

625The picker displays sessions with helpful metadata:

626 

627* Session name or initial prompt

628* Time elapsed since last activity

629* Message count

630* Git branch (if applicable)

631 

632Forked sessions (created with `/rewind` or `--fork-session`) are grouped together under their root session, making it easier to find related conversations.

602 633 

603<Tip>634<Tip>

604 Tips:635 Tips:

605 636 

606 * Conversation history is stored locally on your machine637 * **Name sessions early**: Use `/rename` when starting work on a distinct task—it's much easier to find "payment-integration" than "explain this function" later

607 * Use `--continue` for quick access to your most recent conversation638 * Use `--continue` for quick access to your most recent conversation

608 * Use `--resume` when you need to select a specific past conversation639 * Use `--resume session-name` when you know which session you need

609 * When resuming, you'll see the entire conversation history before continuing640 * Use `--resume` (without a name) when you need to browse and select

641 * For scripts, use `claude --continue --print "prompt"` to resume in non-interactive mode

642 * Press `P` in the picker to preview a session before resuming it

610 * The resumed conversation starts with the same model and configuration as the original643 * The resumed conversation starts with the same model and configuration as the original

611 644 

612 How it works:645 How it works:


615 2. **Message Deserialization**: When resuming, the entire message history is restored to maintain context648 2. **Message Deserialization**: When resuming, the entire message history is restored to maintain context

616 3. **Tool State**: Tool usage and results from the previous conversation are preserved649 3. **Tool State**: Tool usage and results from the previous conversation are preserved

617 4. **Context Restoration**: The conversation resumes with all previous context intact650 4. **Context Restoration**: The conversation resumes with all previous context intact

618 

619 Examples:

620 

621 ```bash theme={null}

622 # Continue most recent conversation

623 claude --continue

624 

625 # Continue most recent conversation with a specific prompt

626 claude --continue --print "Show me our progress"

627 

628 # Show conversation picker

629 claude --resume

630 

631 # Continue most recent conversation in non-interactive mode

632 claude --continue --print "Run the tests again"

633 ```

634</Tip>651</Tip>

635 652 

636***653***


822<Tip>839<Tip>

823 Tips:840 Tips:

824 841 

825 * Command names are derived from the filename (e.g., `optimize.md` becomes `/optimize`)842 * Command names are derived from the filename (for example, `optimize.md` becomes `/optimize`)

826 * You can organize commands in subdirectories (e.g., `.claude/commands/frontend/component.md` creates `/component` with "(project:frontend)" shown in the description)843 * You can organize commands in subdirectories (for example, `.claude/commands/frontend/component.md` creates `/component` with "(project:frontend)" shown in the description)

827 * Project commands are available to everyone who clones the repository844 * Project commands are available to everyone who clones the repository

828 * The Markdown file content becomes the prompt sent to Claude when the command is invoked845 * The Markdown file content becomes the prompt sent to Claude when the command is invoked

829</Tip>846</Tip>


850 > /fix-issue 123 867 > /fix-issue 123

851 ```868 ```

852 869 

853 This will replace \$ARGUMENTS with "123" in the prompt.870 This replaces \$ARGUMENTS with "123" in the prompt.

854 </Step>871 </Step>

855</Steps>872</Steps>

856 873 


947<Card title="Claude Code reference implementation" icon="code" href="https://github.com/anthropics/claude-code/tree/main/.devcontainer">964<Card title="Claude Code reference implementation" icon="code" href="https://github.com/anthropics/claude-code/tree/main/.devcontainer">

948 Clone our development container reference implementation.965 Clone our development container reference implementation.

949</Card>966</Card>

967 

968 

969---

970 

971> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

costs.md +5 −0

Details

129 For team deployments, we recommend starting with a small pilot group to129 For team deployments, we recommend starting with a small pilot group to

130 establish usage patterns before wider rollout.130 establish usage patterns before wider rollout.

131</Note>131</Note>

132 

133 

134---

135 

136> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

data-usage.md +6 −1

Details

17 If you're a new user, you can pick your setting for model training during the signup process.17 If you're a new user, you can pick your setting for model training during the signup process.

18 You can change your selection at any time in your Privacy Settings.18 You can change your selection at any time in your Privacy Settings.

19 19 

20**Commercial users**: (Team and Enterprise plans, API, 3rd-party platforms, and Claude Gov) maintain existing policies: Anthropic does not train generative models using code or prompts sent to Claude Code under commercial terms, unless the customer has chosen to provide their data to us for model improvement (e.g. [Developer Partner Program](https://support.claude.com/en/articles/11174108-about-the-development-partner-program)).20**Commercial users**: (Team and Enterprise plans, API, 3rd-party platforms, and Claude Gov) maintain existing policies: Anthropic does not train generative models using code or prompts sent to Claude Code under commercial terms, unless the customer has chosen to provide their data to us for model improvement (for example, the [Developer Partner Program](https://support.claude.com/en/articles/11174108-about-the-development-partner-program)).

21 21 

22### Development Partner Program22### Development Partner Program

23 23 


94| **Claude API (`/bug` reports)** | Default on.<br />`DISABLE_BUG_COMMAND=1` to disable. | Default off.<br />`CLAUDE_CODE_USE_VERTEX` must be 1. | Default off.<br />`CLAUDE_CODE_USE_BEDROCK` must be 1. |94| **Claude API (`/bug` reports)** | Default on.<br />`DISABLE_BUG_COMMAND=1` to disable. | Default off.<br />`CLAUDE_CODE_USE_VERTEX` must be 1. | Default off.<br />`CLAUDE_CODE_USE_BEDROCK` must be 1. |

95 95 

96All environment variables can be checked into `settings.json` ([read more](/en/settings)).96All environment variables can be checked into `settings.json` ([read more](/en/settings)).

97 

98 

99---

100 

101> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

desktop.md +85 −0 added

Details

1# Claude Code on desktop

2 

3> Run Claude Code tasks locally or on secure cloud infrastructure with the Claude desktop app

4 

5<img src="https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=c4e9dc9737b437d36ab253b75a1cc595" alt="Claude Code on desktop interface" data-og-width="4132" width="4132" data-og-height="2620" height="2620" data-path="images/desktop-interface.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=280&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=b1a8421a544c3e8c78679fa1a7b56190 280w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=560&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=79cf4ea0923098cc429198678ea50903 560w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=840&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=14bcbcd569d179770fe656686ffbf6bf 840w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=1100&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=b873274db1e9ff8585ba545032aa24a5 1100w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=1650&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=25553dced783c3a8c2a1134a53295f7e 1650w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=2500&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=9ad49e6468c2f87b1895093deeea7bb2 2500w" />

6 

7## Claude Code on desktop (Preview)

8 

9The Claude desktop app provides a native interface for running multiple Claude Code sessions on your local machine and seamless integration with Claude Code on the web.

10 

11## Features

12 

13Claude Code on desktop provides:

14 

15* **Parallel local sessions with `git` worktrees**: Run multiple Claude Code sessions simultaneously in the same repository, each with its own isolated `git` worktree

16* **Include files listed in your `.gitignore` in your worktrees**: Automatically copy files in your `.gitignore`, like `.env`, to new worktrees using `.worktreeinclude`

17* **Launch Claude Code on the web**: Kick off secure cloud sessions directly from the desktop app

18 

19## Installation

20 

21Download and install the Claude Desktop app from [claude.ai/download](https://claude.ai/download)

22 

23<Note>

24 Local sessions are not available on Windows arm64 architectures.

25</Note>

26 

27## Using Git worktrees

28 

29Claude Code on desktop enables running multiple Claude Code sessions in the same repository using Git worktrees. Each session gets its own isolated worktree, allowing Claude to work on different tasks without conflicts. The default location for worktrees is `~/.claude-worktrees` but this can be configured in your settings on the Claude desktop app.

30 

31<Note>

32 If you start a local session in a folder that does not have Git initialized, the desktop app will not create a new worktree.

33</Note>

34 

35### Copying files ignored with `.gitignore`

36 

37When Claude Code creates a worktree, files ignored via `.gitignore` aren't automatically available. Including a `.worktreeinclude` file solves this by specifying which ignored files should be copied to new worktrees.

38 

39Create a `.worktreeinclude` file in your repository root:

40 

41```

42.env

43.env.local

44.env.*

45**/.claude/settings.local.json

46```

47 

48The file uses `.gitignore`-style patterns. When a worktree is created, files matching these patterns that are also in your `.gitignore` will be copied from your main repository to the worktree.

49 

50<Tip>

51 Only files that are both matched by `.worktreeinclude` AND listed in `.gitignore` are copied. This prevents accidentally duplicating tracked files.

52</Tip>

53 

54### Launch Claude Code on the web

55 

56From the desktop app, you can kick off Claude Code sessions that run on Anthropic's secure cloud infrastructure. This is useful for:

57 

58To start a web session from desktop, select a remote environment when creating a new session.

59 

60For more details, see [Claude Code on the web](/en/claude-code-on-the-web).

61 

62## Bundled Claude Code version

63 

64Claude Code on desktop includes a bundled, stable version of Claude Code to ensure a consistent experience for all desktop users. The bundled version is required and downloaded on first launch even if a version of Claude Code exists on the computer. Desktop automatically manages version updates and cleans up old versions.

65 

66<Note>

67 The bundled Claude Code version in Desktop may differ from the latest CLI version. Desktop prioritizes stability while the CLI may have newer features.

68</Note>

69 

70### Enterprise configuration

71 

72Organizations 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).

73 

74## Related resources

75 

76* [Claude Code on the web](/en/claude-code-on-the-web)

77* [Claude Desktop support articles](https://support.claude.com/en/collections/16163169-claude-desktop)

78* [Enterprise Configuration](https://support.claude.com/en/articles/12622667-enterprise-configuration)

79* [Common workflows](/en/common-workflows)

80* [Settings reference](/en/settings)

81 

82 

83---

84 

85> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

devcontainer.md +6 −1

Details

8 8 

9<Warning>9<Warning>

10 While the devcontainer provides substantial protections, no system is completely immune to all attacks.10 While the devcontainer provides substantial protections, no system is completely immune to all attacks.

11 When executed with `--dangerously-skip-permissions`, devcontainers do not prevent a malicious project from exfiltrating anything accessible in the devcontainer including Claude Code credentials.11 When executed with `--dangerously-skip-permissions`, devcontainers don't prevent a malicious project from exfiltrating anything accessible in the devcontainer including Claude Code credentials.

12 We recommend only using devcontainers when developing with trusted repositories.12 We recommend only using devcontainers when developing with trusted repositories.

13 Always maintain good security practices and monitor Claude's activities.13 Always maintain good security practices and monitor Claude's activities.

14</Warning>14</Warning>


75* [VS Code devcontainers documentation](https://code.visualstudio.com/docs/devcontainers/containers)75* [VS Code devcontainers documentation](https://code.visualstudio.com/docs/devcontainers/containers)

76* [Claude Code security best practices](/en/security)76* [Claude Code security best practices](/en/security)

77* [Enterprise network configuration](/en/network-config)77* [Enterprise network configuration](/en/network-config)

78 

79 

80---

81 

82> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

11 automation workflows beyond GitHub Actions.11 automation workflows beyond GitHub Actions.

12</Note>12</Note>

13 13 

14<Info>

15 **Claude Opus 4.5 is now available.** Claude Code GitHub Actions default to Sonnet. To use Opus 4.5, configure the [model parameter](#breaking-changes-reference) to use `claude-opus-4-5-20251101`.

16</Info>

17 

14## Why use Claude Code GitHub Actions?18## Why use Claude Code GitHub Actions?

15 19 

16* **Instant PR creation**: Describe what you need, and Claude creates a complete PR with all necessary changes20* **Instant PR creation**: Describe what you need, and Claude creates a complete PR with all necessary changes


633. **Copy the workflow file** from [examples/claude.yml](https://github.com/anthropics/claude-code-action/blob/main/examples/claude.yml) into your repository's `.github/workflows/`673. **Copy the workflow file** from [examples/claude.yml](https://github.com/anthropics/claude-code-action/blob/main/examples/claude.yml) into your repository's `.github/workflows/`

64 68 

65<Tip>69<Tip>

66 After completing either the quickstart or manual setup, test the action by70 After completing either the quickstart or manual setup, test the action by tagging `@claude` in an issue or PR comment.

67 tagging `@claude` in an issue or PR comment!

68</Tip>71</Tip>

69 72 

70## Upgrading from Beta73## Upgrading from Beta


186 with:189 with:

187 anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}190 anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

188 prompt: "Generate a summary of yesterday's commits and open issues"191 prompt: "Generate a summary of yesterday's commits and open issues"

189 claude_args: "--model claude-opus-4-1-20250805"192 claude_args: "--model claude-opus-4-5-20251101"

190```193```

191 194 

192### Common use cases195### Common use cases


209 212 

210### Security considerations213### Security considerations

211 214 

212<Warning>Never commit API keys directly to your repository!</Warning>215<Warning>Never commit API keys directly to your repository.</Warning>

213 216 

214For comprehensive security guidance including permissions, authentication, and best practices, see the [Claude Code Action security documentation](https://github.com/anthropics/claude-code-action/blob/main/docs/security.md).217For comprehensive security guidance including permissions, authentication, and best practices, see the [Claude Code Action security documentation](https://github.com/anthropics/claude-code-action/blob/main/docs/security.md).

215 218 


220* Limit action permissions to only what's necessary223* Limit action permissions to only what's necessary

221* Review Claude's suggestions before merging224* Review Claude's suggestions before merging

222 225 

223Always use GitHub Secrets (e.g., `${{ secrets.ANTHROPIC_API_KEY }}`) rather than hardcoding API keys directly in your workflow files.226Always use GitHub Secrets (for example, `${{ secrets.ANTHROPIC_API_KEY }}`) rather than hardcoding API keys directly in your workflow files.

224 227 

225### Optimizing performance228### Optimizing performance

226 229 


633\*Prompt is optional - when omitted for issue/PR comments, Claude responds to trigger phrase\636\*Prompt is optional - when omitted for issue/PR comments, Claude responds to trigger phrase\

634\*\*Required for direct Claude API, not for Bedrock/Vertex637\*\*Required for direct Claude API, not for Bedrock/Vertex

635 638 

636#### Using claude\_args639#### Pass CLI arguments

637 640 

638The `claude_args` parameter accepts any Claude Code CLI arguments:641The `claude_args` parameter accepts any Claude Code CLI arguments:

639 642 


644Common arguments:647Common arguments:

645 648 

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

647* `--model`: Model to use (e.g., `claude-sonnet-4-5-20250929`)650* `--model`: Model to use (for example, `claude-sonnet-4-5-20250929`)

648* `--mcp-config`: Path to MCP configuration651* `--mcp-config`: Path to MCP configuration

649* `--allowed-tools`: Comma-separated list of allowed tools652* `--allowed-tools`: Comma-separated list of allowed tools

650* `--debug`: Enable debug output653* `--debug`: Enable debug output


6672. **Custom prompts**: Use the `prompt` parameter in the workflow file to provide workflow-specific instructions. This allows you to customize Claude's behavior for different workflows or tasks.6702. **Custom prompts**: Use the `prompt` parameter in the workflow file to provide workflow-specific instructions. This allows you to customize Claude's behavior for different workflows or tasks.

668 671 

669Claude will follow these guidelines when creating PRs and responding to requests.672Claude will follow these guidelines when creating PRs and responding to requests.

673 

674 

675---

676 

677> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

gitlab-ci-cd.md +6 −1

Details

379 379 

380### Security considerations380### Security considerations

381 381 

382Never commit API keys or cloud credentials to your repository! Always use GitLab CI/CD variables:382**Never commit API keys or cloud credentials to your repository**. Always use GitLab CI/CD variables:

383 383 

384* Add `ANTHROPIC_API_KEY` as a masked variable (and protect it if needed)384* Add `ANTHROPIC_API_KEY` as a masked variable (and protect it if needed)

385* Use provider-specific OIDC where possible (no long-lived keys)385* Use provider-specific OIDC where possible (no long-lived keys)


460 460 

4611. **CLAUDE.md**: Define coding standards, security requirements, and project conventions. Claude reads this during runs and follows your rules.4611. **CLAUDE.md**: Define coding standards, security requirements, and project conventions. Claude reads this during runs and follows your rules.

4622. **Custom prompts**: Pass task-specific instructions via `prompt`/`prompt_file` in the job. Use different prompts for different jobs (for example, review, implement, refactor).4622. **Custom prompts**: Pass task-specific instructions via `prompt`/`prompt_file` in the job. Use different prompts for different jobs (for example, review, implement, refactor).

463 

464 

465---

466 

467> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

8 8 

9* A Google Cloud Platform (GCP) account with billing enabled9* A Google Cloud Platform (GCP) account with billing enabled

10* A GCP project with Vertex AI API enabled10* A GCP project with Vertex AI API enabled

11* Access to desired Claude models (e.g., Claude Sonnet 4.5)11* Access to desired Claude models (for example, Claude Sonnet 4.5)

12* Google Cloud SDK (`gcloud`) installed and configured12* Google Cloud SDK (`gcloud`) installed and configured

13* Quota allocated in desired GCP region13* Quota allocated in desired GCP region

14 14 


44 44 

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

462. Search for "Claude" models462. Search for "Claude" models

473. Request access to desired Claude models (e.g., Claude Sonnet 4.5)473. Request access to desired Claude models (for example, Claude Sonnet 4.5)

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

49 49 

50### 3. Configure GCP credentials50### 3. Configure GCP credentials


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

100 100 

101<Note>101<Note>

102 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 (e.g., `claude-haiku-4-5@20251001`).102 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`).

103</Note>103</Note>

104 104 

105To customize models:105To customize models:


157* [Vertex AI documentation](https://cloud.google.com/vertex-ai/docs)157* [Vertex AI documentation](https://cloud.google.com/vertex-ai/docs)

158* [Vertex AI pricing](https://cloud.google.com/vertex-ai/pricing)158* [Vertex AI pricing](https://cloud.google.com/vertex-ai/pricing)

159* [Vertex AI quotas and limits](https://cloud.google.com/vertex-ai/docs/quotas)159* [Vertex AI quotas and limits](https://cloud.google.com/vertex-ai/docs/quotas)

160 

161 

162---

163 

164> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

headless.md +9 −4

Details

21Headless mode leverages all the CLI options available in Claude Code. Here are the key ones for automation and scripting:21Headless mode leverages all the CLI options available in Claude Code. Here are the key ones for automation and scripting:

22 22 

23| Flag | Description | Example |23| Flag | Description | Example |

24| :------------------------- | :----------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------ |24| :------------------------- | :---------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------ |

25| `--print`, `-p` | Run in non-interactive mode | `claude -p "query"` |25| `--print`, `-p` | Run in non-interactive mode | `claude -p "query"` |

26| `--output-format` | Specify output format (`text`, `json`, `stream-json`) | `claude -p --output-format json` |26| `--output-format` | Specify output format (`text`, `json`, `stream-json`) | `claude -p --output-format json` |

27| `--resume`, `-r` | Resume a conversation by session ID | `claude --resume abc123` |27| `--resume`, `-r` | Resume a conversation by session ID | `claude --resume abc123` |

28| `--continue`, `-c` | Continue the most recent conversation | `claude --continue` |28| `--continue`, `-c` | Continue the most recent conversation | `claude --continue` |

29| `--verbose` | Enable verbose logging | `claude --verbose` |29| `--verbose` | Enable verbose logging | `claude --verbose` |

30| `--append-system-prompt` | Append to system prompt (only with `--print`) | `claude --append-system-prompt "Custom instruction"` |30| `--append-system-prompt` | Append to system prompt (only with `--print`) | `claude --append-system-prompt "Custom instruction"` |

31| `--allowedTools` | Space-separated list of allowed tools, or <br /><br /> string of comma-separated list of allowed tools | `claude --allowedTools mcp__slack mcp__filesystem`<br /><br />`claude --allowedTools "Bash(npm install),mcp__filesystem"` |31| `--allowedTools` | Tools that execute without prompting for permission (use `--tools` to restrict available tools) | `claude --allowedTools mcp__slack mcp__filesystem`<br /><br />`claude --allowedTools "Bash(npm install),mcp__filesystem"` |

32| `--disallowedTools` | Space-separated list of denied tools, or <br /><br /> string of comma-separated list of denied tools | `claude --disallowedTools mcp__splunk mcp__github`<br /><br />`claude --disallowedTools "Bash(git commit),mcp__github"` |32| `--disallowedTools` | Tools removed from the model's context (cannot be used) | `claude --disallowedTools mcp__splunk mcp__github`<br /><br />`claude --disallowedTools "Bash(git commit),mcp__github"` |

33| `--mcp-config` | Load MCP servers from a JSON file | `claude --mcp-config servers.json` |33| `--mcp-config` | Load MCP servers from a JSON file | `claude --mcp-config servers.json` |

34| `--permission-prompt-tool` | MCP tool for handling permission prompts (only with `--print`) | `claude --permission-prompt-tool mcp__auth__prompt` |34| `--permission-prompt-tool` | MCP tool for handling permission prompts (only with `--print`) | `claude --permission-prompt-tool mcp__auth__prompt` |

35 35 


109 109 

110A stream of messages provided via `stdin` where each message represents a user turn. This allows multiple turns of a conversation without re-launching the `claude` binary and allows providing guidance to the model while it is processing a request.110A stream of messages provided via `stdin` where each message represents a user turn. This allows multiple turns of a conversation without re-launching the `claude` binary and allows providing guidance to the model while it is processing a request.

111 111 

112Each message is a JSON 'User message' object, following the same format as the output message schema. Messages are formatted using the [jsonl](https://jsonlines.org/) format where each line of input is a complete JSON object. Streaming JSON input requires `-p` and `--output-format stream-json`.112Each message is a JSON 'User message' object, following the same format as the output message schema. Messages are formatted using the [`jsonl`](https://jsonlines.org/) format where each line of input is a complete JSON object. Streaming JSON input requires `-p` and `--output-format stream-json`.

113 113 

114```bash theme={null}114```bash theme={null}

115echo '{"type":"user","message":{"role":"user","content":[{"type":"text","text":"Explain this code"}]}}' | claude -p --output-format=stream-json --input-format=stream-json --verbose115echo '{"type":"user","message":{"role":"user","content":[{"type":"text","text":"Explain this code"}]}}' | claude -p --output-format=stream-json --input-format=stream-json --verbose


202 202 

203* [CLI usage and controls](/en/cli-reference) - Complete CLI documentation203* [CLI usage and controls](/en/cli-reference) - Complete CLI documentation

204* [Common workflows](/en/common-workflows) - Step-by-step guides for common use cases204* [Common workflows](/en/common-workflows) - Step-by-step guides for common use cases

205 

206 

207---

208 

209> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

hooks.md +19 −11

Details

38```38```

39 39 

40* **matcher**: Pattern to match tool names, case-sensitive (only applicable for40* **matcher**: Pattern to match tool names, case-sensitive (only applicable for

41 `PreToolUse` and `PostToolUse`)41 `PreToolUse`, `PermissionRequest`, and `PostToolUse`)

42 * Simple strings match exactly: `Write` matches only the Write tool42 * Simple strings match exactly: `Write` matches only the Write tool

43 * Supports regex: `Edit|Write` or `Notebook.*`43 * Supports regex: `Edit|Write` or `Notebook.*`

44 * Use `*` to match all tools. You can also use empty string (`""`) or leave44 * Use `*` to match all tools. You can also use empty string (`""`) or leave


211* **SubagentStop**: Evaluate if a subagent has completed its task211* **SubagentStop**: Evaluate if a subagent has completed its task

212* **UserPromptSubmit**: Validate user prompts with LLM assistance212* **UserPromptSubmit**: Validate user prompts with LLM assistance

213* **PreToolUse**: Make context-aware permission decisions213* **PreToolUse**: Make context-aware permission decisions

214* **PermissionRequest**: Intelligently allow or deny permission dialogs

214 215 

215### Example: Intelligent Stop hook216### Example: Intelligent Stop hook

216 217 


257| --------------------- | ----------------------- | ------------------------------ |258| --------------------- | ----------------------- | ------------------------------ |

258| **Execution** | Runs bash script | Queries LLM |259| **Execution** | Runs bash script | Queries LLM |

259| **Decision logic** | You implement in code | LLM evaluates context |260| **Decision logic** | You implement in code | LLM evaluates context |

260| **Setup complexity** | Requires script file | Just configure prompt |261| **Setup complexity** | Requires script file | Configure prompt |

261| **Context awareness** | Limited to script logic | Natural language understanding |262| **Context awareness** | Limited to script logic | Natural language understanding |

262| **Performance** | Fast (local execution) | Slower (API call) |263| **Performance** | Fast (local execution) | Slower (API call) |

263| **Use case** | Deterministic rules | Context-aware decisions |264| **Use case** | Deterministic rules | Context-aware decisions |


403 404 

404**Example: Persisting all environment changes from the hook**405**Example: Persisting all environment changes from the hook**

405 406 

406When your setup modifies the environment (e.g., `nvm use`), capture and persist all changes by diffing the environment:407When your setup modifies the environment (for example, `nvm use`), capture and persist all changes by diffing the environment:

407 408 

408```bash theme={null}409```bash theme={null}

409#!/bin/bash410#!/bin/bash


474 "tool_input": {475 "tool_input": {

475 "file_path": "/path/to/file.txt",476 "file_path": "/path/to/file.txt",

476 "content": "file content"477 "content": "file content"

477 }478 },

479 "tool_use_id": "toolu_01ABC123..."

478}480}

479```481```

480 482 


497 "tool_response": {499 "tool_response": {

498 "filePath": "/path/to/file.txt",500 "filePath": "/path/to/file.txt",

499 "success": true501 "success": true

500 }502 },

503 "tool_use_id": "toolu_01ABC123..."

501}504}

502```505```

503 506 


587 590 

588## Hook Output591## Hook Output

589 592 

590There are two mutually-exclusive ways for hooks to return output back to Claude Code. The output593There are two mutually exclusive ways for hooks to return output back to Claude Code. The output

591communicates whether to block and any feedback that should be shown to Claude594communicates whether to block and any feedback that should be shown to Claude

592and the user.595and the user.

593 596 


614#### Exit Code 2 Behavior617#### Exit Code 2 Behavior

615 618 

616| Hook Event | Behavior |619| Hook Event | Behavior |

617| ------------------ | ------------------------------------------------------------------ |620| ------------------- | ------------------------------------------------------------------ |

618| `PreToolUse` | Blocks the tool call, shows stderr to Claude |621| `PreToolUse` | Blocks the tool call, shows stderr to Claude |

622| `PermissionRequest` | Denies the permission, shows stderr to Claude |

619| `PostToolUse` | Shows stderr to Claude (tool already ran) |623| `PostToolUse` | Shows stderr to Claude (tool already ran) |

620| `Notification` | N/A, shows stderr to user only |624| `Notification` | N/A, shows stderr to user only |

621| `UserPromptSubmit` | Blocks prompt processing, erases prompt, shows stderr to user only |625| `UserPromptSubmit` | Blocks prompt processing, erases prompt, shows stderr to user only |


775```779```

776 780 

777<Note>781<Note>

778 The JSON format is not required for simple use cases. To add context, you can782 The JSON format isn't required for simple use cases. To add context, you can print plain text to stdout with exit code 0. Use JSON when you need to

779 just print plain text to stdout with exit code 0. Use JSON when you need to

780 block prompts or want more structured control.783 block prompts or want more structured control.

781</Note>784</Note>

782 785 


873<Note>876<Note>

874 For `UserPromptSubmit` hooks, you can inject context using either method:877 For `UserPromptSubmit` hooks, you can inject context using either method:

875 878 

876 * **Plain text stdout** with exit code 0: Simplest approach—just print text879 * **Plain text stdout** with exit code 0: Simplest approach, prints text

877 * **JSON output** with exit code 0: Use `"decision": "block"` to reject prompts,880 * **JSON output** with exit code 0: Use `"decision": "block"` to reject prompts,

878 or `additionalContext` for structured context injection881 or `additionalContext` for structured context injection

879 882 


1068 * The `CLAUDE_CODE_REMOTE` environment variable indicates whether the hook is running in a remote (web) environment (`"true"`) or local CLI environment (not set or empty). Use this to run different logic based on execution context.1071 * The `CLAUDE_CODE_REMOTE` environment variable indicates whether the hook is running in a remote (web) environment (`"true"`) or local CLI environment (not set or empty). Use this to run different logic based on execution context.

1069* **Input**: JSON via stdin1072* **Input**: JSON via stdin

1070* **Output**:1073* **Output**:

1071 * PreToolUse/PostToolUse/Stop/SubagentStop: Progress shown in verbose mode (ctrl+o)1074 * PreToolUse/PermissionRequest/PostToolUse/Stop/SubagentStop: Progress shown in verbose mode (ctrl+o)

1072 * Notification/SessionEnd: Logged to debug only (`--debug`)1075 * Notification/SessionEnd: Logged to debug only (`--debug`)

1073 * UserPromptSubmit/SessionStart: stdout added as context for Claude1076 * UserPromptSubmit/SessionStart: stdout added as context for Claude

1074 1077 


1123* Command being executed1126* Command being executed

1124* Success/failure status1127* Success/failure status

1125* Output or error messages1128* Output or error messages

1129 

1130 

1131---

1132 

1133> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

hooks-guide.md +7 −1

Details

40workflow:40workflow:

41 41 

42* **PreToolUse**: Runs before tool calls (can block them)42* **PreToolUse**: Runs before tool calls (can block them)

43* **PermissionRequest**: Runs when a permission dialog is shown (can allow or deny)

43* **PostToolUse**: Runs after tool calls complete44* **PostToolUse**: Runs after tool calls complete

44* **UserPromptSubmit**: Runs when the user submits a prompt, before Claude processes it45* **UserPromptSubmit**: Runs when the user submits a prompt, before Claude processes it

45* **Notification**: Runs when Claude Code sends notifications46* **Notification**: Runs when Claude Code sends notifications


91directory. This hook will then apply to all projects, not just your current92directory. This hook will then apply to all projects, not just your current

92project.93project.

93 94 

94Then press Esc until you return to the REPL. Your hook is now registered!95Then press `Esc` until you return to the REPL. Your hook is now registered.

95 96 

96### Step 5: Verify your hook97### Step 5: Verify your hook

97 98 


330* For comprehensive security best practices and safety guidelines, see [Security Considerations](/en/hooks#security-considerations) in the hooks reference documentation.331* For comprehensive security best practices and safety guidelines, see [Security Considerations](/en/hooks#security-considerations) in the hooks reference documentation.

331* For troubleshooting steps and debugging techniques, see [Debugging](/en/hooks#debugging) in the hooks reference332* For troubleshooting steps and debugging techniques, see [Debugging](/en/hooks#debugging) in the hooks reference

332 documentation.333 documentation.

334 

335 

336---

337 

338> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

iam.md +19 −18

Details

4 4 

5## Authentication methods5## Authentication methods

6 6 

7Setting up Claude Code requires access to Anthropic models. For teams, you can set up Claude Code access in one of three ways:7Setting up Claude Code requires access to Anthropic models. For teams, you can set up Claude Code access in one of four ways:

8 8 

9* Claude API via the Claude Console9* Claude API via the Claude Console

10* Amazon Bedrock10* Amazon Bedrock

11* Microsoft Foundry

11* Google Vertex AI12* Google Vertex AI

12 13 

13### Claude API authentication14### Claude API authentication


29 30 

30### Cloud provider authentication31### Cloud provider authentication

31 32 

32**To set up Claude Code access for your team via Bedrock or Vertex:**33**To set up Claude Code access for your team via Bedrock, Vertex, or Azure:**

33 34 

341. Follow the [Bedrock docs](/en/amazon-bedrock) or [Vertex docs](/en/google-vertex-ai)351. Follow the [Bedrock docs](/en/amazon-bedrock), [Vertex docs](/en/google-vertex-ai), or [Microsoft Foundry docs](/en/microsoft-foundry)

352. Distribute the environment variables and instructions for generating cloud credentials to your users. Read more about how to [manage configuration here](/en/settings).362. Distribute the environment variables and instructions for generating cloud credentials to your users. Read more about how to [manage configuration here](/en/settings).

363. Users can [install Claude Code](/en/setup#installation)373. Users can [install Claude Code](/en/setup#installation)

37 38 


166 167 

167[Claude Code hooks](/en/hooks-guide) provide a way to register custom shell commands to perform permission evaluation at runtime. When Claude Code makes a tool call, PreToolUse hooks run before the permission system runs, and the hook output can determine whether to approve or deny the tool call in place of the permission system.168[Claude Code hooks](/en/hooks-guide) provide a way to register custom shell commands to perform permission evaluation at runtime. When Claude Code makes a tool call, PreToolUse hooks run before the permission system runs, and the hook output can determine whether to approve or deny the tool call in place of the permission system.

168 169 

169### Enterprise managed policy settings170### Enterprise managed settings

170 171 

171For enterprise deployments of Claude Code, we support enterprise managed policy settings that take precedence over user and project settings. This allows system administrators to enforce security policies that users cannot override.172For enterprise deployments of Claude Code, administrators can configure and distribute settings to their organization through the [Claude.ai admin console](https://claude.ai/admin-settings/claude-code). These settings are fetched automatically when users authenticate and cannot be overridden locally. This feature is available to Claude for Enterprise customers. If you don't see this option in your admin console, contact your Anthropic account team to have the feature enabled.

172 173 

173System administrators can deploy policies to:174For organizations that prefer file-based policy distribution, Claude Code also supports `managed-settings.json` files that can be deployed to [system directories](/en/settings#settings-files). These policy files follow the same format as regular settings files and cannot be overridden by user or project settings.

174 

175* macOS: `/Library/Application Support/ClaudeCode/managed-settings.json`

176* Linux and WSL: `/etc/claude-code/managed-settings.json`

177* Windows: `C:\ProgramData\ClaudeCode\managed-settings.json`

178 

179These policy files follow the same format as regular [settings files](/en/settings#settings-files) but cannot be overridden by user or project settings. This ensures consistent security policies across your organization.

180 175 

181### Settings precedence176### Settings precedence

182 177 

183When multiple settings sources exist, they are applied in the following order (highest to lowest precedence):178When multiple settings sources exist, they are applied in the following order (highest to lowest precedence):

184 179 

1851. Enterprise policies1801. Managed settings (via Claude.ai admin console)

1862. Command line arguments1812. File-based managed settings (`managed-settings.json`)

1873. Local project settings (`.claude/settings.local.json`)1823. Command line arguments

1884. Shared project settings (`.claude/settings.json`)1834. Local project settings (`.claude/settings.local.json`)

1895. User settings (`~/.claude/settings.json`)1845. Shared project settings (`.claude/settings.json`)

1856. User settings (`~/.claude/settings.json`)

190 186 

191This hierarchy ensures that organizational policies are always enforced while still allowing flexibility at the project and user levels where appropriate.187This hierarchy ensures that organizational policies are always enforced while still allowing flexibility at the project and user levels where appropriate.

192 188 


195Claude Code securely manages your authentication credentials:191Claude Code securely manages your authentication credentials:

196 192 

197* **Storage location**: On macOS, API keys, OAuth tokens, and other credentials are stored in the encrypted macOS Keychain.193* **Storage location**: On macOS, API keys, OAuth tokens, and other credentials are stored in the encrypted macOS Keychain.

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

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

200* **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.196* **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.

197 

198 

199---

200 

201> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

5## Keyboard shortcuts5## Keyboard shortcuts

6 6 

7<Note>7<Note>

8 Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment.8 Keyboard shortcuts may vary by platform and terminal. Press `?` to see available shortcuts for your environment. For example, Option key combinations on macOS may require configuring your terminal to use Option as a meta/escape key.

9</Note>9</Note>

10 10 

11### General controls11### General controls

12 12 

13| Shortcut | Description | Context |13| Shortcut | Description | Context |

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

15| `Ctrl+C` | Cancel current input or generation | Standard interrupt |15| `Ctrl+C` | Cancel current input or generation | Standard interrupt |

16| `Ctrl+D` | Exit Claude Code session | EOF signal |16| `Ctrl+D` | Exit Claude Code session | EOF signal |

17| `Ctrl+L` | Clear terminal screen | Keeps conversation history |17| `Ctrl+L` | Clear terminal screen | Keeps conversation history |


20| `Ctrl+V` (macOS/Linux) or `Alt+V` (Windows) | Paste image from clipboard | Pastes an image or path to an image file |20| `Ctrl+V` (macOS/Linux) or `Alt+V` (Windows) | Paste image from clipboard | Pastes an image or path to an image file |

21| `Up/Down arrows` | Navigate command history | Recall previous inputs |21| `Up/Down arrows` | Navigate command history | Recall previous inputs |

22| `Esc` + `Esc` | Rewind the code/conversation | Restore the code and/or conversation to a previous point |22| `Esc` + `Esc` | Rewind the code/conversation | Restore the code and/or conversation to a previous point |

23| `Tab` | Toggle [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) | Switch between Thinking on and Thinking off |

24| `Shift+Tab` or `Alt+M` (some configurations) | Toggle permission modes | Switch between Auto-Accept Mode, Plan Mode, and normal mode |23| `Shift+Tab` or `Alt+M` (some configurations) | Toggle permission modes | Switch between Auto-Accept Mode, Plan Mode, and normal mode |

24| `Option+P` (macOS) or `Alt+P` (Windows/Linux) | Switch model | Switch models without clearing your prompt |

25 25 

26### Multiline input26### Multiline input

27 27 


167* [CLI reference](/en/cli-reference) - Command-line flags and options167* [CLI reference](/en/cli-reference) - Command-line flags and options

168* [Settings](/en/settings) - Configuration options168* [Settings](/en/settings) - Configuration options

169* [Memory management](/en/memory) - Managing CLAUDE.md files169* [Memory management](/en/memory) - Managing CLAUDE.md files

170 

171 

172---

173 

174> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

jetbrains.md +9 −6

Details

20* **Quick launch**: Use `Cmd+Esc` (Mac) or `Ctrl+Esc` (Windows/Linux) to open Claude Code directly from your editor, or click the Claude Code button in the UI20* **Quick launch**: Use `Cmd+Esc` (Mac) or `Ctrl+Esc` (Windows/Linux) to open Claude Code directly from your editor, or click the Claude Code button in the UI

21* **Diff viewing**: Code changes can be displayed directly in the IDE diff viewer instead of the terminal21* **Diff viewing**: Code changes can be displayed directly in the IDE diff viewer instead of the terminal

22* **Selection context**: The current selection/tab in the IDE is automatically shared with Claude Code22* **Selection context**: The current selection/tab in the IDE is automatically shared with Claude Code

23* **File reference shortcuts**: Use `Cmd+Option+K` (Mac) or `Alt+Ctrl+K` (Linux/Windows) to insert file references (e.g., @File#L1-99)23* **File reference shortcuts**: Use `Cmd+Option+K` (Mac) or `Alt+Ctrl+K` (Linux/Windows) to insert file references (for example, @File#L1-99)

24* **Diagnostic sharing**: Diagnostic errors (lint, syntax, etc.) from the IDE are automatically shared with Claude as you work24* **Diagnostic sharing**: Diagnostic errors (lint, syntax, etc.) from the IDE are automatically shared with Claude as you work

25 25 

26## Installation26## Installation


29 29 

30Find and install the [Claude Code plugin](https://plugins.jetbrains.com/plugin/27310-claude-code-beta-) from the JetBrains marketplace and restart your IDE.30Find and install the [Claude Code plugin](https://plugins.jetbrains.com/plugin/27310-claude-code-beta-) from the JetBrains marketplace and restart your IDE.

31 31 

32### Auto-Installation32If you haven't installed Claude Code yet, see [our quickstart guide](/en/quickstart) for installation instructions.

33 

34The plugin may also be auto-installed when you run `claude` in the integrated terminal. The IDE must be restarted completely to take effect.

35 33 

36<Note>34<Note>

37 After installing the plugin, you must restart your IDE completely for it to take effect. You may need to restart multiple times.35 After installing the plugin, you may need to restart your IDE completely for it to take effect.

38</Note>36</Note>

39 37 

40## Usage38## Usage


70 68 

71#### General Settings69#### General Settings

72 70 

73* **Claude command**: Specify a custom command to run Claude (e.g., `claude`, `/usr/local/bin/claude`, or `npx @anthropic/claude`)71* **Claude command**: Specify a custom command to run Claude (for example, `claude`, `/usr/local/bin/claude`, or `npx @anthropic/claude`)

74* **Suppress notification for Claude command not found**: Skip notifications about not finding the Claude command72* **Suppress notification for Claude command not found**: Skip notifications about not finding the Claude command

75* **Enable using Option+Enter for multi-line prompts** (macOS only): When enabled, Option+Enter inserts new lines in Claude Code prompts. Disable if experiencing issues with the Option key being captured unexpectedly (requires terminal restart)73* **Enable using Option+Enter for multi-line prompts** (macOS only): When enabled, Option+Enter inserts new lines in Claude Code prompts. Disable if experiencing issues with the Option key being captured unexpectedly (requires terminal restart)

76* **Enable automatic updates**: Automatically check for and install plugin updates (applied on restart)74* **Enable automatic updates**: Automatically check for and install plugin updates (applied on restart)


148* Being aware of which files Claude Code has access to modify146* Being aware of which files Claude Code has access to modify

149 147 

150For additional help, see our [troubleshooting guide](/en/troubleshooting).148For additional help, see our [troubleshooting guide](/en/troubleshooting).

149 

150 

151---

152 

153> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

llm-gateway.md +9 −0

Details

29 29 

30Failure to forward headers or preserve body fields may result in reduced functionality or inability to use Claude Code features.30Failure to forward headers or preserve body fields may result in reduced functionality or inability to use Claude Code features.

31 31 

32<Note>

33 Claude Code determines which features to enable based on the API format. When using the Anthropic Messages format with Bedrock or Vertex, you may need to set environment variable `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`.

34</Note>

35 

32## Configuration36## Configuration

33 37 

34### Model selection38### Model selection


164* [Claude Code settings](/en/settings)168* [Claude Code settings](/en/settings)

165* [Enterprise network configuration](/en/network-config)169* [Enterprise network configuration](/en/network-config)

166* [Third-party integrations overview](/en/third-party-integrations)170* [Third-party integrations overview](/en/third-party-integrations)

171 

172 

173---

174 

175> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

mcp.md +130 −26

Details

3> Learn how to connect Claude Code to your tools with the Model Context Protocol.3> Learn how to connect Claude Code to your tools with the Model Context Protocol.

4 4 

5 5 

6Claude Code can connect to hundreds of external tools and data sources through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction), an open-source standard for AI-tool integrations. MCP servers give Claude Code access to your tools, databases, and APIs.6Claude Code can connect to hundreds of external tools and data sources through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction), an open source standard for AI-tool integrations. MCP servers give Claude Code access to your tools, databases, and APIs.

7 7 

8## What you can do with MCP8## What you can do with MCP

9 9 


11 11 

12* **Implement features from issue trackers**: "Add the feature described in JIRA issue ENG-4521 and create a PR on GitHub."12* **Implement features from issue trackers**: "Add the feature described in JIRA issue ENG-4521 and create a PR on GitHub."

13* **Analyze monitoring data**: "Check Sentry and Statsig to check the usage of the feature described in ENG-4521."13* **Analyze monitoring data**: "Check Sentry and Statsig to check the usage of the feature described in ENG-4521."

14* **Query databases**: "Find emails of 10 random users who used feature ENG-4521, based on our Postgres database."14* **Query databases**: "Find emails of 10 random users who used feature ENG-4521, based on our PostgreSQL database."

15* **Integrate designs**: "Update our standard email template based on the new Figma designs that were posted in Slack"15* **Integrate designs**: "Update our standard email template based on the new Figma designs that were posted in Slack"

16* **Automate workflows**: "Create Gmail drafts inviting these 10 users to a feedback session about the new feature."16* **Automate workflows**: "Create Gmail drafts inviting these 10 users to a feedback session about the new feature."

17 17 


121 * `local` (default): Available only to you in the current project (was called `project` in older versions)121 * `local` (default): Available only to you in the current project (was called `project` in older versions)

122 * `project`: Shared with everyone in the project via `.mcp.json` file122 * `project`: Shared with everyone in the project via `.mcp.json` file

123 * `user`: Available to you across all projects (was called `global` in older versions)123 * `user`: Available to you across all projects (was called `global` in older versions)

124 * Set environment variables with `--env` flags (e.g., `--env KEY=value`)124 * Set environment variables with `--env` flags (for example, `--env KEY=value`)

125 * Configure MCP server startup timeout using the MCP\_TIMEOUT environment variable (e.g., `MCP_TIMEOUT=10000 claude` sets a 10-second timeout)125 * Configure MCP server startup timeout using the MCP\_TIMEOUT environment variable (for example, `MCP_TIMEOUT=10000 claude` sets a 10-second timeout)

126 * Claude Code will display a warning when MCP tool output exceeds 10,000 tokens. To increase this limit, set the `MAX_MCP_OUTPUT_TOKENS` environment variable (e.g., `MAX_MCP_OUTPUT_TOKENS=50000`)126 * Claude Code will display a warning when MCP tool output exceeds 10,000 tokens. To increase this limit, set the `MAX_MCP_OUTPUT_TOKENS` environment variable (for example, `MAX_MCP_OUTPUT_TOKENS=50000`)

127 * Use `/mcp` to authenticate with remote servers that require OAuth 2.0 authentication127 * Use `/mcp` to authenticate with remote servers that require OAuth 2.0 authentication

128</Tip>128</Tip>

129 129 


209 209 

210### Local scope210### Local scope

211 211 

212Local-scoped servers represent the default configuration level and are stored in your project-specific user settings. These servers remain private to you and are only accessible when working within the current project directory. This scope is ideal for personal development servers, experimental configurations, or servers containing sensitive credentials that shouldn't be shared.212Local-scoped servers represent the default configuration level and are stored in `~/.claude.json` under your project's path. These servers remain private to you and are only accessible when working within the current project directory. This scope is ideal for personal development servers, experimental configurations, or servers containing sensitive credentials that shouldn't be shared.

213 213 

214```bash theme={null}214```bash theme={null}

215# Add a local-scoped server (default)215# Add a local-scoped server (default)


246 246 

247### User scope247### User scope

248 248 

249User-scoped servers provide cross-project accessibility, making them available across all projects on your machine while remaining private to your user account. This scope works well for personal utility servers, development tools, or services you frequently use across different projects.249User-scoped servers are stored in `~/.claude.json` and provide cross-project accessibility, making them available across all projects on your machine while remaining private to your user account. This scope works well for personal utility servers, development tools, or services you frequently use across different projects.

250 250 

251```bash theme={null}251```bash theme={null}

252# Add a user server252# Add a user server


259 259 

260* **Local scope**: Personal servers, experimental configurations, or sensitive credentials specific to one project260* **Local scope**: Personal servers, experimental configurations, or sensitive credentials specific to one project

261* **Project scope**: Team-shared servers, project-specific tools, or services required for collaboration261* **Project scope**: Team-shared servers, project-specific tools, or services required for collaboration

262* **User scope**: Personal utilities needed across multiple projects, development tools, or frequently-used services262* **User scope**: Personal utilities needed across multiple projects, development tools, or frequently used services

263 

264<Note>

265 **Where are MCP servers stored?**

266 

267 * **User and local scope**: `~/.claude.json` (in the `mcpServers` field or under project paths)

268 * **Project scope**: `.mcp.json` in your project root (checked into source control)

269 * **Enterprise managed**: `managed-mcp.json` in system directories (see [Enterprise MCP configuration](#enterprise-mcp-configuration))

270</Note>

263 271 

264### Scope hierarchy and precedence272### Scope hierarchy and precedence

265 273 


455 * It reads the Claude Desktop configuration file from its standard location on those platforms463 * It reads the Claude Desktop configuration file from its standard location on those platforms

456 * Use the `--scope user` flag to add servers to your user configuration464 * Use the `--scope user` flag to add servers to your user configuration

457 * Imported servers will have the same names as in Claude Desktop465 * Imported servers will have the same names as in Claude Desktop

458 * If servers with the same names already exist, they will get a numerical suffix (e.g., `server_1`)466 * If servers with the same names already exist, they will get a numerical suffix (for example, `server_1`)

459</Tip>467</Tip>

460 468 

461## Use Claude Code as an MCP server469## Use Claude Code as an MCP server


514 522 

515 * The server provides access to Claude's tools like View, Edit, LS, etc.523 * The server provides access to Claude's tools like View, Edit, LS, etc.

516 * In Claude Desktop, try asking Claude to read files in a directory, make edits, and more.524 * In Claude Desktop, try asking Claude to read files in a directory, make edits, and more.

517 * Note that this MCP server is simply exposing Claude Code's tools to your MCP client, so your own client is responsible for implementing user confirmation for individual tool calls.525 * Note that this MCP server is only exposing Claude Code's tools to your MCP client, so your own client is responsible for implementing user confirmation for individual tool calls.

518</Tip>526</Tip>

519 527 

520## MCP output limits and warnings528## MCP output limits and warnings


633 641 

634### Setting up enterprise MCP configuration642### Setting up enterprise MCP configuration

635 643 

636System administrators can deploy an enterprise MCP configuration file alongside the managed settings file:644System administrators deploy an enterprise MCP configuration file to a system-wide directory:

637 645 

638* **macOS**: `/Library/Application Support/ClaudeCode/managed-mcp.json`646* macOS: `/Library/Application Support/ClaudeCode/managed-mcp.json`

639* **Windows**: `C:\ProgramData\ClaudeCode\managed-mcp.json`647* Linux and WSL: `/etc/claude-code/managed-mcp.json`

640* **Linux**: `/etc/claude-code/managed-mcp.json`648* Windows: `C:\Program Files\ClaudeCode\managed-mcp.json`

649 

650<Note>

651 These are system-wide paths (not user home directories like `~/Library/...`) that require administrator privileges. They are designed to be deployed by IT administrators.

652</Note>

641 653 

642The `managed-mcp.json` file uses the same format as a standard `.mcp.json` file:654The `managed-mcp.json` file uses the same format as a standard `.mcp.json` file:

643 655 


666 678 

667### Restricting MCP servers with allowlists and denylists679### Restricting MCP servers with allowlists and denylists

668 680 

669In addition to providing enterprise-managed servers, administrators can control which MCP servers users are allowed to configure using `allowedMcpServers` and `deniedMcpServers` in the `managed-settings.json` file:681In addition to providing enterprise-managed servers, administrators can control which MCP servers users are allowed to configure using `allowedMcpServers` and `deniedMcpServers` in the [managed settings file](/en/settings#settings-files):

670 682 

671* **macOS**: `/Library/Application Support/ClaudeCode/managed-settings.json`683#### Restriction options

672* **Windows**: `C:\ProgramData\ClaudeCode\managed-settings.json`684 

673* **Linux**: `/etc/claude-code/managed-settings.json`685Each entry in the allowlist or denylist can restrict servers in two ways:

686 

6871. **By server name** (`serverName`): Matches the configured name of the server

6882. **By command** (`serverCommand`): Matches the exact command and arguments used to start stdio servers

689 

690**Important**: Each entry must have **either** `serverName` **or** `serverCommand`, not both.

691 

692#### Example configuration

674 693 

675```json theme={null}694```json theme={null}

676{695{

677 "allowedMcpServers": [696 "allowedMcpServers": [

697 // Allow by server name

678 { "serverName": "github" },698 { "serverName": "github" },

679 { "serverName": "sentry" },699 { "serverName": "sentry" },

680 { "serverName": "company-internal" }700 

701 // Allow by exact command (for stdio servers)

702 { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem"] },

703 { "serverCommand": ["python", "/usr/local/bin/approved-server.py"] }

681 ],704 ],

682 "deniedMcpServers": [705 "deniedMcpServers": [

683 { "serverName": "filesystem" }706 // Block by server name

707 { "serverName": "dangerous-server" },

708 

709 // Block by exact command (for stdio servers)

710 { "serverCommand": ["npx", "-y", "unapproved-package"] }

684 ]711 ]

685}712}

686```713```

687 714 

688**Allowlist behavior (`allowedMcpServers`)**:715#### How command-based restrictions work

716 

717**Exact matching**:

718 

719* Command arrays must match **exactly** - both the command and all arguments in the correct order

720* Example: `["npx", "-y", "server"]` will NOT match `["npx", "server"]` or `["npx", "-y", "server", "--flag"]`

721 

722**Stdio server behavior**:

723 

724* When the allowlist contains **any** `serverCommand` entries, stdio servers **must** match one of those commands

725* Stdio servers cannot pass by name alone when command restrictions are present

726* This ensures administrators can enforce which commands are allowed to run

727 

728**Non-stdio server behavior**:

729 

730* Remote servers (HTTP, SSE, WebSocket) always match by name only

731* Command restrictions do not apply to remote servers

732 

733<Accordion title="Example: Command-only allowlist">

734 ```json theme={null}

735 {

736 "allowedMcpServers": [

737 { "serverCommand": ["npx", "-y", "approved-package"] }

738 ]

739 }

740 ```

741 

742 **Result**:

743 

744 * Stdio server with `["npx", "-y", "approved-package"]`: ✅ Allowed (matches command)

745 * Stdio server with `["node", "server.js"]`: ❌ Blocked (doesn't match command)

746 * HTTP server named "my-api": ❌ Blocked (no name entries to match)

747</Accordion>

748 

749<Accordion title="Example: Mixed name and command allowlist">

750 ```json theme={null}

751 {

752 "allowedMcpServers": [

753 { "serverName": "github" },

754 { "serverCommand": ["npx", "-y", "approved-package"] }

755 ]

756 }

757 ```

758 

759 **Result**:

760 

761 * Stdio server named "local-tool" with `["npx", "-y", "approved-package"]`: ✅ Allowed (matches command)

762 * Stdio server named "local-tool" with `["node", "server.js"]`: ❌ Blocked (command entries exist but doesn't match)

763 * Stdio server named "github" with `["node", "server.js"]`: ❌ Blocked (stdio servers must match commands when command entries exist)

764 * HTTP server named "github": ✅ Allowed (matches name)

765 * HTTP server named "other-api": ❌ Blocked (name doesn't match)

766</Accordion>

767 

768<Accordion title="Example: Name-only allowlist">

769 ```json theme={null}

770 {

771 "allowedMcpServers": [

772 { "serverName": "github" },

773 { "serverName": "internal-tool" }

774 ]

775 }

776 ```

777 

778 **Result**:

779 

780 * Stdio server named "github" with any command: ✅ Allowed (no command restrictions)

781 * Stdio server named "internal-tool" with any command: ✅ Allowed (no command restrictions)

782 * HTTP server named "github": ✅ Allowed (matches name)

783 * Any server named "other": ❌ Blocked (name doesn't match)

784</Accordion>

785 

786#### Allowlist behavior (`allowedMcpServers`)

689 787 

690* `undefined` (default): No restrictions - users can configure any MCP server788* `undefined` (default): No restrictions - users can configure any MCP server

691* Empty array `[]`: Complete lockdown - users cannot configure any MCP servers789* Empty array `[]`: Complete lockdown - users cannot configure any MCP servers

692* List of server names: Users can only configure the specified servers790* List of entries: Users can only configure servers that match by name or command

693 791 

694**Denylist behavior (`deniedMcpServers`)**:792#### Denylist behavior (`deniedMcpServers`)

695 793 

696* `undefined` (default): No servers are blocked794* `undefined` (default): No servers are blocked

697* Empty array `[]`: No servers are blocked795* Empty array `[]`: No servers are blocked

698* List of server names: Specified servers are explicitly blocked across all scopes796* List of entries: Specified servers are explicitly blocked across all scopes

699 797 

700**Important notes**:798#### Important notes

701 799 

702* These restrictions apply to all scopes: user, project, local, and even enterprise servers from `managed-mcp.json`800* These restrictions apply to all scopes: user, project, local, and even enterprise servers from `managed-mcp.json`

703* **Denylist takes absolute precedence**: If a server appears in both lists, it will be blocked801* **Denylist takes absolute precedence**: If a server matches a denylist entry (by name or command), it will be blocked even if it's on the allowlist

802* Name-based and command-based restrictions work together: a server passes if it matches **either** a name entry **or** a command entry (unless blocked by denylist)

704 803 

705<Note>804<Note>

706 **Enterprise configuration precedence**: The enterprise MCP configuration has the highest precedence and cannot be overridden by user, local, or project configurations.805 **Enterprise configuration precedence**: The enterprise MCP configuration has the highest precedence and cannot be overridden by user, local, or project configurations.

707</Note>806</Note>

807 

808 

809---

810 

811> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

memory.md +134 −19

Details

9Claude Code offers four memory locations in a hierarchical structure, each serving a different purpose:9Claude Code offers four memory locations in a hierarchical structure, each serving a different purpose:

10 10 

11| Memory Type | Location | Purpose | Use Case Examples | Shared With |11| Memory Type | Location | Purpose | Use Case Examples | Shared With |

12| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------- |12| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------- |

13| **Enterprise policy** | macOS: `/Library/Application Support/ClaudeCode/CLAUDE.md`<br />Linux: `/etc/claude-code/CLAUDE.md`<br />Windows: `C:\ProgramData\ClaudeCode\CLAUDE.md` | Organization-wide instructions managed by IT/DevOps | Company coding standards, security policies, compliance requirements | All users in organization |13| **Enterprise policy** | macOS: `/Library/Application Support/ClaudeCode/CLAUDE.md`<br />Linux: `/etc/claude-code/CLAUDE.md`<br />Windows: `C:\Program Files\ClaudeCode\CLAUDE.md` | Organization-wide instructions managed by IT/DevOps | Company coding standards, security policies, compliance requirements | All users in organization |

14| **Project memory** | `./CLAUDE.md` or `./.claude/CLAUDE.md` | Team-shared instructions for the project | Project architecture, coding standards, common workflows | Team members via source control |14| **Project memory** | `./CLAUDE.md` or `./.claude/CLAUDE.md` | Team-shared instructions for the project | Project architecture, coding standards, common workflows | Team members via source control |

15| **Project rules** | `./.claude/rules/*.md` | Modular, topic-specific project instructions | Language-specific guidelines, testing conventions, API standards | Team members via source control |

15| **User memory** | `~/.claude/CLAUDE.md` | Personal preferences for all projects | Code styling preferences, personal tooling shortcuts | Just you (all projects) |16| **User memory** | `~/.claude/CLAUDE.md` | Personal preferences for all projects | Code styling preferences, personal tooling shortcuts | Just you (all projects) |

16| **Project memory (local)** | `./CLAUDE.local.md` | Personal project-specific preferences | *(Deprecated, see below)* Your sandbox URLs, preferred test data | Just you (current project) |17| **Project memory (local)** | `./CLAUDE.local.md` | Personal project-specific preferences | Your sandbox URLs, preferred test data | Just you (current project) |

17 18 

18All memory files are automatically loaded into Claude Code's context when launched. Files higher in the hierarchy take precedence and are loaded first, providing a foundation that more specific memories build upon.19All memory files are automatically loaded into Claude Code's context when launched. Files higher in the hierarchy take precedence and are loaded first, providing a foundation that more specific memories build upon.

19 20 

21<Note>

22 CLAUDE.local.md files are automatically added to .gitignore, making them ideal for private project-specific preferences that shouldn't be checked into version control.

23</Note>

24 

20## CLAUDE.md imports25## CLAUDE.md imports

21 26 

22CLAUDE.md files can import additional files using `@path/to/import` syntax. The following example imports 3 files:27CLAUDE.md files can import additional files using `@path/to/import` syntax. The following example imports 3 files:


28- git workflow @docs/git-instructions.md33- git workflow @docs/git-instructions.md

29```34```

30 35 

31Both relative and absolute paths are allowed. In particular, importing files in user's home dir is a convenient way for your team members to provide individual instructions that are not checked into the repository. Previously CLAUDE.local.md served a similar purpose, but is now deprecated in favor of imports since they work better across multiple git worktrees.36Both relative and absolute paths are allowed. In particular, importing files in user's home dir is a convenient way for your team members to provide individual instructions that are not checked into the repository. Imports are an alternative to CLAUDE.local.md that work better across multiple git worktrees.

32 37 

33```38```

34# Individual Preferences39# Individual Preferences


49 54 

50Claude will also discover CLAUDE.md nested in subtrees under your current working directory. Instead of loading them at launch, they are only included when Claude reads files in those subtrees.55Claude will also discover CLAUDE.md nested in subtrees under your current working directory. Instead of loading them at launch, they are only included when Claude reads files in those subtrees.

51 56 

52## Quickly add memories with the `#` shortcut

53 

54The fastest way to add a memory is to start your input with the `#` character:

55 

56```

57# Always use descriptive variable names

58```

59 

60You'll be prompted to select which memory file to store this in.

61 

62## Directly edit memories with `/memory`57## Directly edit memories with `/memory`

63 58 

64Use the `/memory` slash command during a session to open any memory file in your system editor for more extensive additions or organization.59Use the `/memory` slash command during a session to open any memory file in your system editor for more extensive additions or organization.


82 * CLAUDE.md memories can be used for both instructions shared with your team and for your individual preferences.77 * CLAUDE.md memories can be used for both instructions shared with your team and for your individual preferences.

83</Tip>78</Tip>

84 79 

80## Modular rules with `.claude/rules/`

81 

82For larger projects, you can organize instructions into multiple files using the `.claude/rules/` directory. This allows teams to maintain focused, well-organized rule files instead of one large CLAUDE.md.

83 

84### Basic structure

85 

86Place markdown files in your project's `.claude/rules/` directory:

87 

88```

89your-project/

90├── .claude/

91│ ├── CLAUDE.md # Main project instructions

92│ └── rules/

93│ ├── code-style.md # Code style guidelines

94│ ├── testing.md # Testing conventions

95│ └── security.md # Security requirements

96```

97 

98All `.md` files in `.claude/rules/` are automatically loaded as project memory, with the same priority as `.claude/CLAUDE.md`.

99 

100### Path-specific rules

101 

102Rules can be scoped to specific files using YAML frontmatter with the `paths` field. These conditional rules only apply when Claude is working with files matching the specified patterns.

103 

104```markdown theme={null}

105---

106paths: src/api/**/*.ts

107---

108 

109# API Development Rules

110 

111- All API endpoints must include input validation

112- Use the standard error response format

113- Include OpenAPI documentation comments

114```

115 

116Rules without a `paths` field are loaded unconditionally and apply to all files.

117 

118### Glob patterns

119 

120The `paths` field supports standard glob patterns:

121 

122| Pattern | Matches |

123| ---------------------- | ---------------------------------------- |

124| `**/*.ts` | All TypeScript files in any directory |

125| `src/**/*` | All files under `src/` directory |

126| `*.md` | Markdown files in the project root |

127| `src/components/*.tsx` | React components in a specific directory |

128 

129You can use braces to match multiple patterns efficiently:

130 

131```markdown theme={null}

132---

133paths: src/**/*.{ts,tsx}

134---

135 

136# TypeScript/React Rules

137```

138 

139This expands to match both `src/**/*.ts` and `src/**/*.tsx`. You can also combine multiple patterns with commas:

140 

141```markdown theme={null}

142---

143paths: {src,lib}/**/*.ts, tests/**/*.test.ts

144---

145```

146 

147### Subdirectories

148 

149Rules can be organized into subdirectories for better structure:

150 

151```

152.claude/rules/

153├── frontend/

154│ ├── react.md

155│ └── styles.md

156├── backend/

157│ ├── api.md

158│ └── database.md

159└── general.md

160```

161 

162All `.md` files are discovered recursively.

163 

164### Symlinks

165 

166The `.claude/rules/` directory supports symlinks, allowing you to share common rules across multiple projects:

167 

168```bash theme={null}

169# Symlink a shared rules directory

170ln -s ~/shared-claude-rules .claude/rules/shared

171 

172# Symlink individual rule files

173ln -s ~/company-standards/security.md .claude/rules/security.md

174```

175 

176Symlinks are resolved and their contents are loaded normally. Circular symlinks are detected and handled gracefully.

177 

178### User-level rules

179 

180You can create personal rules that apply to all your projects in `~/.claude/rules/`:

181 

182```

183~/.claude/rules/

184├── preferences.md # Your personal coding preferences

185└── workflows.md # Your preferred workflows

186```

187 

188User-level rules are loaded before project rules, giving project rules higher priority.

189 

190<Tip>

191 Best practices for `.claude/rules/`:

192 

193 * **Keep rules focused**: Each file should cover one topic (e.g., `testing.md`, `api-design.md`)

194 * **Use descriptive filenames**: The filename should indicate what the rules cover

195 * **Use conditional rules sparingly**: Only add `paths` frontmatter when rules truly apply to specific file types

196 * **Organize with subdirectories**: Group related rules (e.g., `frontend/`, `backend/`)

197</Tip>

198 

85## Organization-level memory management199## Organization-level memory management

86 200 

87Enterprise organizations can deploy centrally managed CLAUDE.md files that apply to all users.201Enterprise organizations can deploy centrally managed CLAUDE.md files that apply to all users.

88 202 

89To set up organization-level memory management:203To set up organization-level memory management:

90 204 

911. Create the enterprise memory file in the appropriate location for your operating system:2051. Create the enterprise memory file at the **Enterprise policy** location shown in the [memory types table above](#determine-memory-type).

92 

93* macOS: `/Library/Application Support/ClaudeCode/CLAUDE.md`

94* Linux/WSL: `/etc/claude-code/CLAUDE.md`

95* Windows: `C:\ProgramData\ClaudeCode\CLAUDE.md`

96 206 

972. Deploy via your configuration management system (MDM, Group Policy, Ansible, etc.) to ensure consistent distribution across all developer machines.2072. Deploy via your configuration management system (MDM, Group Policy, Ansible, etc.) to ensure consistent distribution across all developer machines.

98 208 


101* **Be specific**: "Use 2-space indentation" is better than "Format code properly".211* **Be specific**: "Use 2-space indentation" is better than "Format code properly".

102* **Use structure to organize**: Format each individual memory as a bullet point and group related memories under descriptive markdown headings.212* **Use structure to organize**: Format each individual memory as a bullet point and group related memories under descriptive markdown headings.

103* **Review periodically**: Update memories as your project evolves to ensure Claude is always using the most up to date information and context.213* **Review periodically**: Update memories as your project evolves to ensure Claude is always using the most up to date information and context.

214 

215 

216---

217 

218> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

microsoft-foundry.md +112 −0 added

Details

1# Claude Code on Microsoft Foundry

2 

3> Learn about configuring Claude Code through Microsoft Foundry, including setup, configuration, and troubleshooting.

4 

5## Prerequisites

6 

7Before configuring Claude Code with Microsoft Foundry, ensure you have:

8 

9* An Azure subscription with access to Microsoft Foundry

10* RBAC permissions to create Microsoft Foundry resources and deployments

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

12 

13## Setup

14 

15### 1. Provision Microsoft Foundry resource

16 

17First, create a Claude resource in Azure:

18 

191. Navigate to the [Microsoft Foundry portal](https://ai.azure.com/)

202. Create a new resource, noting your resource name

213. Create deployments for the Claude models:

22 * Claude Opus

23 * Claude Sonnet

24 * Claude Haiku

25 

26### 2. Configure Azure credentials

27 

28Claude Code supports two authentication methods for Microsoft Foundry. Choose the method that best fits your security requirements.

29 

30**Option A: API key authentication**

31 

321. Navigate to your resource in the Microsoft Foundry portal

332. Go to the **Endpoints and keys** section

343. Copy **API Key**

354. Set the environment variable:

36 

37```bash theme={null}

38export ANTHROPIC_FOUNDRY_API_KEY=your-azure-api-key

39```

40 

41**Option B: Microsoft Entra ID authentication**

42 

43When `ANTHROPIC_FOUNDRY_API_KEY` is not set, Claude Code automatically uses the Azure SDK [default credential chain](https://learn.microsoft.com/en-us/azure/developer/javascript/sdk/authentication/credential-chains#defaultazurecredential-overview).

44This supports a variety of methods for authenticating local and remote workloads.

45 

46On local environments, you commonly may use the Azure CLI:

47 

48```bash theme={null}

49az login

50```

51 

52<Note>

53 When using Microsoft Foundry, the `/login` and `/logout` commands are disabled since authentication is handled through Azure credentials.

54</Note>

55 

56### 3. Configure Claude Code

57 

58Set 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).

59 

60```bash theme={null}

61# Enable Microsoft Foundry integration

62export CLAUDE_CODE_USE_FOUNDRY=1

63 

64# Azure resource name (replace {resource} with your resource name)

65export ANTHROPIC_FOUNDRY_RESOURCE={resource}

66# Or provide the full base URL:

67# export ANTHROPIC_FOUNDRY_BASE_URL=https://{resource}.services.ai.azure.com

68 

69# Set models to your resource's deployment names

70export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-4-5'

71export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5'

72export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-1'

73```

74 

75For more details on model configuration options, see [Model configuration](/en/model-config).

76 

77## Azure RBAC configuration

78 

79The `Azure AI User` and `Cognitive Services User` default roles include all required permissions for invoking Claude models.

80 

81For more restrictive permissions, create a custom role with the following:

82 

83```json theme={null}

84{

85 "permissions": [

86 {

87 "dataActions": [

88 "Microsoft.CognitiveServices/accounts/providers/*"

89 ]

90 }

91 ]

92}

93```

94 

95For details, see [Microsoft Foundry RBAC documentation](https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/rbac-azure-ai-foundry).

96 

97## Troubleshooting

98 

99If you receive an error "Failed to get token from azureADTokenProvider: ChainedTokenCredential authentication failed":

100 

101* Configure Entra ID on the environment, or set `ANTHROPIC_FOUNDRY_API_KEY`.

102 

103## Additional resources

104 

105* [Microsoft Foundry documentation](https://learn.microsoft.com/en-us/azure/ai-foundry/what-is-azure-ai-foundry)

106* [Microsoft Foundry models](https://ai.azure.com/explore/models)

107* [Microsoft Foundry pricing](https://azure.microsoft.com/en-us/pricing/details/ai-foundry/)

108 

109 

110---

111 

112> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

model-config.md +15 −7

Details

4 4 

5## Available models5## Available models

6 6 

7For the `model` setting in Claude Code, you can either configure:7For the `model` setting in Claude Code, you can configure either:

8 8 

9* A **model alias**9* A **model alias**

10* A full **[model name](https://docs.claude.com/en/docs/about-claude/models/overview#model-names)**10* A **model name**

11* For Bedrock, an ARN11 * Anthropic API: A full **[model name](https://docs.claude.com/en/docs/about-claude/models/overview#model-names)**

12 * Bedrock: an inference profile ARN

13 * Foundry: a deployment name

14 * Vertex: a version name

12 15 

13### Model aliases16### Model aliases

14 17 


19| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |22| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

20| **`default`** | Recommended model setting, depending on your account type |23| **`default`** | Recommended model setting, depending on your account type |

21| **`sonnet`** | Uses the latest Sonnet model (currently Sonnet 4.5) for daily coding tasks |24| **`sonnet`** | Uses the latest Sonnet model (currently Sonnet 4.5) for daily coding tasks |

22| **`opus`** | Uses Opus model (currently Opus 4.1) for specialized complex reasoning tasks |25| **`opus`** | Uses Opus model (currently Opus 4.5) for specialized complex reasoning tasks |

23| **`haiku`** | Uses the fast and efficient Haiku model for simple tasks |26| **`haiku`** | Uses the fast and efficient Haiku model for simple tasks |

24| **`sonnet[1m]`** | Uses Sonnet with a [1 million token context window](https://docs.claude.com/en/docs/build-with-claude/context-windows#1m-token-context-window) window for long sessions |27| **`sonnet[1m]`** | Uses Sonnet with a [1 million token context window](https://docs.claude.com/en/docs/build-with-claude/context-windows#1m-token-context-window) window for long sessions |

25| **`opusplan`** | Special mode that uses `opus` during plan mode, then switches to `sonnet` for execution |28| **`opusplan`** | Special mode that uses `opus` during plan mode, then switches to `sonnet` for execution |


100## Environment variables103## Environment variables

101 104 

102You can use the following environment variables, which must be full **model105You can use the following environment variables, which must be full **model

103names**, to control the model names that the aliases map to.106names** (or equivalent for your API provider), to control the model names that the aliases map to.

104 107 

105| Env var | Description |108| Environment variable | Description |

106| -------------------------------- | --------------------------------------------------------------------------------------------- |109| -------------------------------- | --------------------------------------------------------------------------------------------- |

107| `ANTHROPIC_DEFAULT_OPUS_MODEL` | The model to use for `opus`, or for `opusplan` when Plan Mode is active. |110| `ANTHROPIC_DEFAULT_OPUS_MODEL` | The model to use for `opus`, or for `opusplan` when Plan Mode is active. |

108| `ANTHROPIC_DEFAULT_SONNET_MODEL` | The model to use for `sonnet`, or for `opusplan` when Plan Mode is not active. |111| `ANTHROPIC_DEFAULT_SONNET_MODEL` | The model to use for `sonnet`, or for `opusplan` when Plan Mode is not active. |


116 119 

117Claude Code automatically uses [prompt caching](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) to optimize performance and reduce costs. You can disable prompt caching globally or for specific model tiers:120Claude Code automatically uses [prompt caching](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) to optimize performance and reduce costs. You can disable prompt caching globally or for specific model tiers:

118 121 

119| Env var | Description |122| Environment variable | Description |

120| ------------------------------- | ---------------------------------------------------------------------------------------------- |123| ------------------------------- | ---------------------------------------------------------------------------------------------- |

121| `DISABLE_PROMPT_CACHING` | Set to `1` to disable prompt caching for all models (takes precedence over per-model settings) |124| `DISABLE_PROMPT_CACHING` | Set to `1` to disable prompt caching for all models (takes precedence over per-model settings) |

122| `DISABLE_PROMPT_CACHING_HAIKU` | Set to `1` to disable prompt caching for Haiku models only |125| `DISABLE_PROMPT_CACHING_HAIKU` | Set to `1` to disable prompt caching for Haiku models only |


124| `DISABLE_PROMPT_CACHING_OPUS` | Set to `1` to disable prompt caching for Opus models only |127| `DISABLE_PROMPT_CACHING_OPUS` | Set to `1` to disable prompt caching for Opus models only |

125 128 

126These environment variables give you fine-grained control over prompt caching behavior. The global `DISABLE_PROMPT_CACHING` setting takes precedence over the model-specific settings, allowing you to quickly disable all caching when needed. The per-model settings are useful for selective control, such as when debugging specific models or working with cloud providers that may have different caching implementations.129These environment variables give you fine-grained control over prompt caching behavior. The global `DISABLE_PROMPT_CACHING` setting takes precedence over the model-specific settings, allowing you to quickly disable all caching when needed. The per-model settings are useful for selective control, such as when debugging specific models or working with cloud providers that may have different caching implementations.

130 

131 

132---

133 

134> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

6 6 

7All 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.7All 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.

8 8 

9<Note>9## Quick start

10 OpenTelemetry support is currently in beta and details are subject to change.

11</Note>

12 

13## Quick Start

14 10 

15Configure OpenTelemetry using environment variables:11Configure OpenTelemetry using environment variables:

16 12 


43 39 

44For full configuration options, see the [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options).40For full configuration options, see the [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options).

45 41 

46## Administrator Configuration42## Administrator configuration

47 

48Administrators can configure OpenTelemetry settings for all users through the managed settings file. This allows for centralized control of telemetry settings across an organization. See the [settings precedence](/en/settings#settings-precedence) for more information about how settings are applied.

49 43 

50The managed settings file is located at:44Administrators can configure OpenTelemetry settings for all users through the [managed settings file](/en/settings#settings-files). This allows for centralized control of telemetry settings across an organization. See the [settings precedence](/en/settings#settings-precedence) for more information about how settings are applied.

51 

52* macOS: `/Library/Application Support/ClaudeCode/managed-settings.json`

53* Linux and WSL: `/etc/claude-code/managed-settings.json`

54* Windows: `C:\ProgramData\ClaudeCode\managed-settings.json`

55 45 

56Example managed settings configuration:46Example managed settings configuration:

57 47 


72 Managed settings can be distributed via MDM (Mobile Device Management) or other device management solutions. Environment variables defined in the managed settings file have high precedence and cannot be overridden by users.62 Managed settings can be distributed via MDM (Mobile Device Management) or other device management solutions. Environment variables defined in the managed settings file have high precedence and cannot be overridden by users.

73</Note>63</Note>

74 64 

75## Configuration Details65## Configuration details

76 66 

77### Common Configuration Variables67### Common configuration variables

78 68 

79| Environment Variable | Description | Example Values |69| Environment Variable | Description | Example Values |

80| ----------------------------------------------- | --------------------------------------------------------- | ------------------------------------ |70| ----------------------------------------------- | --------------------------------------------------------- | ------------------------------------ |


94| `OTEL_LOGS_EXPORT_INTERVAL` | Logs export interval in milliseconds (default: 5000) | `1000`, `10000` |84| `OTEL_LOGS_EXPORT_INTERVAL` | Logs export interval in milliseconds (default: 5000) | `1000`, `10000` |

95| `OTEL_LOG_USER_PROMPTS` | Enable logging of user prompt content (default: disabled) | `1` to enable |85| `OTEL_LOG_USER_PROMPTS` | Enable logging of user prompt content (default: disabled) | `1` to enable |

96 86 

97### Metrics Cardinality Control87### Metrics cardinality control

98 88 

99The following environment variables control which attributes are included in metrics to manage cardinality:89The following environment variables control which attributes are included in metrics to manage cardinality:

100 90 


106 96 

107These variables help control the cardinality of metrics, which affects storage requirements and query performance in your metrics backend. Lower cardinality generally means better performance and lower storage costs but less granular data for analysis.97These variables help control the cardinality of metrics, which affects storage requirements and query performance in your metrics backend. Lower cardinality generally means better performance and lower storage costs but less granular data for analysis.

108 98 

109### Dynamic Headers99### Dynamic headers

110 100 

111For enterprise environments that require dynamic authentication, you can configure a script to generate headers dynamically:101For enterprise environments that require dynamic authentication, you can configure a script to generate headers dynamically:

112 102 

113#### Settings Configuration103#### Settings configuration

114 104 

115Add to your `.claude/settings.json`:105Add to your `.claude/settings.json`:

116 106 


120}110}

121```111```

122 112 

123#### Script Requirements113#### Script requirements

124 114 

125The script must output valid JSON with string key-value pairs representing HTTP headers:115The script must output valid JSON with string key-value pairs representing HTTP headers:

126 116 


130echo "{\"Authorization\": \"Bearer $(get-token.sh)\", \"X-API-Key\": \"$(get-api-key.sh)\"}"120echo "{\"Authorization\": \"Bearer $(get-token.sh)\", \"X-API-Key\": \"$(get-api-key.sh)\"}"

131```121```

132 122 

133#### Important Limitations123#### Important limitations

134 124 

135**Headers are fetched only at startup, not during runtime.** This is due to OpenTelemetry exporter architecture limitations.125**Headers are fetched only at startup, not during runtime.** This is due to OpenTelemetry exporter architecture limitations.

136 126 

137For scenarios requiring frequent token refresh, use an OpenTelemetry Collector as a proxy that can refresh its own headers.127For scenarios requiring frequent token refresh, use an OpenTelemetry Collector as a proxy that can refresh its own headers.

138 128 

139### Multi-Team Organization Support129### Multi-team organization support

140 130 

141Organizations with multiple teams or departments can add custom attributes to distinguish between different groups using the `OTEL_RESOURCE_ATTRIBUTES` environment variable:131Organizations with multiple teams or departments can add custom attributes to distinguish between different groups using the `OTEL_RESOURCE_ATTRIBUTES` environment variable:

142 132 


176 export OTEL_RESOURCE_ATTRIBUTES="org.name=John%27s%20Organization"166 export OTEL_RESOURCE_ATTRIBUTES="org.name=John%27s%20Organization"

177 ```167 ```

178 168 

179 Note: Quoting the entire key=value pair (e.g., `"key=value with spaces"`) is not supported by the OpenTelemetry specification and will result in attributes being prefixed with quotes.169 Note: wrapping values in quotes doesn't escape spaces. For example, `org.name="My Company"` results in the literal value `"My Company"` (with quotes included), not `My Company`.

180</Warning>170</Warning>

181 171 

182### Example Configurations172### Example configurations

183 173 

184```bash theme={null}174```bash theme={null}

185# Console debugging (1-second intervals)175# Console debugging (1-second intervals)


224export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317214export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317

225```215```

226 216 

227## Available Metrics and Events217## Available metrics and events

228 218 

229### Standard Attributes219### Standard attributes

230 220 

231All metrics and events share these standard attributes:221All metrics and events share these standard attributes:

232 222 

233| Attribute | Description | Controlled By |223| Attribute | Description | Controlled By |

234| ------------------- | ------------------------------------------------------------- | --------------------------------------------------- |224| ------------------- | -------------------------------------------------------------------- | --------------------------------------------------- |

235| `session.id` | Unique session identifier | `OTEL_METRICS_INCLUDE_SESSION_ID` (default: true) |225| `session.id` | Unique session identifier | `OTEL_METRICS_INCLUDE_SESSION_ID` (default: true) |

236| `app.version` | Current Claude Code version | `OTEL_METRICS_INCLUDE_VERSION` (default: false) |226| `app.version` | Current Claude Code version | `OTEL_METRICS_INCLUDE_VERSION` (default: false) |

237| `organization.id` | Organization UUID (when authenticated) | Always included when available |227| `organization.id` | Organization UUID (when authenticated) | Always included when available |

238| `user.account_uuid` | Account UUID (when authenticated) | `OTEL_METRICS_INCLUDE_ACCOUNT_UUID` (default: true) |228| `user.account_uuid` | Account UUID (when authenticated) | `OTEL_METRICS_INCLUDE_ACCOUNT_UUID` (default: true) |

239| `terminal.type` | Terminal type (e.g., `iTerm.app`, `vscode`, `cursor`, `tmux`) | Always included when detected |229| `terminal.type` | Terminal type (for example, `iTerm.app`, `vscode`, `cursor`, `tmux`) | Always included when detected |

240 230 

241### Metrics231### Metrics

242 232 


253| `claude_code.code_edit_tool.decision` | Count of code editing tool permission decisions | count |243| `claude_code.code_edit_tool.decision` | Count of code editing tool permission decisions | count |

254| `claude_code.active_time.total` | Total active time in seconds | s |244| `claude_code.active_time.total` | Total active time in seconds | s |

255 245 

256### Metric Details246### Metric details

257 247 

258#### Session Counter248#### Session counter

259 249 

260Incremented at the start of each session.250Incremented at the start of each session.

261 251 


263 253 

264* All [standard attributes](#standard-attributes)254* All [standard attributes](#standard-attributes)

265 255 

266#### Lines of Code Counter256#### Lines of code counter

267 257 

268Incremented when code is added or removed.258Incremented when code is added or removed.

269 259 


272* All [standard attributes](#standard-attributes)262* All [standard attributes](#standard-attributes)

273* `type`: (`"added"`, `"removed"`)263* `type`: (`"added"`, `"removed"`)

274 264 

275#### Pull Request Counter265#### Pull request counter

276 266 

277Incremented when creating pull requests via Claude Code.267Incremented when creating pull requests via Claude Code.

278 268 


280 270 

281* All [standard attributes](#standard-attributes)271* All [standard attributes](#standard-attributes)

282 272 

283#### Commit Counter273#### Commit counter

284 274 

285Incremented when creating git commits via Claude Code.275Incremented when creating git commits via Claude Code.

286 276 


288 278 

289* All [standard attributes](#standard-attributes)279* All [standard attributes](#standard-attributes)

290 280 

291#### Cost Counter281#### Cost counter

292 282 

293Incremented after each API request.283Incremented after each API request.

294 284 

295**Attributes**:285**Attributes**:

296 286 

297* All [standard attributes](#standard-attributes)287* All [standard attributes](#standard-attributes)

298* `model`: Model identifier (e.g., "claude-sonnet-4-5-20250929")288* `model`: Model identifier (for example, "claude-sonnet-4-5-20250929")

299 289 

300#### Token Counter290#### Token counter

301 291 

302Incremented after each API request.292Incremented after each API request.

303 293 


305 295 

306* All [standard attributes](#standard-attributes)296* All [standard attributes](#standard-attributes)

307* `type`: (`"input"`, `"output"`, `"cacheRead"`, `"cacheCreation"`)297* `type`: (`"input"`, `"output"`, `"cacheRead"`, `"cacheCreation"`)

308* `model`: Model identifier (e.g., "claude-sonnet-4-5-20250929")298* `model`: Model identifier (for example, "claude-sonnet-4-5-20250929")

309 299 

310#### Code Edit Tool Decision Counter300#### Code edit tool decision counter

311 301 

312Incremented when user accepts or rejects Edit, Write, or NotebookEdit tool usage.302Incremented when user accepts or rejects Edit, Write, or NotebookEdit tool usage.

313 303 


316* All [standard attributes](#standard-attributes)306* All [standard attributes](#standard-attributes)

317* `tool`: Tool name (`"Edit"`, `"Write"`, `"NotebookEdit"`)307* `tool`: Tool name (`"Edit"`, `"Write"`, `"NotebookEdit"`)

318* `decision`: User decision (`"accept"`, `"reject"`)308* `decision`: User decision (`"accept"`, `"reject"`)

319* `language`: Programming language of the edited file (e.g., `"TypeScript"`, `"Python"`, `"JavaScript"`, `"Markdown"`). Returns `"unknown"` for unrecognized file extensions.309* `language`: Programming language of the edited file (for example, `"TypeScript"`, `"Python"`, `"JavaScript"`, `"Markdown"`). Returns `"unknown"` for unrecognized file extensions.

320 310 

321#### Active Time Counter311#### Active time counter

322 312 

323Tracks actual time spent actively using Claude Code (not idle time). This metric is incremented during user interactions such as typing prompts or receiving responses.313Tracks actual time spent actively using Claude Code (not idle time). This metric is incremented during user interactions such as typing prompts or receiving responses.

324 314 


330 320 

331Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured):321Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured):

332 322 

333#### User Prompt Event323#### User prompt event

334 324 

335Logged when a user submits a prompt.325Logged when a user submits a prompt.

336 326 


344* `prompt_length`: Length of the prompt334* `prompt_length`: Length of the prompt

345* `prompt`: Prompt content (redacted by default, enable with `OTEL_LOG_USER_PROMPTS=1`)335* `prompt`: Prompt content (redacted by default, enable with `OTEL_LOG_USER_PROMPTS=1`)

346 336 

347#### Tool Result Event337#### Tool result event

348 338 

349Logged when a tool completes execution.339Logged when a tool completes execution.

350 340 


364* `tool_parameters`: JSON string containing tool-specific parameters (when available)354* `tool_parameters`: JSON string containing tool-specific parameters (when available)

365 * For Bash tool: includes `bash_command`, `full_command`, `timeout`, `description`, `sandbox`355 * For Bash tool: includes `bash_command`, `full_command`, `timeout`, `description`, `sandbox`

366 356 

367#### API Request Event357#### API request event

368 358 

369Logged for each API request to Claude.359Logged for each API request to Claude.

370 360 


375* All [standard attributes](#standard-attributes)365* All [standard attributes](#standard-attributes)

376* `event.name`: `"api_request"`366* `event.name`: `"api_request"`

377* `event.timestamp`: ISO 8601 timestamp367* `event.timestamp`: ISO 8601 timestamp

378* `model`: Model used (e.g., "claude-sonnet-4-5-20250929")368* `model`: Model used (for example, "claude-sonnet-4-5-20250929")

379* `cost_usd`: Estimated cost in USD369* `cost_usd`: Estimated cost in USD

380* `duration_ms`: Request duration in milliseconds370* `duration_ms`: Request duration in milliseconds

381* `input_tokens`: Number of input tokens371* `input_tokens`: Number of input tokens


383* `cache_read_tokens`: Number of tokens read from cache373* `cache_read_tokens`: Number of tokens read from cache

384* `cache_creation_tokens`: Number of tokens used for cache creation374* `cache_creation_tokens`: Number of tokens used for cache creation

385 375 

386#### API Error Event376#### API error event

387 377 

388Logged when an API request to Claude fails.378Logged when an API request to Claude fails.

389 379 


394* All [standard attributes](#standard-attributes)384* All [standard attributes](#standard-attributes)

395* `event.name`: `"api_error"`385* `event.name`: `"api_error"`

396* `event.timestamp`: ISO 8601 timestamp386* `event.timestamp`: ISO 8601 timestamp

397* `model`: Model used (e.g., "claude-sonnet-4-5-20250929")387* `model`: Model used (for example, "claude-sonnet-4-5-20250929")

398* `error`: Error message388* `error`: Error message

399* `status_code`: HTTP status code (if applicable)389* `status_code`: HTTP status code (if applicable)

400* `duration_ms`: Request duration in milliseconds390* `duration_ms`: Request duration in milliseconds

401* `attempt`: Attempt number (for retried requests)391* `attempt`: Attempt number (for retried requests)

402 392 

403#### Tool Decision Event393#### Tool decision event

404 394 

405Logged when a tool permission decision is made (accept/reject).395Logged when a tool permission decision is made (accept/reject).

406 396 


411* All [standard attributes](#standard-attributes)401* All [standard attributes](#standard-attributes)

412* `event.name`: `"tool_decision"`402* `event.name`: `"tool_decision"`

413* `event.timestamp`: ISO 8601 timestamp403* `event.timestamp`: ISO 8601 timestamp

414* `tool_name`: Name of the tool (e.g., "Read", "Edit", "Write", "NotebookEdit", etc.)404* `tool_name`: Name of the tool (for example, "Read", "Edit", "Write", "NotebookEdit")

415* `decision`: Either `"accept"` or `"reject"`405* `decision`: Either `"accept"` or `"reject"`

416* `source`: Decision source - `"config"`, `"user_permanent"`, `"user_temporary"`, `"user_abort"`, or `"user_reject"`406* `source`: Decision source - `"config"`, `"user_permanent"`, `"user_temporary"`, `"user_abort"`, or `"user_reject"`

417 407 

418## Interpreting Metrics and Events Data408## Interpreting metrics and events data

419 409 

420The metrics exported by Claude Code provide valuable insights into usage patterns and productivity. Here are some common visualizations and analyses you can create:410The metrics exported by Claude Code provide valuable insights into usage patterns and productivity. Here are some common visualizations and analyses you can create:

421 411 

422### Usage Monitoring412### Usage monitoring

423 413 

424| Metric | Analysis Opportunity |414| Metric | Analysis Opportunity |

425| ------------------------------------------------------------- | --------------------------------------------------------- |415| ------------------------------------------------------------- | --------------------------------------------------------- |


428| `claude_code.lines_of_code.count` | Measure productivity by tracking code additions/removals |418| `claude_code.lines_of_code.count` | Measure productivity by tracking code additions/removals |

429| `claude_code.commit.count` & `claude_code.pull_request.count` | Understand impact on development workflows |419| `claude_code.commit.count` & `claude_code.pull_request.count` | Understand impact on development workflows |

430 420 

431### Cost Monitoring421### Cost monitoring

432 422 

433The `claude_code.cost.usage` metric helps with:423The `claude_code.cost.usage` metric helps with:

434 424 


439 Cost metrics are approximations. For official billing data, refer to your API provider (Claude Console, AWS Bedrock, or Google Cloud Vertex).429 Cost metrics are approximations. For official billing data, refer to your API provider (Claude Console, AWS Bedrock, or Google Cloud Vertex).

440</Note>430</Note>

441 431 

442### Alerting and Segmentation432### Alerting and segmentation

443 433 

444Common alerts to consider:434Common alerts to consider:

445 435 


449 439 

450All metrics can be segmented by `user.account_uuid`, `organization.id`, `session.id`, `model`, and `app.version`.440All metrics can be segmented by `user.account_uuid`, `organization.id`, `session.id`, `model`, and `app.version`.

451 441 

452### Event Analysis442### Event analysis

453 443 

454The event data provides detailed insights into Claude Code interactions:444The event data provides detailed insights into Claude Code interactions:

455 445 

456**Tool Usage Patterns**: Analyze tool result events to identify:446**Tool Usage Patterns**: analyze tool result events to identify:

457 447 

458* Most frequently used tools448* Most frequently used tools

459* Tool success rates449* Tool success rates

460* Average tool execution times450* Average tool execution times

461* Error patterns by tool type451* Error patterns by tool type

462 452 

463**Performance Monitoring**: Track API request durations and tool execution times to identify performance bottlenecks.453**Performance Monitoring**: track API request durations and tool execution times to identify performance bottlenecks.

464 454 

465## Backend Considerations455## Backend considerations

466 456 

467Your choice of metrics and logs backends will determine the types of analyses you can perform:457Your choice of metrics and logs backends determines the types of analyses you can perform:

468 458 

469### For Metrics:459### For metrics

470 460 

471* **Time series databases (e.g., Prometheus)**: Rate calculations, aggregated metrics461* **Time series databases (for example, Prometheus)**: Rate calculations, aggregated metrics

472* **Columnar stores (e.g., ClickHouse)**: Complex queries, unique user analysis462* **Columnar stores (for example, ClickHouse)**: Complex queries, unique user analysis

473* **Full-featured observability platforms (e.g., Honeycomb, Datadog)**: Advanced querying, visualization, alerting463* **Full-featured observability platforms (for example, Honeycomb, Datadog)**: Advanced querying, visualization, alerting

474 464 

475### For Events/Logs:465### For events/logs

476 466 

477* **Log aggregation systems (e.g., Elasticsearch, Loki)**: Full-text search, log analysis467* **Log aggregation systems (for example, Elasticsearch, Loki)**: Full-text search, log analysis

478* **Columnar stores (e.g., ClickHouse)**: Structured event analysis468* **Columnar stores (for example, ClickHouse)**: Structured event analysis

479* **Full-featured observability platforms (e.g., Honeycomb, Datadog)**: Correlation between metrics and events469* **Full-featured observability platforms (for example, Honeycomb, Datadog)**: Correlation between metrics and events

480 470 

481For organizations requiring Daily/Weekly/Monthly Active User (DAU/WAU/MAU) metrics, consider backends that support efficient unique value queries.471For organizations requiring Daily/Weekly/Monthly Active User (DAU/WAU/MAU) metrics, consider backends that support efficient unique value queries.

482 472 

483## Service Information473## Service information

484 474 

485All metrics and events are exported with the following resource attributes:475All metrics and events are exported with the following resource attributes:

486 476 

487* `service.name`: `claude-code`477* `service.name`: `claude-code`

488* `service.version`: Current Claude Code version478* `service.version`: Current Claude Code version

489* `os.type`: Operating system type (e.g., `linux`, `darwin`, `windows`)479* `os.type`: Operating system type (for example, `linux`, `darwin`, `windows`)

490* `os.version`: Operating system version string480* `os.version`: Operating system version string

491* `host.arch`: Host architecture (e.g., `amd64`, `arm64`)481* `host.arch`: Host architecture (for example, `amd64`, `arm64`)

492* `wsl.version`: WSL version number (only present when running on Windows Subsystem for Linux)482* `wsl.version`: WSL version number (only present when running on Windows Subsystem for Linux)

493* Meter Name: `com.anthropic.claude_code`483* Meter Name: `com.anthropic.claude_code`

494 484 

495## ROI Measurement Resources485## ROI measurement resources

496 486 

497For 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.487For 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.

498 488 

499## Security/Privacy Considerations489## Security/privacy considerations

500 490 

501* Telemetry is opt-in and requires explicit configuration491* Telemetry is opt-in and requires explicit configuration

502* Sensitive information like API keys or file contents are never included in metrics or events492* Sensitive information like API keys or file contents are never included in metrics or events


505## Monitoring Claude Code on Amazon Bedrock495## Monitoring Claude Code on Amazon Bedrock

506 496 

507For 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).497For 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).

498 

499 

500---

501 

502> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

88* [Claude Code settings](/en/settings)88* [Claude Code settings](/en/settings)

89* [Environment variables reference](/en/settings#environment-variables)89* [Environment variables reference](/en/settings#environment-variables)

90* [Troubleshooting guide](/en/troubleshooting)90* [Troubleshooting guide](/en/troubleshooting)

91 

92 

93---

94 

95> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

107 107 

108You can think of output styles as "stored system prompts" and custom slash108You can think of output styles as "stored system prompts" and custom slash

109commands as "stored prompts".109commands as "stored prompts".

110 

111 

112---

113 

114> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

overview.md +29 −18

Details

10 10 

11**Install Claude Code:**11**Install Claude Code:**

12 12 

13To install Claude Code, use one of the following methods:

14 

13<Tabs>15<Tabs>

14 <Tab title="macOS/Linux">16 <Tab title="Native Install (Recommended)">

17 **macOS, Linux, WSL:**

18 

15 ```bash theme={null}19 ```bash theme={null}

16 curl -fsSL https://claude.ai/install.sh | bash20 curl -fsSL https://claude.ai/install.sh | bash

17 ```21 ```

18 </Tab>

19 22 

20 <Tab title="Homebrew">23 **Windows PowerShell:**

21 ```bash theme={null}

22 brew install --cask claude-code

23 ```

24 </Tab>

25 24 

26 <Tab title="Windows">

27 ```powershell theme={null}25 ```powershell theme={null}

28 irm https://claude.ai/install.ps1 | iex26 irm https://claude.ai/install.ps1 | iex

29 ```27 ```

28 

29 **Windows CMD:**

30 

31 ```batch theme={null}

32 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

33 ```

34 </Tab>

35 

36 <Tab title="Homebrew">

37 ```sh theme={null}

38 brew install --cask claude-code

39 ```

30 </Tab>40 </Tab>

31 41 

32 <Tab title="NPM">42 <Tab title="NPM">

33 ```bash theme={null}43 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):

44 

45 ```sh theme={null}

34 npm install -g @anthropic-ai/claude-code46 npm install -g @anthropic-ai/claude-code

35 ```47 ```

36 

37 Requires [Node.js 18+](https://nodejs.org/en/download/)

38 </Tab>48 </Tab>

39</Tabs>49</Tabs>

40 50 


45claude55claude

46```56```

47 57 

48You'll be prompted to log in on first use. That's it! [Continue with Quickstart (5 mins) →](/en/quickstart)58You'll be prompted to log in on first use. That's it! [Continue with Quickstart (5 minutes) →](/en/quickstart)

49 59 

50<Tip>60<Tip>

51 See [advanced setup](/en/setup) for installation options or [troubleshooting](/en/troubleshooting) if you hit issues.61 Claude Code automatically keeps itself up to date. See [advanced setup](/en/setup) for installation options, manual updates, or uninstallation instructions. Visit [troubleshooting](/en/troubleshooting) if you hit issues.

52</Tip>62</Tip>

53 63 

54<Note>

55 **New VS Code Extension (Beta)**: Prefer a graphical interface? Our new [VS Code extension](/en/vs-code) provides an easy-to-use native IDE experience without requiring terminal familiarity. Simply install from the marketplace and start coding with Claude directly in your sidebar.

56</Note>

57 

58## What Claude Code does for you64## What Claude Code does for you

59 65 

60* **Build features from descriptions**: Tell Claude what you want to build in plain English. It will make a plan, write the code, and ensure it works.66* **Build features from descriptions**: Tell Claude what you want to build in plain English. It will make a plan, write the code, and ensure it works.

61* **Debug and fix issues**: Describe a bug or paste an error message. Claude Code will analyze your codebase, identify the problem, and implement a fix.67* **Debug and fix issues**: Describe a bug or paste an error message. Claude Code will analyze your codebase, identify the problem, and implement a fix.

62* **Navigate any codebase**: Ask anything about your team's codebase, and get a thoughtful answer back. Claude Code maintains awareness of your entire project structure, can find up-to-date information from the web, and with [MCP](/en/mcp) can pull from external datasources like Google Drive, Figma, and Slack.68* **Navigate any codebase**: Ask anything about your team's codebase, and get a thoughtful answer back. Claude Code maintains awareness of your entire project structure, can find up-to-date information from the web, and with [MCP](/en/mcp) can pull from external data sources like Google Drive, Figma, and Slack.

63* **Automate tedious tasks**: Fix fiddly lint issues, resolve merge conflicts, and write release notes. Do all this in a single command from your developer machines, or automatically in CI.69* **Automate tedious tasks**: Fix fiddly lint issues, resolve merge conflicts, and write release notes. Do all this in a single command from your developer machines, or automatically in CI.

64 70 

65## Why developers love Claude Code71## Why developers love Claude Code


120 Understand how Claude Code handles your data126 Understand how Claude Code handles your data

121 </Card>127 </Card>

122</CardGroup>128</CardGroup>

129 

130 

131---

132 

133> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

10 10 

11* **Centralized discovery**: Browse plugins from multiple sources in one place11* **Centralized discovery**: Browse plugins from multiple sources in one place

12* **Version management**: Track and update plugin versions automatically12* **Version management**: Track and update plugin versions automatically

13* **Automatic updates**: Keep plugins current with [per-marketplace auto-update settings](#auto-update-settings)

13* **Team distribution**: Share required plugins across your organization14* **Team distribution**: Share required plugins across your organization

14* **Flexible sources**: Support for git repositories, GitHub repos, local paths, and package managers15* **Flexible sources**: Support for git repositories, GitHub repos, local paths, and package managers

15 16 


692. **Browse plugins**: Use `/plugin` to see available plugins from your marketplace702. **Browse plugins**: Use `/plugin` to see available plugins from your marketplace

703. **Test installation**: Try installing a plugin to verify the marketplace works correctly713. **Test installation**: Try installing a plugin to verify the marketplace works correctly

71 72 

73### Example plugin marketplace

74 

75Claude Code maintains a marketplace of [demo plugins](https://github.com/anthropics/claude-code/tree/main/plugins). These plugins are examples of what's possible with the plugin system.

76 

77```shell Add the marketplace theme={null}

78/plugin marketplace add anthropics/claude-code

79```

80 

72## Configure team marketplaces81## Configure team marketplaces

73 82 

74Set up automatic marketplace installation for team projects by specifying required marketplaces in `.claude/settings.json`:83Set up automatic marketplace installation for team projects by specifying required marketplaces in `.claude/settings.json`:


94 103 

95When team members trust the repository folder, Claude Code automatically installs these marketplaces and any plugins specified in the `enabledPlugins` field.104When team members trust the repository folder, Claude Code automatically installs these marketplaces and any plugins specified in the `enabledPlugins` field.

96 105 

106## Enterprise marketplace restrictions

107 

108For organizations requiring strict control over plugin sources, enterprise administrators can restrict which plugin marketplaces users are allowed to add using the `strictKnownMarketplaces` setting in managed settings.

109 

110**Managed settings file locations**:

111 

112* **macOS**: `/Library/Application Support/ClaudeCode/managed-settings.json`

113* **Linux and WSL**: `/etc/claude-code/managed-settings.json`

114* **Windows**: `C:\ProgramData\ClaudeCode\managed-settings.json`

115 

116**Restriction behavior**:

117 

118When `strictKnownMarketplaces` is configured in managed settings:

119 

120* **Undefined** (default): No restrictions - users can add any marketplace

121* **Empty array `[]`**: Complete lockdown - users cannot add any new marketplaces

122* **List of sources**: Users can only add marketplaces that match the allowlist exactly

123 

124**Basic examples**:

125 

126Disable all marketplace additions:

127 

128```json theme={null}

129{

130 "strictKnownMarketplaces": []

131}

132```

133 

134Allow specific marketplaces only:

135 

136```json theme={null}

137{

138 "strictKnownMarketplaces": [

139 {

140 "source": "github",

141 "repo": "company/approved-plugins"

142 },

143 {

144 "source": "github",

145 "repo": "company/security-tools",

146 "ref": "v2.0"

147 },

148 {

149 "source": "url",

150 "url": "https://internal.company.com/plugins/marketplace.json"

151 }

152 ]

153}

154```

155 

156**Key characteristics**:

157 

158* Enforced BEFORE network/filesystem operations

159* Uses exact matching (including optional `ref` and `path` fields for git sources)

160* Cannot be overridden by user or project settings

161* Only affects adding NEW marketplaces (previously installed marketplaces still work)

162 

163See [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces) for complete configuration details, including all six supported source types, exact matching rules, and comparison with `extraKnownMarketplaces`.

164 

97***165***

98 166 

99## Create your own marketplace167## Create your own marketplace


160### Plugin entries228### Plugin entries

161 229 

162<Note>230<Note>

163 Plugin entries are based on the *plugin manifest schema* (with all fields made optional) plus marketplace-specific fields (`source`, `category`, `tags`, `strict`), with `name` being required.231 Plugin entries are based on the *plugin manifest schema* (with all fields made

232 optional) plus marketplace-specific fields (`source`, `category`, `tags`,

233 `strict`), with `name` being required.

164</Note>234</Note>

165 235 

166**Required fields:**236**Required fields:**


181| `author` | object | Plugin author information |251| `author` | object | Plugin author information |

182| `homepage` | string | Plugin homepage or documentation URL |252| `homepage` | string | Plugin homepage or documentation URL |

183| `repository` | string | Source code repository URL |253| `repository` | string | Source code repository URL |

184| `license` | string | SPDX license identifier (e.g., MIT, Apache-2.0) |254| `license` | string | SPDX license identifier (for example, MIT, Apache-2.0) |

185| `keywords` | array | Tags for plugin discovery and categorization |255| `keywords` | array | Tags for plugin discovery and categorization |

186| `category` | string | Plugin category for organization |256| `category` | string | Plugin category for organization |

187| `tags` | array | Tags for searchability |257| `tags` | array | Tags for searchability |


262 "./commands/enterprise/",332 "./commands/enterprise/",

263 "./commands/experimental/preview.md"333 "./commands/experimental/preview.md"

264 ],334 ],

265 "agents": [335 "agents": ["./agents/security-reviewer.md", "./agents/compliance-checker.md"],

266 "./agents/security-reviewer.md",

267 "./agents/compliance-checker.md"

268 ],

269 "hooks": {336 "hooks": {

270 "PostToolUse": [337 "PostToolUse": [

271 {338 {

272 "matcher": "Write|Edit",339 "matcher": "Write|Edit",

273 "hooks": [{"type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh"}]340 "hooks": [

341 {

342 "type": "command",

343 "command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh"

344 }

345 ]

274 }346 }

275 ]347 ]

276 },348 },


285```357```

286 358 

287<Note>359<Note>

288 **Schema relationship**: Plugin entries use the plugin manifest schema with all fields made optional, plus marketplace-specific fields (`source`, `strict`, `category`, `tags`). This means any field valid in a `plugin.json` file can also be used in a marketplace entry. When `strict: false`, the marketplace entry serves as the complete plugin manifest if no `plugin.json` exists. When `strict: true` (default), marketplace fields supplement the plugin's own manifest file.360 **Schema relationship**: Plugin entries use the plugin manifest schema with

361 all fields made optional, plus marketplace-specific fields (`source`,

362 `strict`, `category`, `tags`). This means any field valid in a `plugin.json`

363 file can also be used in a marketplace entry. When `strict: false`, the

364 marketplace entry serves as the complete plugin manifest if no `plugin.json`

365 exists. When `strict: true` (default), marketplace fields supplement the

366 plugin's own manifest file.

289</Note>367</Note>

290 368 

291***369***


358 436 

359***437***

360 438 

439## Auto-update settings

440 

441Claude Code can automatically update marketplaces and their installed plugins at startup. This keeps your plugins current without manual intervention.

442 

443### How auto-update works

444 

445When auto-update is enabled for a marketplace:

446 

4471. **Marketplace refresh**: Claude Code pulls the latest marketplace data (git pull or re-download)

4482. **Plugin updates**: Installed plugins from that marketplace are updated to their latest versions

4493. **Notification**: If any plugins were updated, you'll see a notification suggesting a restart

450 

451### Configure auto-update per marketplace

452 

453Toggle auto-update for individual marketplaces through the UI:

454 

4551. Run `/plugin` to open the plugin manager

4562. Select **Marketplaces**

4573. Choose a marketplace from the list

4584. Select **Enable auto-update** or **Disable auto-update**

459 

460<Note>

461 Official Anthropic marketplaces have auto-update enabled by default. You can disable this if you prefer manual updates.

462</Note>

463 

464### Auto-update behavior

465 

466| Marketplace type | Default behavior |

467| :------------------------------ | :------------------- |

468| Official Anthropic marketplaces | Auto-update enabled |

469| Third-party marketplaces | Auto-update disabled |

470| Local development marketplaces | Auto-update disabled |

471 

472### Disable auto-update globally

473 

474To disable all automatic updates (both Claude Code and plugins), set the `DISABLE_AUTOUPDATER` environment variable. See [Auto updates](/en/setup#auto-updates) for details.

475 

476When auto-updates are disabled globally:

477 

478* No marketplaces or plugins will auto-update

479* The auto-update toggle is hidden in the UI

480* You can still manually update using `/plugin marketplace update`

481 

482***

483 

361## Troubleshooting marketplaces484## Troubleshooting marketplaces

362 485 

363### Common marketplace issues486### Common marketplace issues


431* [Plugins reference](/en/plugins-reference) - Complete technical specifications and schemas554* [Plugins reference](/en/plugins-reference) - Complete technical specifications and schemas

432* [Plugin development](/en/plugins#develop-more-complex-plugins) - Creating your own plugins555* [Plugin development](/en/plugins#develop-more-complex-plugins) - Creating your own plugins

433* [Settings](/en/settings#plugin-configuration) - Plugin configuration options556* [Settings](/en/settings#plugin-configuration) - Plugin configuration options

557* [strictKnownMarketplaces reference](/en/settings#strictknownmarketplaces) - Complete configuration reference for enterprise marketplace restrictions

558 

559 

560---

561 

562> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

plugins.md +44 −1

Details

201/plugin uninstall plugin-name@marketplace-name201/plugin uninstall plugin-name@marketplace-name

202```202```

203 203 

204### Installation scopes

205 

206Plugins can be installed at different scopes to control their availability and sharing:

207 

208| Scope | Location | Behavior |

209| :-------- | :---------------------------- | :-------------------------------------- |

210| `user` | `~/.claude/settings.json` | Available across all projects (default) |

211| `project` | `.claude/settings.json` | Shared with team via version control |

212| `local` | `.claude/settings.local.json` | Project-specific, gitignored |

213 

214**When to use each scope:**

215 

216* **User scope** (default): For plugins you want available in all your projects

217* **Project scope**: For plugins your team should share (committed to git)

218* **Local scope**: For personal plugins in a specific project (not shared)

219 

220```shell Install to user scope (default) theme={null}

221claude plugin install formatter@your-org

222```

223 

224```shell Install to project scope (shared with team) theme={null}

225claude plugin install formatter@your-org --scope project

226```

227 

228```shell Install to local scope (gitignored) theme={null}

229claude plugin install formatter@your-org --scope local

230```

231 

232The `--scope` option also works with `uninstall`, `enable`, and `disable` commands:

233 

234```shell Uninstall from project scope theme={null}

235claude plugin uninstall formatter@your-org --scope project

236```

237 

238<Note>

239 When using `/plugin install` interactively, you'll be prompted to select the installation scope.

240</Note>

241 

204### Verify installation242### Verify installation

205 243 

206After installing a plugin:244After installing a plugin:


341 379 

3421. **Add documentation**: Include a README.md with installation and usage instructions3801. **Add documentation**: Include a README.md with installation and usage instructions

3432. **Version your plugin**: Use semantic versioning in your `plugin.json`3812. **Version your plugin**: Use semantic versioning in your `plugin.json`

3443. **Create or use a marketplace**: Distribute through plugin marketplaces for easy installation3823. **Create or use a marketplace**: Distribute through plugin marketplaces for installation

3454. **Test with others**: Have team members test the plugin before wider distribution3834. **Test with others**: Have team members test the plugin before wider distribution

346 384 

347<Note>385<Note>


389* [Hooks](/en/hooks) - Automating workflows with event handlers427* [Hooks](/en/hooks) - Automating workflows with event handlers

390* [MCP](/en/mcp) - Connecting to external tools and services428* [MCP](/en/mcp) - Connecting to external tools and services

391* [Settings](/en/settings) - Configuration options for plugins429* [Settings](/en/settings) - Configuration options for plugins

430 

431 

432---

433 

434> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

120**Available events**:120**Available events**:

121 121 

122* `PreToolUse`: Before Claude uses any tool122* `PreToolUse`: Before Claude uses any tool

123* `PermissionRequest`: When a permission dialog is shown

123* `PostToolUse`: After Claude uses any tool124* `PostToolUse`: After Claude uses any tool

124* `UserPromptSubmit`: When user submits a prompt125* `UserPromptSubmit`: When user submits a prompt

125* `Notification`: When Claude Code sends notifications126* `Notification`: When Claude Code sends notifications


225| `commands` | string\|array | Additional command files/directories | `"./custom/cmd.md"` or `["./cmd1.md"]` |226| `commands` | string\|array | Additional command files/directories | `"./custom/cmd.md"` or `["./cmd1.md"]` |

226| `agents` | string\|array | Additional agent files | `"./custom/agents/"` |227| `agents` | string\|array | Additional agent files | `"./custom/agents/"` |

227| `hooks` | string\|object | Hook config path or inline config | `"./hooks.json"` |228| `hooks` | string\|object | Hook config path or inline config | `"./hooks.json"` |

228| `mcpServers` | string\|object | MCP config path or inline config | `"./mcp.json"` |229| `mcpServers` | string\|object | MCP config path or inline config | `"./custom-mcp-config.json"` |

229 230 

230### Path behavior rules231### Path behavior rules

231 232 


326 327 

327***328***

328 329 

330## CLI commands reference

331 

332Claude Code provides CLI commands for non-interactive plugin management, useful for scripting and automation.

333 

334### plugin install

335 

336Install a plugin from available marketplaces.

337 

338```bash theme={null}

339claude plugin install <plugin> [options]

340```

341 

342**Arguments:**

343 

344* `<plugin>`: Plugin name or `plugin-name@marketplace-name` for a specific marketplace

345 

346**Options:**

347 

348| Option | Description | Default |

349| :-------------------- | :------------------------------------------------ | :------ |

350| `-s, --scope <scope>` | Installation scope: `user`, `project`, or `local` | `user` |

351| `-h, --help` | Display help for command | |

352 

353**Examples:**

354 

355```bash theme={null}

356# Install to user scope (default)

357claude plugin install formatter@my-marketplace

358 

359# Install to project scope (shared with team)

360claude plugin install formatter@my-marketplace --scope project

361 

362# Install to local scope (gitignored)

363claude plugin install formatter@my-marketplace --scope local

364```

365 

366### plugin uninstall

367 

368Remove an installed plugin.

369 

370```bash theme={null}

371claude plugin uninstall <plugin> [options]

372```

373 

374**Arguments:**

375 

376* `<plugin>`: Plugin name or `plugin-name@marketplace-name`

377 

378**Options:**

379 

380| Option | Description | Default |

381| :-------------------- | :-------------------------------------------------- | :------ |

382| `-s, --scope <scope>` | Uninstall from scope: `user`, `project`, or `local` | `user` |

383| `-h, --help` | Display help for command | |

384 

385**Aliases:** `remove`, `rm`

386 

387### plugin enable

388 

389Enable a disabled plugin.

390 

391```bash theme={null}

392claude plugin enable <plugin> [options]

393```

394 

395**Arguments:**

396 

397* `<plugin>`: Plugin name or `plugin-name@marketplace-name`

398 

399**Options:**

400 

401| Option | Description | Default |

402| :-------------------- | :--------------------------------------------- | :------ |

403| `-s, --scope <scope>` | Scope to enable: `user`, `project`, or `local` | `user` |

404| `-h, --help` | Display help for command | |

405 

406### plugin disable

407 

408Disable a plugin without uninstalling it.

409 

410```bash theme={null}

411claude plugin disable <plugin> [options]

412```

413 

414**Arguments:**

415 

416* `<plugin>`: Plugin name or `plugin-name@marketplace-name`

417 

418**Options:**

419 

420| Option | Description | Default |

421| :-------------------- | :---------------------------------------------- | :------ |

422| `-s, --scope <scope>` | Scope to disable: `user`, `project`, or `local` | `user` |

423| `-h, --help` | Display help for command | |

424 

425### plugin update

426 

427Update a plugin to the latest version.

428 

429```bash theme={null}

430claude plugin update <plugin> [options]

431```

432 

433**Arguments:**

434 

435* `<plugin>`: Plugin name or `plugin-name@marketplace-name`

436 

437**Options:**

438 

439| Option | Description | Default |

440| :-------------------- | :-------------------------------------------------------- | :------- |

441| `-s, --scope <scope>` | Scope to update: `user`, `project`, `local`, or `managed` | Required |

442| `-h, --help` | Display help for command | |

443 

444### Installation scopes

445 

446| Scope | Settings file | Use case |

447| :-------- | :---------------------------- | :-------------------------------------------------- |

448| `user` | `~/.claude/settings.json` | Personal plugins available across all projects |

449| `project` | `.claude/settings.json` | Team plugins shared via version control |

450| `local` | `.claude/settings.local.json` | Project-specific plugins, gitignored |

451| `managed` | `managed-settings.json` | Enterprise-managed plugins (read-only, update only) |

452 

453***

454 

329## Debugging and development tools455## Debugging and development tools

330 456 

331### Debugging commands457### Debugging commands


374- [MCP](/en/mcp) - External tool integration500- [MCP](/en/mcp) - External tool integration

375- [Settings](/en/settings) - Configuration options for plugins501- [Settings](/en/settings) - Configuration options for plugins

376```502```

503 

504 

505---

506 

507> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

quickstart.md +11 −6

Details

18 18 

19<Tabs>19<Tabs>

20 <Tab title="Native Install (Recommended)">20 <Tab title="Native Install (Recommended)">

21 **Homebrew (macOS, Linux):**

22 

23 ```sh theme={null}

24 brew install --cask claude-code

25 ```

26 

27 **macOS, Linux, WSL:**21 **macOS, Linux, WSL:**

28 22 

29 ```bash theme={null}23 ```bash theme={null}


43 ```37 ```

44 </Tab>38 </Tab>

45 39 

40 <Tab title="Homebrew">

41 ```sh theme={null}

42 brew install --cask claude-code

43 ```

44 </Tab>

45 

46 <Tab title="NPM">46 <Tab title="NPM">

47 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):47 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):

48 48 


326* **In Claude Code**: Type `/help` or ask "how do I..."326* **In Claude Code**: Type `/help` or ask "how do I..."

327* **Documentation**: You're here! Browse other guides327* **Documentation**: You're here! Browse other guides

328* **Community**: Join our [Discord](https://www.anthropic.com/discord) for tips and support328* **Community**: Join our [Discord](https://www.anthropic.com/discord) for tips and support

329 

330 

331---

332 

333> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

sandboxing.md +21 −2

Details

66> /sandbox66> /sandbox

67```67```

68 68 

69This activates the sandboxed bash tool with default settings, allowing access to your current working directory while blocking access to sensitive system locations.69This opens a menu where you can choose between sandbox modes.

70 

71### Sandbox modes

72 

73Claude Code offers two sandbox modes:

74 

75**Auto-allow mode**: Bash commands will attempt to run inside the sandbox and are automatically allowed without requiring permission. Commands that cannot be sandboxed (such as those needing network access to non-allowed hosts) fall back to the regular permission flow. Explicit ask/deny rules you've configured are always respected.

76 

77**Regular permissions mode**: All bash commands go through the standard permission flow, even when sandboxed. This provides more control but requires more approvals.

78 

79In both modes, the sandbox enforces the same filesystem and network restrictions. The difference is only in whether sandboxed commands are auto-approved or require explicit permission.

80 

81<Info>

82 Auto-allow mode works independently of your permission mode setting. Even if you're not in "accept edits" mode, sandboxed bash commands will run automatically when auto-allow is enabled. This means bash commands that modify files within the sandbox boundaries will execute without prompting, even when file edit tools would normally require approval.

83</Info>

70 84 

71### Configure sandboxing85### Configure sandboxing

72 86 


141 155 

142* Privilege Escalation via Unix Sockets: The `allowUnixSockets` configuration can inadvertently grant access to powerful system services that could lead to sandbox bypasses. For example, if it is used to allow access to `/var/run/docker.sock` this would effectively grant access to the host system through exploiting the docker socket. Users are encouraged to carefully consider any unix sockets that they allow through the sandbox.156* Privilege Escalation via Unix Sockets: The `allowUnixSockets` configuration can inadvertently grant access to powerful system services that could lead to sandbox bypasses. For example, if it is used to allow access to `/var/run/docker.sock` this would effectively grant access to the host system through exploiting the docker socket. Users are encouraged to carefully consider any unix sockets that they allow through the sandbox.

143* Filesystem Permission Escalation: Overly broad filesystem write permissions can enable privilege escalation attacks. Allowing writes to directories containing executables in `$PATH`, system configuration directories, or user shell configuration files (`.bashrc`, `.zshrc`) can lead to code execution in different security contexts when other users or system processes access these files.157* Filesystem Permission Escalation: Overly broad filesystem write permissions can enable privilege escalation attacks. Allowing writes to directories containing executables in `$PATH`, system configuration directories, or user shell configuration files (`.bashrc`, `.zshrc`) can lead to code execution in different security contexts when other users or system processes access these files.

144* Linux Sandbox Strength: The Linux implementation provides strong filesystem and network isolation but includes an `enableWeakerNestedSandbox` mode that enables it to work inside of Docker environments without privileged namespaces. This option considerably weakens security and should only be used incases where additional isolation is otherwise enforced.158* Linux Sandbox Strength: The Linux implementation provides strong filesystem and network isolation but includes an `enableWeakerNestedSandbox` mode that enables it to work inside of Docker environments without privileged namespaces. This option considerably weakens security and should only be used in cases where additional isolation is otherwise enforced.

145 159 

146## Advanced usage160## Advanced usage

147 161 


203* [IAM](/en/iam) - Permission configuration and access control217* [IAM](/en/iam) - Permission configuration and access control

204* [Settings](/en/settings) - Complete configuration reference218* [Settings](/en/settings) - Complete configuration reference

205* [CLI reference](/en/cli-reference) - Command-line options including `-sb`219* [CLI reference](/en/cli-reference) - Command-line options including `-sb`

220 

221 

222---

223 

224> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

sdk/migration-guide.md +330 −0 added

Details

1# Migrate to Claude Agent SDK

2 

3Guide for migrating the Claude Code TypeScript and Python SDKs to the Claude Agent SDK

4 

5---

6 

7## Overview

8 

9The Claude Code SDK has been renamed to the **Claude Agent SDK** and its documentation has been reorganized. This change reflects the SDK's broader capabilities for building AI agents beyond just coding tasks.

10 

11## What's Changed

12 

13| Aspect | Old | New |

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

15| **Package Name (TS/JS)** | `@anthropic-ai/claude-code` | `@anthropic-ai/claude-agent-sdk` |

16| **Python Package** | `claude-code-sdk` | `claude-agent-sdk` |

17| **Documentation Location** | Claude Code docs | API Guide → Agent SDK section |

18 

19<Note>

20**Documentation Changes:** The Agent SDK documentation has moved from the Claude Code docs to the API Guide under a dedicated [Agent SDK](/docs/en/agent-sdk/overview) section. The Claude Code docs now focus on the CLI tool and automation features.

21</Note>

22 

23## Migration Steps

24 

25### For TypeScript/JavaScript Projects

26 

27**1. Uninstall the old package:**

28 

29```bash

30npm uninstall @anthropic-ai/claude-code

31```

32 

33**2. Install the new package:**

34 

35```bash

36npm install @anthropic-ai/claude-agent-sdk

37```

38 

39**3. Update your imports:**

40 

41Change all imports from `@anthropic-ai/claude-code` to `@anthropic-ai/claude-agent-sdk`:

42 

43```typescript

44// Before

45import { query, tool, createSdkMcpServer } from "@anthropic-ai/claude-code";

46 

47// After

48import {

49 query,

50 tool,

51 createSdkMcpServer,

52} from "@anthropic-ai/claude-agent-sdk";

53```

54 

55**4. Update package.json dependencies:**

56 

57If you have the package listed in your `package.json`, update it:

58 

59```json

60// Before

61{

62 "dependencies": {

63 "@anthropic-ai/claude-code": "^1.0.0"

64 }

65}

66 

67// After

68{

69 "dependencies": {

70 "@anthropic-ai/claude-agent-sdk": "^0.1.0"

71 }

72}

73```

74 

75That's it! No other code changes are required.

76 

77### For Python Projects

78 

79**1. Uninstall the old package:**

80 

81```bash

82pip uninstall claude-code-sdk

83```

84 

85**2. Install the new package:**

86 

87```bash

88pip install claude-agent-sdk

89```

90 

91**3. Update your imports:**

92 

93Change all imports from `claude_code_sdk` to `claude_agent_sdk`:

94 

95```python

96# Before

97from claude_code_sdk import query, ClaudeCodeOptions

98 

99# After

100from claude_agent_sdk import query, ClaudeAgentOptions

101```

102 

103**4. Update type names:**

104 

105Change `ClaudeCodeOptions` to `ClaudeAgentOptions`:

106 

107```python

108# Before

109from claude_agent_sdk import query, ClaudeCodeOptions

110 

111options = ClaudeCodeOptions(

112 model="claude-sonnet-4-5"

113)

114 

115# After

116from claude_agent_sdk import query, ClaudeAgentOptions

117 

118options = ClaudeAgentOptions(

119 model="claude-sonnet-4-5"

120)

121```

122 

123**5. Review [breaking changes](#breaking-changes)**

124 

125Make any code changes needed to complete the migration.

126 

127## Breaking changes

128 

129<Warning>

130To improve isolation and explicit configuration, Claude Agent SDK v0.1.0 introduces breaking changes for users migrating from Claude Code SDK. Review this section carefully before migrating.

131</Warning>

132 

133### Python: ClaudeCodeOptions renamed to ClaudeAgentOptions

134 

135**What changed:** The Python SDK type `ClaudeCodeOptions` has been renamed to `ClaudeAgentOptions`.

136 

137**Migration:**

138 

139```python

140# BEFORE (v0.0.x)

141from claude_agent_sdk import query, ClaudeCodeOptions

142 

143options = ClaudeCodeOptions(

144 model="claude-sonnet-4-5",

145 permission_mode="acceptEdits"

146)

147 

148# AFTER (v0.1.0)

149from claude_agent_sdk import query, ClaudeAgentOptions

150 

151options = ClaudeAgentOptions(

152 model="claude-sonnet-4-5",

153 permission_mode="acceptEdits"

154)

155```

156 

157**Why this changed:** The type name now matches the "Claude Agent SDK" branding and provides consistency across the SDK's naming conventions.

158 

159### System prompt no longer default

160 

161**What changed:** The SDK no longer uses Claude Code's system prompt by default.

162 

163**Migration:**

164 

165<CodeGroup>

166 

167```typescript TypeScript

168// BEFORE (v0.0.x) - Used Claude Code's system prompt by default

169const result = query({ prompt: "Hello" });

170 

171// AFTER (v0.1.0) - Uses empty system prompt by default

172// To get the old behavior, explicitly request Claude Code's preset:

173const result = query({

174 prompt: "Hello",

175 options: {

176 systemPrompt: { type: "preset", preset: "claude_code" }

177 }

178});

179 

180// Or use a custom system prompt:

181const result = query({

182 prompt: "Hello",

183 options: {

184 systemPrompt: "You are a helpful coding assistant"

185 }

186});

187```

188 

189```python Python

190# BEFORE (v0.0.x) - Used Claude Code's system prompt by default

191async for message in query(prompt="Hello"):

192 print(message)

193 

194# AFTER (v0.1.0) - Uses empty system prompt by default

195# To get the old behavior, explicitly request Claude Code's preset:

196from claude_agent_sdk import query, ClaudeAgentOptions

197 

198async for message in query(

199 prompt="Hello",

200 options=ClaudeAgentOptions(

201 system_prompt={"type": "preset", "preset": "claude_code"} # Use the preset

202 )

203):

204 print(message)

205 

206# Or use a custom system prompt:

207async for message in query(

208 prompt="Hello",

209 options=ClaudeAgentOptions(

210 system_prompt="You are a helpful coding assistant"

211 )

212):

213 print(message)

214```

215 

216</CodeGroup>

217 

218**Why this changed:** Provides better control and isolation for SDK applications. You can now build agents with custom behavior without inheriting Claude Code's CLI-focused instructions.

219 

220### Settings Sources No Longer Loaded by Default

221 

222**What changed:** The SDK no longer reads from filesystem settings (CLAUDE.md, settings.json, slash commands, etc.) by default.

223 

224**Migration:**

225 

226<CodeGroup>

227 

228```typescript TypeScript

229// BEFORE (v0.0.x) - Loaded all settings automatically

230const result = query({ prompt: "Hello" });

231// Would read from:

232// - ~/.claude/settings.json (user)

233// - .claude/settings.json (project)

234// - .claude/settings.local.json (local)

235// - CLAUDE.md files

236// - Custom slash commands

237 

238// AFTER (v0.1.0) - No settings loaded by default

239// To get the old behavior:

240const result = query({

241 prompt: "Hello",

242 options: {

243 settingSources: ["user", "project", "local"]

244 }

245});

246 

247// Or load only specific sources:

248const result = query({

249 prompt: "Hello",

250 options: {

251 settingSources: ["project"] // Only project settings

252 }

253});

254```

255 

256```python Python

257# BEFORE (v0.0.x) - Loaded all settings automatically

258async for message in query(prompt="Hello"):

259 print(message)

260# Would read from:

261# - ~/.claude/settings.json (user)

262# - .claude/settings.json (project)

263# - .claude/settings.local.json (local)

264# - CLAUDE.md files

265# - Custom slash commands

266 

267# AFTER (v0.1.0) - No settings loaded by default

268# To get the old behavior:

269from claude_agent_sdk import query, ClaudeAgentOptions

270 

271async for message in query(

272 prompt="Hello",

273 options=ClaudeAgentOptions(

274 setting_sources=["user", "project", "local"]

275 )

276):

277 print(message)

278 

279# Or load only specific sources:

280async for message in query(

281 prompt="Hello",

282 options=ClaudeAgentOptions(

283 setting_sources=["project"] # Only project settings

284 )

285):

286 print(message)

287```

288 

289</CodeGroup>

290 

291**Why this changed:** Ensures SDK applications have predictable behavior independent of local filesystem configurations. This is especially important for:

292- **CI/CD environments** - Consistent behavior without local customizations

293- **Deployed applications** - No dependency on filesystem settings

294- **Testing** - Isolated test environments

295- **Multi-tenant systems** - Prevent settings leakage between users

296 

297<Note>

298**Backward compatibility:** If your application relied on filesystem settings (custom slash commands, CLAUDE.md instructions, etc.), add `settingSources: ['user', 'project', 'local']` to your options.

299</Note>

300 

301## Why the Rename?

302 

303The Claude Code SDK was originally designed for coding tasks, but it has evolved into a powerful framework for building all types of AI agents. The new name "Claude Agent SDK" better reflects its capabilities:

304 

305- Building business agents (legal assistants, finance advisors, customer support)

306- Creating specialized coding agents (SRE bots, security reviewers, code review agents)

307- Developing custom agents for any domain with tool use, MCP integration, and more

308 

309## Getting Help

310 

311If you encounter any issues during migration:

312 

313**For TypeScript/JavaScript:**

314 

3151. Check that all imports are updated to use `@anthropic-ai/claude-agent-sdk`

3162. Verify your package.json has the new package name

3173. Run `npm install` to ensure dependencies are updated

318 

319**For Python:**

320 

3211. Check that all imports are updated to use `claude_agent_sdk`

3222. Verify your requirements.txt or pyproject.toml has the new package name

3233. Run `pip install claude-agent-sdk` to ensure the package is installed

324 

325## Next Steps

326 

327- Explore the [Agent SDK Overview](/docs/en/agent-sdk/overview) to learn about available features

328- Check out the [TypeScript SDK Reference](/docs/en/agent-sdk/typescript) for detailed API documentation

329- Review the [Python SDK Reference](/docs/en/agent-sdk/python) for Python-specific documentation

330- Learn about [Custom Tools](/docs/en/agent-sdk/custom-tools) and [MCP Integration](/docs/en/agent-sdk/mcp)

security.md +6 −1

Details

113 113 

114### Team security114### Team security

115 115 

116* Use [enterprise managed policies](/en/iam#enterprise-managed-policy-settings) to enforce organizational standards116* Use [enterprise managed settings](/en/iam#enterprise-managed-settings) to enforce organizational standards

117* Share approved permission configurations through version control117* Share approved permission configurations through version control

118* Train team members on security best practices118* Train team members on security best practices

119* Monitor Claude Code usage through [OpenTelemetry metrics](/en/monitoring-usage)119* Monitor Claude Code usage through [OpenTelemetry metrics](/en/monitoring-usage)


134* [Monitoring usage](/en/monitoring-usage) - Track and audit Claude Code activity134* [Monitoring usage](/en/monitoring-usage) - Track and audit Claude Code activity

135* [Development containers](/en/devcontainer) - Secure, isolated environments135* [Development containers](/en/devcontainer) - Secure, isolated environments

136* [Anthropic Trust Center](https://trust.anthropic.com) - Security certifications and compliance136* [Anthropic Trust Center](https://trust.anthropic.com) - Security certifications and compliance

137 

138 

139---

140 

141> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

settings.md +395 −44

Details

14* **Project settings** are saved in your project directory:14* **Project settings** are saved in your project directory:

15 * `.claude/settings.json` for settings that are checked into source control and shared with your team15 * `.claude/settings.json` for settings that are checked into source control and shared with your team

16 * `.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.16 * `.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.

17* For enterprise deployments of Claude Code, we also support **enterprise17* **Managed settings** (Enterprise): Enterprise administrators can configure and distribute Claude Code settings to their organization through the [Claude.ai admin console](https://claude.ai/admin-settings/claude-code). These settings are fetched automatically when users authenticate, take precedence over user and project settings, and cannot be overridden locally. This feature is available to Claude for Enterprise customers. If you don't see this option in your admin console, contact your Anthropic account team to have the feature enabled.

18 managed policy settings**. These take precedence over user and project18 

19 settings. System administrators can deploy policies to:19 For organizations that prefer file-based policy distribution, Claude Code also supports `managed-settings.json` and `managed-mcp.json` files that can be deployed to system directories:

20 * macOS: `/Library/Application Support/ClaudeCode/managed-settings.json`20 

21 * Linux and WSL: `/etc/claude-code/managed-settings.json`21 * macOS: `/Library/Application Support/ClaudeCode/`

22 * Windows: `C:\ProgramData\ClaudeCode\managed-settings.json`22 * Linux and WSL: `/etc/claude-code/`

23* Enterprise deployments can also configure **managed MCP servers** that override23 * Windows: `C:\Program Files\ClaudeCode\`

24 user-configured servers. See [Enterprise MCP configuration](/en/mcp#enterprise-mcp-configuration):24 

25 * macOS: `/Library/Application Support/ClaudeCode/managed-mcp.json`25 <Note>

26 * Linux and WSL: `/etc/claude-code/managed-mcp.json`26 These are system-wide paths (not user home directories like `~/Library/...`) that require administrator privileges. They are designed to be deployed by IT administrators.

27 * Windows: `C:\ProgramData\ClaudeCode\managed-mcp.json`27 </Note>

28 

29 See [Enterprise managed settings](/en/iam#enterprise-managed-settings) and [Enterprise MCP configuration](/en/mcp#enterprise-mcp-configuration) for details.

30 

31 <Note>

32 Enterprise deployments can also restrict **plugin marketplace additions** using

33 `strictKnownMarketplaces`. For more information, see [Enterprise marketplace restrictions](/en/plugin-marketplaces#enterprise-marketplace-restrictions).

34 </Note>

35* **Other configuration** is stored in `~/.claude.json`. This file contains your preferences (theme, notification settings, editor mode), OAuth session, [MCP server](/en/mcp) configurations for user and local scopes, per-project state (allowed tools, trust settings), and various caches. Project-scoped MCP servers are stored separately in `.mcp.json`.

28 36 

29```JSON Example settings.json theme={null}37```JSON Example settings.json theme={null}

30{38{


58`settings.json` supports a number of options:66`settings.json` supports a number of options:

59 67 

60| Key | Description | Example |68| Key | Description | Example |

61| :--------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------- |69| :--------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------- |

62| `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` |70| `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` |

63| `cleanupPeriodDays` | How long to locally retain chat transcripts based on last activity date (default: 30 days) | `20` |71| `cleanupPeriodDays` | Sessions inactive for longer than this period are deleted at startup. Setting to `0` immediately deletes all sessions. (default: 30 days) | `20` |

64| `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"]` |72| `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"]` |

65| `env` | Environment variables that will be applied to every session | `{"FOO": "bar"}` |73| `env` | Environment variables that will be applied to every session | `{"FOO": "bar"}` |

66| `includeCoAuthoredBy` | Whether to include the `co-authored-by Claude` byline in git commits and pull requests (default: `true`) | `false` |74| `attribution` | Customize attribution for git commits and pull requests. See [Attribution settings](#attribution-settings) | `{"commit": "🤖 Generated with Claude Code", "pr": ""}` |

75| `includeCoAuthoredBy` | **Deprecated**: Use `attribution` instead. Whether to include the `co-authored-by Claude` byline in git commits and pull requests (default: `true`) | `false` |

67| `permissions` | See table below for structure of permissions. | |76| `permissions` | See table below for structure of permissions. | |

68| `hooks` | Configure custom commands to run before or after tool executions. See [hooks documentation](/en/hooks) | `{"PreToolUse": {"Bash": "echo 'Running command...'"}}` |77| `hooks` | Configure custom commands to run before or after tool executions. See [hooks documentation](/en/hooks) | `{"PreToolUse": {"Bash": "echo 'Running command...'"}}` |

69| `disableAllHooks` | Disable all [hooks](/en/hooks) | `true` |78| `disableAllHooks` | Disable all [hooks](/en/hooks) | `true` |

70| `model` | Override the default model to use for Claude Code | `"claude-sonnet-4-5-20250929"` |79| `model` | Override the default model to use for Claude Code | `"claude-sonnet-4-5-20250929"` |

71| `statusLine` | Configure a custom status line to display context. See [statusLine documentation](/en/statusline) | `{"type": "command", "command": "~/.claude/statusline.sh"}` |80| `statusLine` | Configure a custom status line to display context. See [`statusLine` documentation](/en/statusline) | `{"type": "command", "command": "~/.claude/statusline.sh"}` |

81| `fileSuggestion` | Configure a custom script for `@` file autocomplete. See [File suggestion settings](#file-suggestion-settings) | `{"type": "command", "command": "~/.claude/file-suggestion.sh"}` |

72| `outputStyle` | Configure an output style to adjust the system prompt. See [output styles documentation](/en/output-styles) | `"Explanatory"` |82| `outputStyle` | Configure an output style to adjust the system prompt. See [output styles documentation](/en/output-styles) | `"Explanatory"` |

73| `forceLoginMethod` | Use `claudeai` to restrict login to Claude.ai accounts, `console` to restrict login to Claude Console (API usage billing) accounts | `claudeai` |83| `forceLoginMethod` | Use `claudeai` to restrict login to Claude.ai accounts, `console` to restrict login to Claude Console (API usage billing) accounts | `claudeai` |

74| `forceLoginOrgUUID` | Specify the UUID of an organization to automatically select it during login, bypassing the organization selection step. Requires `forceLoginMethod` to be set | `"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"` |84| `forceLoginOrgUUID` | Specify the UUID of an organization to automatically select it during login, bypassing the organization selection step. Requires `forceLoginMethod` to be set | `"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"` |


77| `disabledMcpjsonServers` | List of specific MCP servers from `.mcp.json` files to reject | `["filesystem"]` |87| `disabledMcpjsonServers` | List of specific MCP servers from `.mcp.json` files to reject | `["filesystem"]` |

78| `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 [Enterprise MCP configuration](/en/mcp#enterprise-mcp-configuration) | `[{ "serverName": "github" }]` |88| `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 [Enterprise MCP configuration](/en/mcp#enterprise-mcp-configuration) | `[{ "serverName": "github" }]` |

79| `deniedMcpServers` | When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including enterprise servers. Denylist takes precedence over allowlist. See [Enterprise MCP configuration](/en/mcp#enterprise-mcp-configuration) | `[{ "serverName": "filesystem" }]` |89| `deniedMcpServers` | When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including enterprise servers. Denylist takes precedence over allowlist. See [Enterprise MCP configuration](/en/mcp#enterprise-mcp-configuration) | `[{ "serverName": "filesystem" }]` |

90| `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 [Enterprise marketplace restrictions](/en/plugin-marketplaces#enterprise-marketplace-restrictions) | `[{ "source": "github", "repo": "company/plugins" }]` |

80| `awsAuthRefresh` | Custom script that modifies the `.aws` directory (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `aws sso login --profile myprofile` |91| `awsAuthRefresh` | Custom script that modifies the `.aws` directory (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `aws sso login --profile myprofile` |

81| `awsCredentialExport` | Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `/bin/generate_aws_grant.sh` |92| `awsCredentialExport` | Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](/en/amazon-bedrock#advanced-credential-configuration)) | `/bin/generate_aws_grant.sh` |

93| `alwaysThinkingEnabled` | Enable [extended thinking](/en/common-workflows#use-extended-thinking) by default for all sessions. Typically configured via the `/config` command rather than editing directly | `true` |

82 94 

83### Permission settings95### Permission settings

84 96 


89| `deny` | Array of [permission rules](/en/iam#configuring-permissions) to deny tool use. Use this to also exclude sensitive files from Claude Code access. **Note:** Bash patterns are prefix matches and can be bypassed (see [Bash permission limitations](/en/iam#tool-specific-permission-rules)) | `[ "WebFetch", "Bash(curl:*)", "Read(./.env)", "Read(./secrets/**)" ]` |101| `deny` | Array of [permission rules](/en/iam#configuring-permissions) to deny tool use. Use this to also exclude sensitive files from Claude Code access. **Note:** Bash patterns are prefix matches and can be bypassed (see [Bash permission limitations](/en/iam#tool-specific-permission-rules)) | `[ "WebFetch", "Bash(curl:*)", "Read(./.env)", "Read(./secrets/**)" ]` |

90| `additionalDirectories` | Additional [working directories](/en/iam#working-directories) that Claude has access to | `[ "../docs/" ]` |102| `additionalDirectories` | Additional [working directories](/en/iam#working-directories) that Claude has access to | `[ "../docs/" ]` |

91| `defaultMode` | Default [permission mode](/en/iam#permission-modes) when opening Claude Code | `"acceptEdits"` |103| `defaultMode` | Default [permission mode](/en/iam#permission-modes) when opening Claude Code | `"acceptEdits"` |

92| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode from being activated. This disables the `--dangerously-skip-permissions` command-line flag. See [managed policy settings](/en/iam#enterprise-managed-policy-settings) | `"disable"` |104| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode from being activated. This disables the `--dangerously-skip-permissions` command-line flag. See [managed settings](/en/iam#enterprise-managed-settings) | `"disable"` |

93 105 

94### Sandbox settings106### Sandbox settings

95 107 


104| `excludedCommands` | Commands that should run outside of the sandbox | `["git", "docker"]` |116| `excludedCommands` | Commands that should run outside of the sandbox | `["git", "docker"]` |

105| `allowUnsandboxedCommands` | Allow commands to run outside the sandbox via the `dangerouslyDisableSandbox` parameter. When set to `false`, the `dangerouslyDisableSandbox` escape hatch is completely disabled and all commands must run sandboxed (or be in `excludedCommands`). Useful for enterprise policies that require strict sandboxing. Default: true | `false` |117| `allowUnsandboxedCommands` | Allow commands to run outside the sandbox via the `dangerouslyDisableSandbox` parameter. When set to `false`, the `dangerouslyDisableSandbox` escape hatch is completely disabled and all commands must run sandboxed (or be in `excludedCommands`). Useful for enterprise policies that require strict sandboxing. Default: true | `false` |

106| `network.allowUnixSockets` | Unix socket paths accessible in sandbox (for SSH agents, etc.) | `["~/.ssh/agent-socket"]` |118| `network.allowUnixSockets` | Unix socket paths accessible in sandbox (for SSH agents, etc.) | `["~/.ssh/agent-socket"]` |

107| `network.allowLocalBinding` | Allow binding to localhost ports (MacOS only). Default: false | `true` |119| `network.allowLocalBinding` | Allow binding to localhost ports (macOS only). Default: false | `true` |

108| `network.httpProxyPort` | HTTP proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy. | `8080` |120| `network.httpProxyPort` | HTTP proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy. | `8080` |

109| `network.socksProxyPort` | SOCKS5 proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy. | `8081` |121| `network.socksProxyPort` | SOCKS5 proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy. | `8081` |

110| `enableWeakerNestedSandbox` | Enable weaker sandbox for unprivileged Docker environments (Linux only). **Reduces security.** Default: false | `true` |122| `enableWeakerNestedSandbox` | Enable weaker sandbox for unprivileged Docker environments (Linux only). **Reduces security.** Default: false | `true` |


133}145}

134```146```

135 147 

136**Filesystem access** is controlled via Read/Edit permissions:148**Filesystem and network restrictions** use standard permission rules:

149 

150* Use `Read` deny rules to block Claude from reading specific files or directories

151* Use `Edit` allow rules to let Claude write to directories beyond the current working directory

152* Use `Edit` deny rules to block writes to specific paths

153* Use `WebFetch` allow/deny rules to control which network domains Claude can access

154 

155### Attribution settings

156 

157Claude Code adds attribution to git commits and pull requests. These are configured separately:

158 

159* Commits use [git trailers](https://git-scm.com/docs/git-interpret-trailers) (like `Co-Authored-By`) by default, which can be customized or disabled

160* Pull request descriptions are plain text

161 

162| Keys | Description |

163| :------- | :----------------------------------------------------------------------------------------- |

164| `commit` | Attribution for git commits, including any trailers. Empty string hides commit attribution |

165| `pr` | Attribution for pull request descriptions. Empty string hides pull request attribution |

166 

167**Default commit attribution:**

168 

169```

170🤖 Generated with [Claude Code](https://claude.com/claude-code)

171 

172 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

173```

137 174 

138* Read deny rules block file reads in sandbox175**Default pull request attribution:**

139* Edit allow rules permit file writes (in addition to the defaults, e.g. the current working directory)

140* Edit deny rules block writes within allowed paths

141 176 

142**Network access** is controlled via WebFetch permissions:177```

178🤖 Generated with [Claude Code](https://claude.com/claude-code)

179```

180 

181**Example:**

182 

183```json theme={null}

184{

185 "attribution": {

186 "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>",

187 "pr": ""

188 }

189}

190```

191 

192<Note>

193 The `attribution` setting takes precedence over the deprecated `includeCoAuthoredBy` setting. To hide all attribution, set `commit` and `pr` to empty strings.

194</Note>

195 

196### File suggestion settings

197 

198Configure a custom command for `@` file path autocomplete. The built-in file suggestion uses fast filesystem traversal, but large monorepos may benefit from project-specific indexing such as a pre-built file index or custom tooling.

199 

200```json theme={null}

201{

202 "fileSuggestion": {

203 "type": "command",

204 "command": "~/.claude/file-suggestion.sh"

205 }

206}

207```

208 

209The command runs with the same environment variables as [hooks](/en/hooks), including `CLAUDE_PROJECT_DIR`. It receives JSON via stdin with a `query` field:

210 

211```json theme={null}

212{"query": "src/comp"}

213```

214 

215Output newline-separated file paths to stdout (currently limited to 15):

216 

217```

218src/components/Button.tsx

219src/components/Modal.tsx

220src/components/Form.tsx

221```

143 222 

144* WebFetch allow rules permit network domains223**Example:**

145* WebFetch deny rules block network domains224 

225```bash theme={null}

226#!/bin/bash

227query=$(cat | jq -r '.query')

228your-repo-file-index --query "$query" | head -20

229```

146 230 

147### Settings precedence231### Settings precedence

148 232 

149Settings are applied in order of precedence (highest to lowest):233Settings apply in order of precedence. From highest to lowest:

150 234 

1511. **Enterprise managed policies** (`managed-settings.json`)2351. **Managed settings** (Enterprise)

152 * Deployed by IT/DevOps236 * Remote settings configured via the [Claude.ai admin console](https://claude.ai/admin-settings/claude-code)

237 * Fetched automatically when users authenticate

153 * Cannot be overridden238 * Cannot be overridden

154 239 

1552. **Command line arguments**2402. **File-based managed settings** (`managed-settings.json`)

241 * Policies deployed by IT/DevOps to system directories

242 * Cannot be overridden by user or project settings

243 * Ignored when remote managed settings are configured

244 

2453. **Command line arguments**

156 * Temporary overrides for a specific session246 * Temporary overrides for a specific session

157 247 

1583. **Local project settings** (`.claude/settings.local.json`)2484. **Local project settings** (`.claude/settings.local.json`)

159 * Personal project-specific settings249 * Personal project-specific settings

160 250 

1614. **Shared project settings** (`.claude/settings.json`)2515. **Shared project settings** (`.claude/settings.json`)

162 * Team-shared project settings in source control252 * Team-shared project settings in source control

163 253 

1645. **User settings** (`~/.claude/settings.json`)2546. **User settings** (`~/.claude/settings.json`)

165 * Personal global settings255 * Personal global settings

166 256 

167This hierarchy ensures that enterprise security policies are always enforced while still allowing teams and individuals to customize their experience.257This hierarchy ensures that enterprise security policies are always enforced while still allowing teams and individuals to customize their experience.

168 258 

259For 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.

260 

169### Key points about the configuration system261### Key points about the configuration system

170 262 

171* **Memory files (CLAUDE.md)**: Contain instructions and context that Claude loads at startup263* **Memory files (`CLAUDE.md`)**: Contain instructions and context that Claude loads at startup

172* **Settings files (JSON)**: Configure permissions, environment variables, and tool behavior264* **Settings files (JSON)**: Configure permissions, environment variables, and tool behavior

173* **Slash commands**: Custom commands that can be invoked during a session with `/command-name`265* **Slash commands**: Custom commands that can be invoked during a session with `/command-name`

174* **MCP servers**: Extend Claude Code with additional tools and integrations266* **MCP servers**: Extend Claude Code with additional tools and integrations

175* **Precedence**: Higher-level configurations (Enterprise) override lower-level ones (User/Project)267* **Precedence**: Higher-level configurations (Enterprise) override lower-level ones (User/Project)

176* **Inheritance**: Settings are merged, with more specific settings adding to or overriding broader ones268* **Inheritance**: Settings are merged, with more specific settings adding to or overriding broader ones

177 269 

178### System prompt availability270### System prompt

179 271 

180<Note>272Claude Code's internal system prompt is not published. To add custom instructions, use `CLAUDE.md` files or the `--append-system-prompt` flag.

181 Unlike for claude.ai, we do not publish Claude Code's internal system prompt on this website. Use CLAUDE.md files or `--append-system-prompt` to add custom instructions to Claude Code's behavior.

182</Note>

183 273 

184### Excluding sensitive files274### Excluding sensitive files

185 275 

186To prevent Claude Code from accessing files containing sensitive information (e.g., API keys, secrets, environment files), use the `permissions.deny` setting in your `.claude/settings.json` file:276To prevent Claude Code from accessing files containing sensitive information like API keys, secrets, and environment files, use the `permissions.deny` setting in your `.claude/settings.json` file:

187 277 

188```json theme={null}278```json theme={null}

189{279{


294* `git`: Any git URL (uses `url`)384* `git`: Any git URL (uses `url`)

295* `directory`: Local filesystem path (uses `path`, for development only)385* `directory`: Local filesystem path (uses `path`, for development only)

296 386 

387#### `strictKnownMarketplaces`

388 

389**Enterprise-only setting**: Controls which plugin marketplaces users are allowed to add. This setting can only be configured in `managed-settings.json` and provides enterprise administrators with strict control over marketplace sources.

390 

391**Managed settings file locations**:

392 

393* **macOS**: `/Library/Application Support/ClaudeCode/managed-settings.json`

394* **Linux and WSL**: `/etc/claude-code/managed-settings.json`

395* **Windows**: `C:\ProgramData\ClaudeCode\managed-settings.json`

396 

397**Key characteristics**:

398 

399* Only available in enterprise managed settings (`managed-settings.json`)

400* Cannot be overridden by user or project settings (highest precedence)

401* Enforced BEFORE network/filesystem operations (blocked sources never execute)

402* Uses exact matching for source specifications (including `ref`, `path` for git sources)

403 

404**Allowlist behavior**:

405 

406* `undefined` (default): No restrictions - users can add any marketplace

407* Empty array `[]`: Complete lockdown - users cannot add any new marketplaces

408* List of sources: Users can only add marketplaces that match exactly

409 

410**All supported source types**:

411 

412The allowlist supports six marketplace source types. Each source must match exactly for a user's marketplace addition to be allowed.

413 

4141. **GitHub repositories**:

415 

416```json theme={null}

417{ "source": "github", "repo": "company/approved-plugins" }

418{ "source": "github", "repo": "company/security-tools", "ref": "v2.0" }

419{ "source": "github", "repo": "team/plugins", "ref": "main", "path": "marketplace" }

420```

421 

422Fields: `repo` (required), `ref` (optional: branch/tag/SHA), `path` (optional: subdirectory)

423 

4242. **Git repositories**:

425 

426```json theme={null}

427{ "source": "git", "url": "https://gitlab.company.com/tools/plugins.git" }

428{ "source": "git", "url": "https://bitbucket.org/company/plugins.git", "ref": "production" }

429{ "source": "git", "url": "ssh://git@internal.company.com/plugins.git", "ref": "v3.1", "path": "approved" }

430```

431 

432Fields: `url` (required), `ref` (optional: branch/tag/SHA), `path` (optional: subdirectory)

433 

4343. **URL-based marketplaces**:

435 

436```json theme={null}

437{ "source": "url", "url": "https://internal.company.com/plugins/marketplace.json" }

438{ "source": "url", "url": "https://cdn.company.com/marketplace.json", "headers": { "Authorization": "Bearer ${TOKEN}" } }

439```

440 

441Fields: `url` (required), `headers` (optional: HTTP headers for authenticated access)

442 

4434. **NPM packages**:

444 

445```json theme={null}

446{ "source": "npm", "package": "@company/claude-plugins" }

447{ "source": "npm", "package": "@company-internal/approved-marketplace" }

448```

449 

450Fields: `package` (required, supports scoped packages)

451 

4525. **File paths**:

453 

454```json theme={null}

455{ "source": "file", "path": "/usr/local/share/claude/company-marketplace.json" }

456{ "source": "file", "path": "/opt/company/plugins/marketplace.json" }

457```

458 

459Fields: `path` (required: absolute path to marketplace.json file)

460 

4616. **Directory paths**:

462 

463```json theme={null}

464{ "source": "directory", "path": "/usr/local/share/claude/company-plugins" }

465{ "source": "directory", "path": "/opt/company/approved-marketplaces" }

466```

467 

468Fields: `path` (required: absolute path to directory containing `.claude-plugin/marketplace.json`)

469 

470**Configuration examples**:

471 

472Example - Allow specific marketplaces only:

473 

474```json theme={null}

475{

476 "strictKnownMarketplaces": [

477 {

478 "source": "github",

479 "repo": "company/approved-plugins"

480 },

481 {

482 "source": "github",

483 "repo": "company/security-tools",

484 "ref": "v2.0"

485 },

486 {

487 "source": "url",

488 "url": "https://internal.company.com/plugins/marketplace.json"

489 },

490 {

491 "source": "npm",

492 "package": "@company/compliance-plugins"

493 }

494 ]

495}

496```

497 

498Example - Disable all marketplace additions:

499 

500```json theme={null}

501{

502 "strictKnownMarketplaces": []

503}

504```

505 

506**Exact matching requirements**:

507 

508Marketplace sources must match **exactly** for a user's addition to be allowed. For git-based sources (`github` and `git`), this includes all optional fields:

509 

510* The `repo` or `url` must match exactly

511* The `ref` field must match exactly (or both be undefined)

512* The `path` field must match exactly (or both be undefined)

513 

514Examples of sources that **do NOT match**:

515 

516```json theme={null}

517// These are DIFFERENT sources:

518{ "source": "github", "repo": "company/plugins" }

519{ "source": "github", "repo": "company/plugins", "ref": "main" }

520 

521// These are also DIFFERENT:

522{ "source": "github", "repo": "company/plugins", "path": "marketplace" }

523{ "source": "github", "repo": "company/plugins" }

524```

525 

526**Comparison with `extraKnownMarketplaces`**:

527 

528| Aspect | `strictKnownMarketplaces` | `extraKnownMarketplaces` |

529| --------------------- | ------------------------------------ | ------------------------------------ |

530| **Purpose** | Enterprise policy enforcement | Team convenience |

531| **Settings file** | `managed-settings.json` only | Any settings file |

532| **Behavior** | Blocks non-allowlisted additions | Auto-installs missing marketplaces |

533| **When enforced** | Before network/filesystem operations | After user trust prompt |

534| **Can be overridden** | No (highest precedence) | Yes (by higher precedence settings) |

535| **Source format** | Direct source object | Named marketplace with nested source |

536| **Use case** | Compliance, security restrictions | Onboarding, standardization |

537 

538**Format difference**:

539 

540`strictKnownMarketplaces` uses direct source objects:

541 

542```json theme={null}

543{

544 "strictKnownMarketplaces": [

545 { "source": "github", "repo": "company/plugins" }

546 ]

547}

548```

549 

550`extraKnownMarketplaces` requires named marketplaces:

551 

552```json theme={null}

553{

554 "extraKnownMarketplaces": {

555 "company-tools": {

556 "source": { "source": "github", "repo": "company/plugins" }

557 }

558 }

559}

560```

561 

562**Important notes**:

563 

564* Restrictions are checked BEFORE any network requests or filesystem operations

565* When blocked, users see clear error messages indicating the source is blocked by enterprise policy

566* The restriction applies only to adding NEW marketplaces; previously installed marketplaces remain accessible

567* Enterprise managed settings have the highest precedence and cannot be overridden

568 

569See [Enterprise marketplace restrictions](/en/plugin-marketplaces#enterprise-marketplace-restrictions) for user-facing documentation.

570 

297### Managing plugins571### Managing plugins

298 572 

299Use the `/plugin` command to manage plugins interactively:573Use the `/plugin` command to manage plugins interactively:


322| `ANTHROPIC_DEFAULT_HAIKU_MODEL` | See [Model configuration](/en/model-config#environment-variables) |596| `ANTHROPIC_DEFAULT_HAIKU_MODEL` | See [Model configuration](/en/model-config#environment-variables) |

323| `ANTHROPIC_DEFAULT_OPUS_MODEL` | See [Model configuration](/en/model-config#environment-variables) |597| `ANTHROPIC_DEFAULT_OPUS_MODEL` | See [Model configuration](/en/model-config#environment-variables) |

324| `ANTHROPIC_DEFAULT_SONNET_MODEL` | See [Model configuration](/en/model-config#environment-variables) |598| `ANTHROPIC_DEFAULT_SONNET_MODEL` | See [Model configuration](/en/model-config#environment-variables) |

599| `ANTHROPIC_FOUNDRY_API_KEY` | API key for Microsoft Foundry authentication (see [Microsoft Foundry](/en/microsoft-foundry)) |

325| `ANTHROPIC_MODEL` | Name of the model setting to use (see [Model Configuration](/en/model-config#environment-variables)) |600| `ANTHROPIC_MODEL` | Name of the model setting to use (see [Model Configuration](/en/model-config#environment-variables)) |

326| `ANTHROPIC_SMALL_FAST_MODEL` | \[DEPRECATED] Name of [Haiku-class model for background tasks](/en/costs) |601| `ANTHROPIC_SMALL_FAST_MODEL` | \[DEPRECATED] Name of [Haiku-class model for background tasks](/en/costs) |

327| `ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION` | Override AWS region for the Haiku-class model when using Bedrock |602| `ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION` | Override AWS region for the Haiku-class model when using Bedrock |


334| `CLAUDE_CODE_CLIENT_CERT` | Path to client certificate file for mTLS authentication |609| `CLAUDE_CODE_CLIENT_CERT` | Path to client certificate file for mTLS authentication |

335| `CLAUDE_CODE_CLIENT_KEY_PASSPHRASE` | Passphrase for encrypted CLAUDE\_CODE\_CLIENT\_KEY (optional) |610| `CLAUDE_CODE_CLIENT_KEY_PASSPHRASE` | Passphrase for encrypted CLAUDE\_CODE\_CLIENT\_KEY (optional) |

336| `CLAUDE_CODE_CLIENT_KEY` | Path to client private key file for mTLS authentication |611| `CLAUDE_CODE_CLIENT_KEY` | Path to client private key file for mTLS authentication |

612| `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 |

337| `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_BUG_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY` |613| `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | Equivalent of setting `DISABLE_AUTOUPDATER`, `DISABLE_BUG_COMMAND`, `DISABLE_ERROR_REPORTING`, and `DISABLE_TELEMETRY` |

338| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context |614| `CLAUDE_CODE_DISABLE_TERMINAL_TITLE` | Set to `1` to disable automatic terminal title updates based on conversation context |

339| `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` | Skip auto-installation of IDE extensions |615| `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` | Skip auto-installation of IDE extensions |

340| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests |616| `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests |

341| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (e.g. when using an LLM gateway) |617| `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>` |

342| `CLAUDE_CODE_SKIP_VERTEX_AUTH` | Skip Google authentication for Vertex (e.g. when using an LLM gateway) |618| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip AWS authentication for Bedrock (for example, when using an LLM gateway) |

619| `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` | Skip Azure authentication for Microsoft Foundry (for example, when using an LLM gateway) |

620| `CLAUDE_CODE_SKIP_VERTEX_AUTH` | Skip Google authentication for Vertex (for example, when using an LLM gateway) |

343| `CLAUDE_CODE_SUBAGENT_MODEL` | See [Model configuration](/en/model-config) |621| `CLAUDE_CODE_SUBAGENT_MODEL` | See [Model configuration](/en/model-config) |

344| `CLAUDE_CODE_USE_BEDROCK` | Use [Bedrock](/en/amazon-bedrock) |622| `CLAUDE_CODE_USE_BEDROCK` | Use [Bedrock](/en/amazon-bedrock) |

623| `CLAUDE_CODE_USE_FOUNDRY` | Use [Microsoft Foundry](/en/microsoft-foundry) |

345| `CLAUDE_CODE_USE_VERTEX` | Use [Vertex](/en/google-vertex-ai) |624| `CLAUDE_CODE_USE_VERTEX` | Use [Vertex](/en/google-vertex-ai) |

625| `CLAUDE_CONFIG_DIR` | Customize where Claude Code stores its configuration and data files |

346| `DISABLE_AUTOUPDATER` | Set to `1` to disable automatic updates. |626| `DISABLE_AUTOUPDATER` | Set to `1` to disable automatic updates. |

347| `DISABLE_BUG_COMMAND` | Set to `1` to disable the `/bug` command |627| `DISABLE_BUG_COMMAND` | Set to `1` to disable the `/bug` command |

348| `DISABLE_COST_WARNINGS` | Set to `1` to disable cost warning messages |628| `DISABLE_COST_WARNINGS` | Set to `1` to disable cost warning messages |


361| `MCP_TOOL_TIMEOUT` | Timeout in milliseconds for MCP tool execution |641| `MCP_TOOL_TIMEOUT` | Timeout in milliseconds for MCP tool execution |

362| `NO_PROXY` | List of domains and IPs to which requests will be directly issued, bypassing proxy |642| `NO_PROXY` | List of domains and IPs to which requests will be directly issued, bypassing proxy |

363| `SLASH_COMMAND_TOOL_CHAR_BUDGET` | Maximum number of characters for slash command metadata shown to [SlashCommand tool](/en/slash-commands#slashcommand-tool) (default: 15000) |643| `SLASH_COMMAND_TOOL_CHAR_BUDGET` | Maximum number of characters for slash command metadata shown to [SlashCommand tool](/en/slash-commands#slashcommand-tool) (default: 15000) |

364| `USE_BUILTIN_RIPGREP` | Set to `0` to use system-installed `rg` intead of `rg` included with Claude Code |644| `USE_BUILTIN_RIPGREP` | Set to `0` to use system-installed `rg` instead of `rg` included with Claude Code |

365| `VERTEX_REGION_CLAUDE_3_5_HAIKU` | Override region for Claude 3.5 Haiku when using Vertex AI |645| `VERTEX_REGION_CLAUDE_3_5_HAIKU` | Override region for Claude 3.5 Haiku when using Vertex AI |

366| `VERTEX_REGION_CLAUDE_3_7_SONNET` | Override region for Claude 3.7 Sonnet when using Vertex AI |646| `VERTEX_REGION_CLAUDE_3_7_SONNET` | Override region for Claude 3.7 Sonnet when using Vertex AI |

367| `VERTEX_REGION_CLAUDE_4_0_OPUS` | Override region for Claude 4.0 Opus when using Vertex AI |647| `VERTEX_REGION_CLAUDE_4_0_OPUS` | Override region for Claude 4.0 Opus when using Vertex AI |


373Claude Code has access to a set of powerful tools that help it understand and modify your codebase:653Claude Code has access to a set of powerful tools that help it understand and modify your codebase:

374 654 

375| Tool | Description | Permission Required |655| Tool | Description | Permission Required |

376| :--------------- | :------------------------------------------------------------------ | :------------------ |656| :------------------ | :------------------------------------------------------------------------------------------------ | :------------------ |

377| **Bash** | Executes shell commands in your environment | Yes |657| **AskUserQuestion** | Asks the user multiple choice questions to gather information or clarify ambiguity | No |

658| **Bash** | Executes shell commands in your environment (see [Bash tool behavior](#bash-tool-behavior) below) | Yes |

659| **BashOutput** | Retrieves output from a background bash shell | No |

378| **Edit** | Makes targeted edits to specific files | Yes |660| **Edit** | Makes targeted edits to specific files | Yes |

661| **ExitPlanMode** | Prompts the user to exit plan mode and start coding | Yes |

379| **Glob** | Finds files based on pattern matching | No |662| **Glob** | Finds files based on pattern matching | No |

380| **Grep** | Searches for patterns in file contents | No |663| **Grep** | Searches for patterns in file contents | No |

664| **KillShell** | Kills a running background bash shell by its ID | No |

381| **NotebookEdit** | Modifies Jupyter notebook cells | Yes |665| **NotebookEdit** | Modifies Jupyter notebook cells | Yes |

382| **NotebookRead** | Reads and displays Jupyter notebook contents | No |

383| **Read** | Reads the contents of files | No |666| **Read** | Reads the contents of files | No |

667| **Skill** | Executes a skill within the main conversation | Yes |

384| **SlashCommand** | Runs a [custom slash command](/en/slash-commands#slashcommand-tool) | Yes |668| **SlashCommand** | Runs a [custom slash command](/en/slash-commands#slashcommand-tool) | Yes |

385| **Task** | Runs a sub-agent to handle complex, multi-step tasks | No |669| **Task** | Runs a sub-agent to handle complex, multi-step tasks | No |

386| **TodoWrite** | Creates and manages structured task lists | No |670| **TodoWrite** | Creates and manages structured task lists | No |


390 674 

391Permission rules can be configured using `/allowed-tools` or in [permission settings](/en/settings#available-settings). Also see [Tool-specific permission rules](/en/iam#tool-specific-permission-rules).675Permission rules can be configured using `/allowed-tools` or in [permission settings](/en/settings#available-settings). Also see [Tool-specific permission rules](/en/iam#tool-specific-permission-rules).

392 676 

677### Bash tool behavior

678 

679The Bash tool executes shell commands with the following persistence behavior:

680 

681* **Working directory persists**: When Claude changes the working directory (for example, `cd /path/to/dir`), subsequent Bash commands will execute in that directory. You can use `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1` to reset to the project directory after each command.

682* **Environment variables do NOT persist**: Environment variables set in one Bash command (for example, `export MY_VAR=value`) are **not** available in subsequent Bash commands. Each Bash command runs in a fresh shell environment.

683 

684To make environment variables available in Bash commands, you have **three options**:

685 

686**Option 1: Activate environment before starting Claude Code** (simplest approach)

687 

688Activate your virtual environment in your terminal before launching Claude Code:

689 

690```bash theme={null}

691conda activate myenv

692# or: source /path/to/venv/bin/activate

693claude

694```

695 

696This works for shell environments but environment variables set within Claude's Bash commands will not persist between commands.

697 

698**Option 2: Set CLAUDE\_ENV\_FILE before starting Claude Code** (persistent environment setup)

699 

700Export the path to a shell script containing your environment setup:

701 

702```bash theme={null}

703export CLAUDE_ENV_FILE=/path/to/env-setup.sh

704claude

705```

706 

707Where `/path/to/env-setup.sh` contains:

708 

709```bash theme={null}

710conda activate myenv

711# or: source /path/to/venv/bin/activate

712# or: export MY_VAR=value

713```

714 

715Claude Code will source this file before each Bash command, making the environment persistent across all commands.

716 

717**Option 3: Use a SessionStart hook** (project-specific configuration)

718 

719Configure in `.claude/settings.json`:

720 

721```json theme={null}

722{

723 "hooks": {

724 "SessionStart": [{

725 "matcher": "startup",

726 "hooks": [{

727 "type": "command",

728 "command": "echo 'conda activate myenv' >> \"$CLAUDE_ENV_FILE\""

729 }]

730 }]

731 }

732}

733```

734 

735The hook writes to `$CLAUDE_ENV_FILE`, which is then sourced before each Bash command. This is ideal for team-shared project configurations.

736 

737See [SessionStart hooks](/en/hooks#persisting-environment-variables) for more details on Option 3.

738 

393### Extending tools with hooks739### Extending tools with hooks

394 740 

395You can run custom commands before or after any tool executes using741You can run custom commands before or after any tool executes using


402## See also748## See also

403 749 

404* [Identity and Access Management](/en/iam#configuring-permissions) - Learn about Claude Code's permission system750* [Identity and Access Management](/en/iam#configuring-permissions) - Learn about Claude Code's permission system

405* [IAM and access control](/en/iam#enterprise-managed-policy-settings) - Enterprise policy management751* [IAM and access control](/en/iam#enterprise-managed-settings) - Enterprise policy management

406* [Troubleshooting](/en/troubleshooting#auto-updater-issues) - Solutions for common configuration issues752* [Troubleshooting](/en/troubleshooting#auto-updater-issues) - Solutions for common configuration issues

753 

754 

755---

756 

757> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

setup.md +102 −22

Details

5## System requirements5## System requirements

6 6 

7* **Operating Systems**: macOS 10.15+, Ubuntu 20.04+/Debian 10+, or Windows 10+ (with WSL 1, WSL 2, or Git for Windows)7* **Operating Systems**: macOS 10.15+, Ubuntu 20.04+/Debian 10+, or Windows 10+ (with WSL 1, WSL 2, or Git for Windows)

8* **Hardware**: 4GB+ RAM8* **Hardware**: 4 GB+ RAM

9* **Software**: [Node.js 18+](https://nodejs.org/en/download) (only required for NPM installation)9* **Software**: [Node.js 18+](https://nodejs.org/en/download) (only required for npm installation)

10* **Network**: Internet connection required for authentication and AI processing10* **Network**: Internet connection required for authentication and AI processing

11* **Shell**: Works best in Bash, Zsh or Fish11* **Shell**: Works best in Bash, Zsh or Fish

12* **Location**: [Anthropic supported countries](https://www.anthropic.com/supported-countries)12* **Location**: [Anthropic supported countries](https://www.anthropic.com/supported-countries)

13 13 

14### Additional dependencies14### Additional dependencies

15 15 

16* **ripgrep**: Usually included with Claude Code. If search functionality fails, see [search troubleshooting](/en/troubleshooting#search-and-discovery-issues).16* **ripgrep**: Usually included with Claude Code. If search fails, see [search troubleshooting](/en/troubleshooting#search-and-discovery-issues).

17 17 

18## Standard installation18## Standard installation

19 19 


21 21 

22<Tabs>22<Tabs>

23 <Tab title="Native Install (Recommended)">23 <Tab title="Native Install (Recommended)">

24 **Homebrew (macOS, Linux):**

25 

26 ```sh theme={null}

27 brew install --cask claude-code

28 ```

29 

30 **macOS, Linux, WSL:**24 **macOS, Linux, WSL:**

31 25 

32 ```bash theme={null}26 ```bash theme={null}


46 ```40 ```

47 </Tab>41 </Tab>

48 42 

43 <Tab title="Homebrew">

44 ```sh theme={null}

45 brew install --cask claude-code

46 ```

47 </Tab>

48 

49 <Tab title="NPM">49 <Tab title="NPM">

50 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):50 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):

51 51 


68 68 

69Claude Code offers the following authentication options:69Claude Code offers the following authentication options:

70 70 

711. **Claude Console**: The default option. Connect through the Claude Console and complete the OAuth process. Requires active billing at [console.anthropic.com](https://console.anthropic.com). A "Claude Code" workspace will be automatically created for usage tracking and cost management. Note that you cannot create API keys for the Claude Code workspace - it is dedicated exclusively for Claude Code usage.711. **Claude Console**: The default option. Connect through the Claude Console and complete the OAuth process. Requires active billing in the [Anthropic console](https://console.anthropic.com). 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.

722. **Claude App (with Pro or Max plan)**: Subscribe to Claude's [Pro or Max plan](https://claude.com/pricing) for a unified subscription that includes both Claude Code and the web interface. Get more value at the same price point while managing your account in one place. Log in with your Claude.ai account. During launch, choose the option that matches your subscription type.722. **Claude App (with Pro or Max plan)**: Subscribe to Claude's [Pro or Max plan](https://claude.com/pricing) for a unified subscription that includes both Claude Code and the web interface. Get more value at the same price point while managing your account in one place. Log in with your Claude.ai account. During launch, choose the option that matches your subscription type.

733. **Enterprise platforms**: Configure Claude Code to use [Amazon Bedrock or Google Vertex AI](/en/third-party-integrations) for enterprise deployments with your existing cloud infrastructure.733. **Enterprise platforms**: Configure Claude Code to use [Amazon Bedrock, Google Vertex AI, or Microsoft Foundry](/en/third-party-integrations) for enterprise deployments with your existing cloud infrastructure.

74 74 

75<Note>75<Note>

76 Claude Code securely stores your credentials. See [Credential Management](/en/iam#credential-management) for details.76 Claude Code securely stores your credentials. See [Credential Management](/en/iam#credential-management) for details.


126```126```

127 127 

128<Note>128<Note>

129 **Alpine Linux and other musl/uClibc-based distributions**: The native build requires you to install `libgcc`, `libstdc++`, and `ripgrep`. Install (Alpine: `apk add libgcc libstdc++ ripgrep`) and set `USE_BUILTIN_RIPGREP=0`.129 **Alpine Linux and other musl/uClibc-based distributions**: The native build requires `libgcc`, `libstdc++`, and `ripgrep`. For Alpine: `apk add libgcc libstdc++ ripgrep`. Set `USE_BUILTIN_RIPGREP=0`.

130</Note>

131 

132<Note>

133 Claude Code installed via Homebrew will auto-update outside of the brew directory unless explicitly disabled with the `DISABLE_AUTOUPDATER` environment variable (see [Auto updates](#auto-updates) section).

134</Note>130</Note>

135 131 

136**Windows PowerShell:**132**Windows PowerShell:**


183 If you encounter permission errors, see [configure Claude Code](/en/troubleshooting#linux-permission-issues) for recommended solutions.179 If you encounter permission errors, see [configure Claude Code](/en/troubleshooting#linux-permission-issues) for recommended solutions.

184</Warning>180</Warning>

185 181 

186### Local installation

187 

188* After global install via npm, use `claude migrate-installer` to move to local

189* Avoids autoupdater npm permission issues

190* Some users may be automatically migrated to this method

191 

192## Running on AWS or GCP182## Running on AWS or GCP

193 183 

194By default, Claude Code uses the Claude API.184By default, Claude Code uses the Claude API.


219```bash theme={null}209```bash theme={null}

220claude update210claude update

221```211```

212 

213## Uninstall Claude Code

214 

215If you need to uninstall Claude Code, follow the instructions for your installation method.

216 

217### Native installation

218 

219Remove the Claude Code binary and symlink:

220 

221**macOS, Linux, WSL:**

222 

223```bash theme={null}

224rm -f ~/.local/bin/claude

225rm -rf ~/.claude-code

226```

227 

228**Windows PowerShell:**

229 

230```powershell theme={null}

231Remove-Item -Path "$env:LOCALAPPDATA\Programs\claude-code" -Recurse -Force

232Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\WindowsApps\claude.exe" -Force

233```

234 

235**Windows CMD:**

236 

237```batch theme={null}

238rmdir /s /q "%LOCALAPPDATA%\Programs\claude-code"

239del "%LOCALAPPDATA%\Microsoft\WindowsApps\claude.exe"

240```

241 

242### Homebrew installation

243 

244```bash theme={null}

245brew uninstall --cask claude-code

246```

247 

248### NPM installation

249 

250```bash theme={null}

251npm uninstall -g @anthropic-ai/claude-code

252```

253 

254### Clean up configuration files (optional)

255 

256<Warning>

257 Removing configuration files will delete all your settings, allowed tools, MCP server configurations, and session history.

258</Warning>

259 

260To remove Claude Code settings and cached data:

261 

262**macOS, Linux, WSL:**

263 

264```bash theme={null}

265# Remove user settings and state

266rm -rf ~/.claude

267rm ~/.claude.json

268 

269# Remove project-specific settings (run from your project directory)

270rm -rf .claude

271rm -f .mcp.json

272```

273 

274**Windows PowerShell:**

275 

276```powershell theme={null}

277# Remove user settings and state

278Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force

279Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force

280 

281# Remove project-specific settings (run from your project directory)

282Remove-Item -Path ".claude" -Recurse -Force

283Remove-Item -Path ".mcp.json" -Force

284```

285 

286**Windows CMD:**

287 

288```batch theme={null}

289REM Remove user settings and state

290rmdir /s /q "%USERPROFILE%\.claude"

291del "%USERPROFILE%\.claude.json"

292 

293REM Remove project-specific settings (run from your project directory)

294rmdir /s /q ".claude"

295del ".mcp.json"

296```

297 

298 

299---

300 

301> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

skills.md +7 −2

Details

146When this Skill is active, Claude can only use the specified tools (Read, Grep, Glob) without needing to ask for permission. This is useful for:146When this Skill is active, Claude can only use the specified tools (Read, Grep, Glob) without needing to ask for permission. This is useful for:

147 147 

148* Read-only Skills that shouldn't modify files148* Read-only Skills that shouldn't modify files

149* Skills with limited scope (e.g., only data analysis, no file writing)149* Skills with limited scope: for example, only data analysis, no file writing

150* Security-sensitive workflows where you want to restrict capabilities150* Security-sensitive workflows where you want to restrict capabilities

151 151 

152If `allowed-tools` is not specified, Claude will ask for permission to use tools as normal, following the standard permission model.152If `allowed-tools` isn't specified, Claude will ask for permission to use tools as normal, following the standard permission model.

153 153 

154<Note>154<Note>

155 `allowed-tools` is only supported for Skills in Claude Code.155 `allowed-tools` is only supported for Skills in Claude Code.


605 Create your first Skill605 Create your first Skill

606 </Card>606 </Card>

607</CardGroup>607</CardGroup>

608 

609 

610---

611 

612> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

slack.md +211 −0 added

Details

1# Claude Code in Slack

2 

3> Delegate coding tasks directly from your Slack workspace

4 

5Claude Code in Slack brings the power of Claude Code directly into your Slack workspace. When you mention `@Claude` with a coding task, Claude automatically detects the intent and creates a Claude Code session on the web, allowing you to delegate development work without leaving your team conversations.

6 

7This integration is built on the existing Claude for Slack app but adds intelligent routing to Claude Code on the web for coding-related requests.

8 

9## Use cases

10 

11* **Bug investigation and fixes**: Ask Claude to investigate and fix bugs as soon as they're reported in Slack channels.

12* **Quick code reviews and modifications**: Have Claude implement small features or refactor code based on team feedback.

13* **Collaborative debugging**: When team discussions provide crucial context (e.g., error reproductions or user reports), Claude can use that information to inform its debugging approach.

14* **Parallel task execution**: Kick off coding tasks in Slack while you continue other work, receiving notifications when complete.

15 

16## Prerequisites

17 

18Before using Claude Code in Slack, ensure you have the following:

19 

20| Requirement | Details |

21| :--------------------- | :----------------------------------------------------------------------------- |

22| Claude Plan | Pro, Max, Team, or Enterprise with Claude Code access (premium seats) |

23| Claude Code on the web | Access to [Claude Code on the web](/en/claude-code-on-the-web) must be enabled |

24| GitHub Account | Connected to Claude Code on the web with at least one repository authenticated |

25| Slack Authentication | Your Slack account linked to your Claude account via the Claude app |

26 

27## Setting up Claude Code in Slack

28 

29<Steps>

30 <Step title="Install the Claude App in Slack">

31 A workspace administrator must install the Claude app from the Slack App Marketplace. Visit the [Slack App Marketplace](https://slack.com/marketplace/A08SF47R6P4) and click "Add to Slack" to begin the installation process.

32 </Step>

33 

34 <Step title="Connect your Claude account">

35 After the app is installed, authenticate your individual Claude account:

36 

37 1. Open the Claude app in Slack by clicking on "Claude" in your Apps section

38 2. Navigate to the App Home tab

39 3. Click "Connect" to link your Slack account with your Claude account

40 4. Complete the authentication flow in your browser

41 </Step>

42 

43 <Step title="Configure Claude Code on the web">

44 Ensure your Claude Code on the web is properly configured:

45 

46 * Visit [claude.ai/code](https://claude.ai/code) and sign in with the same account you connected to Slack

47 * Connect your GitHub account if not already connected

48 * Authenticate at least one repository that you want Claude to work with

49 </Step>

50 

51 <Step title="Choose your routing mode">

52 After connecting your accounts, configure how Claude handles your messages in Slack. Navigate to the Claude App Home in Slack to find the **Routing Mode** setting.

53 

54 | Mode | Behavior |

55 | :-------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

56 | **Code only** | Claude routes all @mentions to Claude Code sessions. Best for teams using Claude in Slack exclusively for development tasks. |

57 | **Code + Chat** | Claude analyzes each message and intelligently routes between Claude Code (for coding tasks) and Claude Chat (for writing, analysis, and general questions). Best for teams who want a single @Claude entry point for all types of work. |

58 

59 <Note>

60 In Code + Chat mode, if Claude routes a message to Chat but you wanted a coding session, you can click "Retry as Code" to create a Claude Code session instead. Similarly, if it's routed to Code but you wanted a Chat session, you can choose that option in that thread.

61 </Note>

62 </Step>

63</Steps>

64 

65## How it works

66 

67### Automatic detection

68 

69When you mention @Claude in a Slack channel or thread, Claude automatically analyzes your message to determine if it's a coding task. If Claude detects coding intent, it will route your request to Claude Code on the web instead of responding as a regular chat assistant.

70 

71You can also explicitly tell Claude to handle a request as a coding task, even if it doesn't automatically detect it.

72 

73<Note>

74 Claude Code in Slack only works in channels (public or private). It does not work in direct messages (DMs).

75</Note>

76 

77### Context gathering

78 

79**From threads**: When you @mention Claude in a thread, it gathers context from all messages in that thread to understand the full conversation.

80 

81**From channels**: When mentioned directly in a channel, Claude looks at recent channel messages for relevant context.

82 

83This context helps Claude understand the problem, select the appropriate repository, and inform its approach to the task.

84 

85<Warning>

86 When @Claude is invoked in Slack, Claude is given access to the conversation context to better understand your request. Claude may follow directions from other messages in the context, so users should make sure to only use Claude in trusted Slack conversations.

87</Warning>

88 

89### Session flow

90 

911. **Initiation**: You @mention Claude with a coding request

922. **Detection**: Claude analyzes your message and detects coding intent

933. **Session creation**: A new Claude Code session is created on claude.ai/code

944. **Progress updates**: Claude posts status updates to your Slack thread as work progresses

955. **Completion**: When finished, Claude @mentions you with a summary and action buttons

966. **Review**: Click "View Session" to see the full transcript, or "Create PR" to open a pull request

97 

98## User interface elements

99 

100### App Home

101 

102The App Home tab shows your connection status and allows you to connect or disconnect your Claude account from Slack.

103 

104### Message actions

105 

106* **View Session**: Opens the full Claude Code session in your browser where you can see all work performed, continue the session, or make additional requests.

107* **Create PR**: Creates a pull request directly from the session's changes.

108* **Retry as Code**: If Claude initially responds as a chat assistant but you wanted a coding session, click this button to retry the request as a Claude Code task.

109* **Change Repo**: Allows you to select a different repository if Claude chose incorrectly.

110 

111### Repository selection

112 

113Claude automatically selects a repository based on context from your Slack conversation. If multiple repositories could apply, Claude may display a dropdown allowing you to choose the correct one.

114 

115## Access and permissions

116 

117### User-level access

118 

119| Access Type | Requirement |

120| :------------------- | :-------------------------------------------------------------- |

121| Claude Code Sessions | Each user runs sessions under their own Claude account |

122| Usage & Rate Limits | Sessions count against the individual user's plan limits |

123| Repository Access | Users can only access repositories they've personally connected |

124| Session History | Sessions appear in your Claude Code history on claude.ai/code |

125 

126### Workspace admin permissions

127 

128Slack workspace administrators control whether the Claude app can be installed in the workspace. Individual users then authenticate with their own Claude accounts to use the integration.

129 

130## What's accessible where

131 

132**In Slack**: You'll see status updates, completion summaries, and action buttons. The full transcript is preserved and always accessible.

133 

134**On the web**: The complete Claude Code session with full conversation history, all code changes, file operations, and the ability to continue the session or create pull requests.

135 

136## Best practices

137 

138### Writing effective requests

139 

140* **Be specific**: Include file names, function names, or error messages when relevant.

141* **Provide context**: Mention the repository or project if it's not clear from the conversation.

142* **Define success**: Explain what "done" looks like—should Claude write tests? Update documentation? Create a PR?

143* **Use threads**: Reply in threads when discussing bugs or features so Claude can gather the full context.

144 

145### When to use Slack vs. web

146 

147**Use Slack when**: Context already exists in a Slack discussion, you want to kick off a task asynchronously, or you're collaborating with teammates who need visibility.

148 

149**Use the web directly when**: You need to upload files, want real-time interaction during development, or are working on longer, more complex tasks.

150 

151## Troubleshooting

152 

153### Sessions not starting

154 

1551. Verify your Claude account is connected in the Claude App Home

1562. Check that you have Claude Code on the web access enabled

1573. Ensure you have at least one GitHub repository connected to Claude Code

158 

159### Repository not showing

160 

1611. Connect the repository in Claude Code on the web at [claude.ai/code](https://claude.ai/code)

1622. Verify your GitHub permissions for that repository

1633. Try disconnecting and reconnecting your GitHub account

164 

165### Wrong repository selected

166 

1671. Click the "Change Repo" button to select a different repository

1682. Include the repository name in your request for more accurate selection

169 

170### Authentication errors

171 

1721. Disconnect and reconnect your Claude account in the App Home

1732. Ensure you're signed into the correct Claude account in your browser

1743. Check that your Claude plan includes Claude Code access

175 

176### Session expiration

177 

1781. Sessions remain accessible in your Claude Code history on the web

1792. You can continue or reference past sessions from [claude.ai/code](https://claude.ai/code)

180 

181## Current limitations

182 

183* **GitHub only**: Currently supports repositories on GitHub.

184* **One PR at a time**: Each session can create one pull request.

185* **Rate limits apply**: Sessions use your individual Claude plan's rate limits.

186* **Web access required**: Users must have Claude Code on the web access; those without it will only get standard Claude chat responses.

187 

188## Related resources

189 

190<CardGroup>

191 <Card title="Claude Code on the web" icon="globe" href="/en/claude-code-on-the-web">

192 Learn more about Claude Code on the web

193 </Card>

194 

195 <Card title="Claude for Slack" icon="slack" href="https://claude.com/claude-and-slack">

196 General Claude for Slack documentation

197 </Card>

198 

199 <Card title="Slack App Marketplace" icon="store" href="https://slack.com/marketplace/A08SF47R6P4">

200 Install the Claude app from the Slack Marketplace

201 </Card>

202 

203 <Card title="Claude Help Center" icon="circle-question" href="https://support.claude.com">

204 Get additional support

205 </Card>

206</CardGroup>

207 

208 

209---

210 

211> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

slash-commands.md +51 −36

Details

14| `/compact [instructions]` | Compact conversation with optional focus instructions |14| `/compact [instructions]` | Compact conversation with optional focus instructions |

15| `/config` | Open the Settings interface (Config tab) |15| `/config` | Open the Settings interface (Config tab) |

16| `/context` | Visualize current context usage as a colored grid |16| `/context` | Visualize current context usage as a colored grid |

17| `/cost` | Show token usage statistics (see [cost tracking guide](/en/costs#using-the-cost-command) for subscription-specific details) |17| `/cost` | Show token usage statistics. See [cost tracking guide](/en/costs#using-the-cost-command) for subscription-specific details. |

18| `/doctor` | Checks the health of your Claude Code installation |18| `/doctor` | Checks the health of your Claude Code installation |

19| `/exit` | Exit the REPL |19| `/exit` | Exit the REPL |

20| `/export [filename]` | Export the current conversation to a file or clipboard |20| `/export [filename]` | Export the current conversation to a file or clipboard |

21| `/help` | Get usage help |21| `/help` | Get usage help |

22| `/hooks` | Manage hook configurations for tool events |22| `/hooks` | Manage hook configurations for tool events |

23| `/init` | Initialize project with CLAUDE.md guide |23| `/ide` | Manage IDE integrations and show status |

24| `/init` | Initialize project with `CLAUDE.md` guide |

25| `/install-github-app` | Set up Claude GitHub Actions for a repository |

24| `/login` | Switch Anthropic accounts |26| `/login` | Switch Anthropic accounts |

25| `/logout` | Sign out from your Anthropic account |27| `/logout` | Sign out from your Anthropic account |

26| `/mcp` | Manage MCP server connections and OAuth authentication |28| `/mcp` | Manage MCP server connections and OAuth authentication |

27| `/memory` | Edit CLAUDE.md memory files |29| `/memory` | Edit `CLAUDE.md` memory files |

28| `/model` | Select or change the AI model |30| `/model` | Select or change the AI model |

29| `/output-style [style]` | Set the output style directly or from a selection menu |31| `/output-style [style]` | Set the output style directly or from a selection menu |

30| `/permissions` | View or update [permissions](/en/iam#configuring-permissions) |32| `/permissions` | View or update [permissions](/en/iam#configuring-permissions) |

31| `/pr_comments` | View pull request comments |33| `/plugin` | Manage Claude Code plugins |

34| `/pr-comments` | View pull request comments |

32| `/privacy-settings` | View and update your privacy settings |35| `/privacy-settings` | View and update your privacy settings |

36| `/release-notes` | View release notes |

37| `/rename <name>` | Rename the current session for easier identification |

38| `/resume [session]` | Resume a conversation by ID or name, or open the session picker |

33| `/review` | Request code review |39| `/review` | Request code review |

34| `/sandbox` | Enable sandboxed bash tool with filesystem and network isolation for safer, more autonomous execution |

35| `/rewind` | Rewind the conversation and/or code |40| `/rewind` | Rewind the conversation and/or code |

41| `/sandbox` | Enable sandboxed bash tool with filesystem and network isolation for safer, more autonomous execution |

42| `/security-review` | Complete a security review of pending changes on the current branch |

43| `/stats` | Visualize daily usage, session history, streaks, and model preferences |

36| `/status` | Open the Settings interface (Status tab) showing version, model, account, and connectivity |44| `/status` | Open the Settings interface (Status tab) showing version, model, account, and connectivity |

37| `/statusline` | Set up Claude Code's status line UI |45| `/statusline` | Set up Claude Code's status line UI |

38| `/terminal-setup` | Install Shift+Enter key binding for newlines (iTerm2 and VSCode only) |46| `/terminal-setup` | Install Shift+Enter key binding for newlines (iTerm2 and VSCode only) |

39| `/todos` | List current todo items |47| `/todos` | List current TODO items |

40| `/usage` | Show plan usage limits and rate limit status (subscription plans only) |48| `/usage` | For subscription plans only: show plan usage limits and rate limit status |

41| `/vim` | Enter vim mode for alternating insert and command modes |49| `/vim` | Enter vim mode for alternating insert and command modes |

42 50 

43## Custom slash commands51## Custom slash commands

44 52 

45Custom slash commands allow you to define frequently-used prompts as Markdown files that Claude Code can execute. Commands are organized by scope (project-specific or personal) and support namespacing through directory structures.53Custom slash commands allow you to define frequently used prompts as Markdown files that Claude Code can execute. Commands are organized by scope (project-specific or personal) and support namespacing through directory structures.

46 54 

47### Syntax55### Syntax

48 56 


65 73 

66**Location**: `.claude/commands/`74**Location**: `.claude/commands/`

67 75 

68In the following example, we create the `/optimize` command:76The following example creates the `/optimize` command:

69 77 

70```bash theme={null}78```bash theme={null}

71# Create a project command79# Create a project command


79 87 

80**Location**: `~/.claude/commands/`88**Location**: `~/.claude/commands/`

81 89 

82In the following example, we create the `/security-review` command:90The following example creates the `/security-review` command:

83 91 

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

85# Create a personal command93# Create a personal command


91 99 

92#### Namespacing100#### Namespacing

93 101 

94Organize commands in subdirectories. The subdirectories are used for organization and appear in the command description, but they do not affect the command name itself. The description will show whether the command comes from the project directory (`.claude/commands`) or the user-level directory (`~/.claude/commands`), along with the subdirectory name.102Use subdirectories to group related commands. Subdirectories appear in the command description but don't affect the command name.

103 

104For example:

95 105 

96Conflicts between user and project level commands are not supported. Otherwise, multiple commands with the same base file name can coexist.106* `.claude/commands/frontend/component.md` creates `/component` with description "(project:frontend)"

107* `~/.claude/commands/component.md` creates `/component` with description "(user)"

97 108 

98For example, a file at `.claude/commands/frontend/component.md` creates the command `/component` with description showing "(project:frontend)".109If a project command and user command share the same name, the project command takes precedence and the user command is silently ignored. For example, if both `.claude/commands/deploy.md` and `~/.claude/commands/deploy.md` exist, `/deploy` runs the project version.

99Meanwhile, a file at `~/.claude/commands/component.md` creates the command `/component` with description showing "(user)".110 

111Commands in different subdirectories can share names since the subdirectory appears in the description to distinguish them. For example, `.claude/commands/frontend/test.md` and `.claude/commands/backend/test.md` both create `/test`, but show as "(project:frontend)" and "(project:backend)" respectively.

100 112 

101#### Arguments113#### Arguments

102 114 


304 316 

305#### Naming conventions317#### Naming conventions

306 318 

307* Server and prompt names are normalized319Server and prompt names are normalized:

320 

308* Spaces and special characters become underscores321* Spaces and special characters become underscores

309* Names are lowercased for consistency322* Names are lowercase for consistency

310 323 

311### Managing MCP connections324### Managing MCP connections

312 325 


320 333 

321### MCP permissions and wildcards334### MCP permissions and wildcards

322 335 

323When configuring [permissions for MCP tools](/en/iam#tool-specific-permission-rules), note that **wildcards are not supported**:336Wildcards aren't supported in [permissions for MCP tools](/en/iam#tool-specific-permission-rules).

337 

338To approve all tools from an MCP server, use the server name alone, without wildcards:

324 339 

325* ✅ **Correct**: `mcp__github` (approves ALL tools from the github server)340* `mcp__github` (approves all GitHub tools)

326* ✅ **Correct**: `mcp__github__get_issue` (approves specific tool)

327* ❌ **Incorrect**: `mcp__github__*` (wildcards not supported)

328 341 

329To approve all tools from an MCP server, use just the server name: `mcp__servername`. To approve specific tools only, list each tool individually.342To approve specific tools, list each one explicitly:

343 

344* `mcp__github__get_issue`

345* `mcp__github__list_issues`

330 346 

331## `SlashCommand` tool347## `SlashCommand` tool

332 348 


334during a conversation. This gives Claude the ability to invoke custom commands350during a conversation. This gives Claude the ability to invoke custom commands

335on your behalf when appropriate.351on your behalf when appropriate.

336 352 

337To encourage Claude to trigger `SlashCommand` tool, your instructions (prompts,353To encourage Claude to use the `SlashCommand` tool, reference the command by name, including the slash, in your prompts or `CLAUDE.md` file. For example:

338CLAUDE.md, etc.) generally need to reference the command by name with its slash.

339 

340Example:

341 354 

342```355```

343> Run /write-unit-test when you are about to start writing tests.356> Run /write-unit-test when you are about to start writing tests.

344```357```

345 358 

346This tool puts each available custom slash command's metadata into context up to the359This tool puts each available custom slash command's metadata into context up to the character budget limit. You can use `/context` to monitor token usage and follow the operations below to manage context.

347character budget limit. You can use `/context` to monitor token usage and follow

348the operations below to manage context.

349 360 

350### `SlashCommand` tool supported commands361### `SlashCommand` tool supported commands

351 362 

352`SlashCommand` tool only supports custom slash commands that:363`SlashCommand` tool only supports custom slash commands that:

353 364 

354* Are user-defined. Built-in commands like `/compact` and `/init` are *not* supported.365* Are user-defined. Built-in commands like `/compact` and `/init` are *not* supported.

355* Have the `description` frontmatter field populated. We use the `description` in the context.366* Have the `description` frontmatter field populated. The description is used in the context.

356 367 

357For Claude Code versions >= 1.0.124, you can see which custom slash commands368For Claude Code versions >= 1.0.124, you can see which custom slash commands

358`SlashCommand` tool can invoke by running `claude --debug` and triggering a query.369`SlashCommand` tool can invoke by running `claude --debug` and triggering a query.


366# Add to deny rules: SlashCommand377# Add to deny rules: SlashCommand

367```378```

368 379 

369This will also remove SlashCommand tool (and the slash command descriptions) from context.380This also removes the SlashCommand tool and command descriptions from context.

370 381 

371### Disable specific commands only382### Disable specific commands only

372 383 

373To prevent a specific slash command from becoming available, add384To prevent a specific slash command from becoming available, add

374`disable-model-invocation: true` to the slash command's frontmatter.385`disable-model-invocation: true` to the slash command's frontmatter.

375 386 

376This will also remove the command's metadata from context.387This also removes the command's metadata from context.

377 388 

378### `SlashCommand` permission rules389### `SlashCommand` permission rules

379 390 


388descriptions shown to Claude. This prevents token overflow when many commands399descriptions shown to Claude. This prevents token overflow when many commands

389are available.400are available.

390 401 

391The budget includes each custom slash command's name, args, and description.402The budget includes each custom slash command's name, arguments, and description.

392 403 

393* **Default limit**: 15,000 characters404* **Default limit**: 15,000 characters

394* **Custom limit**: Set via `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable405* **Custom limit**: Set via `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable

395 406 

396When the character budget is exceeded, Claude will see only a subset of the407When the character budget is exceeded, Claude sees only a subset of the available commands. In `/context`, a warning shows "M of N commands".

397available commands. In `/context`, a warning will show with "M of N commands".

398 408 

399## Skills vs slash commands409## Skills vs slash commands

400 410 


402 412 

403### Use slash commands for413### Use slash commands for

404 414 

405**Quick, frequently-used prompts**:415**Quick, frequently used prompts**:

406 416 

407* Simple prompt snippets you use often417* Simple prompt snippets you use often

408* Quick reminders or templates418* Quick reminders or templates

409* Frequently-used instructions that fit in one file419* Frequently used instructions that fit in one file

410 420 

411**Examples**:421**Examples**:

412 422 


497* [CLI reference](/en/cli-reference) - Command-line flags and options507* [CLI reference](/en/cli-reference) - Command-line flags and options

498* [Settings](/en/settings) - Configuration options508* [Settings](/en/settings) - Configuration options

499* [Memory management](/en/memory) - Managing Claude's memory across sessions509* [Memory management](/en/memory) - Managing Claude's memory across sessions

510 

511 

512---

513 

514> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

statusline.md +51 −1

Details

25## How it Works25## How it Works

26 26 

27* The status line is updated when the conversation messages update27* The status line is updated when the conversation messages update

28* Updates run at most every 300ms28* Updates run at most every 300 ms

29* The first line of stdout from your command becomes the status line text29* The first line of stdout from your command becomes the status line text

30* ANSI color codes are supported for styling your status line30* ANSI color codes are supported for styling your status line

31* Claude Code passes contextual information about the current session (model, directories, etc.) as JSON to your script via stdin31* Claude Code passes contextual information about the current session (model, directories, etc.) as JSON to your script via stdin


58 "total_api_duration_ms": 2300,58 "total_api_duration_ms": 2300,

59 "total_lines_added": 156,59 "total_lines_added": 156,

60 "total_lines_removed": 2360 "total_lines_removed": 23

61 },

62 "context_window": {

63 "total_input_tokens": 15234,

64 "total_output_tokens": 4521,

65 "context_window_size": 200000,

66 "current_usage": {

67 "input_tokens": 8500,

68 "output_tokens": 1200,

69 "cache_creation_input_tokens": 5000,

70 "cache_read_input_tokens": 2000

71 }

61 }72 }

62}73}

63```74```


181get_duration() { echo "$input" | jq -r '.cost.total_duration_ms'; }192get_duration() { echo "$input" | jq -r '.cost.total_duration_ms'; }

182get_lines_added() { echo "$input" | jq -r '.cost.total_lines_added'; }193get_lines_added() { echo "$input" | jq -r '.cost.total_lines_added'; }

183get_lines_removed() { echo "$input" | jq -r '.cost.total_lines_removed'; }194get_lines_removed() { echo "$input" | jq -r '.cost.total_lines_removed'; }

195get_input_tokens() { echo "$input" | jq -r '.context_window.total_input_tokens'; }

196get_output_tokens() { echo "$input" | jq -r '.context_window.total_output_tokens'; }

197get_context_window_size() { echo "$input" | jq -r '.context_window.context_window_size'; }

184 198 

185# Use the helpers199# Use the helpers

186MODEL=$(get_model_name)200MODEL=$(get_model_name)


188echo "[$MODEL] 📁 ${DIR##*/}"202echo "[$MODEL] 📁 ${DIR##*/}"

189```203```

190 204 

205### Context Window Usage

206 

207Display the percentage of context window consumed. The `context_window` object contains:

208 

209* `total_input_tokens` / `total_output_tokens`: Cumulative totals across the entire session

210* `current_usage`: Current context window usage from the last API call (may be `null` if no messages yet)

211 * `input_tokens`: Input tokens in current context

212 * `output_tokens`: Output tokens generated

213 * `cache_creation_input_tokens`: Tokens written to cache

214 * `cache_read_input_tokens`: Tokens read from cache

215 

216For accurate context percentage, use `current_usage` which reflects the actual context window state:

217 

218```bash theme={null}

219#!/bin/bash

220input=$(cat)

221 

222MODEL=$(echo "$input" | jq -r '.model.display_name')

223CONTEXT_SIZE=$(echo "$input" | jq -r '.context_window.context_window_size')

224USAGE=$(echo "$input" | jq '.context_window.current_usage')

225 

226if [ "$USAGE" != "null" ]; then

227 # Calculate current context from current_usage fields

228 CURRENT_TOKENS=$(echo "$USAGE" | jq '.input_tokens + .cache_creation_input_tokens + .cache_read_input_tokens')

229 PERCENT_USED=$((CURRENT_TOKENS * 100 / CONTEXT_SIZE))

230 echo "[$MODEL] Context: ${PERCENT_USED}%"

231else

232 echo "[$MODEL] Context: 0%"

233fi

234```

235 

191## Tips236## Tips

192 237 

193* Keep your status line concise - it should fit on one line238* Keep your status line concise - it should fit on one line


200 245 

201* If your status line doesn't appear, check that your script is executable (`chmod +x`)246* If your status line doesn't appear, check that your script is executable (`chmod +x`)

202* Ensure your script outputs to stdout (not stderr)247* Ensure your script outputs to stdout (not stderr)

248 

249 

250---

251 

252> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

sub-agents.md +102 −11

Details

27 </Card>27 </Card>

28 28 

29 <Card title="Reusability" icon="rotate">29 <Card title="Reusability" icon="rotate">

30 Once created, subagents can be used across different projects and shared with your team for consistent workflows.30 Once created, you can use subagents across different projects and share them with your team for consistent workflows.

31 </Card>31 </Card>

32 32 

33 <Card title="Flexible permissions" icon="shield-check">33 <Card title="Flexible permissions" icon="shield-check">


53 </Step>53 </Step>

54 54 

55 <Step title="Define the subagent">55 <Step title="Define the subagent">

56 * **Recommended**: Generate with Claude first, then customize to make it yours56 * **Recommended**: generate with Claude first, then customize to make it yours

57 * Describe your subagent in detail and when it should be used57 * Describe your subagent in detail, including when Claude should use it

58 * Select the tools you want to grant access to (or leave blank to inherit all tools)58 * Select the tools you want to grant access to, or leave this blank to inherit all tools

59 * The interface shows all available tools, making selection easy59 * The interface shows all available tools

60 * If you're generating with Claude, you can also edit the system prompt in your own editor by pressing `e`60 * If you're generating with Claude, you can also edit the system prompt in your own editor by pressing `e`

61 </Step>61 </Step>

62 62 

63 <Step title="Save and use">63 <Step title="Save and use">

64 Your subagent is now available! Claude will use it automatically when appropriate, or you can invoke it explicitly:64 Your subagent is now available. Claude uses it automatically when appropriate, or you can invoke it explicitly:

65 65 

66 ```66 ```

67 > Use the code-reviewer subagent to check my recent changes67 > Use the code-reviewer subagent to check my recent changes


86 86 

87[Plugins](/en/plugins) can provide custom subagents that integrate seamlessly with Claude Code. Plugin agents work identically to user-defined agents and appear in the `/agents` interface.87[Plugins](/en/plugins) can provide custom subagents that integrate seamlessly with Claude Code. Plugin agents work identically to user-defined agents and appear in the `/agents` interface.

88 88 

89**Plugin agent locations**: Plugins include agents in their `agents/` directory (or custom paths specified in the plugin manifest).89**Plugin agent locations**: plugins include agents in their `agents/` directory (or custom paths specified in the plugin manifest).

90 90 

91**Using plugin agents**:91**Using plugin agents**:

92 92 


133description: Description of when this subagent should be invoked133description: Description of when this subagent should be invoked

134tools: tool1, tool2, tool3 # Optional - inherits all tools if omitted134tools: tool1, tool2, tool3 # Optional - inherits all tools if omitted

135model: sonnet # Optional - specify model alias or 'inherit'135model: sonnet # Optional - specify model alias or 'inherit'

136permissionMode: default # Optional - permission mode for the subagent

137skills: skill1, skill2 # Optional - skills to auto-load

136---138---

137 139 

138Your subagent's system prompt goes here. This can be multiple paragraphs140Your subagent's system prompt goes here. This can be multiple paragraphs


146#### Configuration fields148#### Configuration fields

147 149 

148| Field | Required | Description |150| Field | Required | Description |

149| :------------ | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |151| :--------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

150| `name` | Yes | Unique identifier using lowercase letters and hyphens |152| `name` | Yes | Unique identifier using lowercase letters and hyphens |

151| `description` | Yes | Natural language description of the subagent's purpose |153| `description` | Yes | Natural language description of the subagent's purpose |

152| `tools` | No | Comma-separated list of specific tools. If omitted, inherits all tools from the main thread |154| `tools` | No | Comma-separated list of specific tools. If omitted, inherits all tools from the main thread |

153| `model` | No | Model to use for this subagent. Can be a model alias (`sonnet`, `opus`, `haiku`) or `'inherit'` to use the main conversation's model. If omitted, defaults to the [configured subagent model](/en/model-config) |155| `model` | No | Model to use for this subagent. Can be a model alias (`sonnet`, `opus`, `haiku`) or `'inherit'` to use the main conversation's model. If omitted, defaults to the [configured subagent model](/en/model-config) |

156| `permissionMode` | No | Permission mode for the subagent. Valid values: `default`, `acceptEdits`, `bypassPermissions`, `plan`, `ignore`. Controls how the subagent handles permission requests |

157| `skills` | No | Comma-separated list of skill names to auto-load when the subagent starts. Skills are loaded into the subagent's context automatically |

154 158 

155### Model selection159### Model selection

156 160 


196* Edit existing custom subagents, including their tool access200* Edit existing custom subagents, including their tool access

197* Delete custom subagents201* Delete custom subagents

198* See which subagents are active when duplicates exist202* See which subagents are active when duplicates exist

199* **Easily manage tool permissions** with a complete list of available tools203* **Manage tool permissions** with a complete list of available tools

200 204 

201### Direct file management205### Direct file management

202 206 


217# ... create subagent file221# ... create subagent file

218```222```

219 223 

224<Note>

225 Subagents created by manually adding files will be loaded the next time you start a Claude Code session. To create and use a subagent immediately without restarting, use the `/agents` command instead.

226</Note>

227 

220## Using subagents effectively228## Using subagents effectively

221 229 

222### Automatic delegation230### Automatic delegation


245 253 

246Claude Code includes built-in subagents that are available out of the box:254Claude Code includes built-in subagents that are available out of the box:

247 255 

256### General-purpose subagent

257 

258The general-purpose subagent is a capable agent for complex, multi-step tasks that require both exploration and action. Unlike the Explore subagent, it can modify files and execute a wider range of operations.

259 

260**Key characteristics:**

261 

262* **Model**: Uses Sonnet for more capable reasoning

263* **Tools**: Has access to all tools

264* **Mode**: Can read and write files, execute commands, make changes

265* **Purpose**: Complex research tasks, multi-step operations, code modifications

266 

267**When Claude uses it:**

268 

269Claude delegates to the general-purpose subagent when:

270 

271* The task requires both exploration and modification

272* Complex reasoning is needed to interpret search results

273* Multiple strategies may be needed if initial searches fail

274* The task has multiple steps that depend on each other

275 

276**Example scenario:**

277 

278```

279User: Find all the places where we handle authentication and update them to use the new token format

280 

281Claude: [Invokes general-purpose subagent]

282[Agent searches for auth-related code across codebase]

283[Agent reads and analyzes multiple files]

284[Agent makes necessary edits]

285[Returns detailed writeup of changes made]

286```

287 

248### Plan subagent288### Plan subagent

249 289 

250The Plan subagent is a specialized built-in agent designed for use during plan mode. When Claude is operating in plan mode (non-execution mode), it uses the Plan subagent to conduct research and gather information about your codebase before presenting a plan.290The Plan subagent is a specialized built-in agent designed for use during plan mode. When Claude is operating in plan mode (non-execution mode), it uses the Plan subagent to conduct research and gather information about your codebase before presenting a plan.


274 The Plan subagent is only used in plan mode. In normal execution mode, Claude uses the general-purpose agent or other custom subagents you've created.314 The Plan subagent is only used in plan mode. In normal execution mode, Claude uses the general-purpose agent or other custom subagents you've created.

275</Tip>315</Tip>

276 316 

317### Explore subagent

318 

319The Explore subagent is a fast, lightweight agent optimized for searching and analyzing codebases. It operates in strict read-only mode and is designed for rapid file discovery and code exploration.

320 

321**Key characteristics:**

322 

323* **Model**: Uses Haiku for fast, low-latency searches

324* **Mode**: Strictly read-only - cannot create, modify, or delete files

325* **Tools available**:

326 * Glob - File pattern matching

327 * Grep - Content searching with regular expressions

328 * Read - Reading file contents

329 * Bash - Read-only commands only (ls, git status, git log, git diff, find, cat, head, tail)

330 

331**When Claude uses it:**

332 

333Claude will delegate to the Explore subagent when it needs to search or understand a codebase but doesn't need to make changes. This is more efficient than the main agent running multiple search commands directly, as content found during the exploration process doesn't bloat the main conversation.

334 

335**Thoroughness levels:**

336 

337When invoking the Explore subagent, Claude specifies a thoroughness level:

338 

339* **Quick** - Fast searches with minimal exploration. Good for targeted lookups.

340* **Medium** - Moderate exploration. Balances speed and thoroughness.

341* **Very thorough** - Comprehensive analysis across multiple locations and naming conventions. Used when the target might be in unexpected places.

342 

343**Example scenarios:**

344 

345```

346User: Where are errors from the client handled?

347 

348Claude: [Invokes Explore subagent with "medium" thoroughness]

349[Explore uses Grep to search for error handling patterns]

350[Explore uses Read to examine promising files]

351[Returns findings with absolute file paths]

352Claude: Client errors are handled in src/services/process.ts:712...

353```

354 

355```

356User: What's the codebase structure?

357 

358Claude: [Invokes Explore subagent with "quick" thoroughness]

359[Explore uses Glob and ls to map directory structure]

360[Returns overview of key directories and their purposes]

361```

362 

277## Example subagents363## Example subagents

278 364 

279### Code reviewer365### Code reviewer


2943. Begin review immediately3803. Begin review immediately

295 381 

296Review checklist:382Review checklist:

297- Code is simple and readable383- Code is clear and readable

298- Functions and variables are well-named384- Functions and variables are well-named

299- No duplicated code385- No duplicated code

300- Proper error handling386- Proper error handling


343- Testing approach429- Testing approach

344- Prevention recommendations430- Prevention recommendations

345 431 

346Focus on fixing the underlying issue, not just symptoms.432Focus on fixing the underlying issue, not the symptoms.

347```433```

348 434 

349### Data scientist435### Data scientist


477* [Slash commands](/en/slash-commands) - Learn about other built-in commands563* [Slash commands](/en/slash-commands) - Learn about other built-in commands

478* [Settings](/en/settings) - Configure Claude Code behavior564* [Settings](/en/settings) - Configure Claude Code behavior

479* [Hooks](/en/hooks) - Automate workflows with event handlers565* [Hooks](/en/hooks) - Automate workflows with event handlers

566 

567 

568---

569 

570> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

10 10 

11### Line breaks11### Line breaks

12 12 

13You have several options for entering linebreaks into Claude Code:13You have several options for entering line breaks into Claude Code:

14 14 

15* **Quick escape**: Type `\` followed by Enter to create a newline15* **Quick escape**: Type `\` followed by Enter to create a newline

16* **Keyboard shortcut**: Set up a keybinding to insert a newline16* **Keyboard shortcut**: Set up a keybinding to insert a newline


67* Mode switching: `Esc` (to NORMAL), `i`/`I`, `a`/`A`, `o`/`O` (to INSERT)67* Mode switching: `Esc` (to NORMAL), `i`/`I`, `a`/`A`, `o`/`O` (to INSERT)

68* Navigation: `h`/`j`/`k`/`l`, `w`/`e`/`b`, `0`/`$`/`^`, `gg`/`G`68* Navigation: `h`/`j`/`k`/`l`, `w`/`e`/`b`, `0`/`$`/`^`, `gg`/`G`

69* Editing: `x`, `dw`/`de`/`db`/`dd`/`D`, `cw`/`ce`/`cb`/`cc`/`C`, `.` (repeat)69* Editing: `x`, `dw`/`de`/`db`/`dd`/`D`, `cw`/`ce`/`cb`/`cc`/`C`, `.` (repeat)

70 

71 

72---

73 

74> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

Details

13 <th>Anthropic</th>13 <th>Anthropic</th>

14 <th>Amazon Bedrock</th>14 <th>Amazon Bedrock</th>

15 <th>Google Vertex AI</th>15 <th>Google Vertex AI</th>

16 <th>Microsoft Foundry</th>

16 </tr>17 </tr>

17 </thead>18 </thead>

18 19 


22 <td>Supported [countries](https://www.anthropic.com/supported-countries)</td>23 <td>Supported [countries](https://www.anthropic.com/supported-countries)</td>

23 <td>Multiple AWS [regions](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html)</td>24 <td>Multiple AWS [regions](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html)</td>

24 <td>Multiple GCP [regions](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations)</td>25 <td>Multiple GCP [regions](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations)</td>

26 <td>Multiple Azure [regions](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/)</td>

25 </tr>27 </tr>

26 28 

27 <tr>29 <tr>


29 <td>Enabled by default</td>31 <td>Enabled by default</td>

30 <td>Enabled by default</td>32 <td>Enabled by default</td>

31 <td>Enabled by default</td>33 <td>Enabled by default</td>

34 <td>Enabled by default</td>

32 </tr>35 </tr>

33 36 

34 <tr>37 <tr>

35 <td>Authentication</td>38 <td>Authentication</td>

36 <td>API key</td>39 <td>API key</td>

37 <td>AWS credentials (IAM)</td>40 <td>API key or AWS credentials</td>

38 <td>GCP credentials (OAuth/Service Account)</td>41 <td>GCP credentials</td>

42 <td>API key or Microsoft Entra ID</td>

39 </tr>43 </tr>

40 44 

41 <tr>45 <tr>


43 <td>Dashboard</td>47 <td>Dashboard</td>

44 <td>AWS Cost Explorer</td>48 <td>AWS Cost Explorer</td>

45 <td>GCP Billing</td>49 <td>GCP Billing</td>

50 <td>Azure Cost Management</td>

46 </tr>51 </tr>

47 52 

48 <tr>53 <tr>


50 <td>Teams, usage monitoring</td>55 <td>Teams, usage monitoring</td>

51 <td>IAM policies, CloudTrail</td>56 <td>IAM policies, CloudTrail</td>

52 <td>IAM roles, Cloud Audit Logs</td>57 <td>IAM roles, Cloud Audit Logs</td>

58 <td>RBAC policies, Azure Monitor</td>

53 </tr>59 </tr>

54 </tbody>60 </tbody>

55</table>61</table>

56 62 

57## Cloud providers63## Cloud providers

58 64 

59<CardGroup cols={2}>65<CardGroup cols={3}>

60 <Card title="Amazon Bedrock" icon="aws" href="/en/amazon-bedrock">66 <Card title="Amazon Bedrock" icon="aws" href="/en/amazon-bedrock">

61 Use Claude models through AWS infrastructure with IAM-based authentication and AWS-native monitoring67 Use Claude models through AWS infrastructure with API key or IAM-based authentication and AWS-native monitoring

62 </Card>68 </Card>

63 69 

64 <Card title="Google Vertex AI" icon="google" href="/en/google-vertex-ai">70 <Card title="Google Vertex AI" icon="google" href="/en/google-vertex-ai">

65 Access Claude models via Google Cloud Platform with enterprise-grade security and compliance71 Access Claude models via Google Cloud Platform with enterprise-grade security and compliance

66 </Card>72 </Card>

73 

74 <Card title="Microsoft Foundry" icon="microsoft" href="/en/microsoft-foundry">

75 Access Claude through Azure with API key or Microsoft Entra ID authentication and Azure billing

76 </Card>

67</CardGroup>77</CardGroup>

68 78 

69## Corporate infrastructure79## Corporate infrastructure


117export CLAUDE_CODE_SKIP_BEDROCK_AUTH=1 # If gateway handles AWS auth127export CLAUDE_CODE_SKIP_BEDROCK_AUTH=1 # If gateway handles AWS auth

118```128```

119 129 

130### Using Foundry with corporate proxy

131 

132Route Azure traffic through a corporate HTTP/HTTPS proxy:

133 

134```bash theme={null}

135# Enable Microsoft Foundry

136export CLAUDE_CODE_USE_FOUNDRY=1

137export ANTHROPIC_FOUNDRY_RESOURCE=your-resource

138export ANTHROPIC_FOUNDRY_API_KEY=your-api-key # Or omit for Entra ID auth

139 

140# Configure corporate proxy

141export HTTPS_PROXY='https://proxy.example.com:8080'

142```

143 

144### Using Foundry with LLM Gateway

145 

146Use a gateway service that provides Azure-compatible endpoints:

147 

148```bash theme={null}

149# Enable Microsoft Foundry

150export CLAUDE_CODE_USE_FOUNDRY=1

151 

152# Configure LLM gateway

153export ANTHROPIC_FOUNDRY_BASE_URL='https://your-llm-gateway.com'

154export CLAUDE_CODE_SKIP_FOUNDRY_AUTH=1 # If gateway handles Azure auth

155```

156 

120### Using Vertex AI with corporate proxy157### Using Vertex AI with corporate proxy

121 158 

122Route Vertex AI traffic through a corporate HTTP/HTTPS proxy:159Route Vertex AI traffic through a corporate HTTP/HTTPS proxy:


211 248 

212MCP is a great way to give Claude Code more information, such as connecting to ticket management systems or error logs. We recommend that one central team configures MCP servers and checks a `.mcp.json` configuration into the codebase so that all users benefit. [Learn more](/en/mcp).249MCP is a great way to give Claude Code more information, such as connecting to ticket management systems or error logs. We recommend that one central team configures MCP servers and checks a `.mcp.json` configuration into the codebase so that all users benefit. [Learn more](/en/mcp).

213 250 

214At Anthropic, we trust Claude Code to power development across every Anthropic codebase. We hope you enjoy using Claude Code as much as we do!251At Anthropic, we trust Claude Code to power development across every Anthropic codebase. We hope you enjoy using Claude Code as much as we do.

215 252 

216## Next steps253## Next steps

217 254 

218* [Set up Amazon Bedrock](/en/amazon-bedrock) for AWS-native deployment255* [Set up Amazon Bedrock](/en/amazon-bedrock) for AWS-native deployment

219* [Configure Google Vertex AI](/en/google-vertex-ai) for GCP deployment256* [Configure Google Vertex AI](/en/google-vertex-ai) for GCP deployment

257* [Set up Microsoft Foundry](/en/microsoft-foundry) for Azure deployment

220* [Configure Enterprise Network](/en/network-config) for network requirements258* [Configure Enterprise Network](/en/network-config) for network requirements

221* [Deploy LLM Gateway](/en/llm-gateway) for enterprise management259* [Deploy LLM Gateway](/en/llm-gateway) for enterprise management

222* [Settings](/en/settings) for configuration options and environment variables260* [Settings](/en/settings) for configuration options and environment variables

261 

262 

263---

264 

265> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

troubleshooting.md +62 −37

Details

50```50```

51 51 

52<Warning>52<Warning>

53 Avoid disabling Windows PATH importing (`appendWindowsPath = false`) as this breaks the ability to easily call Windows executables from WSL. Similarly, avoid uninstalling Node.js from Windows if you use it for Windows development.53 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.

54</Warning>54</Warning>

55 55 

56### Linux and Mac installation issues: permission or command not found errors56### Linux and Mac installation issues: permission or command not found errors

57 57 

58When installing Claude Code with npm, `PATH` problems may prevent access to `claude`.58When installing Claude Code with npm, `PATH` problems may prevent access to `claude`.

59You may also encounter permission errors if your npm global prefix is not user writable (eg. `/usr`, or `/usr/local`).59You may also encounter permission errors if your npm global prefix is not user writable (for example, `/usr`, or `/usr/local`).

60 60 

61#### Recommended solution: Native Claude Code installation61#### Recommended solution: Native Claude Code installation

62 62 

63Claude Code has a native installation that doesn't depend on npm or Node.js.63Claude Code has a native installation that doesn't depend on npm or Node.js.

64 64 

65<Note>

66 The native Claude Code installer is currently in beta.

67</Note>

68 

69Use the following command to run the native installer.65Use the following command to run the native installer.

70 66 

71**macOS, Linux, WSL:**67**macOS, Linux, WSL:**


101 Make sure that you have the installation directory in your system PATH.97 Make sure that you have the installation directory in your system PATH.

102</Tip>98</Tip>

103 99 

104#### Alternative solution: Migrate to local installation

105 

106Alternatively, if Claude Code will run, you can migrate to a local installation:

107 

108```bash theme={null}

109claude migrate-installer

110```

111 

112This moves Claude Code to `~/.claude/local/` and sets up an alias in your shell configuration. No `sudo` is required for future updates.

113 

114After migration, restart your shell, and then verify your installation:

115 

116On macOS/Linux/WSL:

117 

118```bash theme={null}

119which claude # Should show an alias to ~/.claude/local/claude

120```

121 

122On Windows:

123 

124```powershell theme={null}

125where claude # Should show path to claude executable

126```

127 

128Verify installation:100Verify installation:

129 101 

130```bash theme={null}102```bash theme={null}


155 127 

156This removes your stored authentication information and forces a clean login.128This removes your stored authentication information and forces a clean login.

157 129 

130## Configuration file locations

131 

132Claude Code stores configuration in several locations:

133 

134| File | Purpose |

135| :---------------------------- | :--------------------------------------------------------------------- |

136| `~/.claude/settings.json` | User settings (permissions, hooks, model overrides) |

137| `.claude/settings.json` | Project settings (checked into source control) |

138| `.claude/settings.local.json` | Local project settings (not committed) |

139| `~/.claude.json` | Global state (theme, OAuth, MCP servers, allowed tools) |

140| `.mcp.json` | Project MCP servers (checked into source control) |

141| `managed-settings.json` | [Enterprise managed settings](/en/settings#settings-files) |

142| `managed-mcp.json` | [Enterprise managed MCP servers](/en/mcp#enterprise-mcp-configuration) |

143 

144On Windows, `~` refers to your user home directory, such as `C:\Users\YourName`.

145 

146**Enterprise managed file locations:**

147 

148* macOS: `/Library/Application Support/ClaudeCode/`

149* Linux/WSL: `/etc/claude-code/`

150* Windows: `C:\ProgramData\ClaudeCode\`

151 

152For details on configuring these files, see [Settings](/en/settings) and [MCP](/en/mcp).

153 

154### Resetting configuration

155 

156To reset Claude Code to default settings, you can remove the configuration files:

157 

158```bash theme={null}

159# Reset all user settings and state

160rm ~/.claude.json

161rm -rf ~/.claude/

162 

163# Reset project-specific settings

164rm -rf .claude/

165rm .mcp.json

166```

167 

168<Warning>

169 This will remove all your settings, allowed tools, MCP server configurations, and session history.

170</Warning>

171 

158## Performance and stability172## Performance and stability

159 173 

160### High CPU or memory usage174### High CPU or memory usage


252 These networking issues only affect WSL2. WSL1 uses the host's network directly and doesn't require these configurations.266 These networking issues only affect WSL2. WSL1 uses the host's network directly and doesn't require these configurations.

253</Note>267</Note>

254 268 

255For additional JetBrains configuration tips, see our [IDE integration guide](/en/vs-code#jetbrains-plugin-settings).269For additional JetBrains configuration tips, see our [JetBrains IDE guide](/en/jetbrains#plugin-settings).

256 270 

257### Reporting Windows IDE integration issues (both native and WSL)271### Reporting Windows IDE integration issues (both native and WSL)

258 272 

259If you're experiencing IDE integration problems on Windows, please [create an issue](https://github.com/anthropics/claude-code/issues) with the following information: whether you are native (git bash), or WSL1/WSL2, WSL networking mode (NAT or mirrored), IDE name/version, Claude Code extension/plugin version, and shell type (bash/zsh/etc)273If you're experiencing IDE integration problems on Windows, [create an issue](https://github.com/anthropics/claude-code/issues) with the following information:

260 274 

261### ESC key not working in JetBrains (IntelliJ, PyCharm, etc.) terminals275* Environment type: native Windows (Git Bash) or WSL1/WSL2

276* WSL networking mode (if applicable): NAT or mirrored

277* IDE name and version

278* Claude Code extension/plugin version

279* Shell type: Bash, Zsh, PowerShell, etc.

262 280 

263If 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.281### Escape key not working in JetBrains (IntelliJ, PyCharm, etc.) terminals

282 

283If 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.

264 284 

265To fix this issue:285To fix this issue:

266 286 


270 * Click "Configure terminal keybindings" and delete the "Switch focus to Editor" shortcut290 * Click "Configure terminal keybindings" and delete the "Switch focus to Editor" shortcut

2713. Apply the changes2913. Apply the changes

272 292 

273This allows the ESC key to properly interrupt Claude Code operations.293This allows the `Esc` key to properly interrupt Claude Code operations.

274 294 

275## Markdown formatting issues295## Markdown formatting issues

276 296 


300 320 

301**Solutions:**321**Solutions:**

302 322 

3031. **Ask Claude to add language tags**: Simply request "Please add appropriate language tags to all code blocks in this markdown file."3231. **Ask Claude to add language tags**: Request "Add appropriate language tags to all code blocks in this markdown file."

304 324 

3052. **Use post-processing hooks**: Set up automatic formatting hooks to detect and add missing language tags. See the [markdown formatting hook example](/en/hooks-guide#markdown-formatting-hook) for implementation details.3252. **Use post-processing hooks**: Set up automatic formatting hooks to detect and add missing language tags. See the [markdown formatting hook example](/en/hooks-guide#markdown-formatting-hook) for implementation details.

306 326 


323To minimize formatting issues:343To minimize formatting issues:

324 344 

325* **Be explicit in requests**: Ask for "properly formatted markdown with language-tagged code blocks"345* **Be explicit in requests**: Ask for "properly formatted markdown with language-tagged code blocks"

326* **Use project conventions**: Document your preferred markdown style in [CLAUDE.md](/en/memory)346* **Use project conventions**: Document your preferred markdown style in [`CLAUDE.md`](/en/memory)

327* **Set up validation hooks**: Use post-processing hooks to automatically verify and fix common formatting issues347* **Set up validation hooks**: Use post-processing hooks to automatically verify and fix common formatting issues

328 348 

329## Getting more help349## Getting more help


3342. Check the [GitHub repository](https://github.com/anthropics/claude-code) for known issues3542. Check the [GitHub repository](https://github.com/anthropics/claude-code) for known issues

3353. Run `/doctor` to check the health of your Claude Code installation3553. Run `/doctor` to check the health of your Claude Code installation

3364. Ask Claude directly about its capabilities and features - Claude has built-in access to its documentation3564. Ask Claude directly about its capabilities and features - Claude has built-in access to its documentation

357 

358 

359---

360 

361> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt

vs-code.md +198 −81

Details

1# Visual Studio Code1# Use Claude Code in VS Code

2 2 

3> Use Claude Code with Visual Studio Code through our native extension or CLI integration3> Install and configure the Claude Code extension for VS Code. Get AI coding assistance with inline diffs, @-mentions, plan review, and keyboard shortcuts.

4 4 

5<img src="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=300652d5678c63905e6b0ea9e50835f8" alt="Claude Code VS Code Extension Interface" data-og-width="2500" width="2500" data-og-height="1155" height="1155" data-path="images/vs-code-extension-interface.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=280&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=87630c671517a3d52e9aee627041696e 280w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=560&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=716b093879204beec8d952649ef75292 560w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=840&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=c1525d1a01513acd9d83d8b5a8fe2fc8 840w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=1100&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=1d90021d58bbb51f871efec13af955c3 1100w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=1650&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=7babdd25440099886f193cfa99af88ae 1650w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=2500&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=08c92eedfb56fe61a61e480fb63784b6 2500w" />5<img src="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=300652d5678c63905e6b0ea9e50835f8" alt="VS Code editor with the Claude Code extension panel open on the right side, showing a conversation with Claude" data-og-width="2500" width="2500" data-og-height="1155" height="1155" data-path="images/vs-code-extension-interface.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=280&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=87630c671517a3d52e9aee627041696e 280w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=560&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=716b093879204beec8d952649ef75292 560w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=840&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=c1525d1a01513acd9d83d8b5a8fe2fc8 840w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=1100&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=1d90021d58bbb51f871efec13af955c3 1100w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=1650&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=7babdd25440099886f193cfa99af88ae 1650w, https://mintcdn.com/claude-code/-YhHHmtSxwr7W8gy/images/vs-code-extension-interface.jpg?w=2500&fit=max&auto=format&n=-YhHHmtSxwr7W8gy&q=85&s=08c92eedfb56fe61a61e480fb63784b6 2500w" />

6 6 

7## VS Code Extension (Beta)7The VS Code extension provides a native graphical interface for Claude Code, integrated directly into your IDE. This is the recommended way to use Claude Code in VS Code.

8 8 

9The VS Code extension, available in beta, lets you see Claude's changes in real-time through a native graphical interface integrated directly into your IDE. The VS Code extension makes it easier to access and interact with Claude Code for users who prefer a visual interface over the terminal.9With the extension, you can review and edit Claude's plans before accepting them, auto-accept edits as they're made, @-mention files with specific line ranges from your selection, access conversation history, and open multiple conversations in separate tabs or windows.

10 10 

11### Features11## Prerequisites

12 12 

13The VS Code extension provides:13* VS Code 1.98.0 or higher

14* 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.

14 15 

15* **Native IDE experience**: Dedicated Claude Code sidebar panel accessed via the Spark icon16You don't need to install the Claude Code CLI first. However, some features like MCP server configuration require the CLI. See [VS Code extension vs. Claude Code CLI](#vs-code-extension-vs-claude-code-cli) for details.

16* **Plan mode with editing**: Review and edit Claude's plans before accepting them

17* **Auto-accept edits mode**: Automatically apply Claude's changes as they're made

18* **Extended thinking**: Toggle extended thinking on/off using the Extended Thinking button in the bottom-right corner of the prompt input

19* **File management**: @-mention files or attach files and images using the system file picker

20* **MCP server usage**: Use Model Context Protocol servers configured through the CLI

21* **Conversation history**: Easy access to past conversations

22* **Multiple sessions**: Run multiple Claude Code sessions simultaneously

23* **Keyboard shortcuts**: Support for most shortcuts from the CLI

24* **Slash commands**: Access most CLI slash commands directly in the extension

25 17 

26### Requirements18## Install the extension

27 19 

28* VS Code 1.98.0 or higher20Click the link for your IDE to install directly:

21 

22* [Install for VS Code](vscode:extension/anthropic.claude-code)

23* [Install for Cursor](cursor:extension/anthropic.claude-code)

29 24 

30### Installation25Or in VS Code, press `Cmd+Shift+X` (Mac) or `Ctrl+Shift+X` (Windows/Linux) to open the Extensions view, search for "Claude Code", and click **Install**.

31 26 

32Download and install the extension from the [Visual Studio Code Extension Marketplace](https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code).27<Note>You may need to restart VS Code or run "Developer: Reload Window" from the Command Palette after installation.</Note>

33 28 

34### How It Works29## Get started

35 30 

36Once installed, you can start using Claude Code through the VS Code interface:31Once installed, you can start using Claude Code through the VS Code interface:

37 32 

381. Click the Spark icon in your editor's sidebar to open the Claude Code panel33<Steps>

392. Prompt Claude Code in the same way you would in the terminal34 <Step title="Open the Claude Code panel">

403. Watch as Claude analyzes your code and suggests changes35 Throughout VS Code, the Spark icon indicates Claude Code: <img src="https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=a734d84e785140016672f08e0abb236c" alt="Spark icon" style={{display: "inline", height: "0.85em", verticalAlign: "middle"}} data-og-width="16" width="16" data-og-height="16" height="16" data-path="images/vs-code-spark-icon.svg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=280&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=9a45aad9a84b9fa1701ac99a1f9aa4e9 280w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=560&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=3f4cb9254c4d4e93989c4b6bf9292f4b 560w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=840&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=e75ccc9faa3e572db8f291ceb65bb264 840w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=1100&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=f147bd81a381a62539a4ce361fac41c7 1100w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=1650&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=78fe68efaee5d6e844bbacab1b442ed5 1650w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-spark-icon.svg?w=2500&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=efb8dbe1dfa722d094edc6ad2ad4bedb 2500w" />

414. Review and accept edits directly in the interface36 

42 * **Tip**: Drag the sidebar wider to see inline diffs, then click on them to expand for full details37 The quickest way to open Claude is to click this icon in the **Editor Toolbar** (top-right corner of the editor). Note: This icon only appears when you have a file open—opening just a folder isn't enough.

38 

39 <img src="https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=eb4540325d94664c51776dbbfec4cf02" alt="VS Code editor showing the Spark icon in the Editor Toolbar" data-og-width="2796" width="2796" data-og-height="734" height="734" data-path="images/vs-code-editor-icon.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=280&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=56f218d5464359d6480cfe23f70a923e 280w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=560&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=344a8db024b196c795a80dc85cacb8d1 560w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=840&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=f30bf834ee0625b2a4a635d552d87163 840w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=1100&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=81fdf984840e43a9f08ae42729d1484d 1100w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=1650&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=8b60fb32de54717093d512afaa99785c 1650w, https://mintcdn.com/claude-code/mfM-EyoZGnQv8JTc/images/vs-code-editor-icon.png?w=2500&fit=max&auto=format&n=mfM-EyoZGnQv8JTc&q=85&s=893e6bda8f2e9d42c8a294d394f0b736 2500w" />

40 

41 Other ways to open Claude Code:

42 

43 * **Command Palette**: `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type "Claude Code", and select an option like "Open in New Tab"

44 * **Activity Bar**: Run "Claude Code: Open in Side Bar" from the Command Palette once, and a Spark icon will appear in the left sidebar. This is useful if you want quick access without having a file open.

45 

46 You can drag the Claude panel to reposition it anywhere in VS Code, including to the Activity Bar if the Spark icon isn't showing there. See [Customize your workflow](#customize-your-workflow) for details.

47 </Step>

48 

49 <Step title="Send a prompt">

50 Prompt Claude Code in the same way you would in the terminal.

51 </Step>

52 

53 <Step title="Review changes">

54 Watch as Claude analyzes your code and suggests changes. Review and accept edits directly in the interface.

55 </Step>

56</Steps>

57 

58## Customize your workflow

59 

60Once you're up and running, you can reposition the Claude panel or switch to terminal mode.

61 

62### Change the layout

63 

64You can drag the Claude panel to reposition it anywhere in VS Code. Grab the panel's tab or title bar and drag it to:

65 

66* **Activity Bar**: The left sidebar with icons for Explorer, Search, etc.

67* **Secondary sidebar**: The right side of the window

68* **Editor area**: Opens Claude as a tab alongside your files

69 

70This lets you position Claude wherever works best for your workflow.

71 

72### Switch to terminal mode

73 

74By default, the extension opens a graphical chat panel. If you prefer the CLI-style interface, open the [Use Terminal setting](vscode://settings/claudeCode.useTerminal) and check the box.

75 

76You can also open VS Code settings (`Cmd+,` on Mac or `Ctrl+,` on Windows/Linux), go to Extensions → Claude Code, and check **Use Terminal**.

77 

78<Note>

79 In terminal mode, the Activity Bar icon (left vertical menu) still opens the graphical panel, while the Editor Toolbar icon (top-right of editor) opens terminal mode. You can use both entry points to switch between interfaces without changing settings.

80</Note>

81 

82## VS Code commands and shortcuts

83 

84Open the Command Palette (`Cmd+Shift+P` on Mac or `Ctrl+Shift+P` on Windows/Linux) and type "Claude Code" to see all available VS Code commands for the Claude Code extension:

85 

86<Note>

87 These are VS Code commands for controlling the extension. For Claude Code slash commands (like `/help` or `/compact`), not all CLI commands are available in the extension yet. See [VS Code extension vs. Claude Code CLI](#vs-code-extension-vs-claude-code-cli) for details.

88</Note>

43 89 

44### Using Third-Party Providers (Vertex and Bedrock)90| Command | Shortcut | Description |

91| -------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------------- |

92| Focus Input | `Cmd+Esc` (Mac) / `Ctrl+Esc` (Windows/Linux) | Toggle focus between editor and Claude |

93| Open in Side Bar | — | Open Claude in the left sidebar |

94| Open in Terminal | — | Open Claude in terminal mode |

95| Open in New Tab | `Cmd+Shift+Esc` (Mac) / `Ctrl+Shift+Esc` (Windows/Linux) | Open a new conversation as an editor tab |

96| Open in New Window | — | Open a new conversation in a separate window |

97| New Conversation | `Cmd+N` (Mac) / `Ctrl+N` (Windows/Linux) | Start a new conversation (when Claude is focused) |

98| Insert @-Mention Reference | `Alt+K` | Insert a reference to the current file (includes line numbers if text is selected) |

99| Show Logs | — | View extension debug logs |

100| Logout | — | Sign out of your Anthropic account |

45 101 

46The VS Code extension supports using Claude Code with third-party providers like Amazon Bedrock and Google Vertex AI. When configured with these providers, the extension will not prompt for login. To use third-party providers, configure environment variables in the VS Code extension settings:102Use **Open in New Tab** or **Open in New Window** to run multiple conversations simultaneously. Each tab or window maintains its own conversation history and context.

47 103 

481. Open VS Code settings104## Configure settings

492. Search for "Claude Code: Environment Variables"

503. Add the required environment variables

51 105 

52#### Environment Variables106The extension has two types of settings:

53 107 

54| Variable | Description | Required | Example |108* **Extension settings**: Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code.

55| :---------------------------- | :------------------------------------- | :--------------------- | :----------------------------------------------- |

56| `CLAUDE_CODE_USE_BEDROCK` | Enable Amazon Bedrock integration | Required for Bedrock | `"1"` or `"true"` |

57| `CLAUDE_CODE_USE_VERTEX` | Enable Google Vertex AI integration | Required for Vertex AI | `"1"` or `"true"` |

58| `ANTHROPIC_API_KEY` | API key for third-party access | Required | `"your-api-key"` |

59| `AWS_REGION` | AWS region for Bedrock | | `"us-east-2"` |

60| `AWS_PROFILE` | AWS profile for Bedrock authentication | | `"your-profile"` |

61| `CLOUD_ML_REGION` | Region for Vertex AI | | `"global"` or `"us-east5"` |

62| `ANTHROPIC_VERTEX_PROJECT_ID` | GCP project ID for Vertex AI | | `"your-project-id"` |

63| `ANTHROPIC_MODEL` | Override primary model | Override model ID | `"us.anthropic.claude-sonnet-4-5-20250929-v1:0"` |

64| `ANTHROPIC_SMALL_FAST_MODEL` | Override small/fast model | Optional | `"us.anthropic.claude-3-5-haiku-20241022-v1:0"` |

65| `CLAUDE_CODE_SKIP_AUTH_LOGIN` | Disable all prompts to login | Optional | `"1"` or `"true"` |

66 109 

67For detailed setup instructions and additional configuration options, see:110 | Setting | Description |

111 | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

112 | Selected Model | Default model for new conversations. Change per-session with `/model`. |

113 | Use Terminal | Launch Claude in terminal mode instead of graphical panel |

114 | Initial Permission Mode | Controls approval prompts for file edits and commands. Defaults to `default` (ask before each action). |

115 | Preferred Location | Default location: sidebar (right) or panel (new tab) |

116 | Autosave | Auto-save files before Claude reads or writes them |

117 | Use Ctrl+Enter to Send | Use Ctrl/Cmd+Enter instead of Enter to send prompts |

118 | Enable New Conversation Shortcut | Enable Cmd/Ctrl+N to start a new conversation |

119 | Respect Git Ignore | Exclude .gitignore patterns from file searches |

120 | Environment Variables | Set environment variables for the Claude process. **Not recommended**—use [Claude Code settings](/en/settings) instead so configuration is shared between extension and CLI. |

121 | Disable Login Prompt | Skip authentication prompts (for third-party provider setups) |

122 | Allow Dangerously Skip Permissions | Bypass all permission prompts. **Use with extreme caution**—recommended only for isolated sandboxes with no internet access. |

123 | Claude Process Wrapper | Executable path used to launch the Claude process |

68 124 

69* [Claude Code on Amazon Bedrock](/en/amazon-bedrock)125* **Claude Code settings** (`~/.claude/settings.json`): These settings are shared between the VS Code extension and the CLI. Use this file for allowed commands and directories, environment variables, hooks, and MCP servers. See the [settings documentation](/en/settings) for details.

70* [Claude Code on Google Vertex AI](/en/google-vertex-ai)

71 126 

72### Not Yet Implemented127## Use third-party providers

73 128 

74The following features are not yet available in the VS Code extension:129By default, Claude Code connects directly to Anthropic's API. If your organization uses Amazon Bedrock, Google Vertex AI, or Microsoft Foundry to access Claude, configure the extension to use your provider instead:

75 130 

76* **MCP server and Plugin configuration UI**: Type `/mcp` to open the terminal-based MCP server configuration, or `/plugin` for Plugin configuration. Once configured, MCP servers and Plugins will work in the extension. You can also [configure MCP servers through the CLI](/en/mcp) first, then the extension will use them.131<Steps>

77* **Subagents configuration**: Configure [subagents through the CLI](/en/sub-agents) to use them in VS Code132 <Step title="Disable login prompt">

78* **Checkpoints**: Save and restore conversation state at specific points133 Open the [Disable Login Prompt setting](vscode://settings/claudeCode.disableLoginPrompt) and check the box.

79* **Conversation rewinding**: The `/rewind` command is coming soon

80* **Advanced shortcuts**:

81 * `#` shortcut to add to memory (not supported)

82 * `!` shortcut to run bash commands directly (not supported)

83* **Tab completion**: File path completion with tab key

84* **Model selection UI for older models**: To use older model versions like `claude-sonnet-4-20250514`, open VS Code settings for Claude Code (the `/General Config` command) and insert the model string directly into the 'Selected Model' field

85 134 

86We are working on adding these features in future updates.135 You can also open VS Code settings (`Cmd+,` on Mac or `Ctrl+,` on Windows/Linux), search for "Claude Code login", and check **Disable Login Prompt**.

136 </Step>

87 137 

88## Security Considerations138 <Step title="Configure your provider">

139 Follow the setup guide for your provider:

89 140 

90When Claude Code runs in VS Code with auto-edit permissions enabled, it may be able to modify IDE configuration files that can be automatically executed by your IDE. This may increase the risk of running Claude Code in auto-edit mode and allow bypassing Claude Code's permission prompts for bash execution.141 * [Claude Code on Amazon Bedrock](/en/amazon-bedrock)

142 * [Claude Code on Google Vertex AI](/en/google-vertex-ai)

143 * [Claude Code on Microsoft Foundry](/en/microsoft-foundry)

91 144 

92When running in VS Code, consider:145 These guides cover configuring your provider in `~/.claude/settings.json`, which ensures your settings are shared between the VS Code extension and the CLI.

146 </Step>

147</Steps>

93 148 

94* Enabling [VS Code Restricted Mode](https://code.visualstudio.com/docs/editor/workspace-trust#_restricted-mode) for untrusted workspaces149## VS Code extension vs. Claude Code CLI

95* Using manual approval mode for edits

96* Taking extra care to ensure Claude is only used with trusted prompts

97 150 

98## Legacy CLI Integration151The extension doesn't yet have full feature parity with the CLI. If you need CLI-only features, you can run `claude` directly in VS Code's integrated terminal.

99 152 

100The first VS Code integration that we released allows Claude Code running in the terminal to interact with your IDE. It provides selection context sharing (current selection/tab is automatically shared with Claude Code), diff viewing in the IDE instead of terminal, file reference shortcuts (`Cmd+Option+K` on Mac or `Alt+Ctrl+K` on Windows/Linux to insert file references like @File#L1-99), and automatic diagnostic sharing (lint and syntax errors).153| Feature | CLI | VS Code Extension |

154| ----------------- | ------------------------------ | ---------------------------------------- |

155| Slash commands | [Full set](/en/slash-commands) | Subset (type `/` to see available) |

156| MCP server config | Yes | No (configure via CLI, use in extension) |

157| Checkpoints | Yes | Coming soon |

158| `!` bash shortcut | Yes | No |

159| Tab completion | Yes | No |

101 160 

102The legacy integration auto-installs when you run `claude` from VS Code's integrated terminal. Simply run `claude` from the terminal and all features activate. For external terminals, use the `/ide` command to connect Claude Code to your VS Code instance. To configure, run `claude`, enter `/config`, and set the diff tool to `auto` for automatic IDE detection.161### Run CLI in VS Code

103 162 

104Both the extension and CLI integration work with Visual Studio Code, Cursor, Windsurf, and VSCodium.163To use the CLI while staying in VS Code, open the integrated terminal (`` Ctrl+` `` on Windows/Linux or `` Cmd+` `` on Mac) and run `claude`. The CLI automatically integrates with your IDE for features like diff viewing and diagnostic sharing.

105 164 

106## Troubleshooting165If using an external terminal, run `/ide` inside Claude Code to connect it to VS Code.

107 166 

108### Extension Not Installing167### Switch between extension and CLI

109 168 

110* Ensure you have a compatible version of VS Code (1.85.0 or later)169The extension and CLI share the same conversation history. To continue an extension conversation in the CLI, run `claude --resume` in the terminal. This opens an interactive picker where you can search for and select your conversation.

170 

171## Security considerations

172 

173With auto-edit permissions enabled, Claude Code can modify VS Code configuration files (like `settings.json` or `tasks.json`) that VS Code may execute automatically. This could potentially bypass Claude Code's normal permission prompts.

174 

175To reduce risk when working with untrusted code:

176 

177* Enable [VS Code Restricted Mode](https://code.visualstudio.com/docs/editor/workspace-trust#_restricted-mode) for untrusted workspaces

178* Use manual approval mode instead of auto-accept for edits

179* Review changes carefully before accepting them

180 

181## Fix common issues

182 

183### Extension won't install

184 

185* Ensure you have a compatible version of VS Code (1.98.0 or later)

111* Check that VS Code has permission to install extensions186* Check that VS Code has permission to install extensions

112* Try installing directly from the Marketplace website187* Try installing directly from the Marketplace website

113 188 

114### Claude Code Never Responds189### Spark icon not visible

190 

191There are two places the Spark icon can appear:

192 

193* **Editor Toolbar** (top-right of editor): Only visible when a file is open

194* **Activity Bar** (left sidebar): Only visible after running "Claude Code: Open in Side Bar" from the Command Palette

195 

196If you don't see the icon:

197 

1981. **Open a file**: The Editor Toolbar icon requires a file to be open—having just a folder open isn't enough

1992. **Enable the Activity Bar icon**: Run "Claude Code: Open in Side Bar" from the Command Palette once, and the icon will appear in the Activity Bar permanently

2003. **Check VS Code version**: Requires 1.98.0 or higher (Help → About)

2014. **Restart VS Code**: Run "Developer: Reload Window" from the command palette

2025. **Disable conflicting extensions**: Temporarily disable other AI extensions (Cline, Continue, etc.)

2036. **Check workspace trust**: The extension doesn't work in Restricted Mode

2047. **Use the Command Palette**: Open with `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), then type "Claude Code: Open in Side Bar"

205 

206### Claude Code never responds

115 207 

116If Claude Code is not responding to your prompts:208If Claude Code isn't responding to your prompts:

117 209 

1181. **Check your internet connection**: Ensure you have a stable internet connection2101. **Check your internet connection**: Ensure you have a stable internet connection

1192. **Start a new conversation**: Try starting a fresh conversation to see if the issue persists2112. **Start a new conversation**: Try starting a fresh conversation to see if the issue persists

1203. **Try the CLI**: Run `claude` from the terminal to see if you get more detailed error messages2123. **Try the CLI**: Run `claude` from the terminal to see if you get more detailed error messages

1214. **File a bug report**: If the problem continues, [file an issue on GitHub](https://github.com/anthropics/claude-code/issues) with details about the error2134. **File a bug report**: If the problem continues, [file an issue on GitHub](https://github.com/anthropics/claude-code/issues) with details about the error

122 214 

123### Legacy Integration Not Working215### Standalone CLI not connecting to IDE

124 216 

125* Ensure you're running Claude Code from VS Code's integrated terminal217* Ensure you're running Claude Code from VS Code's integrated terminal (not an external terminal)

126* Ensure the CLI for your IDE variant is installed:218* Ensure the CLI for your IDE variant is installed:

127 * VS Code: `code` command should be available219 * VS Code: `code` command should be available

128 * Cursor: `cursor` command should be available220 * Cursor: `cursor` command should be available

129 * Windsurf: `windsurf` command should be available221 * Windsurf: `windsurf` command should be available

130 * VSCodium: `codium` command should be available222 * VSCodium: `codium` command should be available

131* If the command isn't installed:223* If the command isn't available, install it from the Command Palette → "Shell Command: Install 'code' command in PATH"

132 1. Open command palette with `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux)224 

133 2. Search for "Shell Command: Install 'code' command in PATH" (or equivalent for your IDE)225## Uninstall the extension

226 

227To uninstall the Claude Code extension:

228 

2291. Open the Extensions view (`Cmd+Shift+X` on Mac or `Ctrl+Shift+X` on Windows/Linux)

2302. Search for "Claude Code"

2313. Click **Uninstall**

232 

233To also remove extension data and reset all settings:

234 

235```bash theme={null}

236rm -rf ~/.vscode/globalStorage/anthropic.claude-code

237```

238 

239For additional help, see the [troubleshooting guide](/en/troubleshooting).

240 

241## Next steps

242 

243Now that you have Claude Code set up in VS Code:

244 

245* [Explore common workflows](/en/common-workflows) to get the most out of Claude Code

246* [Set up MCP servers](/en/mcp) to extend Claude's capabilities with external tools. Configure servers using the CLI, then use them in the extension.

247* [Configure Claude Code settings](/en/settings) to customize allowed commands, hooks, and more. These settings are shared between the extension and CLI.

248 

249 

250---

134 251 

135For additional help, see our [troubleshooting guide](/en/troubleshooting).252> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt