Skip to content

Env

Base classes

Name Children Inherits
ClaudeCodeBaseModel
clawd_code_sdk.models.base
Base model for all Claude Code Pydantic models.

⋔ Inheritance diagram

graph TD
  2671874493["settings.Env"]
  2604142835["base.ClaudeCodeBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  2604142835 --> 2671874493
  3879467795 --> 2604142835
  2751680898 --> 3879467795

🛈 DocStrings

Bases: ClaudeCodeBaseModel

Environment variables to set for Claude Code sessions. Many environment variables provide settings dimensions not available as dedicated settings.json properties (e.g., thinking tokens, prompt caching, bash timeouts, shell configuration). See https://code.claude.com/docs/en/settings#environment-variables for the full list.

Source code in src/clawd_code_sdk/models/settings.py
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
class Env(ClaudeCodeBaseModel):
    """Environment variables to set for Claude Code sessions. Many environment variables provide settings dimensions not available as dedicated settings.json properties (e.g., thinking tokens, prompt caching, bash timeouts, shell configuration). See https://code.claude.com/docs/en/settings#environment-variables for the full list."""

    anthropic_api_key: str | None = Field(None, alias="ANTHROPIC_API_KEY")
    """
    API key for Anthropic API authentication
    """
    anthropic_auth_token: str | None = Field(None, alias="ANTHROPIC_AUTH_TOKEN")
    """
    Custom Authorization header bearer token for API requests
    """
    anthropic_aws_api_key: str | None = Field(None, alias="ANTHROPIC_AWS_API_KEY")
    """
    Workspace API key for Claude Platform on AWS; takes precedence over SigV4 authentication. See https://code.claude.com/docs/en/claude-platform-on-aws#1-configure-aws-credentials
    """
    anthropic_aws_base_url: str | None = Field(None, alias="ANTHROPIC_AWS_BASE_URL")
    """
    Override the Claude Platform on AWS endpoint URL. Default is https://aws-external-anthropic.{region}.api.aws. See https://code.claude.com/docs/en/claude-platform-on-aws#route-through-a-corporate-proxy
    """
    anthropic_aws_workspace_id: str | None = Field(None, alias="ANTHROPIC_AWS_WORKSPACE_ID")
    """
    Required workspace ID for Claude Platform on AWS; sent as the anthropic-workspace-id header on every request. See https://code.claude.com/docs/en/claude-platform-on-aws#2-configure-claude-code
    """
    anthropic_base_url: str | None = Field(None, alias="ANTHROPIC_BASE_URL")
    """
    Override API endpoint URL for proxy or gateway routing
    """
    anthropic_bedrock_base_url: str | None = Field(None, alias="ANTHROPIC_BEDROCK_BASE_URL")
    """
    Override Amazon Bedrock endpoint URL
    """
    anthropic_bedrock_mantle_base_url: str | None = Field(
        None, alias="ANTHROPIC_BEDROCK_MANTLE_BASE_URL"
    )
    """
    Override Bedrock Mantle endpoint URL
    """
    anthropic_bedrock_service_tier: Literal["default", "flex", "priority"] | None = Field(
        None, alias="ANTHROPIC_BEDROCK_SERVICE_TIER"
    )
    """
    Select Bedrock service tier; sent as X-Amzn-Bedrock-Service-Tier header. See https://code.claude.com/docs/en/amazon-bedrock#service-tiers
    """
    anthropic_betas: str | None = Field(None, alias="ANTHROPIC_BETAS")
    """
    Comma-separated beta header values to include in API requests
    """
    anthropic_custom_headers: str | None = Field(None, alias="ANTHROPIC_CUSTOM_HEADERS")
    """
    Custom HTTP headers for API requests (newline-separated 'Name: Value' pairs)
    """
    anthropic_custom_model_option: str | None = Field(None, alias="ANTHROPIC_CUSTOM_MODEL_OPTION")
    """
    Custom model ID to add as an entry in the model picker
    """
    anthropic_custom_model_option_description: str | None = Field(
        None, alias="ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION"
    )
    """
    Display description for the custom model in the model picker
    """
    anthropic_custom_model_option_name: str | None = Field(
        None, alias="ANTHROPIC_CUSTOM_MODEL_OPTION_NAME"
    )
    """
    Display name for the custom model in the model picker
    """
    anthropic_custom_model_option_supported_capabilities: str | None = Field(
        None, alias="ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES"
    )
    """
    JSON object specifying capability flags for the custom model
    """
    anthropic_default_fable_model: str | None = Field(None, alias="ANTHROPIC_DEFAULT_FABLE_MODEL")
    """
    Override the default Fable-class model ID. See https://code.claude.com/docs/en/model-config#environment-variables
    """
    anthropic_default_fable_model_description: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION"
    )
    """
    Display description shown for the Fable model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_fable_model_name: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_FABLE_MODEL_NAME"
    )
    """
    Display name shown for the Fable model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_fable_model_supported_capabilities: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES"
    )
    """
    Comma-separated list of capabilities the pinned Fable model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_haiku_model: str | None = Field(None, alias="ANTHROPIC_DEFAULT_HAIKU_MODEL")
    """
    Override default Haiku model ID
    """
    anthropic_default_haiku_model_description: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION"
    )
    """
    Display description shown for the Haiku model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_haiku_model_name: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME"
    )
    """
    Display name shown for the Haiku model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_haiku_model_supported_capabilities: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES"
    )
    """
    Comma-separated list of capabilities the pinned Haiku model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_opus_model: str | None = Field(None, alias="ANTHROPIC_DEFAULT_OPUS_MODEL")
    """
    Override default Opus model ID
    """
    anthropic_default_opus_model_description: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION"
    )
    """
    Display description shown for the Opus model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_opus_model_name: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_OPUS_MODEL_NAME"
    )
    """
    Display name shown for the Opus model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_opus_model_supported_capabilities: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES"
    )
    """
    Comma-separated list of capabilities the pinned Opus model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_sonnet_model: str | None = Field(None, alias="ANTHROPIC_DEFAULT_SONNET_MODEL")
    """
    Override default Sonnet model ID
    """
    anthropic_default_sonnet_model_description: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION"
    )
    """
    Display description shown for the Sonnet model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_sonnet_model_name: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_SONNET_MODEL_NAME"
    )
    """
    Display name shown for the Sonnet model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_default_sonnet_model_supported_capabilities: str | None = Field(
        None, alias="ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES"
    )
    """
    Comma-separated list of capabilities the pinned Sonnet model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities
    """
    anthropic_foundry_api_key: str | None = Field(None, alias="ANTHROPIC_FOUNDRY_API_KEY")
    """
    Microsoft Foundry authentication key
    """
    anthropic_foundry_auth_token: str | None = Field(None, alias="ANTHROPIC_FOUNDRY_AUTH_TOKEN")
    """
    Bearer token for Microsoft Foundry authentication, such as a Microsoft Entra access token. Claude Code sends it as the Authorization: Bearer header. Takes precedence over ANTHROPIC_FOUNDRY_API_KEY and over the Azure default credential chain. Requires Claude Code v2.1.203 or later. See https://code.claude.com/docs/en/microsoft-foundry
    """
    anthropic_foundry_base_url: str | None = Field(None, alias="ANTHROPIC_FOUNDRY_BASE_URL")
    """
    Microsoft Foundry resource URL
    """
    anthropic_foundry_resource: str | None = Field(None, alias="ANTHROPIC_FOUNDRY_RESOURCE")
    """
    Microsoft Foundry resource name
    """
    anthropic_model: str | None = Field(None, alias="ANTHROPIC_MODEL")
    """
    Model to use (e.g., 'claude-opus-4-1', 'claude-sonnet-4-5-20250514', 'opus', 'sonnet', 'haiku')
    """
    anthropic_small_fast_model: str | None = Field(None, alias="ANTHROPIC_SMALL_FAST_MODEL")
    """
    DEPRECATED (prefer ANTHROPIC_DEFAULT_HAIKU_MODEL). Haiku-class model to use for background and low-complexity tasks (e.g., 'claude-3-5-haiku-latest')
    """
    anthropic_small_fast_model_aws_region: str | None = Field(
        None, alias="ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION"
    )
    """
    Override the AWS region for the Haiku-class model on Bedrock and Bedrock Mantle. Has no effect without ANTHROPIC_DEFAULT_HAIKU_MODEL (or the deprecated ANTHROPIC_SMALL_FAST_MODEL) set on Bedrock. See https://code.claude.com/docs/en/amazon-bedrock#3-configure-claude-code
    """
    anthropic_vertex_base_url: str | None = Field(None, alias="ANTHROPIC_VERTEX_BASE_URL")
    """
    Override Google Cloud's Agent Platform (formerly Vertex AI) endpoint URL. Use for custom endpoints or when routing through an LLM gateway
    """
    anthropic_vertex_project_id: str | None = Field(None, alias="ANTHROPIC_VERTEX_PROJECT_ID")
    """
    GCP project ID for Google Cloud's Agent Platform (formerly Vertex AI) requests. Overridden by GCLOUD_PROJECT, GOOGLE_CLOUD_PROJECT, or the project in your GOOGLE_APPLICATION_CREDENTIALS credential file
    """
    anthropic_workspace_id: str | None = Field(None, alias="ANTHROPIC_WORKSPACE_ID")
    """
    Workspace ID for workload identity federation. Scopes the minted token to a specific workspace when the federation rule covers more than one. See https://code.claude.com/docs/en/env-vars
    """
    api_force_idle_timeout: str | None = Field(None, alias="API_FORCE_IDLE_TIMEOUT")
    """
    Override the 5-minute idle timeout for streaming responses (0 disables it). See https://code.claude.com/docs/en/env-vars
    """
    api_timeout_ms: str | None = Field(None, alias="API_TIMEOUT_MS")
    """
    Timeout for API requests in milliseconds (default: 600000, or 10 minutes; maximum: 2147483647). Increase this when requests time out on slow networks or when routing through a proxy. Values above the maximum overflow the underlying timer and cause requests to fail immediately.
    """
    aws_bearer_token_bedrock: str | None = Field(None, alias="AWS_BEARER_TOKEN_BEDROCK")
    """
    Bearer token for Bedrock API authentication
    """
    aws_region: str | None = Field(None, alias="AWS_REGION")
    """
    AWS region for Amazon Bedrock and Claude Platform on AWS requests (e.g. us-east-1). See https://code.claude.com/docs/en/amazon-bedrock#3-configure-claude-code
    """
    bash_default_timeout_ms: str | None = Field(None, alias="BASH_DEFAULT_TIMEOUT_MS")
    """
    Default bash command timeout in milliseconds (default: 120000)
    """
    bash_max_output_length: str | None = Field(None, alias="BASH_MAX_OUTPUT_LENGTH")
    """
    Maximum bash output characters before truncation
    """
    bash_max_timeout_ms: str | None = Field(None, alias="BASH_MAX_TIMEOUT_MS")
    """
    Maximum bash command timeout in milliseconds (default: 600000)
    """
    beta_tracing_endpoint: str | None = Field(None, alias="BETA_TRACING_ENDPOINT")
    """
    Endpoint that, together with ENABLE_BETA_TRACING_DETAILED=1, activates detailed beta tracing spans (e.g. claude_code.hook). See https://code.claude.com/docs/en/monitoring-usage#traces-beta
    """
    ccr_force_bundle: Literal["0", "1"] | None = Field(None, alias="CCR_FORCE_BUNDLE")
    """
    Force local repo bundling for --remote invocations
    """
    claudecode: Literal["0", "1"] | None = Field(None, alias="CLAUDECODE")
    """
    Set to 1 in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, hook commands, status line commands, stdio MCP server subprocesses). IDE extensions also set this in their integrated terminals. To distinguish a direct tool/hook subprocess from a stdio MCP server subprocess, use CLAUDE_CODE_CHILD_SESSION instead. See https://code.claude.com/docs/en/env-vars
    """
    claude_afk_countdown_ms: str | None = Field(None, alias="CLAUDE_AFK_COUNTDOWN_MS")
    """
    How many milliseconds before auto-continue the on-screen countdown appears on an unanswered AskUserQuestion dialog. Default 20000 (20 seconds). See CLAUDE_AFK_TIMEOUT_MS. Requires Claude Code v2.1.198 or later. See https://code.claude.com/docs/en/env-vars
    """
    claude_afk_timeout_ms: str | None = Field(None, alias="CLAUDE_AFK_TIMEOUT_MS")
    """
    How many milliseconds of idle time before an unanswered AskUserQuestion dialog auto-continues without you. Default 60000 (60 seconds). Requires Claude Code v2.1.198 or later. See https://code.claude.com/docs/en/env-vars
    """
    claude_agent_sdk_disable_builtin_agents: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS"
    )
    """
    Disable built-in subagent types in Agent SDK
    """
    claude_agent_sdk_mcp_no_prefix: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_AGENT_SDK_MCP_NO_PREFIX"
    )
    """
    Skip `mcp__<server>__` prefix on MCP tool names in Agent SDK
    """
    claude_async_agent_stall_timeout_ms: str | None = Field(
        None, alias="CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS"
    )
    """
    Stall timeout for background subagents in milliseconds (default 600000). The timer resets on each streaming progress event; if no progress arrives within the window the subagent is aborted and the task is marked failed, surfacing any partial result to the parent. See https://code.claude.com/docs/en/env-vars
    """
    claude_autocompact_pct_override: str | None = Field(
        None, alias="CLAUDE_AUTOCOMPACT_PCT_OVERRIDE"
    )
    """
    Context capacity percentage threshold for auto-compaction (1-100)
    """
    claude_auto_background_tasks: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_AUTO_BACKGROUND_TASKS"
    )
    """
    Force-enable automatic backgrounding of tasks
    """
    claude_ax_screen_reader: Literal["0", "1"] | None = Field(None, alias="CLAUDE_AX_SCREEN_READER")
    """
    Set to 1 to render screen-reader friendly output: flat text without decorative borders or animations. Set to 0 to force screen-reader mode off even when axScreenReader is true. The --ax-screen-reader flag takes precedence. Requires Claude Code v2.1.181 or later. See https://code.claude.com/docs/en/env-vars
    """
    claude_bash_maintain_project_working_dir: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR"
    )
    """
    Return to original project directory after each bash command
    """
    claude_client_presence_file: str | None = Field(None, alias="CLAUDE_CLIENT_PRESENCE_FILE")
    """
    Path to a file whose existence marks the user as present; while it exists, mobile push notifications are skipped (v2.1.181+). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_accessibility: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ACCESSIBILITY"
    )
    """
    Keep native cursor visible for screen magnifiers and assistive tools
    """
    claude_code_additional_directories_claude_md: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD"
    )
    """
    Load CLAUDE.md memory files from additional directories
    """
    claude_code_alt_screen_full_repaint: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT"
    )
    """
    Force a full-screen repaint on every frame in fullscreen mode. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_always_enable_effort: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ALWAYS_ENABLE_EFFORT"
    )
    """
    Send the effort parameter for all models, not just those with effort enabled by default. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_api_key_helper_ttl_ms: str | None = Field(
        None, alias="CLAUDE_CODE_API_KEY_HELPER_TTL_MS"
    )
    """
    Credential helper refresh interval in milliseconds
    """
    claude_code_artifact_auto_open: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ARTIFACT_AUTO_OPEN"
    )
    """
    Set to 0 to stop auto-opening the browser when a new artifact is created. See https://code.claude.com/docs/en/artifacts#create-an-artifact
    """
    claude_code_attribution_header: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ATTRIBUTION_HEADER"
    )
    """
    Include attribution block in the system prompt
    """
    claude_code_auto_compact_window: str | None = Field(
        None, alias="CLAUDE_CODE_AUTO_COMPACT_WINDOW"
    )
    """
    Context capacity for compaction calculations in tokens
    """
    claude_code_auto_connect_ide: Literal["true", "false"] | None = Field(
        None, alias="CLAUDE_CODE_AUTO_CONNECT_IDE"
    )
    """
    Override automatic IDE connection behavior
    """
    claude_code_aws_chain_resolve_timeout_ms: str | None = Field(
        None, alias="CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS"
    )
    """
    Time in milliseconds Claude Code waits for the AWS default credential provider chain to produce credentials before the request fails with "AWS default-chain credential resolve timed out" (default: 60000). Raise it when a step in your chain legitimately needs longer, such as a browser-based SSO sign-in with MFA through a wrapper like aws-vault. Applies wherever Claude Code signs with the default chain. Requires Claude Code v2.1.207 or later. See https://code.claude.com/docs/en/amazon-bedrock#credential-caching-and-resolution-timeout
    """
    claude_code_bridge_session_id: str | None = Field(None, alias="CLAUDE_CODE_BRIDGE_SESSION_ID")
    """
    Set automatically in Bash tool and hook command subprocesses while the session has an active Remote Control connection, and removed when the connection ends. The value is the session's ID in session_ form, the same identifier that appears in the session's claude.ai/code URL, so a script can link back to the session that ran it. Requires Claude Code v2.1.199 or later. See https://code.claude.com/docs/en/remote-control
    """
    claude_code_cert_store: str | None = Field(None, alias="CLAUDE_CODE_CERT_STORE")
    """
    CA certificate sources (comma-separated: 'bundled', 'system')
    """
    claude_code_child_session: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_CHILD_SESSION"
    )
    """
    Set by Claude Code to 1 in nested subprocesses (Bash, PowerShell, Monitor, hook commands, status-line commands) to distinguish nested sessions from a top-level claude launched in IDE terminals (v2.1.172+). A nested interactive claude TUI started this way is excluded from --resume, --continue, up-arrow history, and the claude agents list; non-interactive claude -p sessions still persist (override with CLAUDE_CODE_FORCE_SESSION_PERSISTENCE=1). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_client_cert: str | None = Field(None, alias="CLAUDE_CODE_CLIENT_CERT")
    """
    Client certificate file path for mutual TLS
    """
    claude_code_client_key: str | None = Field(None, alias="CLAUDE_CODE_CLIENT_KEY")
    """
    Client private key file path for mutual TLS
    """
    claude_code_client_key_passphrase: str | None = Field(
        None, alias="CLAUDE_CODE_CLIENT_KEY_PASSPHRASE"
    )
    """
    Passphrase for encrypted client private key
    """
    claude_code_debug_logs_dir: str | None = Field(None, alias="CLAUDE_CODE_DEBUG_LOGS_DIR")
    """
    Override the debug log file path. Despite the name, this is a file path, not a directory.
    """
    claude_code_debug_log_level: Literal["verbose", "debug", "info", "warn", "error"] | None = (
        Field(None, alias="CLAUDE_CODE_DEBUG_LOG_LEVEL")
    )
    """
    Debug log verbosity level
    """
    claude_code_disable_1_m_context: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_1M_CONTEXT"
    )
    """
    Disable 1M context window models
    """
    claude_code_disable_adaptive_thinking: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING"
    )
    """
    Disable adaptive reasoning
    """
    claude_code_disable_advisor_tool: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_ADVISOR_TOOL"
    )
    """
    Disable the server-side advisor tool. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_disable_agent_view: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_AGENT_VIEW"
    )
    """
    Turn off background agents and agent view (claude agents, --bg, /background, and the on-demand supervisor). Equivalent to the disableAgentView setting. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_disable_alternate_screen: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN"
    )
    """
    Disable alternate screen buffer rendering. When set to 1, keeps conversation in native scrollback instead of fullscreen renderer
    """
    claude_code_disable_artifact: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_ARTIFACT"
    )
    """
    Disable the Artifact tool. Equivalent to setting disableArtifact. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_disable_attachments: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_ATTACHMENTS"
    )
    """
    Disable attachment processing
    """
    claude_code_disable_auto_memory: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_AUTO_MEMORY"
    )
    """
    Disable automatic memory feature
    """
    claude_code_disable_background_tasks: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_BACKGROUND_TASKS"
    )
    """
    Disable all background task functionality
    """
    claude_code_disable_bedrock_content_type_guard: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD"
    )
    """
    Set to 1 to skip the check that an Amazon Bedrock streaming response carries the application/vnd.amazon.eventstream content-type. Without this variable, a response with a different content-type fails with an error naming that content-type, which means a gateway or proxy is transforming the response. Set it only when the gateway rewrites the Content-Type header but passes the binary event-stream body through unmodified; if the body itself was transformed, requests fail with "Truncated event message received" instead. Requires Claude Code v2.1.208 or later. See https://code.claude.com/docs/en/amazon-bedrock#streaming-errors-behind-a-gateway-or-proxy
    """
    claude_code_disable_bg_exit_handoff: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF"
    )
    """
    Set to 1 to stop a background session's running background shell commands, dynamic workflows, and (as of v2.1.198) background subagents when the supervisor stops, restarts, or updates that session's process, instead of handing them off to the session's next process. Affects only that handoff; CLAUDE_DISABLE_ADOPT turns off both. Requires Claude Code v2.1.196 or later. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_disable_bg_shell_pressure_reap: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP"
    )
    """
    UNDOCUMENTED. Disable automatic memory-pressure reaping of idle background shell commands (added v2.1.193).
    """
    claude_code_disable_bundled_skills: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_BUNDLED_SKILLS"
    )
    """
    Disable the skills and workflows bundled with Claude Code (plugins and project .claude/skills are unaffected). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_disable_claude_mds: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_CLAUDE_MDS"
    )
    """
    Prevent loading CLAUDE.md memory files
    """
    claude_code_disable_cron: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_CRON"
    )
    """
    Disable scheduled/cron tasks
    """
    claude_code_disable_experimental_betas: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS"
    )
    """
    Strip anthropic-beta headers from API requests. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21123
    """
    claude_code_disable_explore_plan_agents: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS"
    )
    """
    Set to 1 to disable the built-in Explore and Plan subagents. Requires Claude Code v2.1.198 or later. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_disable_fast_mode: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_FAST_MODE"
    )
    """
    Disable fast mode toggle
    """
    claude_code_disable_feedback_survey: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY"
    )
    """
    Disable session quality feedback surveys
    """
    claude_code_disable_file_checkpointing: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING"
    )
    """
    Disable file checkpointing for /rewind
    """
    claude_code_disable_git_instructions: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS"
    )
    """
    Remove git commit and PR workflow instructions from the system prompt
    """
    claude_code_disable_legacy_model_remap: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP"
    )
    """
    Prevent automatic remapping of legacy model names
    """
    claude_code_disable_mouse: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_MOUSE"
    )
    """
    Disable mouse tracking in fullscreen mode. See https://code.claude.com/docs/en/fullscreen#keep-native-text-selection
    """
    claude_code_disable_mouse_clicks: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_MOUSE_CLICKS"
    )
    """
    Disable mouse click/drag/hover in fullscreen mode while keeping wheel scroll (requires v2.1.195+). CLAUDE_CODE_DISABLE_MOUSE takes precedence when both variables are set. See https://code.claude.com/docs/en/fullscreen#keep-native-text-selection
    """
    claude_code_disable_nonessential_traffic: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC"
    )
    """
    Disable auto-update checks, telemetry, and feedback in one setting
    """
    claude_code_disable_nonstreaming_fallback: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK"
    )
    """
    Disable fallback to non-streaming API mode
    """
    claude_code_disable_notification_presence_check: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECK"
    )
    """
    Set to 1 to send desktop notifications from the PushNotification tool even while focused on the terminal. Requires Claude Code v2.1.193 or later. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_disable_official_marketplace_autoinstall: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL"
    )
    """
    Skip automatic installation of official marketplace plugins. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_disable_policy_skills: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_POLICY_SKILLS"
    )
    """
    Skip loading system-wide policy skills. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_disable_terminal_title: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_TERMINAL_TITLE"
    )
    """
    Disable terminal title updates
    """
    claude_code_disable_thinking: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_THINKING"
    )
    """
    Force-disable extended thinking
    """
    claude_code_disable_virtual_scroll: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL"
    )
    """
    Disable virtual scrolling in fullscreen mode
    """
    claude_code_disable_workflows: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_DISABLE_WORKFLOWS"
    )
    """
    Set to 1 to disable workflows. Equivalent to the disableWorkflows setting. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_effort_level: Literal["low", "medium", "high", "xhigh", "max", "auto"] | None = (
        Field(None, alias="CLAUDE_CODE_EFFORT_LEVEL")
    )
    """
    Reasoning effort level
    """
    claude_code_enable_append_subagent_prompt: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT"
    )
    """
    Set to 1 to enable appending extra text to the end of every subagent's system prompt. The --append-subagent-system-prompt flag supplies the appended text and sets this variable automatically, so you do not need to set it yourself. Requires Claude Code v2.1.205 or later. See https://code.claude.com/docs/en/sub-agents
    """
    claude_code_enable_auto_mode: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_AUTO_MODE"
    )
    """
    Set to 1 to make auto mode available on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry (requires v2.1.158+; no effect on the Anthropic API where auto mode is available by default). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_enable_away_summary: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_AWAY_SUMMARY"
    )
    """
    Override session recap/away summary availability
    """
    claude_code_enable_background_plugin_refresh: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH"
    )
    """
    Refresh plugins at turn boundaries. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_enable_feedback_survey_for_otel: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL"
    )
    """
    Enable feedback survey collection via OpenTelemetry for enterprises
    """
    claude_code_enable_fine_grained_tool_streaming: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING"
    )
    """
    Force fine-grained tool output streaming
    """
    claude_code_enable_gateway_model_discovery: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY"
    )
    """
    Enable model discovery from LLM gateway /v1/models endpoint when ANTHROPIC_BASE_URL points at an Anthropic-compatible gateway
    """
    claude_code_enable_prompt_suggestion: Literal["true", "false"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION"
    )
    """
    Enable prompt suggestions
    """
    claude_code_enable_sdk_file_checkpointing: str | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING"
    )
    """
    Enable file checkpointing for a non-interactive CLI run, so `claude -p --resume `<session-id>` --rewind-files `<checkpoint-uuid>`` can rewind files. The Agent SDK sets this internally when enable_file_checkpointing (Python) or enableFileCheckpointing (TypeScript) is enabled; the bare CLI never sets it. Without it, a non-interactive rewind fails with "File rewinding is not enabled". See https://code.claude.com/docs/en/agent-sdk/file-checkpointing
    """
    claude_code_enable_tasks: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_TASKS"
    )
    """
    Enable task tracking in non-interactive mode
    """
    claude_code_enable_telemetry: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENABLE_TELEMETRY"
    )
    """
    Set to 1 to enable telemetry collection. Required for all OpenTelemetry integration. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    claude_code_enhanced_telemetry_beta: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_ENHANCED_TELEMETRY_BETA"
    )
    """
    Enable the enhanced telemetry (tracing) beta. ENABLE_ENHANCED_TELEMETRY_BETA is also accepted. See https://code.claude.com/docs/en/monitoring-usage#traces-beta
    """
    claude_code_exit_after_stop_delay: str | None = Field(
        None, alias="CLAUDE_CODE_EXIT_AFTER_STOP_DELAY"
    )
    """
    Wait time in milliseconds before auto-exit after stop
    """
    claude_code_experimental_agent_teams: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS"
    )
    """
    Enable experimental agent teams feature
    """
    claude_code_extra_body: str | None = Field(None, alias="CLAUDE_CODE_EXTRA_BODY")
    """
    JSON object to merge into every API request body
    """
    claude_code_file_read_max_output_tokens: str | None = Field(
        None, alias="CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS"
    )
    """
    Token limit for file read operations
    """
    claude_code_force_session_persistence: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_FORCE_SESSION_PERSISTENCE"
    )
    """
    Set to 1 to override the automatic exclusion of nested interactive claude TUI sessions from --resume, --continue, up-arrow history, and the claude agents list (requires v2.1.172+). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_force_strikethrough: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_FORCE_STRIKETHROUGH"
    )
    """
    Set to 1 to force strikethrough rendering for ~~text~~ in Claude's responses when the terminal supports it but is not auto-detected, such as over SSH without TERM_PROGRAM forwarded. Without this, undetected terminals show the literal ~~ markers. Requires Claude Code v2.1.186 or later. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_force_sync_output: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_FORCE_SYNC_OUTPUT"
    )
    """
    Force synchronous output flushing. When set to 1, forces synchronized output on terminals that auto-detection misses (e.g., Emacs eat)
    """
    claude_code_fork_subagent: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_FORK_SUBAGENT"
    )
    """
    Fork subagent processes in non-interactive sessions. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21120
    """
    claude_code_forward_subagent_text: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_FORWARD_SUBAGENT_TEXT"
    )
    """
    Set to 1 to emit subagent text and thinking blocks in claude -p --output-format stream-json output, the same behavior as the --forward-subagent-text flag. Use the variable when a harness invokes claude and cannot pass the flag itself. Unlike the flag, which exits with an error outside non-interactive mode with stream-json output, the variable is ignored there so that nested invocations keep working when it is set process-wide. Requires Claude Code v2.1.211 or later. See https://code.claude.com/docs/en/sub-agents
    """
    claude_code_git_bash_path: str | None = Field(None, alias="CLAUDE_CODE_GIT_BASH_PATH")
    """
    Path to Git Bash executable (Windows only)
    """
    claude_code_glob_hidden: Literal["true", "false"] | None = Field(
        None, alias="CLAUDE_CODE_GLOB_HIDDEN"
    )
    """
    Include dotfiles/hidden files in Glob results
    """
    claude_code_glob_no_ignore: Literal["true", "false"] | None = Field(
        None, alias="CLAUDE_CODE_GLOB_NO_IGNORE"
    )
    """
    Don't respect .gitignore rules in Glob results
    """
    claude_code_glob_timeout_seconds: str | None = Field(
        None, alias="CLAUDE_CODE_GLOB_TIMEOUT_SECONDS"
    )
    """
    Glob tool timeout in seconds (default: 20-60)
    """
    claude_code_hide_cwd: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_HIDE_CWD")
    """
    Hide the working directory in the startup logo. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21126
    """
    claude_code_ide_host_override: str | None = Field(None, alias="CLAUDE_CODE_IDE_HOST_OVERRIDE")
    """
    Override IDE connection address
    """
    claude_code_ide_skip_auto_install: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL"
    )
    """
    Skip automatic IDE extension installation
    """
    claude_code_ide_skip_valid_check: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_IDE_SKIP_VALID_CHECK"
    )
    """
    Skip IDE lockfile validation
    """
    claude_code_max_concurrent_subagents: str | None = Field(
        None, alias="CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS"
    )
    """
    How many subagents can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but cannot disable it. Requires Claude Code v2.1.217 or later. See https://code.claude.com/docs/en/sub-agents#concurrent-subagent-limit
    """
    claude_code_max_context_tokens: str | None = Field(None, alias="CLAUDE_CODE_MAX_CONTEXT_TOKENS")
    """
    Override context window size in tokens
    """
    claude_code_max_output_tokens: str | None = Field(None, alias="CLAUDE_CODE_MAX_OUTPUT_TOKENS")
    """
    Maximum output tokens per API request
    """
    claude_code_max_retries: str | None = Field(None, alias="CLAUDE_CODE_MAX_RETRIES")
    """
    Maximum API request retry attempts (default: 10)
    """
    claude_code_max_subagents_per_session: str | None = Field(
        None, alias="CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION"
    )
    """
    Cap on the number of subagents one session can spawn with the Agent tool (default: 200). When Claude reaches the cap, spawning another subagent fails with an error telling Claude to finish the remaining work directly. Accepts a positive whole number in plain digits with no upper bound; this variable does not take the scientific notation or digit-separator spellings. Anything else is ignored and the default applies, so the cap can be raised but not turned off. Requires Claude Code v2.1.212 or later. See https://code.claude.com/docs/en/sub-agents#session-subagent-limit
    """
    claude_code_max_subagent_spawn_depth: str | None = Field(
        None, alias="CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH"
    )
    """
    Number of subagent layers allowed below the main conversation (default: 1). At the default, subagents cannot spawn their own subagents; set 2 or higher to allow it. Accepts a positive whole number in plain digits; anything else is ignored, so the limit can be raised but not turned off. Requires Claude Code v2.1.217 or later. See https://code.claude.com/docs/en/sub-agents#let-subagents-spawn-their-own-subagents
    """
    claude_code_max_tool_use_concurrency: str | None = Field(
        None, alias="CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY"
    )
    """
    Maximum parallel tool executions (default: 10)
    """
    claude_code_max_turns: str | None = Field(None, alias="CLAUDE_CODE_MAX_TURNS")
    """
    Cap the number of agentic turns when no explicit limit is passed. Equivalent to --max-turns, which takes precedence. A non-positive integer is rejected at startup. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_max_web_searches_per_session: str | None = Field(
        None, alias="CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION"
    )
    """
    Cap on the total number of WebSearch calls one session can make (default: 200). When Claude reaches the cap, further WebSearch calls return a notice telling it to continue with the information it already gathered. Accepts a positive whole number with no upper bound. Anything else is ignored and the default applies, so the cap can be raised but not turned off. Requires Claude Code v2.1.212 or later. See https://code.claude.com/docs/en/tools-reference#websearch-tool-behavior
    """
    claude_code_mcp_allowlist_env: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_MCP_ALLOWLIST_ENV"
    )
    """
    Isolate MCP server environments to allowlisted variables
    """
    claude_code_mcp_auto_background_ms: str | None = Field(
        None, alias="CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS"
    )
    """
    Elapsed time in milliseconds before a still-running MCP tool call moves to a background task (default: 120000, or 2 minutes). Set to 0 to turn automatic backgrounding off. Requires Claude Code v2.1.212 or later. See https://code.claude.com/docs/en/mcp#automatic-backgrounding-of-long-tool-calls
    """
    claude_code_mcp_tool_idle_timeout: str | None = Field(
        None, alias="CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT"
    )
    """
    Idle timeout in milliseconds for MCP tool calls. When a stdio, HTTP, SSE, WebSocket, or claude.ai connector MCP server sends no response and no progress notification for this long, the tool call aborts with an error instead of waiting for the overall MCP_TOOL_TIMEOUT. Overrides the per-transport defaults of 300000 (5 minutes) for network servers and 1800000 (30 minutes) for stdio servers. Set to 0 to disable the idle check. Values below 1000 are raised to one second, and the value is capped at the effective MCP_TOOL_TIMEOUT. A per-server timeout in .mcp.json of at least 1000 raises that server's idle window to at least the timeout value. Does not apply to IDE servers or SDK in-process servers. Requires Claude Code v2.1.187 or later. Before v2.1.203, stdio servers were exempt from the idle timeout. See https://code.claude.com/docs/en/mcp
    """
    claude_code_native_cursor: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_NATIVE_CURSOR"
    )
    """
    Set to 1 to show the terminal's own cursor at the input caret instead of a drawn block. The cursor respects the terminal's blink, shape, and focus settings. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_new_init: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_NEW_INIT")
    """
    Use the interactive /init setup flow
    """
    claude_code_no_flicker: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_NO_FLICKER")
    """
    Enable fullscreen rendering mode to reduce flicker
    """
    claude_code_oauth_refresh_token: str | None = Field(
        None, alias="CLAUDE_CODE_OAUTH_REFRESH_TOKEN"
    )
    """
    OAuth refresh token
    """
    claude_code_oauth_scopes: str | None = Field(None, alias="CLAUDE_CODE_OAUTH_SCOPES")
    """
    OAuth scopes (space-separated)
    """
    claude_code_oauth_token: str | None = Field(None, alias="CLAUDE_CODE_OAUTH_TOKEN")
    """
    OAuth access token
    """
    claude_code_otel_content_max_length: str | None = Field(
        None, alias="CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH"
    )
    """
    Maximum length of content-bearing OpenTelemetry attributes (model responses, tool content, system prompts, raw API bodies), truncation marker included, in UTF-16 code units (default: 61440, i.e. 60 KB). Raise it only if your telemetry backend accepts attribute values larger than 64 KB, or lower it to cut telemetry volume. Requires Claude Code v2.1.214 or later. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    claude_code_otel_diag_stderr: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_OTEL_DIAG_STDERR"
    )
    """
    Set to 1 to write OpenTelemetry exporter diagnostic errors to stderr (otherwise shown only with --debug). Requires v2.1.179+. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_otel_flush_timeout_ms: str | None = Field(
        None, alias="CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS"
    )
    """
    OpenTelemetry span flush timeout in milliseconds (default: 5000)
    """
    claude_code_otel_headers_helper_debounce_ms: str | None = Field(
        None, alias="CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS"
    )
    """
    OpenTelemetry header helper refresh interval in milliseconds
    """
    claude_code_otel_shutdown_timeout_ms: str | None = Field(
        None, alias="CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS"
    )
    """
    OpenTelemetry shutdown timeout in milliseconds (default: 2000)
    """
    claude_code_package_manager_auto_update: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE"
    )
    """
    Enable automatic package manager updates. When set, Claude Code runs the upgrade command in background on Homebrew/WinGet and prompts to restart
    """
    claude_code_perforce_mode: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_PERFORCE_MODE"
    )
    """
    Enable Perforce write protection mode
    """
    claude_code_plugin_cache_dir: str | None = Field(None, alias="CLAUDE_CODE_PLUGIN_CACHE_DIR")
    """
    Override the plugins root directory. Despite the name, this sets the parent directory, not the cache itself: marketplaces and the plugin cache live in subdirectories under this path. Defaults to ~/.claude/plugins. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_plugin_git_timeout_ms: str | None = Field(
        None, alias="CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS"
    )
    """
    Plugin marketplace git operations timeout in milliseconds (default: 120000). See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2151
    """
    claude_code_plugin_keep_marketplace_on_failure: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE"
    )
    """
    Keep plugin cache on update failure
    """
    claude_code_plugin_prefer_https: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_PLUGIN_PREFER_HTTPS"
    )
    """
    Set to 1 to clone GitHub owner/repo plugin sources over HTTPS instead of SSH. Useful in CI runners, containers, or environments without a configured SSH key for github.com. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_plugin_seed_dir: str | None = Field(None, alias="CLAUDE_CODE_PLUGIN_SEED_DIR")
    """
    Path(s) to pre-populated plugin directories. See https://code.claude.com/docs/en/plugin-marketplaces#pre-populate-plugins-for-containers
    """
    claude_code_powershell_respect_execution_policy: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY"
    )
    """
    Set to 1 to stop Claude Code from passing -ExecutionPolicy Bypass when spawning PowerShell for tool calls, hooks, and status line commands. By default Claude Code bypasses execution policy so .ps1 scripts work on default-Restricted Windows installs. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_print_bg_wait_ceiling_ms: str | None = Field(
        None, alias="CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS"
    )
    """
    Cap, in milliseconds, on how long `claude -p` waits for background subagents at exit (default 10 minutes; set to 0 to wait without limit, added v2.1.182). See https://code.claude.com/docs/en/headless#background-tasks-at-exit
    """
    claude_code_process_wrapper: str | None = Field(None, alias="CLAUDE_CODE_PROCESS_WRAPPER")
    """
    Launch the processes Claude Code starts from its own binary, such as the background service that hosts agent view sessions, through a corporate launcher given as an argv prefix like /opt/corp/launcher. Set it in the env block of user or managed settings, not as a shell export, so the detached background service inherits it; project and local settings cannot set it. Equivalent to the processWrapper setting, which requires Claude Code v2.1.210 or later; this variable takes precedence when both are set. The VS Code extension configures its own launcher separately through its claudeProcessWrapper setting. Ignored on Windows. Requires Claude Code v2.1.208 or later. See https://code.claude.com/docs/en/corporate-launcher
    """
    claude_code_propagate_traceparent: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_PROPAGATE_TRACEPARENT"
    )
    """
    Propagate the W3C traceparent header on API requests when using a custom ANTHROPIC_BASE_URL. See https://code.claude.com/docs/en/monitoring-usage#traces-beta
    """
    claude_code_provider_managed_by_host: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST"
    )
    """
    Indicate that the host application manages provider routing
    """
    claude_code_proxy_resolves_hosts: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_PROXY_RESOLVES_HOSTS"
    )
    """
    Allow proxy to handle DNS resolution
    """
    claude_code_remote: Literal["true", "false"] | None = Field(None, alias="CLAUDE_CODE_REMOTE")
    """
    Indicates a remote web environment session
    """
    claude_code_remote_session_id: str | None = Field(None, alias="CLAUDE_CODE_REMOTE_SESSION_ID")
    """
    Cloud session identifier for remote sessions
    """
    claude_code_resume_interrupted_turn: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_RESUME_INTERRUPTED_TURN"
    )
    """
    Automatically resume from a mid-turn interruption
    """
    claude_code_resume_interrupted_turn_max_age_ms: str | None = Field(
        None, alias="CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS"
    )
    """
    Maximum age in milliseconds of the last transcript message for a session that ended mid-turn to continue automatically on resume. When the last message is older than this bound, Claude Code skips both the CLAUDE_CODE_RESUME_INTERRUPTED_TURN automatic resume and the injected CLAUDE_CODE_RESUME_PROMPT continuation message, and the session starts idle so you continue explicitly. Unset or 0 means no bound; a negative or non-numeric value applies a one-hour bound. Spawn scripts for long-running agents can set this so a restart against an old transcript does not re-run a stale prompt. Claude Code sets a one-hour bound itself when it restarts a crashed agent view session that inherited its conversation from an interactive session. Requires Claude Code v2.1.211 or later. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_resume_prompt: str | None = Field(None, alias="CLAUDE_CODE_RESUME_PROMPT")
    """
    Override the continuation message injected when resuming a session that ended mid-turn (default "Continue from where you left off."). An empty string uses the default. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_retry_watchdog: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_RETRY_WATCHDOG"
    )
    """
    Set to 1 for unattended sessions (eval harnesses, CI, remote workers) to retry 429/529 capacity errors indefinitely, backing off up to 5 minutes, instead of failing after CLAUDE_CODE_MAX_RETRIES. Requires v2.1.186+. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_safe_mode: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_SAFE_MODE")
    """
    Set to 1 to start in safe mode: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto-memory do not load, for troubleshooting a broken configuration. Managed settings policy still applies. Equivalent to passing --safe-mode; directly spawned child processes inherit the variable. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_script_caps: str | None = Field(None, alias="CLAUDE_CODE_SCRIPT_CAPS")
    """
    Script invocation limits (JSON object)
    """
    claude_code_scroll_speed: str | None = Field(None, alias="CLAUDE_CODE_SCROLL_SPEED")
    """
    Set the mouse wheel scroll multiplier in fullscreen rendering. Accepts any positive value up to 20, including fractional values below 1 such as 0.5 to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. Set to 3 to match vim if your terminal sends one wheel event per notch without amplification. See https://code.claude.com/docs/en/fullscreen#mouse-wheel-scrolling
    """
    claude_code_sessionend_hooks_timeout_ms: str | None = Field(
        None, alias="CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS"
    )
    """
    Override the time budget in milliseconds for SessionEnd hooks (default 1500, raised up to 60000 by the highest configured per-hook timeout). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_session_id: str | None = Field(None, alias="CLAUDE_CODE_SESSION_ID")
    """
    Set automatically to the current session ID in Bash/PowerShell tool subprocesses, hook command subprocesses, and stdio MCP server subprocesses. Read-only. See https://code.claude.com/docs/en/env-vars
    """
    claude_code_shell: str | None = Field(None, alias="CLAUDE_CODE_SHELL")
    """
    Override automatic shell detection (e.g., '/bin/zsh', '/bin/bash')
    """
    claude_code_shell_prefix: str | None = Field(None, alias="CLAUDE_CODE_SHELL_PREFIX")
    """
    Command prefix wrapper for shell commands
    """
    claude_code_simple: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_SIMPLE")
    """
    Minimal mode with core tools only
    """
    claude_code_simple_system_prompt: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT"
    )
    """
    Use a shortened system prompt
    """
    claude_code_skip_anthropic_aws_auth: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH"
    )
    """
    Skip client-side SigV4 authentication for Claude Platform on AWS; use when a proxy or gateway adds authentication before forwarding. See https://code.claude.com/docs/en/claude-platform-on-aws#route-through-a-corporate-proxy
    """
    claude_code_skip_aws_cred_cache: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SKIP_AWS_CRED_CACHE"
    )
    """
    Set to 1 to turn off the in-process cache of credentials resolved from the AWS default credential provider chain, so Claude Code resolves the chain on every API request. With the cache off, an SSO-backed profile requests credentials from IAM Identity Center on every request. Requires Claude Code v2.1.207 or later. See https://code.claude.com/docs/en/amazon-bedrock#credential-caching-and-resolution-timeout
    """
    claude_code_skip_bedrock_auth: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SKIP_BEDROCK_AUTH"
    )
    """
    Skip AWS authentication for Bedrock
    """
    claude_code_skip_fast_mode_network_errors: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS"
    )
    """
    Set to 1 to treat a failed fast mode availability check as available, for networks that block the check's direct request to api.anthropic.com. Claude Code still honors a "disabled by your organization" response. See https://code.claude.com/docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways
    """
    claude_code_skip_fast_mode_org_check: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK"
    )
    """
    Set to 1 to skip the client-side fast mode availability check, for proxies that intercept the check's request rather than refuse it. The API still rejects fast mode requests when your organization has fast mode disabled. See https://code.claude.com/docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways
    """
    claude_code_skip_foundry_auth: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SKIP_FOUNDRY_AUTH"
    )
    """
    Skip Azure authentication for Foundry
    """
    claude_code_skip_mantle_auth: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SKIP_MANTLE_AUTH"
    )
    """
    Skip AWS authentication for Bedrock Mantle (for example, when using an LLM gateway). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_skip_prompt_history: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SKIP_PROMPT_HISTORY"
    )
    """
    Disable transcript writes entirely. See https://code.claude.com/docs/en/settings#environment-variables
    """
    claude_code_skip_vertex_auth: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SKIP_VERTEX_AUTH"
    )
    """
    Skip Google authentication for Google Cloud's Agent Platform
    """
    claude_code_stop_hook_block_cap: str | None = Field(
        None, alias="CLAUDE_CODE_STOP_HOOK_BLOCK_CAP"
    )
    """
    Override the default maximum consecutive Stop hook blocks (default: 8) before the turn ends with a warning. Raise this when a stop hook legitimately needs more than 8 iterations to converge. See https://code.claude.com/docs/en/hooks-guide
    """
    claude_code_subagent_model: str | None = Field(None, alias="CLAUDE_CODE_SUBAGENT_MODEL")
    """
    Override model used by subagents
    """
    claude_code_subprocess_env_scrub: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SUBPROCESS_ENV_SCRUB"
    )
    """
    Strip credentials from subprocess environments
    """
    claude_code_sync_plugin_install: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_SYNC_PLUGIN_INSTALL"
    )
    """
    Wait synchronously for plugin installation
    """
    claude_code_sync_plugin_install_timeout_ms: str | None = Field(
        None, alias="CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS"
    )
    """
    Timeout in milliseconds for synchronous plugin installation
    """
    claude_code_sync_skills: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_SYNC_SKILLS")
    """
    Set to 1 to download enabled claude.ai skills into ~/.claude/skills/ before the first query and resync every 10 minutes (non-interactive -p mode only; requires claude.ai auth). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_sync_skills_install_timeout_ms: str | None = Field(
        None, alias="CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS"
    )
    """
    Timeout in milliseconds for a mid-session skills resync when CLAUDE_CODE_SYNC_SKILLS is set (default 30000). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_sync_skills_wait_timeout_ms: str | None = Field(
        None, alias="CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS"
    )
    """
    Timeout in milliseconds for the first query to wait on the initial skills sync when CLAUDE_CODE_SYNC_SKILLS is set (default 5000). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_syntax_highlight: Literal["true", "false"] | None = Field(
        None, alias="CLAUDE_CODE_SYNTAX_HIGHLIGHT"
    )
    """
    UNDOCUMENTED. Enable syntax highlighting in diffs
    """
    claude_code_task_list_id: str | None = Field(None, alias="CLAUDE_CODE_TASK_LIST_ID")
    """
    Shared task list identifier for team collaboration
    """
    claude_code_team_name: str | None = Field(None, alias="CLAUDE_CODE_TEAM_NAME")
    """
    Agent team membership name
    """
    claude_code_team_teardown_park_timeout_ms: str | None = Field(
        None, alias="CLAUDE_CODE_TEAM_TEARDOWN_PARK_TIMEOUT_MS"
    )
    """
    Override, in milliseconds, how long a non-interactive session waits at exit for its agent team to finish tearing down. Accepts 1000 to 60000; an out-of-range value is ignored and the default of 10000 applies. Requires Claude Code v2.1.206 or later. See https://code.claude.com/docs/en/agent-teams
    """
    claude_code_tmpdir: str | None = Field(None, alias="CLAUDE_CODE_TMPDIR")
    """
    Override temp directory path
    """
    claude_code_tmux_truecolor: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_TMUX_TRUECOLOR"
    )
    """
    Allow 24-bit truecolor rendering in tmux
    """
    claude_code_use_anthropic_aws: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_USE_ANTHROPIC_AWS"
    )
    """
    Enable Claude Platform on AWS as the API provider. Bedrock and Foundry take precedence if also set. See https://code.claude.com/docs/en/claude-platform-on-aws#2-configure-claude-code
    """
    claude_code_use_bedrock: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_USE_BEDROCK")
    """
    Enable Amazon Bedrock as the API provider. See https://code.claude.com/docs/en/amazon-bedrock#3-configure-claude-code
    """
    claude_code_use_foundry: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_USE_FOUNDRY")
    """
    Enable Microsoft Foundry as the API provider. See https://code.claude.com/docs/en/microsoft-foundry#3-configure-claude-code
    """
    claude_code_use_mantle: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_USE_MANTLE")
    """
    Enable the Mantle endpoint (native Anthropic API shape on Bedrock). See https://code.claude.com/docs/en/amazon-bedrock#enable-mantle
    """
    claude_code_use_native_file_search: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_USE_NATIVE_FILE_SEARCH"
    )
    """
    Set to 1 to discover custom commands, subagents, and output styles using Node.js file APIs instead of ripgrep (for environments where the bundled ripgrep is unavailable). See https://code.claude.com/docs/en/env-vars
    """
    claude_code_use_powershell_tool: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_CODE_USE_POWERSHELL_TOOL"
    )
    """
    Enable PowerShell as default shell for interactive commands (Windows)
    """
    claude_code_use_vertex: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_USE_VERTEX")
    """
    Enable Google Cloud's Agent Platform as the API provider. See https://code.claude.com/docs/en/google-vertex-ai#4-configure-claude-code
    """
    claude_config_dir: str | None = Field(None, alias="CLAUDE_CONFIG_DIR")
    """
    Override the configuration directory (default ~/.claude) where settings, credentials, session history, and plugins are stored. Useful for running multiple accounts side by side. See https://code.claude.com/docs/en/env-vars
    """
    claude_disable_adopt: Literal["0", "1"] | None = Field(None, alias="CLAUDE_DISABLE_ADOPT")
    """
    Set to 1 to stop in-flight background work instead of carrying it over when you background a session by pressing ← or with /background. Claude Code asks you to confirm before backgrounding, then stops the tasks that would otherwise carry over. Requires Claude Code v2.1.195 or later. See https://code.claude.com/docs/en/env-vars
    """
    claude_effort: Literal["low", "medium", "high", "xhigh", "max"] | None = Field(
        None, alias="CLAUDE_EFFORT"
    )
    """
    Set automatically in Bash tool subprocesses and hook commands to the active effort level for the turn (low, medium, high, xhigh, or max; ultracode reports as xhigh). Read-only. See https://code.claude.com/docs/en/env-vars
    """
    claude_enable_byte_watchdog: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_ENABLE_BYTE_WATCHDOG"
    )
    """
    Set to 1 to force-enable, or 0 to force-disable, the byte-level streaming idle watchdog that aborts a connection when no bytes arrive within the configured timeout. Enabled by default on direct Anthropic API and Claude Platform on AWS connections. See https://code.claude.com/docs/en/env-vars
    """
    claude_enable_byte_watchdog_bedrock: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK"
    )
    """
    Set to 1 to enable the byte-level streaming idle watchdog on Amazon Bedrock eventstream responses (off by default). Configure the timeout with CLAUDE_STREAM_IDLE_TIMEOUT_MS. See https://code.claude.com/docs/en/env-vars
    """
    claude_enable_stream_watchdog: Literal["0", "1"] | None = Field(
        None, alias="CLAUDE_ENABLE_STREAM_WATCHDOG"
    )
    """
    Set to 1 to force-enable, or 0 to force-disable, the event-level streaming idle watchdog. When unset, the watchdog is on by default for all providers (as of v2.1.196; before that the unset default was server-controlled on the direct Anthropic API and off on other providers). See https://code.claude.com/docs/en/env-vars
    """
    claude_env_file: str | None = Field(None, alias="CLAUDE_ENV_FILE")
    """
    File path for persisting environment variables across Bash commands
    """
    claude_pid: str | None = Field(None, alias="CLAUDE_PID")
    """
    Claude Code sets this to its own process ID in the subprocesses it spawns: Bash and PowerShell tool commands and hook commands. On Linux, the Bash tool's shell integration uses it to refuse a pkill pattern that would match the Claude Code process itself. Read it from your own scripts to identify or signal the parent Claude Code process deliberately. Requires Claude Code v2.1.214 or later. See https://code.claude.com/docs/en/errors#pkill-pattern-matches-the-claude-code-process
    """
    claude_project_dir: str | None = Field(None, alias="CLAUDE_PROJECT_DIR")
    """
    Project root directory path (also provided to hooks)
    """
    claude_remote_control_session_name_prefix: str | None = Field(
        None, alias="CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX"
    )
    """
    Prefix for auto-generated Remote Control session names when no explicit name is set. Defaults to the machine hostname, producing names like myhost-graceful-unicorn. See https://code.claude.com/docs/en/remote-control#start-a-remote-control-session
    """
    claude_stream_idle_timeout_ms: str | None = Field(None, alias="CLAUDE_STREAM_IDLE_TIMEOUT_MS")
    """
    Timeout in milliseconds before the streaming idle watchdog closes a stalled connection. When set explicitly the minimum is 300000 (5 minutes); lower values are clamped. See https://code.claude.com/docs/en/env-vars
    """
    cloud_ml_region: str | None = Field(None, alias="CLOUD_ML_REGION")
    """
    Google Cloud's Agent Platform region: global, a multi-region location (eu, us), or a specific region (e.g. us-east5). See https://code.claude.com/docs/en/google-vertex-ai#region-configuration
    """
    debug: str | None = Field(None, alias="DEBUG")
    """
    Set to a truthy value (1, true, yes, or on) to enable debug mode, equivalent to --debug. Logs are written to `~/.claude/debug/<session-id>.txt`. See https://code.claude.com/docs/en/env-vars
    """
    disable_autoupdater: Literal["0", "1"] | None = Field(None, alias="DISABLE_AUTOUPDATER")
    """
    Set to 1 to disable automatic background updates. Manual claude update still works; use DISABLE_UPDATES to block both. See https://code.claude.com/docs/en/env-vars
    """
    disable_auto_compact: Literal["0", "1"] | None = Field(None, alias="DISABLE_AUTO_COMPACT")
    """
    Set to 1 to disable automatic compaction when approaching the context limit. The manual /compact command remains available. Equivalent to autoCompactEnabled: false. See https://code.claude.com/docs/en/env-vars
    """
    disable_compact: Literal["0", "1"] | None = Field(None, alias="DISABLE_COMPACT")
    """
    Set to 1 to disable all compaction: both automatic compaction and the manual /compact command. See https://code.claude.com/docs/en/env-vars
    """
    disable_cost_warnings: Literal["0", "1"] | None = Field(None, alias="DISABLE_COST_WARNINGS")
    """
    Set to 1 to disable cost warning messages. See https://code.claude.com/docs/en/env-vars
    """
    disable_doctor_command: Literal["0", "1"] | None = Field(None, alias="DISABLE_DOCTOR_COMMAND")
    """
    Set to 1 to hide the /doctor command (useful for managed deployments). See https://code.claude.com/docs/en/env-vars
    """
    disable_error_reporting: Literal["0", "1"] | None = Field(None, alias="DISABLE_ERROR_REPORTING")
    """
    Disable Sentry error reporting
    """
    disable_extra_usage_command: Literal["0", "1"] | None = Field(
        None, alias="DISABLE_EXTRA_USAGE_COMMAND"
    )
    """
    Set to 1 to hide the /usage-credits command for purchasing additional usage beyond rate limits. See https://code.claude.com/docs/en/env-vars
    """
    disable_feedback_command: Literal["0", "1"] | None = Field(
        None, alias="DISABLE_FEEDBACK_COMMAND"
    )
    """
    Set to 1 to disable the /feedback command. The older name DISABLE_BUG_COMMAND is also accepted. See https://code.claude.com/docs/en/env-vars
    """
    disable_growthbook: Literal["0", "1"] | None = Field(None, alias="DISABLE_GROWTHBOOK")
    """
    Set to 1 to disable GrowthBook feature-flag fetching and use code defaults for every flag. Telemetry stays on unless DISABLE_TELEMETRY is also set. See https://code.claude.com/docs/en/env-vars
    """
    disable_installation_checks: Literal["0", "1"] | None = Field(
        None, alias="DISABLE_INSTALLATION_CHECKS"
    )
    """
    Set to 1 to disable installation warnings (use only when manually managing the installation location). See https://code.claude.com/docs/en/env-vars
    """
    disable_install_github_app_command: Literal["0", "1"] | None = Field(
        None, alias="DISABLE_INSTALL_GITHUB_APP_COMMAND"
    )
    """
    Set to 1 to hide the /install-github-app command (already hidden on Bedrock, Vertex, or Foundry). See https://code.claude.com/docs/en/env-vars
    """
    disable_interleaved_thinking: Literal["0", "1"] | None = Field(
        None, alias="DISABLE_INTERLEAVED_THINKING"
    )
    """
    Set to 1 to prevent sending the interleaved-thinking beta header (useful when a gateway or provider does not support interleaved thinking). See https://code.claude.com/docs/en/env-vars
    """
    disable_login_command: Literal["0", "1"] | None = Field(None, alias="DISABLE_LOGIN_COMMAND")
    """
    Set to 1 to hide the /login command (useful when authentication is handled externally via API keys or apiKeyHelper). See https://code.claude.com/docs/en/env-vars
    """
    disable_logout_command: Literal["0", "1"] | None = Field(None, alias="DISABLE_LOGOUT_COMMAND")
    """
    Set to 1 to hide the /logout command. See https://code.claude.com/docs/en/env-vars
    """
    disable_prompt_caching: Literal["0", "1"] | None = Field(None, alias="DISABLE_PROMPT_CACHING")
    """
    Disable prompt caching for all models. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching
    """
    disable_prompt_caching_fable: Literal["0", "1"] | None = Field(
        None, alias="DISABLE_PROMPT_CACHING_FABLE"
    )
    """
    Disable prompt caching for Fable models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching
    """
    disable_prompt_caching_haiku: Literal["0", "1"] | None = Field(
        None, alias="DISABLE_PROMPT_CACHING_HAIKU"
    )
    """
    Disable prompt caching for Haiku models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching
    """
    disable_prompt_caching_opus: Literal["0", "1"] | None = Field(
        None, alias="DISABLE_PROMPT_CACHING_OPUS"
    )
    """
    Disable prompt caching for Opus models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching
    """
    disable_prompt_caching_sonnet: Literal["0", "1"] | None = Field(
        None, alias="DISABLE_PROMPT_CACHING_SONNET"
    )
    """
    Disable prompt caching for Sonnet models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching
    """
    disable_telemetry: Literal["0", "1"] | None = Field(None, alias="DISABLE_TELEMETRY")
    """
    Set to 1 to opt out of telemetry. Also disables feature-flag fetching (same effect as DISABLE_GROWTHBOOK). See https://code.claude.com/docs/en/env-vars
    """
    disable_updates: Literal["0", "1"] | None = Field(None, alias="DISABLE_UPDATES")
    """
    Block all update paths including manual updates
    """
    disable_upgrade_command: Literal["0", "1"] | None = Field(None, alias="DISABLE_UPGRADE_COMMAND")
    """
    Set to 1 to hide the /upgrade command. See https://code.claude.com/docs/en/env-vars
    """
    do_not_track: Literal["0", "1"] | None = Field(None, alias="DO_NOT_TRACK")
    """
    Set to 1 to opt out of telemetry (cross-tool convention; equivalent to DISABLE_TELEMETRY). See https://code.claude.com/docs/en/env-vars
    """
    enable_beta_tracing_detailed: Literal["0", "1"] | None = Field(
        None, alias="ENABLE_BETA_TRACING_DETAILED"
    )
    """
    Emit detailed spans including hook execution when the tracing beta is enabled. See https://code.claude.com/docs/en/monitoring-usage#traces-beta
    """
    enable_claudeai_mcp_servers: Literal["true", "false"] | None = Field(
        None, alias="ENABLE_CLAUDEAI_MCP_SERVERS"
    )
    """
    Opt in/out of claude.ai MCP servers. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2163
    """
    enable_prompt_caching_1_h: Literal["0", "1"] | None = Field(
        None, alias="ENABLE_PROMPT_CACHING_1H"
    )
    """
    Request a 1-hour prompt cache TTL instead of the 5-minute default (billed at a higher rate). See https://code.claude.com/docs/en/prompt-caching#cache-lifetime
    """
    enable_tool_search: str | None = Field(None, alias="ENABLE_TOOL_SEARCH")
    """
    Control MCP tool search: "true" always defers and sends the beta header (requests fail on Google Cloud's Agent Platform models earlier than Sonnet 4.5/Opus 4.5 or on proxies that do not support tool_reference); "auto" loads tools upfront if they fit within 10% of context; "auto:N" sets a custom threshold percentage (e.g. auto:5); "false" loads all tools upfront. Also applies when ANTHROPIC_BASE_URL points to a non-first-party host. See https://code.claude.com/docs/en/google-vertex-ai#4-configure-claude-code
    """
    fallback_for_all_primary_models: str | None = Field(
        None, alias="FALLBACK_FOR_ALL_PRIMARY_MODELS"
    )
    """
    Set to any non-empty value to make all models (not only Opus) stop retrying with a repeated-overload error when no fallback model is configured. See https://code.claude.com/docs/en/env-vars
    """
    force_autoupdate_plugins: Literal["0", "1"] | None = Field(
        None, alias="FORCE_AUTOUPDATE_PLUGINS"
    )
    """
    Keep plugin auto-updates enabled even when DISABLE_AUTOUPDATER=1 is set. See https://code.claude.com/docs/en/discover-plugins#configure-auto-updates
    """
    force_hyperlink: Literal["0", "1"] | None = Field(None, alias="FORCE_HYPERLINK")
    """
    Set to 1 to enable clickable OSC 8 hyperlinks when your terminal supports them but is not auto-detected, or 0 to disable them
    """
    force_prompt_caching_5_m: Literal["0", "1"] | None = Field(
        None, alias="FORCE_PROMPT_CACHING_5M"
    )
    """
    Force a 5-minute cache TTL regardless of authentication method; overrides ENABLE_PROMPT_CACHING_1H or a managed-settings TTL. See https://code.claude.com/docs/en/prompt-caching#override-the-ttl
    """
    google_application_credentials: str | None = Field(None, alias="GOOGLE_APPLICATION_CREDENTIALS")
    """
    Path to a GCP credential configuration file (service account key or workload identity federation config) used for Google Cloud's Agent Platform authentication. See https://code.claude.com/docs/en/google-vertex-ai#3-configure-gcp-credentials
    """
    https_proxy: str | None = Field(None, alias="HTTPS_PROXY")
    """
    HTTPS proxy URL (recommended over HTTP_PROXY)
    """
    http_proxy: str | None = Field(None, alias="HTTP_PROXY")
    """
    HTTP proxy URL
    """
    is_demo: Literal["0", "1"] | None = Field(None, alias="IS_DEMO")
    """
    Set to 1 to enable demo mode: hides email and organization name from the header and /status output and skips onboarding. See https://code.claude.com/docs/en/env-vars
    """
    max_mcp_output_tokens: str | None = Field(None, alias="MAX_MCP_OUTPUT_TOKENS")
    """
    Maximum number of tokens allowed in MCP tool output before truncation (default: 25000). Claude Code displays a warning above 10000 tokens. For tools that declare anthropic/maxResultSizeChars, that character limit replaces this token limit for text content, but image content from those tools is still subject to this limit. See https://code.claude.com/docs/en/mcp
    """
    max_structured_output_retries: str | None = Field(None, alias="MAX_STRUCTURED_OUTPUT_RETRIES")
    """
    Number of times to retry when the model's response fails validation against --json-schema in non-interactive (-p) mode (default 5). See https://code.claude.com/docs/en/env-vars
    """
    max_thinking_tokens: str | None = Field(None, alias="MAX_THINKING_TOKENS")
    """
    Override the extended thinking token budget; set to 0 to disable thinking on the Anthropic API. On adaptive reasoning models (Opus 4.7+, Opus 4.8, Fable 5) a nonzero budget is ignored unless CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING is set. See https://code.claude.com/docs/en/model-config#extended-thinking
    """
    mcp_client_secret: str | None = Field(None, alias="MCP_CLIENT_SECRET")
    """
    OAuth client secret for MCP servers that require pre-configured credentials (avoids the interactive prompt when adding a server with --client-secret). See https://code.claude.com/docs/en/env-vars
    """
    mcp_connection_nonblocking: Literal["0", "1"] | None = Field(
        None, alias="MCP_CONNECTION_NONBLOCKING"
    )
    """
    Controls whether startup waits for MCP servers to connect before the first query. Non-blocking by default since v2.1.142; set to 0 to restore the blocking 5-second connection wait. See https://code.claude.com/docs/en/env-vars
    """
    mcp_connect_timeout_ms: str | None = Field(None, alias="MCP_CONNECT_TIMEOUT_MS")
    """
    How long blocking MCP startup waits in milliseconds for the connection batch before snapshotting the tool list (default 5000). Applies when MCP_CONNECTION_NONBLOCKING=0 or for alwaysLoad servers. See https://code.claude.com/docs/en/env-vars
    """
    mcp_oauth_callback_port: str | None = Field(None, alias="MCP_OAUTH_CALLBACK_PORT")
    """
    Fixed port for the OAuth redirect callback, as an alternative to --callback-port when adding an MCP server with pre-configured credentials. See https://code.claude.com/docs/en/env-vars
    """
    mcp_remote_server_connection_batch_size: str | None = Field(
        None, alias="MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE"
    )
    """
    Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default 20). See https://code.claude.com/docs/en/env-vars
    """
    mcp_server_connection_batch_size: str | None = Field(
        None, alias="MCP_SERVER_CONNECTION_BATCH_SIZE"
    )
    """
    Maximum number of local MCP servers (stdio) to connect in parallel during startup (default 3). See https://code.claude.com/docs/en/env-vars
    """
    mcp_timeout: str | None = Field(None, alias="MCP_TIMEOUT")
    """
    Timeout in milliseconds for MCP server startup (default 30000). See https://code.claude.com/docs/en/env-vars
    """
    mcp_tool_timeout: str | None = Field(None, alias="MCP_TOOL_TIMEOUT")
    """
    Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours). A per-server timeout field in .mcp.json overrides this for that server. Values below 1000 are floored to one second. See https://code.claude.com/docs/en/mcp
    """
    node_extra_ca_certs: str | None = Field(None, alias="NODE_EXTRA_CA_CERTS")
    """
    Path to custom CA certificate file
    """
    no_proxy: str | None = Field(None, alias="NO_PROXY")
    """
    Domains to bypass proxy (space or comma-separated, or '*' for all)
    """
    otel_attribute_value_length_limit: str | None = Field(
        None, alias="OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT"
    )
    """
    Standard OpenTelemetry SDK limit on attribute value length. Claude Code caps content-bearing telemetry attributes at the smaller of this and CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH, so the truncation marker stays within the SDK limit. Claude Code reads the OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT and OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT variants the same way, and the smallest set value applies to all signals. Requires Claude Code v2.1.214 or later. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_exporter_otlp_certificate: str | None = Field(None, alias="OTEL_EXPORTER_OTLP_CERTIFICATE")
    """
    Path to the CA certificate for gRPC OTLP mTLS. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication
    """
    otel_exporter_otlp_client_certificate: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE"
    )
    """
    Path to the client certificate for gRPC OTLP mTLS. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication
    """
    otel_exporter_otlp_client_key: str | None = Field(None, alias="OTEL_EXPORTER_OTLP_CLIENT_KEY")
    """
    Path to the client private key for gRPC OTLP mTLS. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication
    """
    otel_exporter_otlp_endpoint: str | None = Field(None, alias="OTEL_EXPORTER_OTLP_ENDPOINT")
    """
    OTLP exporter endpoint for all signals (e.g. http://localhost:4317). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_exporter_otlp_headers: str | None = Field(None, alias="OTEL_EXPORTER_OTLP_HEADERS")
    """
    Headers sent with OTLP exporter requests (e.g. Authorization=Bearer token). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_exporter_otlp_logs_client_certificate: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE"
    )
    """
    Path to the client certificate for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE for logs only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication
    """
    otel_exporter_otlp_logs_client_key: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY"
    )
    """
    Path to the client private key for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_KEY for logs only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication
    """
    otel_exporter_otlp_logs_endpoint: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"
    )
    """
    OTLP exporter endpoint override for logs. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_exporter_otlp_logs_protocol: Literal["grpc", "http/json", "http/protobuf"] | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_LOGS_PROTOCOL"
    )
    """
    OTLP protocol override for logs: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_exporter_otlp_metrics_client_certificate: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE"
    )
    """
    Path to the client certificate for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE for metrics only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication
    """
    otel_exporter_otlp_metrics_client_key: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY"
    )
    """
    Path to the client private key for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_KEY for metrics only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication
    """
    otel_exporter_otlp_metrics_endpoint: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_METRICS_ENDPOINT"
    )
    """
    OTLP exporter endpoint override for metrics. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_exporter_otlp_metrics_protocol: Literal["grpc", "http/json", "http/protobuf"] | None = (
        Field(None, alias="OTEL_EXPORTER_OTLP_METRICS_PROTOCOL")
    )
    """
    OTLP protocol override for metrics: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_exporter_otlp_metrics_temporality_preference: Literal["delta", "cumulative"] | None = (
        Field(None, alias="OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE")
    )
    """
    Metrics temporality preference: delta (default) or cumulative. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_exporter_otlp_protocol: Literal["grpc", "http/json", "http/protobuf"] | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_PROTOCOL"
    )
    """
    OTLP exporter protocol for all signals: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_exporter_otlp_traces_client_certificate: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE"
    )
    """
    Path to the client certificate for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE for traces only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication
    """
    otel_exporter_otlp_traces_client_key: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY"
    )
    """
    Path to the client private key for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_KEY for traces only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication
    """
    otel_exporter_otlp_traces_endpoint: str | None = Field(
        None, alias="OTEL_EXPORTER_OTLP_TRACES_ENDPOINT"
    )
    """
    OTLP exporter endpoint override for traces. See https://code.claude.com/docs/en/monitoring-usage#traces-beta
    """
    otel_exporter_otlp_traces_protocol: Literal["grpc", "http/json", "http/protobuf"] | None = (
        Field(None, alias="OTEL_EXPORTER_OTLP_TRACES_PROTOCOL")
    )
    """
    OTLP protocol override for traces: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#traces-beta
    """
    otel_logs_exporter: str | None = Field(None, alias="OTEL_LOGS_EXPORTER")
    """
    OpenTelemetry logs exporter(s) as a comma-separated list. Valid values: otlp, console, none. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_logs_export_interval: str | None = Field(None, alias="OTEL_LOGS_EXPORT_INTERVAL")
    """
    Logs export interval in milliseconds (default 5000). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_log_assistant_responses: Literal["0", "1"] | None = Field(
        None, alias="OTEL_LOG_ASSISTANT_RESPONSES"
    )
    """
    UNDOCUMENTED. Include assistant response text in the claude_code.assistant_response OpenTelemetry log event (added v2.1.193). When unset, follows OTEL_LOG_USER_PROMPTS; set to 0 to keep prompts-only.
    """
    otel_log_raw_api_bodies: str | None = Field(None, alias="OTEL_LOG_RAW_API_BODIES")
    """
    Log raw API request/response bodies. Set to 1, or to `file:<dir>` to write them to a directory. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_log_tool_content: Literal["0", "1"] | None = Field(None, alias="OTEL_LOG_TOOL_CONTENT")
    """
    Include full tool input/output content in OpenTelemetry log events (requires tracing; disabled by default). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_log_tool_details: Literal["0", "1"] | None = Field(None, alias="OTEL_LOG_TOOL_DETAILS")
    """
    Include tool name and parameters in OpenTelemetry log events (disabled by default). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_log_user_prompts: Literal["0", "1"] | None = Field(None, alias="OTEL_LOG_USER_PROMPTS")
    """
    Include user prompt text in OpenTelemetry log events (disabled by default). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_metrics_exporter: str | None = Field(None, alias="OTEL_METRICS_EXPORTER")
    """
    OpenTelemetry metrics exporter(s) as a comma-separated list. Valid values: otlp, prometheus, console, none. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_metrics_include_account_uuid: Literal["true", "false"] | None = Field(
        None, alias="OTEL_METRICS_INCLUDE_ACCOUNT_UUID"
    )
    """
    Include the user.account_uuid and user.account_id attributes on metrics (default true). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control
    """
    otel_metrics_include_entrypoint: Literal["true", "false"] | None = Field(
        None, alias="OTEL_METRICS_INCLUDE_ENTRYPOINT"
    )
    """
    Include the app.entrypoint attribute on metrics (default false). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control
    """
    otel_metrics_include_resource_attributes: Literal["true", "false"] | None = Field(
        None, alias="OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES"
    )
    """
    Include configured OTEL_RESOURCE_ATTRIBUTES on metric data points (default true). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control
    """
    otel_metrics_include_session_id: Literal["true", "false"] | None = Field(
        None, alias="OTEL_METRICS_INCLUDE_SESSION_ID"
    )
    """
    Include the session.id attribute on metrics (default true). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control
    """
    otel_metrics_include_version: Literal["true", "false"] | None = Field(
        None, alias="OTEL_METRICS_INCLUDE_VERSION"
    )
    """
    Include the app.version attribute on metrics (default false). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control
    """
    otel_metric_export_interval: str | None = Field(None, alias="OTEL_METRIC_EXPORT_INTERVAL")
    """
    Metrics export interval in milliseconds (default 60000). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables
    """
    otel_resource_attributes: str | None = Field(None, alias="OTEL_RESOURCE_ATTRIBUTES")
    """
    Comma-separated key=value resource attributes attached to all telemetry. See https://code.claude.com/docs/en/monitoring-usage#multi-team-organization-support
    """
    otel_traces_exporter: str | None = Field(None, alias="OTEL_TRACES_EXPORTER")
    """
    OpenTelemetry traces exporter(s) as a comma-separated list. Valid values: otlp, console, none. See https://code.claude.com/docs/en/monitoring-usage#traces-beta
    """
    otel_traces_export_interval: str | None = Field(None, alias="OTEL_TRACES_EXPORT_INTERVAL")
    """
    Traces export interval in milliseconds (default 5000). See https://code.claude.com/docs/en/monitoring-usage#traces-beta
    """
    slash_command_tool_char_budget: str | None = Field(None, alias="SLASH_COMMAND_TOOL_CHAR_BUDGET")
    """
    Override the character budget for skill metadata shown to the Skill tool. The budget scales dynamically at 1% of the context window, with a fallback of 8000 characters. Legacy name kept for backwards compatibility. See https://code.claude.com/docs/en/skills#control-who-invokes-a-skill
    """
    task_max_output_length: str | None = Field(None, alias="TASK_MAX_OUTPUT_LENGTH")
    """
    Maximum number of characters in subagent output before truncation (default 32000, maximum 160000). When truncated, the full output is saved to disk and the path is included in the response. See https://code.claude.com/docs/en/env-vars
    """
    use_builtin_ripgrep: Literal["0", "1"] | None = Field(None, alias="USE_BUILTIN_RIPGREP")
    """
    Use the bundled ripgrep binary instead of system ripgrep
    """
    vertex_region_claude_3_5_haiku: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_3_5_HAIKU")
    """
    Override the Vertex AI region for Claude 3.5 Haiku (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_3_5_sonnet: str | None = Field(
        None, alias="VERTEX_REGION_CLAUDE_3_5_SONNET"
    )
    """
    Override the Vertex AI region for Claude 3.5 Sonnet (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_3_7_sonnet: str | None = Field(
        None, alias="VERTEX_REGION_CLAUDE_3_7_SONNET"
    )
    """
    Override the Vertex AI region for Claude 3.7 Sonnet (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_4_0_opus: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_4_0_OPUS")
    """
    Override the Vertex AI region for Claude 4.0 Opus (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_4_0_sonnet: str | None = Field(
        None, alias="VERTEX_REGION_CLAUDE_4_0_SONNET"
    )
    """
    Override the Vertex AI region for Claude 4.0 Sonnet (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_4_1_opus: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_4_1_OPUS")
    """
    Override the Vertex AI region for Claude 4.1 Opus (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_4_5_opus: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_4_5_OPUS")
    """
    Override the Vertex AI region for Claude Opus 4.5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_4_5_sonnet: str | None = Field(
        None, alias="VERTEX_REGION_CLAUDE_4_5_SONNET"
    )
    """
    Override the Vertex AI region for Claude Sonnet 4.5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_4_6_opus: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_4_6_OPUS")
    """
    Override the Vertex AI region for Claude Opus 4.6 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_4_6_sonnet: str | None = Field(
        None, alias="VERTEX_REGION_CLAUDE_4_6_SONNET"
    )
    """
    Override the Vertex AI region for Claude Sonnet 4.6 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_4_7_opus: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_4_7_OPUS")
    """
    Override the Vertex AI region for Claude Opus 4.7 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_4_8_opus: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_4_8_OPUS")
    """
    Override the Vertex AI region for Claude Opus 4.8 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_5_opus: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_5_OPUS")
    """
    Override region for Claude Opus 5 when using Google Cloud's Agent Platform (formerly Vertex AI). Added in v2.1.219. See https://code.claude.com/docs/en/google-vertex-ai
    """
    vertex_region_claude_5_sonnet: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_5_SONNET")
    """
    Override region for Claude Sonnet 5 when using Google Cloud's Agent Platform (formerly Vertex AI). Added in v2.1.197. See https://code.claude.com/docs/en/google-vertex-ai
    """
    vertex_region_claude_fable_5: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_FABLE_5")
    """
    Override the Vertex AI region for Claude Fable 5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """
    vertex_region_claude_haiku_4_5: str | None = Field(None, alias="VERTEX_REGION_CLAUDE_HAIKU_4_5")
    """
    Override the Vertex AI region for Claude Haiku 4.5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars
    """

anthropic_api_key class-attribute instance-attribute

anthropic_api_key: str | None = Field(None, alias='ANTHROPIC_API_KEY')

API key for Anthropic API authentication

anthropic_auth_token class-attribute instance-attribute

anthropic_auth_token: str | None = Field(None, alias='ANTHROPIC_AUTH_TOKEN')

Custom Authorization header bearer token for API requests

anthropic_aws_api_key class-attribute instance-attribute

anthropic_aws_api_key: str | None = Field(None, alias='ANTHROPIC_AWS_API_KEY')

Workspace API key for Claude Platform on AWS; takes precedence over SigV4 authentication. See https://code.claude.com/docs/en/claude-platform-on-aws#1-configure-aws-credentials

anthropic_aws_base_url class-attribute instance-attribute

anthropic_aws_base_url: str | None = Field(None, alias='ANTHROPIC_AWS_BASE_URL')

Override the Claude Platform on AWS endpoint URL. Default is https://aws-external-anthropic.{region}.api.aws. See https://code.claude.com/docs/en/claude-platform-on-aws#route-through-a-corporate-proxy

anthropic_aws_workspace_id class-attribute instance-attribute

anthropic_aws_workspace_id: str | None = Field(None, alias='ANTHROPIC_AWS_WORKSPACE_ID')

Required workspace ID for Claude Platform on AWS; sent as the anthropic-workspace-id header on every request. See https://code.claude.com/docs/en/claude-platform-on-aws#2-configure-claude-code

anthropic_base_url class-attribute instance-attribute

anthropic_base_url: str | None = Field(None, alias='ANTHROPIC_BASE_URL')

Override API endpoint URL for proxy or gateway routing

anthropic_bedrock_base_url class-attribute instance-attribute

anthropic_bedrock_base_url: str | None = Field(None, alias='ANTHROPIC_BEDROCK_BASE_URL')

Override Amazon Bedrock endpoint URL

anthropic_bedrock_mantle_base_url class-attribute instance-attribute

anthropic_bedrock_mantle_base_url: str | None = Field(
    None, alias="ANTHROPIC_BEDROCK_MANTLE_BASE_URL"
)

Override Bedrock Mantle endpoint URL

anthropic_bedrock_service_tier class-attribute instance-attribute

anthropic_bedrock_service_tier: Literal["default", "flex", "priority"] | None = Field(
    None, alias="ANTHROPIC_BEDROCK_SERVICE_TIER"
)

Select Bedrock service tier; sent as X-Amzn-Bedrock-Service-Tier header. See https://code.claude.com/docs/en/amazon-bedrock#service-tiers

anthropic_betas class-attribute instance-attribute

anthropic_betas: str | None = Field(None, alias='ANTHROPIC_BETAS')

Comma-separated beta header values to include in API requests

anthropic_custom_headers class-attribute instance-attribute

anthropic_custom_headers: str | None = Field(None, alias='ANTHROPIC_CUSTOM_HEADERS')

Custom HTTP headers for API requests (newline-separated 'Name: Value' pairs)

anthropic_custom_model_option class-attribute instance-attribute

anthropic_custom_model_option: str | None = Field(None, alias='ANTHROPIC_CUSTOM_MODEL_OPTION')

Custom model ID to add as an entry in the model picker

anthropic_custom_model_option_description class-attribute instance-attribute

anthropic_custom_model_option_description: str | None = Field(
    None, alias="ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION"
)

Display description for the custom model in the model picker

anthropic_custom_model_option_name class-attribute instance-attribute

anthropic_custom_model_option_name: str | None = Field(
    None, alias="ANTHROPIC_CUSTOM_MODEL_OPTION_NAME"
)

Display name for the custom model in the model picker

anthropic_custom_model_option_supported_capabilities class-attribute instance-attribute

anthropic_custom_model_option_supported_capabilities: str | None = Field(
    None, alias="ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES"
)

JSON object specifying capability flags for the custom model

anthropic_default_fable_model class-attribute instance-attribute

anthropic_default_fable_model: str | None = Field(None, alias='ANTHROPIC_DEFAULT_FABLE_MODEL')

Override the default Fable-class model ID. See https://code.claude.com/docs/en/model-config#environment-variables

anthropic_default_fable_model_description class-attribute instance-attribute

anthropic_default_fable_model_description: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION"
)

Display description shown for the Fable model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_fable_model_name class-attribute instance-attribute

anthropic_default_fable_model_name: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_FABLE_MODEL_NAME"
)

Display name shown for the Fable model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_fable_model_supported_capabilities class-attribute instance-attribute

anthropic_default_fable_model_supported_capabilities: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES"
)

Comma-separated list of capabilities the pinned Fable model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_haiku_model class-attribute instance-attribute

anthropic_default_haiku_model: str | None = Field(None, alias='ANTHROPIC_DEFAULT_HAIKU_MODEL')

Override default Haiku model ID

anthropic_default_haiku_model_description class-attribute instance-attribute

anthropic_default_haiku_model_description: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION"
)

Display description shown for the Haiku model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_haiku_model_name class-attribute instance-attribute

anthropic_default_haiku_model_name: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME"
)

Display name shown for the Haiku model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_haiku_model_supported_capabilities class-attribute instance-attribute

anthropic_default_haiku_model_supported_capabilities: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES"
)

Comma-separated list of capabilities the pinned Haiku model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_opus_model class-attribute instance-attribute

anthropic_default_opus_model: str | None = Field(None, alias='ANTHROPIC_DEFAULT_OPUS_MODEL')

Override default Opus model ID

anthropic_default_opus_model_description class-attribute instance-attribute

anthropic_default_opus_model_description: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION"
)

Display description shown for the Opus model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_opus_model_name class-attribute instance-attribute

anthropic_default_opus_model_name: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_OPUS_MODEL_NAME"
)

Display name shown for the Opus model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_opus_model_supported_capabilities class-attribute instance-attribute

anthropic_default_opus_model_supported_capabilities: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES"
)

Comma-separated list of capabilities the pinned Opus model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_sonnet_model class-attribute instance-attribute

anthropic_default_sonnet_model: str | None = Field(None, alias='ANTHROPIC_DEFAULT_SONNET_MODEL')

Override default Sonnet model ID

anthropic_default_sonnet_model_description class-attribute instance-attribute

anthropic_default_sonnet_model_description: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION"
)

Display description shown for the Sonnet model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_sonnet_model_name class-attribute instance-attribute

anthropic_default_sonnet_model_name: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_SONNET_MODEL_NAME"
)

Display name shown for the Sonnet model in the model picker. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_default_sonnet_model_supported_capabilities class-attribute instance-attribute

anthropic_default_sonnet_model_supported_capabilities: str | None = Field(
    None, alias="ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES"
)

Comma-separated list of capabilities the pinned Sonnet model supports. See https://code.claude.com/docs/en/model-config#customize-pinned-model-display-and-capabilities

anthropic_foundry_api_key class-attribute instance-attribute

anthropic_foundry_api_key: str | None = Field(None, alias='ANTHROPIC_FOUNDRY_API_KEY')

Microsoft Foundry authentication key

anthropic_foundry_auth_token class-attribute instance-attribute

anthropic_foundry_auth_token: str | None = Field(None, alias='ANTHROPIC_FOUNDRY_AUTH_TOKEN')

Bearer token for Microsoft Foundry authentication, such as a Microsoft Entra access token. Claude Code sends it as the Authorization: Bearer header. Takes precedence over ANTHROPIC_FOUNDRY_API_KEY and over the Azure default credential chain. Requires Claude Code v2.1.203 or later. See https://code.claude.com/docs/en/microsoft-foundry

anthropic_foundry_base_url class-attribute instance-attribute

anthropic_foundry_base_url: str | None = Field(None, alias='ANTHROPIC_FOUNDRY_BASE_URL')

Microsoft Foundry resource URL

anthropic_foundry_resource class-attribute instance-attribute

anthropic_foundry_resource: str | None = Field(None, alias='ANTHROPIC_FOUNDRY_RESOURCE')

Microsoft Foundry resource name

anthropic_model class-attribute instance-attribute

anthropic_model: str | None = Field(None, alias='ANTHROPIC_MODEL')

Model to use (e.g., 'claude-opus-4-1', 'claude-sonnet-4-5-20250514', 'opus', 'sonnet', 'haiku')

anthropic_small_fast_model class-attribute instance-attribute

anthropic_small_fast_model: str | None = Field(None, alias='ANTHROPIC_SMALL_FAST_MODEL')

DEPRECATED (prefer ANTHROPIC_DEFAULT_HAIKU_MODEL). Haiku-class model to use for background and low-complexity tasks (e.g., 'claude-3-5-haiku-latest')

anthropic_small_fast_model_aws_region class-attribute instance-attribute

anthropic_small_fast_model_aws_region: str | None = Field(
    None, alias="ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION"
)

Override the AWS region for the Haiku-class model on Bedrock and Bedrock Mantle. Has no effect without ANTHROPIC_DEFAULT_HAIKU_MODEL (or the deprecated ANTHROPIC_SMALL_FAST_MODEL) set on Bedrock. See https://code.claude.com/docs/en/amazon-bedrock#3-configure-claude-code

anthropic_vertex_base_url class-attribute instance-attribute

anthropic_vertex_base_url: str | None = Field(None, alias='ANTHROPIC_VERTEX_BASE_URL')

Override Google Cloud's Agent Platform (formerly Vertex AI) endpoint URL. Use for custom endpoints or when routing through an LLM gateway

anthropic_vertex_project_id class-attribute instance-attribute

anthropic_vertex_project_id: str | None = Field(None, alias='ANTHROPIC_VERTEX_PROJECT_ID')

GCP project ID for Google Cloud's Agent Platform (formerly Vertex AI) requests. Overridden by GCLOUD_PROJECT, GOOGLE_CLOUD_PROJECT, or the project in your GOOGLE_APPLICATION_CREDENTIALS credential file

anthropic_workspace_id class-attribute instance-attribute

anthropic_workspace_id: str | None = Field(None, alias='ANTHROPIC_WORKSPACE_ID')

Workspace ID for workload identity federation. Scopes the minted token to a specific workspace when the federation rule covers more than one. See https://code.claude.com/docs/en/env-vars

api_force_idle_timeout class-attribute instance-attribute

api_force_idle_timeout: str | None = Field(None, alias='API_FORCE_IDLE_TIMEOUT')

Override the 5-minute idle timeout for streaming responses (0 disables it). See https://code.claude.com/docs/en/env-vars

api_timeout_ms class-attribute instance-attribute

api_timeout_ms: str | None = Field(None, alias='API_TIMEOUT_MS')

Timeout for API requests in milliseconds (default: 600000, or 10 minutes; maximum: 2147483647). Increase this when requests time out on slow networks or when routing through a proxy. Values above the maximum overflow the underlying timer and cause requests to fail immediately.

aws_bearer_token_bedrock class-attribute instance-attribute

aws_bearer_token_bedrock: str | None = Field(None, alias='AWS_BEARER_TOKEN_BEDROCK')

Bearer token for Bedrock API authentication

aws_region class-attribute instance-attribute

aws_region: str | None = Field(None, alias='AWS_REGION')

AWS region for Amazon Bedrock and Claude Platform on AWS requests (e.g. us-east-1). See https://code.claude.com/docs/en/amazon-bedrock#3-configure-claude-code

bash_default_timeout_ms class-attribute instance-attribute

bash_default_timeout_ms: str | None = Field(None, alias='BASH_DEFAULT_TIMEOUT_MS')

Default bash command timeout in milliseconds (default: 120000)

bash_max_output_length class-attribute instance-attribute

bash_max_output_length: str | None = Field(None, alias='BASH_MAX_OUTPUT_LENGTH')

Maximum bash output characters before truncation

bash_max_timeout_ms class-attribute instance-attribute

bash_max_timeout_ms: str | None = Field(None, alias='BASH_MAX_TIMEOUT_MS')

Maximum bash command timeout in milliseconds (default: 600000)

beta_tracing_endpoint class-attribute instance-attribute

beta_tracing_endpoint: str | None = Field(None, alias='BETA_TRACING_ENDPOINT')

Endpoint that, together with ENABLE_BETA_TRACING_DETAILED=1, activates detailed beta tracing spans (e.g. claude_code.hook). See https://code.claude.com/docs/en/monitoring-usage#traces-beta

ccr_force_bundle class-attribute instance-attribute

ccr_force_bundle: Literal['0', '1'] | None = Field(None, alias='CCR_FORCE_BUNDLE')

Force local repo bundling for --remote invocations

claude_afk_countdown_ms class-attribute instance-attribute

claude_afk_countdown_ms: str | None = Field(None, alias='CLAUDE_AFK_COUNTDOWN_MS')

How many milliseconds before auto-continue the on-screen countdown appears on an unanswered AskUserQuestion dialog. Default 20000 (20 seconds). See CLAUDE_AFK_TIMEOUT_MS. Requires Claude Code v2.1.198 or later. See https://code.claude.com/docs/en/env-vars

claude_afk_timeout_ms class-attribute instance-attribute

claude_afk_timeout_ms: str | None = Field(None, alias='CLAUDE_AFK_TIMEOUT_MS')

How many milliseconds of idle time before an unanswered AskUserQuestion dialog auto-continues without you. Default 60000 (60 seconds). Requires Claude Code v2.1.198 or later. See https://code.claude.com/docs/en/env-vars

claude_agent_sdk_disable_builtin_agents class-attribute instance-attribute

claude_agent_sdk_disable_builtin_agents: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS"
)

Disable built-in subagent types in Agent SDK

claude_agent_sdk_mcp_no_prefix class-attribute instance-attribute

claude_agent_sdk_mcp_no_prefix: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_AGENT_SDK_MCP_NO_PREFIX"
)

Skip mcp__<server>__ prefix on MCP tool names in Agent SDK

claude_async_agent_stall_timeout_ms class-attribute instance-attribute

claude_async_agent_stall_timeout_ms: str | None = Field(
    None, alias="CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS"
)

Stall timeout for background subagents in milliseconds (default 600000). The timer resets on each streaming progress event; if no progress arrives within the window the subagent is aborted and the task is marked failed, surfacing any partial result to the parent. See https://code.claude.com/docs/en/env-vars

claude_auto_background_tasks class-attribute instance-attribute

claude_auto_background_tasks: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_AUTO_BACKGROUND_TASKS"
)

Force-enable automatic backgrounding of tasks

claude_autocompact_pct_override class-attribute instance-attribute

claude_autocompact_pct_override: str | None = Field(None, alias='CLAUDE_AUTOCOMPACT_PCT_OVERRIDE')

Context capacity percentage threshold for auto-compaction (1-100)

claude_ax_screen_reader class-attribute instance-attribute

claude_ax_screen_reader: Literal['0', '1'] | None = Field(None, alias='CLAUDE_AX_SCREEN_READER')

Set to 1 to render screen-reader friendly output: flat text without decorative borders or animations. Set to 0 to force screen-reader mode off even when axScreenReader is true. The --ax-screen-reader flag takes precedence. Requires Claude Code v2.1.181 or later. See https://code.claude.com/docs/en/env-vars

claude_bash_maintain_project_working_dir class-attribute instance-attribute

claude_bash_maintain_project_working_dir: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR"
)

Return to original project directory after each bash command

claude_client_presence_file class-attribute instance-attribute

claude_client_presence_file: str | None = Field(None, alias='CLAUDE_CLIENT_PRESENCE_FILE')

Path to a file whose existence marks the user as present; while it exists, mobile push notifications are skipped (v2.1.181+). See https://code.claude.com/docs/en/env-vars

claude_code_accessibility class-attribute instance-attribute

claude_code_accessibility: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_ACCESSIBILITY")

Keep native cursor visible for screen magnifiers and assistive tools

claude_code_additional_directories_claude_md class-attribute instance-attribute

claude_code_additional_directories_claude_md: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD"
)

Load CLAUDE.md memory files from additional directories

claude_code_alt_screen_full_repaint class-attribute instance-attribute

claude_code_alt_screen_full_repaint: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT"
)

Force a full-screen repaint on every frame in fullscreen mode. See https://code.claude.com/docs/en/env-vars

claude_code_always_enable_effort class-attribute instance-attribute

claude_code_always_enable_effort: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ALWAYS_ENABLE_EFFORT"
)

Send the effort parameter for all models, not just those with effort enabled by default. See https://code.claude.com/docs/en/env-vars

claude_code_api_key_helper_ttl_ms class-attribute instance-attribute

claude_code_api_key_helper_ttl_ms: str | None = Field(
    None, alias="CLAUDE_CODE_API_KEY_HELPER_TTL_MS"
)

Credential helper refresh interval in milliseconds

claude_code_artifact_auto_open class-attribute instance-attribute

claude_code_artifact_auto_open: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ARTIFACT_AUTO_OPEN"
)

Set to 0 to stop auto-opening the browser when a new artifact is created. See https://code.claude.com/docs/en/artifacts#create-an-artifact

claude_code_attribution_header class-attribute instance-attribute

claude_code_attribution_header: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ATTRIBUTION_HEADER"
)

Include attribution block in the system prompt

claude_code_auto_compact_window class-attribute instance-attribute

claude_code_auto_compact_window: str | None = Field(None, alias='CLAUDE_CODE_AUTO_COMPACT_WINDOW')

Context capacity for compaction calculations in tokens

claude_code_auto_connect_ide class-attribute instance-attribute

claude_code_auto_connect_ide: Literal["true", "false"] | None = Field(
    None, alias="CLAUDE_CODE_AUTO_CONNECT_IDE"
)

Override automatic IDE connection behavior

claude_code_aws_chain_resolve_timeout_ms class-attribute instance-attribute

claude_code_aws_chain_resolve_timeout_ms: str | None = Field(
    None, alias="CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS"
)

Time in milliseconds Claude Code waits for the AWS default credential provider chain to produce credentials before the request fails with "AWS default-chain credential resolve timed out" (default: 60000). Raise it when a step in your chain legitimately needs longer, such as a browser-based SSO sign-in with MFA through a wrapper like aws-vault. Applies wherever Claude Code signs with the default chain. Requires Claude Code v2.1.207 or later. See https://code.claude.com/docs/en/amazon-bedrock#credential-caching-and-resolution-timeout

claude_code_bridge_session_id class-attribute instance-attribute

claude_code_bridge_session_id: str | None = Field(None, alias='CLAUDE_CODE_BRIDGE_SESSION_ID')

Set automatically in Bash tool and hook command subprocesses while the session has an active Remote Control connection, and removed when the connection ends. The value is the session's ID in session_ form, the same identifier that appears in the session's claude.ai/code URL, so a script can link back to the session that ran it. Requires Claude Code v2.1.199 or later. See https://code.claude.com/docs/en/remote-control

claude_code_cert_store class-attribute instance-attribute

claude_code_cert_store: str | None = Field(None, alias='CLAUDE_CODE_CERT_STORE')

CA certificate sources (comma-separated: 'bundled', 'system')

claude_code_child_session class-attribute instance-attribute

claude_code_child_session: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_CHILD_SESSION")

Set by Claude Code to 1 in nested subprocesses (Bash, PowerShell, Monitor, hook commands, status-line commands) to distinguish nested sessions from a top-level claude launched in IDE terminals (v2.1.172+). A nested interactive claude TUI started this way is excluded from --resume, --continue, up-arrow history, and the claude agents list; non-interactive claude -p sessions still persist (override with CLAUDE_CODE_FORCE_SESSION_PERSISTENCE=1). See https://code.claude.com/docs/en/env-vars

claude_code_client_cert class-attribute instance-attribute

claude_code_client_cert: str | None = Field(None, alias='CLAUDE_CODE_CLIENT_CERT')

Client certificate file path for mutual TLS

claude_code_client_key class-attribute instance-attribute

claude_code_client_key: str | None = Field(None, alias='CLAUDE_CODE_CLIENT_KEY')

Client private key file path for mutual TLS

claude_code_client_key_passphrase class-attribute instance-attribute

claude_code_client_key_passphrase: str | None = Field(
    None, alias="CLAUDE_CODE_CLIENT_KEY_PASSPHRASE"
)

Passphrase for encrypted client private key

claude_code_debug_log_level class-attribute instance-attribute

claude_code_debug_log_level: Literal["verbose", "debug", "info", "warn", "error"] | None = Field(
    None, alias="CLAUDE_CODE_DEBUG_LOG_LEVEL"
)

Debug log verbosity level

claude_code_debug_logs_dir class-attribute instance-attribute

claude_code_debug_logs_dir: str | None = Field(None, alias='CLAUDE_CODE_DEBUG_LOGS_DIR')

Override the debug log file path. Despite the name, this is a file path, not a directory.

claude_code_disable_1_m_context class-attribute instance-attribute

claude_code_disable_1_m_context: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_1M_CONTEXT"
)

Disable 1M context window models

claude_code_disable_adaptive_thinking class-attribute instance-attribute

claude_code_disable_adaptive_thinking: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING"
)

Disable adaptive reasoning

claude_code_disable_advisor_tool class-attribute instance-attribute

claude_code_disable_advisor_tool: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_ADVISOR_TOOL"
)

Disable the server-side advisor tool. See https://code.claude.com/docs/en/env-vars

claude_code_disable_agent_view class-attribute instance-attribute

claude_code_disable_agent_view: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_AGENT_VIEW"
)

Turn off background agents and agent view (claude agents, --bg, /background, and the on-demand supervisor). Equivalent to the disableAgentView setting. See https://code.claude.com/docs/en/env-vars

claude_code_disable_alternate_screen class-attribute instance-attribute

claude_code_disable_alternate_screen: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN"
)

Disable alternate screen buffer rendering. When set to 1, keeps conversation in native scrollback instead of fullscreen renderer

claude_code_disable_artifact class-attribute instance-attribute

claude_code_disable_artifact: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_ARTIFACT"
)

Disable the Artifact tool. Equivalent to setting disableArtifact. See https://code.claude.com/docs/en/env-vars

claude_code_disable_attachments class-attribute instance-attribute

claude_code_disable_attachments: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_ATTACHMENTS"
)

Disable attachment processing

claude_code_disable_auto_memory class-attribute instance-attribute

claude_code_disable_auto_memory: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_AUTO_MEMORY"
)

Disable automatic memory feature

claude_code_disable_background_tasks class-attribute instance-attribute

claude_code_disable_background_tasks: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_BACKGROUND_TASKS"
)

Disable all background task functionality

claude_code_disable_bedrock_content_type_guard class-attribute instance-attribute

claude_code_disable_bedrock_content_type_guard: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD"
)

Set to 1 to skip the check that an Amazon Bedrock streaming response carries the application/vnd.amazon.eventstream content-type. Without this variable, a response with a different content-type fails with an error naming that content-type, which means a gateway or proxy is transforming the response. Set it only when the gateway rewrites the Content-Type header but passes the binary event-stream body through unmodified; if the body itself was transformed, requests fail with "Truncated event message received" instead. Requires Claude Code v2.1.208 or later. See https://code.claude.com/docs/en/amazon-bedrock#streaming-errors-behind-a-gateway-or-proxy

claude_code_disable_bg_exit_handoff class-attribute instance-attribute

claude_code_disable_bg_exit_handoff: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF"
)

Set to 1 to stop a background session's running background shell commands, dynamic workflows, and (as of v2.1.198) background subagents when the supervisor stops, restarts, or updates that session's process, instead of handing them off to the session's next process. Affects only that handoff; CLAUDE_DISABLE_ADOPT turns off both. Requires Claude Code v2.1.196 or later. See https://code.claude.com/docs/en/env-vars

claude_code_disable_bg_shell_pressure_reap class-attribute instance-attribute

claude_code_disable_bg_shell_pressure_reap: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP"
)

UNDOCUMENTED. Disable automatic memory-pressure reaping of idle background shell commands (added v2.1.193).

claude_code_disable_bundled_skills class-attribute instance-attribute

claude_code_disable_bundled_skills: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_BUNDLED_SKILLS"
)

Disable the skills and workflows bundled with Claude Code (plugins and project .claude/skills are unaffected). See https://code.claude.com/docs/en/env-vars

claude_code_disable_claude_mds class-attribute instance-attribute

claude_code_disable_claude_mds: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_CLAUDE_MDS"
)

Prevent loading CLAUDE.md memory files

claude_code_disable_cron class-attribute instance-attribute

claude_code_disable_cron: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_DISABLE_CRON')

Disable scheduled/cron tasks

claude_code_disable_experimental_betas class-attribute instance-attribute

claude_code_disable_experimental_betas: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS"
)

Strip anthropic-beta headers from API requests. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21123

claude_code_disable_explore_plan_agents class-attribute instance-attribute

claude_code_disable_explore_plan_agents: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS"
)

Set to 1 to disable the built-in Explore and Plan subagents. Requires Claude Code v2.1.198 or later. See https://code.claude.com/docs/en/env-vars

claude_code_disable_fast_mode class-attribute instance-attribute

claude_code_disable_fast_mode: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_FAST_MODE"
)

Disable fast mode toggle

claude_code_disable_feedback_survey class-attribute instance-attribute

claude_code_disable_feedback_survey: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY"
)

Disable session quality feedback surveys

claude_code_disable_file_checkpointing class-attribute instance-attribute

claude_code_disable_file_checkpointing: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING"
)

Disable file checkpointing for /rewind

claude_code_disable_git_instructions class-attribute instance-attribute

claude_code_disable_git_instructions: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS"
)

Remove git commit and PR workflow instructions from the system prompt

claude_code_disable_legacy_model_remap class-attribute instance-attribute

claude_code_disable_legacy_model_remap: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP"
)

Prevent automatic remapping of legacy model names

claude_code_disable_mouse class-attribute instance-attribute

claude_code_disable_mouse: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_DISABLE_MOUSE")

Disable mouse tracking in fullscreen mode. See https://code.claude.com/docs/en/fullscreen#keep-native-text-selection

claude_code_disable_mouse_clicks class-attribute instance-attribute

claude_code_disable_mouse_clicks: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_MOUSE_CLICKS"
)

Disable mouse click/drag/hover in fullscreen mode while keeping wheel scroll (requires v2.1.195+). CLAUDE_CODE_DISABLE_MOUSE takes precedence when both variables are set. See https://code.claude.com/docs/en/fullscreen#keep-native-text-selection

claude_code_disable_nonessential_traffic class-attribute instance-attribute

claude_code_disable_nonessential_traffic: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC"
)

Disable auto-update checks, telemetry, and feedback in one setting

claude_code_disable_nonstreaming_fallback class-attribute instance-attribute

claude_code_disable_nonstreaming_fallback: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK"
)

Disable fallback to non-streaming API mode

claude_code_disable_notification_presence_check class-attribute instance-attribute

claude_code_disable_notification_presence_check: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECK"
)

Set to 1 to send desktop notifications from the PushNotification tool even while focused on the terminal. Requires Claude Code v2.1.193 or later. See https://code.claude.com/docs/en/env-vars

claude_code_disable_official_marketplace_autoinstall class-attribute instance-attribute

claude_code_disable_official_marketplace_autoinstall: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL"
)

Skip automatic installation of official marketplace plugins. See https://code.claude.com/docs/en/env-vars

claude_code_disable_policy_skills class-attribute instance-attribute

claude_code_disable_policy_skills: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_POLICY_SKILLS"
)

Skip loading system-wide policy skills. See https://code.claude.com/docs/en/env-vars

claude_code_disable_terminal_title class-attribute instance-attribute

claude_code_disable_terminal_title: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_TERMINAL_TITLE"
)

Disable terminal title updates

claude_code_disable_thinking class-attribute instance-attribute

claude_code_disable_thinking: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_THINKING"
)

Force-disable extended thinking

claude_code_disable_virtual_scroll class-attribute instance-attribute

claude_code_disable_virtual_scroll: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL"
)

Disable virtual scrolling in fullscreen mode

claude_code_disable_workflows class-attribute instance-attribute

claude_code_disable_workflows: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_DISABLE_WORKFLOWS"
)

Set to 1 to disable workflows. Equivalent to the disableWorkflows setting. See https://code.claude.com/docs/en/env-vars

claude_code_effort_level class-attribute instance-attribute

claude_code_effort_level: Literal["low", "medium", "high", "xhigh", "max", "auto"] | None = Field(
    None, alias="CLAUDE_CODE_EFFORT_LEVEL"
)

Reasoning effort level

claude_code_enable_append_subagent_prompt class-attribute instance-attribute

claude_code_enable_append_subagent_prompt: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT"
)

Set to 1 to enable appending extra text to the end of every subagent's system prompt. The --append-subagent-system-prompt flag supplies the appended text and sets this variable automatically, so you do not need to set it yourself. Requires Claude Code v2.1.205 or later. See https://code.claude.com/docs/en/sub-agents

claude_code_enable_auto_mode class-attribute instance-attribute

claude_code_enable_auto_mode: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_AUTO_MODE"
)

Set to 1 to make auto mode available on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry (requires v2.1.158+; no effect on the Anthropic API where auto mode is available by default). See https://code.claude.com/docs/en/env-vars

claude_code_enable_away_summary class-attribute instance-attribute

claude_code_enable_away_summary: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_AWAY_SUMMARY"
)

Override session recap/away summary availability

claude_code_enable_background_plugin_refresh class-attribute instance-attribute

claude_code_enable_background_plugin_refresh: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH"
)

Refresh plugins at turn boundaries. See https://code.claude.com/docs/en/env-vars

claude_code_enable_feedback_survey_for_otel class-attribute instance-attribute

claude_code_enable_feedback_survey_for_otel: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL"
)

Enable feedback survey collection via OpenTelemetry for enterprises

claude_code_enable_fine_grained_tool_streaming class-attribute instance-attribute

claude_code_enable_fine_grained_tool_streaming: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING"
)

Force fine-grained tool output streaming

claude_code_enable_gateway_model_discovery class-attribute instance-attribute

claude_code_enable_gateway_model_discovery: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY"
)

Enable model discovery from LLM gateway /v1/models endpoint when ANTHROPIC_BASE_URL points at an Anthropic-compatible gateway

claude_code_enable_prompt_suggestion class-attribute instance-attribute

claude_code_enable_prompt_suggestion: Literal["true", "false"] | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION"
)

Enable prompt suggestions

claude_code_enable_sdk_file_checkpointing class-attribute instance-attribute

claude_code_enable_sdk_file_checkpointing: str | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING"
)

Enable file checkpointing for a non-interactive CLI run, so claude -p --resume--rewind-files`` can rewind files. The Agent SDK sets this internally when enable_file_checkpointing (Python) or enableFileCheckpointing (TypeScript) is enabled; the bare CLI never sets it. Without it, a non-interactive rewind fails with "File rewinding is not enabled". See https://code.claude.com/docs/en/agent-sdk/file-checkpointing

claude_code_enable_tasks class-attribute instance-attribute

claude_code_enable_tasks: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_ENABLE_TASKS')

Enable task tracking in non-interactive mode

claude_code_enable_telemetry class-attribute instance-attribute

claude_code_enable_telemetry: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ENABLE_TELEMETRY"
)

Set to 1 to enable telemetry collection. Required for all OpenTelemetry integration. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

claude_code_enhanced_telemetry_beta class-attribute instance-attribute

claude_code_enhanced_telemetry_beta: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_ENHANCED_TELEMETRY_BETA"
)

Enable the enhanced telemetry (tracing) beta. ENABLE_ENHANCED_TELEMETRY_BETA is also accepted. See https://code.claude.com/docs/en/monitoring-usage#traces-beta

claude_code_exit_after_stop_delay class-attribute instance-attribute

claude_code_exit_after_stop_delay: str | None = Field(
    None, alias="CLAUDE_CODE_EXIT_AFTER_STOP_DELAY"
)

Wait time in milliseconds before auto-exit after stop

claude_code_experimental_agent_teams class-attribute instance-attribute

claude_code_experimental_agent_teams: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS"
)

Enable experimental agent teams feature

claude_code_extra_body class-attribute instance-attribute

claude_code_extra_body: str | None = Field(None, alias='CLAUDE_CODE_EXTRA_BODY')

JSON object to merge into every API request body

claude_code_file_read_max_output_tokens class-attribute instance-attribute

claude_code_file_read_max_output_tokens: str | None = Field(
    None, alias="CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS"
)

Token limit for file read operations

claude_code_force_session_persistence class-attribute instance-attribute

claude_code_force_session_persistence: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_FORCE_SESSION_PERSISTENCE"
)

Set to 1 to override the automatic exclusion of nested interactive claude TUI sessions from --resume, --continue, up-arrow history, and the claude agents list (requires v2.1.172+). See https://code.claude.com/docs/en/env-vars

claude_code_force_strikethrough class-attribute instance-attribute

claude_code_force_strikethrough: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_FORCE_STRIKETHROUGH"
)

Set to 1 to force strikethrough rendering for ~~text~~ in Claude's responses when the terminal supports it but is not auto-detected, such as over SSH without TERM_PROGRAM forwarded. Without this, undetected terminals show the literal ~~ markers. Requires Claude Code v2.1.186 or later. See https://code.claude.com/docs/en/env-vars

claude_code_force_sync_output class-attribute instance-attribute

claude_code_force_sync_output: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_FORCE_SYNC_OUTPUT"
)

Force synchronous output flushing. When set to 1, forces synchronized output on terminals that auto-detection misses (e.g., Emacs eat)

claude_code_fork_subagent class-attribute instance-attribute

claude_code_fork_subagent: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_FORK_SUBAGENT")

Fork subagent processes in non-interactive sessions. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21120

claude_code_forward_subagent_text class-attribute instance-attribute

claude_code_forward_subagent_text: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_FORWARD_SUBAGENT_TEXT"
)

Set to 1 to emit subagent text and thinking blocks in claude -p --output-format stream-json output, the same behavior as the --forward-subagent-text flag. Use the variable when a harness invokes claude and cannot pass the flag itself. Unlike the flag, which exits with an error outside non-interactive mode with stream-json output, the variable is ignored there so that nested invocations keep working when it is set process-wide. Requires Claude Code v2.1.211 or later. See https://code.claude.com/docs/en/sub-agents

claude_code_git_bash_path class-attribute instance-attribute

claude_code_git_bash_path: str | None = Field(None, alias='CLAUDE_CODE_GIT_BASH_PATH')

Path to Git Bash executable (Windows only)

claude_code_glob_hidden class-attribute instance-attribute

claude_code_glob_hidden: Literal["true", "false"] | None = Field(
    None, alias="CLAUDE_CODE_GLOB_HIDDEN"
)

Include dotfiles/hidden files in Glob results

claude_code_glob_no_ignore class-attribute instance-attribute

claude_code_glob_no_ignore: Literal["true", "false"] | None = Field(
    None, alias="CLAUDE_CODE_GLOB_NO_IGNORE"
)

Don't respect .gitignore rules in Glob results

claude_code_glob_timeout_seconds class-attribute instance-attribute

claude_code_glob_timeout_seconds: str | None = Field(None, alias="CLAUDE_CODE_GLOB_TIMEOUT_SECONDS")

Glob tool timeout in seconds (default: 20-60)

claude_code_hide_cwd class-attribute instance-attribute

claude_code_hide_cwd: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_HIDE_CWD')

Hide the working directory in the startup logo. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21126

claude_code_ide_host_override class-attribute instance-attribute

claude_code_ide_host_override: str | None = Field(None, alias='CLAUDE_CODE_IDE_HOST_OVERRIDE')

Override IDE connection address

claude_code_ide_skip_auto_install class-attribute instance-attribute

claude_code_ide_skip_auto_install: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL"
)

Skip automatic IDE extension installation

claude_code_ide_skip_valid_check class-attribute instance-attribute

claude_code_ide_skip_valid_check: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_IDE_SKIP_VALID_CHECK"
)

Skip IDE lockfile validation

claude_code_max_concurrent_subagents class-attribute instance-attribute

claude_code_max_concurrent_subagents: str | None = Field(
    None, alias="CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS"
)

How many subagents can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but cannot disable it. Requires Claude Code v2.1.217 or later. See https://code.claude.com/docs/en/sub-agents#concurrent-subagent-limit

claude_code_max_context_tokens class-attribute instance-attribute

claude_code_max_context_tokens: str | None = Field(None, alias='CLAUDE_CODE_MAX_CONTEXT_TOKENS')

Override context window size in tokens

claude_code_max_output_tokens class-attribute instance-attribute

claude_code_max_output_tokens: str | None = Field(None, alias='CLAUDE_CODE_MAX_OUTPUT_TOKENS')

Maximum output tokens per API request

claude_code_max_retries class-attribute instance-attribute

claude_code_max_retries: str | None = Field(None, alias='CLAUDE_CODE_MAX_RETRIES')

Maximum API request retry attempts (default: 10)

claude_code_max_subagent_spawn_depth class-attribute instance-attribute

claude_code_max_subagent_spawn_depth: str | None = Field(
    None, alias="CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH"
)

Number of subagent layers allowed below the main conversation (default: 1). At the default, subagents cannot spawn their own subagents; set 2 or higher to allow it. Accepts a positive whole number in plain digits; anything else is ignored, so the limit can be raised but not turned off. Requires Claude Code v2.1.217 or later. See https://code.claude.com/docs/en/sub-agents#let-subagents-spawn-their-own-subagents

claude_code_max_subagents_per_session class-attribute instance-attribute

claude_code_max_subagents_per_session: str | None = Field(
    None, alias="CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION"
)

Cap on the number of subagents one session can spawn with the Agent tool (default: 200). When Claude reaches the cap, spawning another subagent fails with an error telling Claude to finish the remaining work directly. Accepts a positive whole number in plain digits with no upper bound; this variable does not take the scientific notation or digit-separator spellings. Anything else is ignored and the default applies, so the cap can be raised but not turned off. Requires Claude Code v2.1.212 or later. See https://code.claude.com/docs/en/sub-agents#session-subagent-limit

claude_code_max_tool_use_concurrency class-attribute instance-attribute

claude_code_max_tool_use_concurrency: str | None = Field(
    None, alias="CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY"
)

Maximum parallel tool executions (default: 10)

claude_code_max_turns class-attribute instance-attribute

claude_code_max_turns: str | None = Field(None, alias='CLAUDE_CODE_MAX_TURNS')

Cap the number of agentic turns when no explicit limit is passed. Equivalent to --max-turns, which takes precedence. A non-positive integer is rejected at startup. See https://code.claude.com/docs/en/env-vars

claude_code_max_web_searches_per_session class-attribute instance-attribute

claude_code_max_web_searches_per_session: str | None = Field(
    None, alias="CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION"
)

Cap on the total number of WebSearch calls one session can make (default: 200). When Claude reaches the cap, further WebSearch calls return a notice telling it to continue with the information it already gathered. Accepts a positive whole number with no upper bound. Anything else is ignored and the default applies, so the cap can be raised but not turned off. Requires Claude Code v2.1.212 or later. See https://code.claude.com/docs/en/tools-reference#websearch-tool-behavior

claude_code_mcp_allowlist_env class-attribute instance-attribute

claude_code_mcp_allowlist_env: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_MCP_ALLOWLIST_ENV"
)

Isolate MCP server environments to allowlisted variables

claude_code_mcp_auto_background_ms class-attribute instance-attribute

claude_code_mcp_auto_background_ms: str | None = Field(
    None, alias="CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS"
)

Elapsed time in milliseconds before a still-running MCP tool call moves to a background task (default: 120000, or 2 minutes). Set to 0 to turn automatic backgrounding off. Requires Claude Code v2.1.212 or later. See https://code.claude.com/docs/en/mcp#automatic-backgrounding-of-long-tool-calls

claude_code_mcp_tool_idle_timeout class-attribute instance-attribute

claude_code_mcp_tool_idle_timeout: str | None = Field(
    None, alias="CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT"
)

Idle timeout in milliseconds for MCP tool calls. When a stdio, HTTP, SSE, WebSocket, or claude.ai connector MCP server sends no response and no progress notification for this long, the tool call aborts with an error instead of waiting for the overall MCP_TOOL_TIMEOUT. Overrides the per-transport defaults of 300000 (5 minutes) for network servers and 1800000 (30 minutes) for stdio servers. Set to 0 to disable the idle check. Values below 1000 are raised to one second, and the value is capped at the effective MCP_TOOL_TIMEOUT. A per-server timeout in .mcp.json of at least 1000 raises that server's idle window to at least the timeout value. Does not apply to IDE servers or SDK in-process servers. Requires Claude Code v2.1.187 or later. Before v2.1.203, stdio servers were exempt from the idle timeout. See https://code.claude.com/docs/en/mcp

claude_code_native_cursor class-attribute instance-attribute

claude_code_native_cursor: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_NATIVE_CURSOR")

Set to 1 to show the terminal's own cursor at the input caret instead of a drawn block. The cursor respects the terminal's blink, shape, and focus settings. See https://code.claude.com/docs/en/env-vars

claude_code_new_init class-attribute instance-attribute

claude_code_new_init: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_NEW_INIT')

Use the interactive /init setup flow

claude_code_no_flicker class-attribute instance-attribute

claude_code_no_flicker: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_NO_FLICKER')

Enable fullscreen rendering mode to reduce flicker

claude_code_oauth_refresh_token class-attribute instance-attribute

claude_code_oauth_refresh_token: str | None = Field(None, alias='CLAUDE_CODE_OAUTH_REFRESH_TOKEN')

OAuth refresh token

claude_code_oauth_scopes class-attribute instance-attribute

claude_code_oauth_scopes: str | None = Field(None, alias='CLAUDE_CODE_OAUTH_SCOPES')

OAuth scopes (space-separated)

claude_code_oauth_token class-attribute instance-attribute

claude_code_oauth_token: str | None = Field(None, alias='CLAUDE_CODE_OAUTH_TOKEN')

OAuth access token

claude_code_otel_content_max_length class-attribute instance-attribute

claude_code_otel_content_max_length: str | None = Field(
    None, alias="CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH"
)

Maximum length of content-bearing OpenTelemetry attributes (model responses, tool content, system prompts, raw API bodies), truncation marker included, in UTF-16 code units (default: 61440, i.e. 60 KB). Raise it only if your telemetry backend accepts attribute values larger than 64 KB, or lower it to cut telemetry volume. Requires Claude Code v2.1.214 or later. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

claude_code_otel_diag_stderr class-attribute instance-attribute

claude_code_otel_diag_stderr: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_OTEL_DIAG_STDERR"
)

Set to 1 to write OpenTelemetry exporter diagnostic errors to stderr (otherwise shown only with --debug). Requires v2.1.179+. See https://code.claude.com/docs/en/env-vars

claude_code_otel_flush_timeout_ms class-attribute instance-attribute

claude_code_otel_flush_timeout_ms: str | None = Field(
    None, alias="CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS"
)

OpenTelemetry span flush timeout in milliseconds (default: 5000)

claude_code_otel_headers_helper_debounce_ms class-attribute instance-attribute

claude_code_otel_headers_helper_debounce_ms: str | None = Field(
    None, alias="CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS"
)

OpenTelemetry header helper refresh interval in milliseconds

claude_code_otel_shutdown_timeout_ms class-attribute instance-attribute

claude_code_otel_shutdown_timeout_ms: str | None = Field(
    None, alias="CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS"
)

OpenTelemetry shutdown timeout in milliseconds (default: 2000)

claude_code_package_manager_auto_update class-attribute instance-attribute

claude_code_package_manager_auto_update: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE"
)

Enable automatic package manager updates. When set, Claude Code runs the upgrade command in background on Homebrew/WinGet and prompts to restart

claude_code_perforce_mode class-attribute instance-attribute

claude_code_perforce_mode: Literal["0", "1"] | None = Field(None, alias="CLAUDE_CODE_PERFORCE_MODE")

Enable Perforce write protection mode

claude_code_plugin_cache_dir class-attribute instance-attribute

claude_code_plugin_cache_dir: str | None = Field(None, alias='CLAUDE_CODE_PLUGIN_CACHE_DIR')

Override the plugins root directory. Despite the name, this sets the parent directory, not the cache itself: marketplaces and the plugin cache live in subdirectories under this path. Defaults to ~/.claude/plugins. See https://code.claude.com/docs/en/env-vars

claude_code_plugin_git_timeout_ms class-attribute instance-attribute

claude_code_plugin_git_timeout_ms: str | None = Field(
    None, alias="CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS"
)

Plugin marketplace git operations timeout in milliseconds (default: 120000). See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2151

claude_code_plugin_keep_marketplace_on_failure class-attribute instance-attribute

claude_code_plugin_keep_marketplace_on_failure: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE"
)

Keep plugin cache on update failure

claude_code_plugin_prefer_https class-attribute instance-attribute

claude_code_plugin_prefer_https: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_PLUGIN_PREFER_HTTPS"
)

Set to 1 to clone GitHub owner/repo plugin sources over HTTPS instead of SSH. Useful in CI runners, containers, or environments without a configured SSH key for github.com. See https://code.claude.com/docs/en/env-vars

claude_code_plugin_seed_dir class-attribute instance-attribute

claude_code_plugin_seed_dir: str | None = Field(None, alias='CLAUDE_CODE_PLUGIN_SEED_DIR')

Path(s) to pre-populated plugin directories. See https://code.claude.com/docs/en/plugin-marketplaces#pre-populate-plugins-for-containers

claude_code_powershell_respect_execution_policy class-attribute instance-attribute

claude_code_powershell_respect_execution_policy: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY"
)

Set to 1 to stop Claude Code from passing -ExecutionPolicy Bypass when spawning PowerShell for tool calls, hooks, and status line commands. By default Claude Code bypasses execution policy so .ps1 scripts work on default-Restricted Windows installs. See https://code.claude.com/docs/en/env-vars

claude_code_print_bg_wait_ceiling_ms class-attribute instance-attribute

claude_code_print_bg_wait_ceiling_ms: str | None = Field(
    None, alias="CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS"
)

Cap, in milliseconds, on how long claude -p waits for background subagents at exit (default 10 minutes; set to 0 to wait without limit, added v2.1.182). See https://code.claude.com/docs/en/headless#background-tasks-at-exit

claude_code_process_wrapper class-attribute instance-attribute

claude_code_process_wrapper: str | None = Field(None, alias='CLAUDE_CODE_PROCESS_WRAPPER')

Launch the processes Claude Code starts from its own binary, such as the background service that hosts agent view sessions, through a corporate launcher given as an argv prefix like /opt/corp/launcher. Set it in the env block of user or managed settings, not as a shell export, so the detached background service inherits it; project and local settings cannot set it. Equivalent to the processWrapper setting, which requires Claude Code v2.1.210 or later; this variable takes precedence when both are set. The VS Code extension configures its own launcher separately through its claudeProcessWrapper setting. Ignored on Windows. Requires Claude Code v2.1.208 or later. See https://code.claude.com/docs/en/corporate-launcher

claude_code_propagate_traceparent class-attribute instance-attribute

claude_code_propagate_traceparent: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_PROPAGATE_TRACEPARENT"
)

Propagate the W3C traceparent header on API requests when using a custom ANTHROPIC_BASE_URL. See https://code.claude.com/docs/en/monitoring-usage#traces-beta

claude_code_provider_managed_by_host class-attribute instance-attribute

claude_code_provider_managed_by_host: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST"
)

Indicate that the host application manages provider routing

claude_code_proxy_resolves_hosts class-attribute instance-attribute

claude_code_proxy_resolves_hosts: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_PROXY_RESOLVES_HOSTS"
)

Allow proxy to handle DNS resolution

claude_code_remote class-attribute instance-attribute

claude_code_remote: Literal['true', 'false'] | None = Field(None, alias='CLAUDE_CODE_REMOTE')

Indicates a remote web environment session

claude_code_remote_session_id class-attribute instance-attribute

claude_code_remote_session_id: str | None = Field(None, alias='CLAUDE_CODE_REMOTE_SESSION_ID')

Cloud session identifier for remote sessions

claude_code_resume_interrupted_turn class-attribute instance-attribute

claude_code_resume_interrupted_turn: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_RESUME_INTERRUPTED_TURN"
)

Automatically resume from a mid-turn interruption

claude_code_resume_interrupted_turn_max_age_ms class-attribute instance-attribute

claude_code_resume_interrupted_turn_max_age_ms: str | None = Field(
    None, alias="CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS"
)

Maximum age in milliseconds of the last transcript message for a session that ended mid-turn to continue automatically on resume. When the last message is older than this bound, Claude Code skips both the CLAUDE_CODE_RESUME_INTERRUPTED_TURN automatic resume and the injected CLAUDE_CODE_RESUME_PROMPT continuation message, and the session starts idle so you continue explicitly. Unset or 0 means no bound; a negative or non-numeric value applies a one-hour bound. Spawn scripts for long-running agents can set this so a restart against an old transcript does not re-run a stale prompt. Claude Code sets a one-hour bound itself when it restarts a crashed agent view session that inherited its conversation from an interactive session. Requires Claude Code v2.1.211 or later. See https://code.claude.com/docs/en/env-vars

claude_code_resume_prompt class-attribute instance-attribute

claude_code_resume_prompt: str | None = Field(None, alias='CLAUDE_CODE_RESUME_PROMPT')

Override the continuation message injected when resuming a session that ended mid-turn (default "Continue from where you left off."). An empty string uses the default. See https://code.claude.com/docs/en/env-vars

claude_code_retry_watchdog class-attribute instance-attribute

claude_code_retry_watchdog: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_RETRY_WATCHDOG"
)

Set to 1 for unattended sessions (eval harnesses, CI, remote workers) to retry 429/529 capacity errors indefinitely, backing off up to 5 minutes, instead of failing after CLAUDE_CODE_MAX_RETRIES. Requires v2.1.186+. See https://code.claude.com/docs/en/env-vars

claude_code_safe_mode class-attribute instance-attribute

claude_code_safe_mode: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_SAFE_MODE')

Set to 1 to start in safe mode: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto-memory do not load, for troubleshooting a broken configuration. Managed settings policy still applies. Equivalent to passing --safe-mode; directly spawned child processes inherit the variable. See https://code.claude.com/docs/en/env-vars

claude_code_script_caps class-attribute instance-attribute

claude_code_script_caps: str | None = Field(None, alias='CLAUDE_CODE_SCRIPT_CAPS')

Script invocation limits (JSON object)

claude_code_scroll_speed class-attribute instance-attribute

claude_code_scroll_speed: str | None = Field(None, alias='CLAUDE_CODE_SCROLL_SPEED')

Set the mouse wheel scroll multiplier in fullscreen rendering. Accepts any positive value up to 20, including fractional values below 1 such as 0.5 to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. Set to 3 to match vim if your terminal sends one wheel event per notch without amplification. See https://code.claude.com/docs/en/fullscreen#mouse-wheel-scrolling

claude_code_session_id class-attribute instance-attribute

claude_code_session_id: str | None = Field(None, alias='CLAUDE_CODE_SESSION_ID')

Set automatically to the current session ID in Bash/PowerShell tool subprocesses, hook command subprocesses, and stdio MCP server subprocesses. Read-only. See https://code.claude.com/docs/en/env-vars

claude_code_sessionend_hooks_timeout_ms class-attribute instance-attribute

claude_code_sessionend_hooks_timeout_ms: str | None = Field(
    None, alias="CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS"
)

Override the time budget in milliseconds for SessionEnd hooks (default 1500, raised up to 60000 by the highest configured per-hook timeout). See https://code.claude.com/docs/en/env-vars

claude_code_shell class-attribute instance-attribute

claude_code_shell: str | None = Field(None, alias='CLAUDE_CODE_SHELL')

Override automatic shell detection (e.g., '/bin/zsh', '/bin/bash')

claude_code_shell_prefix class-attribute instance-attribute

claude_code_shell_prefix: str | None = Field(None, alias='CLAUDE_CODE_SHELL_PREFIX')

Command prefix wrapper for shell commands

claude_code_simple class-attribute instance-attribute

claude_code_simple: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_SIMPLE')

Minimal mode with core tools only

claude_code_simple_system_prompt class-attribute instance-attribute

claude_code_simple_system_prompt: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT"
)

Use a shortened system prompt

claude_code_skip_anthropic_aws_auth class-attribute instance-attribute

claude_code_skip_anthropic_aws_auth: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH"
)

Skip client-side SigV4 authentication for Claude Platform on AWS; use when a proxy or gateway adds authentication before forwarding. See https://code.claude.com/docs/en/claude-platform-on-aws#route-through-a-corporate-proxy

claude_code_skip_aws_cred_cache class-attribute instance-attribute

claude_code_skip_aws_cred_cache: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SKIP_AWS_CRED_CACHE"
)

Set to 1 to turn off the in-process cache of credentials resolved from the AWS default credential provider chain, so Claude Code resolves the chain on every API request. With the cache off, an SSO-backed profile requests credentials from IAM Identity Center on every request. Requires Claude Code v2.1.207 or later. See https://code.claude.com/docs/en/amazon-bedrock#credential-caching-and-resolution-timeout

claude_code_skip_bedrock_auth class-attribute instance-attribute

claude_code_skip_bedrock_auth: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SKIP_BEDROCK_AUTH"
)

Skip AWS authentication for Bedrock

claude_code_skip_fast_mode_network_errors class-attribute instance-attribute

claude_code_skip_fast_mode_network_errors: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS"
)

Set to 1 to treat a failed fast mode availability check as available, for networks that block the check's direct request to api.anthropic.com. Claude Code still honors a "disabled by your organization" response. See https://code.claude.com/docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways

claude_code_skip_fast_mode_org_check class-attribute instance-attribute

claude_code_skip_fast_mode_org_check: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK"
)

Set to 1 to skip the client-side fast mode availability check, for proxies that intercept the check's request rather than refuse it. The API still rejects fast mode requests when your organization has fast mode disabled. See https://code.claude.com/docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways

claude_code_skip_foundry_auth class-attribute instance-attribute

claude_code_skip_foundry_auth: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SKIP_FOUNDRY_AUTH"
)

Skip Azure authentication for Foundry

claude_code_skip_mantle_auth class-attribute instance-attribute

claude_code_skip_mantle_auth: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SKIP_MANTLE_AUTH"
)

Skip AWS authentication for Bedrock Mantle (for example, when using an LLM gateway). See https://code.claude.com/docs/en/env-vars

claude_code_skip_prompt_history class-attribute instance-attribute

claude_code_skip_prompt_history: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SKIP_PROMPT_HISTORY"
)

Disable transcript writes entirely. See https://code.claude.com/docs/en/settings#environment-variables

claude_code_skip_vertex_auth class-attribute instance-attribute

claude_code_skip_vertex_auth: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SKIP_VERTEX_AUTH"
)

Skip Google authentication for Google Cloud's Agent Platform

claude_code_stop_hook_block_cap class-attribute instance-attribute

claude_code_stop_hook_block_cap: str | None = Field(None, alias='CLAUDE_CODE_STOP_HOOK_BLOCK_CAP')

Override the default maximum consecutive Stop hook blocks (default: 8) before the turn ends with a warning. Raise this when a stop hook legitimately needs more than 8 iterations to converge. See https://code.claude.com/docs/en/hooks-guide

claude_code_subagent_model class-attribute instance-attribute

claude_code_subagent_model: str | None = Field(None, alias='CLAUDE_CODE_SUBAGENT_MODEL')

Override model used by subagents

claude_code_subprocess_env_scrub class-attribute instance-attribute

claude_code_subprocess_env_scrub: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SUBPROCESS_ENV_SCRUB"
)

Strip credentials from subprocess environments

claude_code_sync_plugin_install class-attribute instance-attribute

claude_code_sync_plugin_install: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_SYNC_PLUGIN_INSTALL"
)

Wait synchronously for plugin installation

claude_code_sync_plugin_install_timeout_ms class-attribute instance-attribute

claude_code_sync_plugin_install_timeout_ms: str | None = Field(
    None, alias="CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS"
)

Timeout in milliseconds for synchronous plugin installation

claude_code_sync_skills class-attribute instance-attribute

claude_code_sync_skills: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_SYNC_SKILLS')

Set to 1 to download enabled claude.ai skills into ~/.claude/skills/ before the first query and resync every 10 minutes (non-interactive -p mode only; requires claude.ai auth). See https://code.claude.com/docs/en/env-vars

claude_code_sync_skills_install_timeout_ms class-attribute instance-attribute

claude_code_sync_skills_install_timeout_ms: str | None = Field(
    None, alias="CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS"
)

Timeout in milliseconds for a mid-session skills resync when CLAUDE_CODE_SYNC_SKILLS is set (default 30000). See https://code.claude.com/docs/en/env-vars

claude_code_sync_skills_wait_timeout_ms class-attribute instance-attribute

claude_code_sync_skills_wait_timeout_ms: str | None = Field(
    None, alias="CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS"
)

Timeout in milliseconds for the first query to wait on the initial skills sync when CLAUDE_CODE_SYNC_SKILLS is set (default 5000). See https://code.claude.com/docs/en/env-vars

claude_code_syntax_highlight class-attribute instance-attribute

claude_code_syntax_highlight: Literal["true", "false"] | None = Field(
    None, alias="CLAUDE_CODE_SYNTAX_HIGHLIGHT"
)

UNDOCUMENTED. Enable syntax highlighting in diffs

claude_code_task_list_id class-attribute instance-attribute

claude_code_task_list_id: str | None = Field(None, alias='CLAUDE_CODE_TASK_LIST_ID')

Shared task list identifier for team collaboration

claude_code_team_name class-attribute instance-attribute

claude_code_team_name: str | None = Field(None, alias='CLAUDE_CODE_TEAM_NAME')

Agent team membership name

claude_code_team_teardown_park_timeout_ms class-attribute instance-attribute

claude_code_team_teardown_park_timeout_ms: str | None = Field(
    None, alias="CLAUDE_CODE_TEAM_TEARDOWN_PARK_TIMEOUT_MS"
)

Override, in milliseconds, how long a non-interactive session waits at exit for its agent team to finish tearing down. Accepts 1000 to 60000; an out-of-range value is ignored and the default of 10000 applies. Requires Claude Code v2.1.206 or later. See https://code.claude.com/docs/en/agent-teams

claude_code_tmpdir class-attribute instance-attribute

claude_code_tmpdir: str | None = Field(None, alias='CLAUDE_CODE_TMPDIR')

Override temp directory path

claude_code_tmux_truecolor class-attribute instance-attribute

claude_code_tmux_truecolor: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_TMUX_TRUECOLOR"
)

Allow 24-bit truecolor rendering in tmux

claude_code_use_anthropic_aws class-attribute instance-attribute

claude_code_use_anthropic_aws: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_USE_ANTHROPIC_AWS"
)

Enable Claude Platform on AWS as the API provider. Bedrock and Foundry take precedence if also set. See https://code.claude.com/docs/en/claude-platform-on-aws#2-configure-claude-code

claude_code_use_bedrock class-attribute instance-attribute

claude_code_use_bedrock: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_USE_BEDROCK')

Enable Amazon Bedrock as the API provider. See https://code.claude.com/docs/en/amazon-bedrock#3-configure-claude-code

claude_code_use_foundry class-attribute instance-attribute

claude_code_use_foundry: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_USE_FOUNDRY')

Enable Microsoft Foundry as the API provider. See https://code.claude.com/docs/en/microsoft-foundry#3-configure-claude-code

claude_code_use_mantle class-attribute instance-attribute

claude_code_use_mantle: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_USE_MANTLE')

Enable the Mantle endpoint (native Anthropic API shape on Bedrock). See https://code.claude.com/docs/en/amazon-bedrock#enable-mantle

claude_code_use_native_file_search: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_USE_NATIVE_FILE_SEARCH"
)

Set to 1 to discover custom commands, subagents, and output styles using Node.js file APIs instead of ripgrep (for environments where the bundled ripgrep is unavailable). See https://code.claude.com/docs/en/env-vars

claude_code_use_powershell_tool class-attribute instance-attribute

claude_code_use_powershell_tool: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_CODE_USE_POWERSHELL_TOOL"
)

Enable PowerShell as default shell for interactive commands (Windows)

claude_code_use_vertex class-attribute instance-attribute

claude_code_use_vertex: Literal['0', '1'] | None = Field(None, alias='CLAUDE_CODE_USE_VERTEX')

Enable Google Cloud's Agent Platform as the API provider. See https://code.claude.com/docs/en/google-vertex-ai#4-configure-claude-code

claude_config_dir class-attribute instance-attribute

claude_config_dir: str | None = Field(None, alias='CLAUDE_CONFIG_DIR')

Override the configuration directory (default ~/.claude) where settings, credentials, session history, and plugins are stored. Useful for running multiple accounts side by side. See https://code.claude.com/docs/en/env-vars

claude_disable_adopt class-attribute instance-attribute

claude_disable_adopt: Literal['0', '1'] | None = Field(None, alias='CLAUDE_DISABLE_ADOPT')

Set to 1 to stop in-flight background work instead of carrying it over when you background a session by pressing ← or with /background. Claude Code asks you to confirm before backgrounding, then stops the tasks that would otherwise carry over. Requires Claude Code v2.1.195 or later. See https://code.claude.com/docs/en/env-vars

claude_effort class-attribute instance-attribute

claude_effort: Literal["low", "medium", "high", "xhigh", "max"] | None = Field(
    None, alias="CLAUDE_EFFORT"
)

Set automatically in Bash tool subprocesses and hook commands to the active effort level for the turn (low, medium, high, xhigh, or max; ultracode reports as xhigh). Read-only. See https://code.claude.com/docs/en/env-vars

claude_enable_byte_watchdog class-attribute instance-attribute

claude_enable_byte_watchdog: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_ENABLE_BYTE_WATCHDOG"
)

Set to 1 to force-enable, or 0 to force-disable, the byte-level streaming idle watchdog that aborts a connection when no bytes arrive within the configured timeout. Enabled by default on direct Anthropic API and Claude Platform on AWS connections. See https://code.claude.com/docs/en/env-vars

claude_enable_byte_watchdog_bedrock class-attribute instance-attribute

claude_enable_byte_watchdog_bedrock: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK"
)

Set to 1 to enable the byte-level streaming idle watchdog on Amazon Bedrock eventstream responses (off by default). Configure the timeout with CLAUDE_STREAM_IDLE_TIMEOUT_MS. See https://code.claude.com/docs/en/env-vars

claude_enable_stream_watchdog class-attribute instance-attribute

claude_enable_stream_watchdog: Literal["0", "1"] | None = Field(
    None, alias="CLAUDE_ENABLE_STREAM_WATCHDOG"
)

Set to 1 to force-enable, or 0 to force-disable, the event-level streaming idle watchdog. When unset, the watchdog is on by default for all providers (as of v2.1.196; before that the unset default was server-controlled on the direct Anthropic API and off on other providers). See https://code.claude.com/docs/en/env-vars

claude_env_file class-attribute instance-attribute

claude_env_file: str | None = Field(None, alias='CLAUDE_ENV_FILE')

File path for persisting environment variables across Bash commands

claude_pid class-attribute instance-attribute

claude_pid: str | None = Field(None, alias='CLAUDE_PID')

Claude Code sets this to its own process ID in the subprocesses it spawns: Bash and PowerShell tool commands and hook commands. On Linux, the Bash tool's shell integration uses it to refuse a pkill pattern that would match the Claude Code process itself. Read it from your own scripts to identify or signal the parent Claude Code process deliberately. Requires Claude Code v2.1.214 or later. See https://code.claude.com/docs/en/errors#pkill-pattern-matches-the-claude-code-process

claude_project_dir class-attribute instance-attribute

claude_project_dir: str | None = Field(None, alias='CLAUDE_PROJECT_DIR')

Project root directory path (also provided to hooks)

claude_remote_control_session_name_prefix class-attribute instance-attribute

claude_remote_control_session_name_prefix: str | None = Field(
    None, alias="CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX"
)

Prefix for auto-generated Remote Control session names when no explicit name is set. Defaults to the machine hostname, producing names like myhost-graceful-unicorn. See https://code.claude.com/docs/en/remote-control#start-a-remote-control-session

claude_stream_idle_timeout_ms class-attribute instance-attribute

claude_stream_idle_timeout_ms: str | None = Field(None, alias='CLAUDE_STREAM_IDLE_TIMEOUT_MS')

Timeout in milliseconds before the streaming idle watchdog closes a stalled connection. When set explicitly the minimum is 300000 (5 minutes); lower values are clamped. See https://code.claude.com/docs/en/env-vars

claudecode class-attribute instance-attribute

claudecode: Literal['0', '1'] | None = Field(None, alias='CLAUDECODE')

Set to 1 in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, hook commands, status line commands, stdio MCP server subprocesses). IDE extensions also set this in their integrated terminals. To distinguish a direct tool/hook subprocess from a stdio MCP server subprocess, use CLAUDE_CODE_CHILD_SESSION instead. See https://code.claude.com/docs/en/env-vars

cloud_ml_region class-attribute instance-attribute

cloud_ml_region: str | None = Field(None, alias='CLOUD_ML_REGION')

Google Cloud's Agent Platform region: global, a multi-region location (eu, us), or a specific region (e.g. us-east5). See https://code.claude.com/docs/en/google-vertex-ai#region-configuration

debug class-attribute instance-attribute

debug: str | None = Field(None, alias='DEBUG')

Set to a truthy value (1, true, yes, or on) to enable debug mode, equivalent to --debug. Logs are written to ~/.claude/debug/<session-id>.txt. See https://code.claude.com/docs/en/env-vars

disable_auto_compact class-attribute instance-attribute

disable_auto_compact: Literal['0', '1'] | None = Field(None, alias='DISABLE_AUTO_COMPACT')

Set to 1 to disable automatic compaction when approaching the context limit. The manual /compact command remains available. Equivalent to autoCompactEnabled: false. See https://code.claude.com/docs/en/env-vars

disable_autoupdater class-attribute instance-attribute

disable_autoupdater: Literal['0', '1'] | None = Field(None, alias='DISABLE_AUTOUPDATER')

Set to 1 to disable automatic background updates. Manual claude update still works; use DISABLE_UPDATES to block both. See https://code.claude.com/docs/en/env-vars

disable_compact class-attribute instance-attribute

disable_compact: Literal['0', '1'] | None = Field(None, alias='DISABLE_COMPACT')

Set to 1 to disable all compaction: both automatic compaction and the manual /compact command. See https://code.claude.com/docs/en/env-vars

disable_cost_warnings class-attribute instance-attribute

disable_cost_warnings: Literal['0', '1'] | None = Field(None, alias='DISABLE_COST_WARNINGS')

Set to 1 to disable cost warning messages. See https://code.claude.com/docs/en/env-vars

disable_doctor_command class-attribute instance-attribute

disable_doctor_command: Literal['0', '1'] | None = Field(None, alias='DISABLE_DOCTOR_COMMAND')

Set to 1 to hide the /doctor command (useful for managed deployments). See https://code.claude.com/docs/en/env-vars

disable_error_reporting class-attribute instance-attribute

disable_error_reporting: Literal['0', '1'] | None = Field(None, alias='DISABLE_ERROR_REPORTING')

Disable Sentry error reporting

disable_extra_usage_command class-attribute instance-attribute

disable_extra_usage_command: Literal["0", "1"] | None = Field(
    None, alias="DISABLE_EXTRA_USAGE_COMMAND"
)

Set to 1 to hide the /usage-credits command for purchasing additional usage beyond rate limits. See https://code.claude.com/docs/en/env-vars

disable_feedback_command class-attribute instance-attribute

disable_feedback_command: Literal['0', '1'] | None = Field(None, alias='DISABLE_FEEDBACK_COMMAND')

Set to 1 to disable the /feedback command. The older name DISABLE_BUG_COMMAND is also accepted. See https://code.claude.com/docs/en/env-vars

disable_growthbook class-attribute instance-attribute

disable_growthbook: Literal['0', '1'] | None = Field(None, alias='DISABLE_GROWTHBOOK')

Set to 1 to disable GrowthBook feature-flag fetching and use code defaults for every flag. Telemetry stays on unless DISABLE_TELEMETRY is also set. See https://code.claude.com/docs/en/env-vars

disable_install_github_app_command class-attribute instance-attribute

disable_install_github_app_command: Literal["0", "1"] | None = Field(
    None, alias="DISABLE_INSTALL_GITHUB_APP_COMMAND"
)

Set to 1 to hide the /install-github-app command (already hidden on Bedrock, Vertex, or Foundry). See https://code.claude.com/docs/en/env-vars

disable_installation_checks class-attribute instance-attribute

disable_installation_checks: Literal["0", "1"] | None = Field(
    None, alias="DISABLE_INSTALLATION_CHECKS"
)

Set to 1 to disable installation warnings (use only when manually managing the installation location). See https://code.claude.com/docs/en/env-vars

disable_interleaved_thinking class-attribute instance-attribute

disable_interleaved_thinking: Literal["0", "1"] | None = Field(
    None, alias="DISABLE_INTERLEAVED_THINKING"
)

Set to 1 to prevent sending the interleaved-thinking beta header (useful when a gateway or provider does not support interleaved thinking). See https://code.claude.com/docs/en/env-vars

disable_login_command class-attribute instance-attribute

disable_login_command: Literal['0', '1'] | None = Field(None, alias='DISABLE_LOGIN_COMMAND')

Set to 1 to hide the /login command (useful when authentication is handled externally via API keys or apiKeyHelper). See https://code.claude.com/docs/en/env-vars

disable_logout_command class-attribute instance-attribute

disable_logout_command: Literal['0', '1'] | None = Field(None, alias='DISABLE_LOGOUT_COMMAND')

Set to 1 to hide the /logout command. See https://code.claude.com/docs/en/env-vars

disable_prompt_caching class-attribute instance-attribute

disable_prompt_caching: Literal['0', '1'] | None = Field(None, alias='DISABLE_PROMPT_CACHING')

Disable prompt caching for all models. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching

disable_prompt_caching_fable class-attribute instance-attribute

disable_prompt_caching_fable: Literal["0", "1"] | None = Field(
    None, alias="DISABLE_PROMPT_CACHING_FABLE"
)

Disable prompt caching for Fable models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching

disable_prompt_caching_haiku class-attribute instance-attribute

disable_prompt_caching_haiku: Literal["0", "1"] | None = Field(
    None, alias="DISABLE_PROMPT_CACHING_HAIKU"
)

Disable prompt caching for Haiku models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching

disable_prompt_caching_opus class-attribute instance-attribute

disable_prompt_caching_opus: Literal["0", "1"] | None = Field(
    None, alias="DISABLE_PROMPT_CACHING_OPUS"
)

Disable prompt caching for Opus models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching

disable_prompt_caching_sonnet class-attribute instance-attribute

disable_prompt_caching_sonnet: Literal["0", "1"] | None = Field(
    None, alias="DISABLE_PROMPT_CACHING_SONNET"
)

Disable prompt caching for Sonnet models only. See https://code.claude.com/docs/en/prompt-caching#disable-prompt-caching

disable_telemetry class-attribute instance-attribute

disable_telemetry: Literal['0', '1'] | None = Field(None, alias='DISABLE_TELEMETRY')

Set to 1 to opt out of telemetry. Also disables feature-flag fetching (same effect as DISABLE_GROWTHBOOK). See https://code.claude.com/docs/en/env-vars

disable_updates class-attribute instance-attribute

disable_updates: Literal['0', '1'] | None = Field(None, alias='DISABLE_UPDATES')

Block all update paths including manual updates

disable_upgrade_command class-attribute instance-attribute

disable_upgrade_command: Literal['0', '1'] | None = Field(None, alias='DISABLE_UPGRADE_COMMAND')

Set to 1 to hide the /upgrade command. See https://code.claude.com/docs/en/env-vars

do_not_track class-attribute instance-attribute

do_not_track: Literal['0', '1'] | None = Field(None, alias='DO_NOT_TRACK')

Set to 1 to opt out of telemetry (cross-tool convention; equivalent to DISABLE_TELEMETRY). See https://code.claude.com/docs/en/env-vars

enable_beta_tracing_detailed class-attribute instance-attribute

enable_beta_tracing_detailed: Literal["0", "1"] | None = Field(
    None, alias="ENABLE_BETA_TRACING_DETAILED"
)

Emit detailed spans including hook execution when the tracing beta is enabled. See https://code.claude.com/docs/en/monitoring-usage#traces-beta

enable_claudeai_mcp_servers class-attribute instance-attribute

enable_claudeai_mcp_servers: Literal["true", "false"] | None = Field(
    None, alias="ENABLE_CLAUDEAI_MCP_SERVERS"
)

Opt in/out of claude.ai MCP servers. See https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2163

enable_prompt_caching_1_h class-attribute instance-attribute

enable_prompt_caching_1_h: Literal['0', '1'] | None = Field(None, alias='ENABLE_PROMPT_CACHING_1H')

Request a 1-hour prompt cache TTL instead of the 5-minute default (billed at a higher rate). See https://code.claude.com/docs/en/prompt-caching#cache-lifetime

enable_tool_search: str | None = Field(None, alias='ENABLE_TOOL_SEARCH')

Control MCP tool search: "true" always defers and sends the beta header (requests fail on Google Cloud's Agent Platform models earlier than Sonnet 4.5/Opus 4.5 or on proxies that do not support tool_reference); "auto" loads tools upfront if they fit within 10% of context; "auto:N" sets a custom threshold percentage (e.g. auto:5); "false" loads all tools upfront. Also applies when ANTHROPIC_BASE_URL points to a non-first-party host. See https://code.claude.com/docs/en/google-vertex-ai#4-configure-claude-code

fallback_for_all_primary_models class-attribute instance-attribute

fallback_for_all_primary_models: str | None = Field(None, alias='FALLBACK_FOR_ALL_PRIMARY_MODELS')

Set to any non-empty value to make all models (not only Opus) stop retrying with a repeated-overload error when no fallback model is configured. See https://code.claude.com/docs/en/env-vars

force_autoupdate_plugins class-attribute instance-attribute

force_autoupdate_plugins: Literal['0', '1'] | None = Field(None, alias='FORCE_AUTOUPDATE_PLUGINS')

Keep plugin auto-updates enabled even when DISABLE_AUTOUPDATER=1 is set. See https://code.claude.com/docs/en/discover-plugins#configure-auto-updates

force_hyperlink: Literal['0', '1'] | None = Field(None, alias='FORCE_HYPERLINK')

Set to 1 to enable clickable OSC 8 hyperlinks when your terminal supports them but is not auto-detected, or 0 to disable them

force_prompt_caching_5_m class-attribute instance-attribute

force_prompt_caching_5_m: Literal['0', '1'] | None = Field(None, alias='FORCE_PROMPT_CACHING_5M')

Force a 5-minute cache TTL regardless of authentication method; overrides ENABLE_PROMPT_CACHING_1H or a managed-settings TTL. See https://code.claude.com/docs/en/prompt-caching#override-the-ttl

google_application_credentials class-attribute instance-attribute

google_application_credentials: str | None = Field(None, alias='GOOGLE_APPLICATION_CREDENTIALS')

Path to a GCP credential configuration file (service account key or workload identity federation config) used for Google Cloud's Agent Platform authentication. See https://code.claude.com/docs/en/google-vertex-ai#3-configure-gcp-credentials

http_proxy class-attribute instance-attribute

http_proxy: str | None = Field(None, alias='HTTP_PROXY')

HTTP proxy URL

https_proxy class-attribute instance-attribute

https_proxy: str | None = Field(None, alias='HTTPS_PROXY')

HTTPS proxy URL (recommended over HTTP_PROXY)

is_demo class-attribute instance-attribute

is_demo: Literal['0', '1'] | None = Field(None, alias='IS_DEMO')

Set to 1 to enable demo mode: hides email and organization name from the header and /status output and skips onboarding. See https://code.claude.com/docs/en/env-vars

max_mcp_output_tokens class-attribute instance-attribute

max_mcp_output_tokens: str | None = Field(None, alias='MAX_MCP_OUTPUT_TOKENS')

Maximum number of tokens allowed in MCP tool output before truncation (default: 25000). Claude Code displays a warning above 10000 tokens. For tools that declare anthropic/maxResultSizeChars, that character limit replaces this token limit for text content, but image content from those tools is still subject to this limit. See https://code.claude.com/docs/en/mcp

max_structured_output_retries class-attribute instance-attribute

max_structured_output_retries: str | None = Field(None, alias='MAX_STRUCTURED_OUTPUT_RETRIES')

Number of times to retry when the model's response fails validation against --json-schema in non-interactive (-p) mode (default 5). See https://code.claude.com/docs/en/env-vars

max_thinking_tokens class-attribute instance-attribute

max_thinking_tokens: str | None = Field(None, alias='MAX_THINKING_TOKENS')

Override the extended thinking token budget; set to 0 to disable thinking on the Anthropic API. On adaptive reasoning models (Opus 4.7+, Opus 4.8, Fable 5) a nonzero budget is ignored unless CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING is set. See https://code.claude.com/docs/en/model-config#extended-thinking

mcp_client_secret class-attribute instance-attribute

mcp_client_secret: str | None = Field(None, alias='MCP_CLIENT_SECRET')

OAuth client secret for MCP servers that require pre-configured credentials (avoids the interactive prompt when adding a server with --client-secret). See https://code.claude.com/docs/en/env-vars

mcp_connect_timeout_ms class-attribute instance-attribute

mcp_connect_timeout_ms: str | None = Field(None, alias='MCP_CONNECT_TIMEOUT_MS')

How long blocking MCP startup waits in milliseconds for the connection batch before snapshotting the tool list (default 5000). Applies when MCP_CONNECTION_NONBLOCKING=0 or for alwaysLoad servers. See https://code.claude.com/docs/en/env-vars

mcp_connection_nonblocking class-attribute instance-attribute

mcp_connection_nonblocking: Literal["0", "1"] | None = Field(
    None, alias="MCP_CONNECTION_NONBLOCKING"
)

Controls whether startup waits for MCP servers to connect before the first query. Non-blocking by default since v2.1.142; set to 0 to restore the blocking 5-second connection wait. See https://code.claude.com/docs/en/env-vars

mcp_oauth_callback_port class-attribute instance-attribute

mcp_oauth_callback_port: str | None = Field(None, alias='MCP_OAUTH_CALLBACK_PORT')

Fixed port for the OAuth redirect callback, as an alternative to --callback-port when adding an MCP server with pre-configured credentials. See https://code.claude.com/docs/en/env-vars

mcp_remote_server_connection_batch_size class-attribute instance-attribute

mcp_remote_server_connection_batch_size: str | None = Field(
    None, alias="MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE"
)

Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default 20). See https://code.claude.com/docs/en/env-vars

mcp_server_connection_batch_size class-attribute instance-attribute

mcp_server_connection_batch_size: str | None = Field(None, alias="MCP_SERVER_CONNECTION_BATCH_SIZE")

Maximum number of local MCP servers (stdio) to connect in parallel during startup (default 3). See https://code.claude.com/docs/en/env-vars

mcp_timeout class-attribute instance-attribute

mcp_timeout: str | None = Field(None, alias='MCP_TIMEOUT')

Timeout in milliseconds for MCP server startup (default 30000). See https://code.claude.com/docs/en/env-vars

mcp_tool_timeout class-attribute instance-attribute

mcp_tool_timeout: str | None = Field(None, alias='MCP_TOOL_TIMEOUT')

Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours). A per-server timeout field in .mcp.json overrides this for that server. Values below 1000 are floored to one second. See https://code.claude.com/docs/en/mcp

no_proxy class-attribute instance-attribute

no_proxy: str | None = Field(None, alias='NO_PROXY')

Domains to bypass proxy (space or comma-separated, or '*' for all)

node_extra_ca_certs class-attribute instance-attribute

node_extra_ca_certs: str | None = Field(None, alias='NODE_EXTRA_CA_CERTS')

Path to custom CA certificate file

otel_attribute_value_length_limit class-attribute instance-attribute

otel_attribute_value_length_limit: str | None = Field(
    None, alias="OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT"
)

Standard OpenTelemetry SDK limit on attribute value length. Claude Code caps content-bearing telemetry attributes at the smaller of this and CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH, so the truncation marker stays within the SDK limit. Claude Code reads the OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT and OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT variants the same way, and the smallest set value applies to all signals. Requires Claude Code v2.1.214 or later. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_exporter_otlp_certificate class-attribute instance-attribute

otel_exporter_otlp_certificate: str | None = Field(None, alias='OTEL_EXPORTER_OTLP_CERTIFICATE')

Path to the CA certificate for gRPC OTLP mTLS. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication

otel_exporter_otlp_client_certificate class-attribute instance-attribute

otel_exporter_otlp_client_certificate: str | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE"
)

Path to the client certificate for gRPC OTLP mTLS. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication

otel_exporter_otlp_client_key class-attribute instance-attribute

otel_exporter_otlp_client_key: str | None = Field(None, alias='OTEL_EXPORTER_OTLP_CLIENT_KEY')

Path to the client private key for gRPC OTLP mTLS. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication

otel_exporter_otlp_endpoint class-attribute instance-attribute

otel_exporter_otlp_endpoint: str | None = Field(None, alias='OTEL_EXPORTER_OTLP_ENDPOINT')

OTLP exporter endpoint for all signals (e.g. http://localhost:4317). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_exporter_otlp_headers class-attribute instance-attribute

otel_exporter_otlp_headers: str | None = Field(None, alias='OTEL_EXPORTER_OTLP_HEADERS')

Headers sent with OTLP exporter requests (e.g. Authorization=Bearer token). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_exporter_otlp_logs_client_certificate class-attribute instance-attribute

otel_exporter_otlp_logs_client_certificate: str | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE"
)

Path to the client certificate for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE for logs only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication

otel_exporter_otlp_logs_client_key class-attribute instance-attribute

otel_exporter_otlp_logs_client_key: str | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY"
)

Path to the client private key for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_KEY for logs only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication

otel_exporter_otlp_logs_endpoint class-attribute instance-attribute

otel_exporter_otlp_logs_endpoint: str | None = Field(None, alias="OTEL_EXPORTER_OTLP_LOGS_ENDPOINT")

OTLP exporter endpoint override for logs. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_exporter_otlp_logs_protocol class-attribute instance-attribute

otel_exporter_otlp_logs_protocol: Literal["grpc", "http/json", "http/protobuf"] | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_LOGS_PROTOCOL"
)

OTLP protocol override for logs: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_exporter_otlp_metrics_client_certificate class-attribute instance-attribute

otel_exporter_otlp_metrics_client_certificate: str | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE"
)

Path to the client certificate for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE for metrics only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication

otel_exporter_otlp_metrics_client_key class-attribute instance-attribute

otel_exporter_otlp_metrics_client_key: str | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY"
)

Path to the client private key for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_KEY for metrics only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication

otel_exporter_otlp_metrics_endpoint class-attribute instance-attribute

otel_exporter_otlp_metrics_endpoint: str | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_METRICS_ENDPOINT"
)

OTLP exporter endpoint override for metrics. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_exporter_otlp_metrics_protocol class-attribute instance-attribute

otel_exporter_otlp_metrics_protocol: Literal["grpc", "http/json", "http/protobuf"] | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_METRICS_PROTOCOL"
)

OTLP protocol override for metrics: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_exporter_otlp_metrics_temporality_preference class-attribute instance-attribute

otel_exporter_otlp_metrics_temporality_preference: Literal["delta", "cumulative"] | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"
)

Metrics temporality preference: delta (default) or cumulative. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_exporter_otlp_protocol class-attribute instance-attribute

otel_exporter_otlp_protocol: Literal["grpc", "http/json", "http/protobuf"] | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_PROTOCOL"
)

OTLP exporter protocol for all signals: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_exporter_otlp_traces_client_certificate class-attribute instance-attribute

otel_exporter_otlp_traces_client_certificate: str | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE"
)

Path to the client certificate for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE for traces only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication

otel_exporter_otlp_traces_client_key class-attribute instance-attribute

otel_exporter_otlp_traces_client_key: str | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY"
)

Path to the client private key for gRPC OTLP mTLS, overriding OTEL_EXPORTER_OTLP_CLIENT_KEY for traces only. See https://code.claude.com/docs/en/monitoring-usage#mtls-authentication

otel_exporter_otlp_traces_endpoint class-attribute instance-attribute

otel_exporter_otlp_traces_endpoint: str | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_TRACES_ENDPOINT"
)

OTLP exporter endpoint override for traces. See https://code.claude.com/docs/en/monitoring-usage#traces-beta

otel_exporter_otlp_traces_protocol class-attribute instance-attribute

otel_exporter_otlp_traces_protocol: Literal["grpc", "http/json", "http/protobuf"] | None = Field(
    None, alias="OTEL_EXPORTER_OTLP_TRACES_PROTOCOL"
)

OTLP protocol override for traces: grpc, http/json, or http/protobuf. See https://code.claude.com/docs/en/monitoring-usage#traces-beta

otel_log_assistant_responses class-attribute instance-attribute

otel_log_assistant_responses: Literal["0", "1"] | None = Field(
    None, alias="OTEL_LOG_ASSISTANT_RESPONSES"
)

UNDOCUMENTED. Include assistant response text in the claude_code.assistant_response OpenTelemetry log event (added v2.1.193). When unset, follows OTEL_LOG_USER_PROMPTS; set to 0 to keep prompts-only.

otel_log_raw_api_bodies class-attribute instance-attribute

otel_log_raw_api_bodies: str | None = Field(None, alias='OTEL_LOG_RAW_API_BODIES')

Log raw API request/response bodies. Set to 1, or to file:<dir> to write them to a directory. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_log_tool_content class-attribute instance-attribute

otel_log_tool_content: Literal['0', '1'] | None = Field(None, alias='OTEL_LOG_TOOL_CONTENT')

Include full tool input/output content in OpenTelemetry log events (requires tracing; disabled by default). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_log_tool_details class-attribute instance-attribute

otel_log_tool_details: Literal['0', '1'] | None = Field(None, alias='OTEL_LOG_TOOL_DETAILS')

Include tool name and parameters in OpenTelemetry log events (disabled by default). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_log_user_prompts class-attribute instance-attribute

otel_log_user_prompts: Literal['0', '1'] | None = Field(None, alias='OTEL_LOG_USER_PROMPTS')

Include user prompt text in OpenTelemetry log events (disabled by default). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_logs_export_interval class-attribute instance-attribute

otel_logs_export_interval: str | None = Field(None, alias='OTEL_LOGS_EXPORT_INTERVAL')

Logs export interval in milliseconds (default 5000). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_logs_exporter class-attribute instance-attribute

otel_logs_exporter: str | None = Field(None, alias='OTEL_LOGS_EXPORTER')

OpenTelemetry logs exporter(s) as a comma-separated list. Valid values: otlp, console, none. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_metric_export_interval class-attribute instance-attribute

otel_metric_export_interval: str | None = Field(None, alias='OTEL_METRIC_EXPORT_INTERVAL')

Metrics export interval in milliseconds (default 60000). See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_metrics_exporter class-attribute instance-attribute

otel_metrics_exporter: str | None = Field(None, alias='OTEL_METRICS_EXPORTER')

OpenTelemetry metrics exporter(s) as a comma-separated list. Valid values: otlp, prometheus, console, none. See https://code.claude.com/docs/en/monitoring-usage#common-configuration-variables

otel_metrics_include_account_uuid class-attribute instance-attribute

otel_metrics_include_account_uuid: Literal["true", "false"] | None = Field(
    None, alias="OTEL_METRICS_INCLUDE_ACCOUNT_UUID"
)

Include the user.account_uuid and user.account_id attributes on metrics (default true). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control

otel_metrics_include_entrypoint class-attribute instance-attribute

otel_metrics_include_entrypoint: Literal["true", "false"] | None = Field(
    None, alias="OTEL_METRICS_INCLUDE_ENTRYPOINT"
)

Include the app.entrypoint attribute on metrics (default false). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control

otel_metrics_include_resource_attributes class-attribute instance-attribute

otel_metrics_include_resource_attributes: Literal["true", "false"] | None = Field(
    None, alias="OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES"
)

Include configured OTEL_RESOURCE_ATTRIBUTES on metric data points (default true). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control

otel_metrics_include_session_id class-attribute instance-attribute

otel_metrics_include_session_id: Literal["true", "false"] | None = Field(
    None, alias="OTEL_METRICS_INCLUDE_SESSION_ID"
)

Include the session.id attribute on metrics (default true). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control

otel_metrics_include_version class-attribute instance-attribute

otel_metrics_include_version: Literal["true", "false"] | None = Field(
    None, alias="OTEL_METRICS_INCLUDE_VERSION"
)

Include the app.version attribute on metrics (default false). See https://code.claude.com/docs/en/monitoring-usage#metrics-cardinality-control

otel_resource_attributes class-attribute instance-attribute

otel_resource_attributes: str | None = Field(None, alias='OTEL_RESOURCE_ATTRIBUTES')

Comma-separated key=value resource attributes attached to all telemetry. See https://code.claude.com/docs/en/monitoring-usage#multi-team-organization-support

otel_traces_export_interval class-attribute instance-attribute

otel_traces_export_interval: str | None = Field(None, alias='OTEL_TRACES_EXPORT_INTERVAL')

Traces export interval in milliseconds (default 5000). See https://code.claude.com/docs/en/monitoring-usage#traces-beta

otel_traces_exporter class-attribute instance-attribute

otel_traces_exporter: str | None = Field(None, alias='OTEL_TRACES_EXPORTER')

OpenTelemetry traces exporter(s) as a comma-separated list. Valid values: otlp, console, none. See https://code.claude.com/docs/en/monitoring-usage#traces-beta

slash_command_tool_char_budget class-attribute instance-attribute

slash_command_tool_char_budget: str | None = Field(None, alias='SLASH_COMMAND_TOOL_CHAR_BUDGET')

Override the character budget for skill metadata shown to the Skill tool. The budget scales dynamically at 1% of the context window, with a fallback of 8000 characters. Legacy name kept for backwards compatibility. See https://code.claude.com/docs/en/skills#control-who-invokes-a-skill

task_max_output_length class-attribute instance-attribute

task_max_output_length: str | None = Field(None, alias='TASK_MAX_OUTPUT_LENGTH')

Maximum number of characters in subagent output before truncation (default 32000, maximum 160000). When truncated, the full output is saved to disk and the path is included in the response. See https://code.claude.com/docs/en/env-vars

use_builtin_ripgrep class-attribute instance-attribute

use_builtin_ripgrep: Literal['0', '1'] | None = Field(None, alias='USE_BUILTIN_RIPGREP')

Use the bundled ripgrep binary instead of system ripgrep

vertex_region_claude_3_5_haiku class-attribute instance-attribute

vertex_region_claude_3_5_haiku: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_3_5_HAIKU')

Override the Vertex AI region for Claude 3.5 Haiku (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_3_5_sonnet class-attribute instance-attribute

vertex_region_claude_3_5_sonnet: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_3_5_SONNET')

Override the Vertex AI region for Claude 3.5 Sonnet (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_3_7_sonnet class-attribute instance-attribute

vertex_region_claude_3_7_sonnet: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_3_7_SONNET')

Override the Vertex AI region for Claude 3.7 Sonnet (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_4_0_opus class-attribute instance-attribute

vertex_region_claude_4_0_opus: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_4_0_OPUS')

Override the Vertex AI region for Claude 4.0 Opus (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_4_0_sonnet class-attribute instance-attribute

vertex_region_claude_4_0_sonnet: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_4_0_SONNET')

Override the Vertex AI region for Claude 4.0 Sonnet (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_4_1_opus class-attribute instance-attribute

vertex_region_claude_4_1_opus: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_4_1_OPUS')

Override the Vertex AI region for Claude 4.1 Opus (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_4_5_opus class-attribute instance-attribute

vertex_region_claude_4_5_opus: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_4_5_OPUS')

Override the Vertex AI region for Claude Opus 4.5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_4_5_sonnet class-attribute instance-attribute

vertex_region_claude_4_5_sonnet: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_4_5_SONNET')

Override the Vertex AI region for Claude Sonnet 4.5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_4_6_opus class-attribute instance-attribute

vertex_region_claude_4_6_opus: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_4_6_OPUS')

Override the Vertex AI region for Claude Opus 4.6 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_4_6_sonnet class-attribute instance-attribute

vertex_region_claude_4_6_sonnet: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_4_6_SONNET')

Override the Vertex AI region for Claude Sonnet 4.6 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_4_7_opus class-attribute instance-attribute

vertex_region_claude_4_7_opus: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_4_7_OPUS')

Override the Vertex AI region for Claude Opus 4.7 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_4_8_opus class-attribute instance-attribute

vertex_region_claude_4_8_opus: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_4_8_OPUS')

Override the Vertex AI region for Claude Opus 4.8 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_5_opus class-attribute instance-attribute

vertex_region_claude_5_opus: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_5_OPUS')

Override region for Claude Opus 5 when using Google Cloud's Agent Platform (formerly Vertex AI). Added in v2.1.219. See https://code.claude.com/docs/en/google-vertex-ai

vertex_region_claude_5_sonnet class-attribute instance-attribute

vertex_region_claude_5_sonnet: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_5_SONNET')

Override region for Claude Sonnet 5 when using Google Cloud's Agent Platform (formerly Vertex AI). Added in v2.1.197. See https://code.claude.com/docs/en/google-vertex-ai

vertex_region_claude_fable_5 class-attribute instance-attribute

vertex_region_claude_fable_5: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_FABLE_5')

Override the Vertex AI region for Claude Fable 5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

vertex_region_claude_haiku_4_5 class-attribute instance-attribute

vertex_region_claude_haiku_4_5: str | None = Field(None, alias='VERTEX_REGION_CLAUDE_HAIKU_4_5')

Override the Vertex AI region for Claude Haiku 4.5 (used when CLOUD_ML_REGION=global). See https://code.claude.com/docs/en/env-vars

:fa-brands-github: Show source on GitHub