diff --git a/content/.metadata.json b/content/.metadata.json
index affe3ef58f..5b57050958 100644
--- a/content/.metadata.json
+++ b/content/.metadata.json
@@ -1,7 +1,7 @@
{
"metadata": {
"version": "2.0",
- "fetch_date": "2026-10-24T18:25:24.303414Z",
+ "fetch_date": "2026-10-25T05:27:12.927389Z",
"section": "all"
},
"items": [
@@ -5805,8 +5805,8 @@
"url": "https://code.claude.com/docs/en/prompt-caching",
"status": "success",
"path": "en/docs/claude-code/prompt-caching.md",
- "sha256": "dbc4fb385c4c03ecfda0b23926f2ad22662649fa3e2282f90c516c80bcaa540e",
- "size": 44402
+ "sha256": "72827859936804a9261011c4e72756806a740655a4363d01b0be5fade45a8749",
+ "size": 44347
},
{
"url": "https://code.claude.com/docs/en/memory",
@@ -5854,8 +5854,8 @@
"url": "https://code.claude.com/docs/en/remote-control",
"status": "success",
"path": "en/docs/claude-code/remote-control.md",
- "sha256": "2a5ce1a713d1fa1a14451e7dd7631f6c8136523fe50dffed8d065f4c031769a2",
- "size": 62531
+ "sha256": "992b74ae008d367f385c219c56840bba8d84b5ed00ac547313dbd19d351385f1",
+ "size": 63572
},
{
"url": "https://code.claude.com/docs/en/claude-projects",
@@ -5910,22 +5910,22 @@
"url": "https://code.claude.com/docs/en/web-quickstart",
"status": "success",
"path": "en/docs/claude-code/web-quickstart.md",
- "sha256": "3868309039025ec7f78a28f087f1dc143b577c98512d8b0f3e7e5a9d38307248",
- "size": 25096
+ "sha256": "2c0459b7b49d442dd2c18ad472ef69c336187cc3c70740f64c0ae9be82c7f9a1",
+ "size": 25621
},
{
"url": "https://code.claude.com/docs/en/claude-code-on-the-web",
"status": "success",
"path": "en/docs/claude-code/claude-code-on-the-web.md",
- "sha256": "048976f7a49faf9e719ef3564f8feb4ad5b917625f4e8b8a7bb1b7fcf7929276",
- "size": 44897
+ "sha256": "54179672811c78e422475af50a4182aa842657bcdba6f5987572bfb5545519f5",
+ "size": 46572
},
{
"url": "https://code.claude.com/docs/en/routines",
"status": "success",
"path": "en/docs/claude-code/routines.md",
- "sha256": "e0b273166fea5899fa1c0d898975938cc423eb1c8b0a1d4c0609ee105cf9c53f",
- "size": 46689
+ "sha256": "900d6395f0a88f2ddda732191a867f3f585abf1d463b73488b308fe4715e29c6",
+ "size": 49929
},
{
"url": "https://code.claude.com/docs/en/desktop-quickstart",
@@ -5938,8 +5938,8 @@
"url": "https://code.claude.com/docs/en/desktop",
"status": "success",
"path": "en/docs/claude-code/desktop.md",
- "sha256": "6ad9b2d44e0ba007ff732d749d75bfe1e77271a86137a1217c2787c773fa9834",
- "size": 190946
+ "sha256": "03298b688d61d56339526e6bd9fde6ce5bb75cfce6a0881a8cb673f29ab5e056",
+ "size": 190920
},
{
"url": "https://code.claude.com/docs/en/desktop-linux",
@@ -5994,8 +5994,8 @@
"url": "https://code.claude.com/docs/en/code-review",
"status": "success",
"path": "en/docs/claude-code/code-review.md",
- "sha256": "b0360a11dad62ad8cb2e534d6e60fda87327abb68bfcb1fffca230ae67c6cf14",
- "size": 10690
+ "sha256": "7aa52d68d9b983279a89722ccde8bb62c995ee73f56c6fd398ab9244355fd69d",
+ "size": 10650
},
{
"url": "https://code.claude.com/docs/en/code-review-setup",
@@ -6015,8 +6015,8 @@
"url": "https://code.claude.com/docs/en/code-review-pull-requests",
"status": "success",
"path": "en/docs/claude-code/code-review-pull-requests.md",
- "sha256": "4885216bb19c7025043a5bf4c545e36e70b0cfb75b17c17ba059c99921c923c3",
- "size": 15513
+ "sha256": "7c0c18aa147fc07b840d41e2bb25cd9bbb72b7ebf7c83c27105b41c54e4e77d5",
+ "size": 15719
},
{
"url": "https://code.claude.com/docs/en/code-review-costs",
@@ -6029,8 +6029,8 @@
"url": "https://code.claude.com/docs/en/code-review-troubleshooting",
"status": "success",
"path": "en/docs/claude-code/code-review-troubleshooting.md",
- "sha256": "1e82bd95bf6c1d3a3a8c7d6a9e1d909c1255c7876c61c76f93f12195e2dafaed",
- "size": 10983
+ "sha256": "ea27dac8da01ac609861527065704f126cd002631ef60e7c2c4f883d73c09963",
+ "size": 11198
},
{
"url": "https://code.claude.com/docs/en/security-guidance",
@@ -6148,8 +6148,8 @@
"url": "https://code.claude.com/docs/en/hooks-guide",
"status": "success",
"path": "en/docs/claude-code/hooks-guide.md",
- "sha256": "14bcf3cd102f06c93f179123709b9179b8ed22c778274e16537aa3b27815b95d",
- "size": 65493
+ "sha256": "49b5c6ff0ed6379a97ff44ca6614061f580819371b2547550f28a2ed44d5552e",
+ "size": 65478
},
{
"url": "https://code.claude.com/docs/en/channels",
@@ -6190,8 +6190,8 @@
"url": "https://code.claude.com/docs/en/large-codebases",
"status": "success",
"path": "en/docs/claude-code/large-codebases.md",
- "sha256": "d41576eed15d2393913d0b4dcd52e5a794920358b820237610967860cdc06f70",
- "size": 35669
+ "sha256": "4b1791070dfa39331cd862d9036cd7163aac36b19db390ba03635fa3c9ea7f3f",
+ "size": 35533
},
{
"url": "https://code.claude.com/docs/en/troubleshoot-install",
@@ -6232,8 +6232,8 @@
"url": "https://code.claude.com/docs/en/plugins/install",
"status": "success",
"path": "en/docs/claude-code/plugins/install.md",
- "sha256": "dac1cff425abd374c83c197c030a80a3979ceabc59de5572b304d8aafc7f83a8",
- "size": 32518
+ "sha256": "7d9ae581b0dc1f0f53ef5aa40cfd4682fe65632595b5a879f0b07460b30faad6",
+ "size": 32565
},
{
"url": "https://code.claude.com/docs/en/plugins/anthropic-marketplaces",
@@ -6267,8 +6267,8 @@
"url": "https://code.claude.com/docs/en/plugins/components",
"status": "success",
"path": "en/docs/claude-code/plugins/components.md",
- "sha256": "786d53be6bd916b4a90f196843d3848170ceac5a46c8cba6b1507e94f3d282a8",
- "size": 40023
+ "sha256": "9da4bed2412f440540da2d3830d65972c83fe838c3e17230c0feed3e5e3281c0",
+ "size": 40199
},
{
"url": "https://code.claude.com/docs/en/plugins/dependencies",
@@ -6379,8 +6379,8 @@
"url": "https://code.claude.com/docs/en/plugins/host-marketplace",
"status": "success",
"path": "en/docs/claude-code/plugins/host-marketplace.md",
- "sha256": "3eccac1c5fbce214f32979784ce2133043b202e87254e3b6a8b4ea39524ecf5b",
- "size": 40111
+ "sha256": "8c157a1f6d6c8acd86737fe163762f3bc2575da5f3fcbc5f7e0aa7ebd6a876bc",
+ "size": 40178
},
{
"url": "https://code.claude.com/docs/en/plugins/relevance",
@@ -6407,8 +6407,8 @@
"url": "https://code.claude.com/docs/en/plugins/troubleshooting",
"status": "success",
"path": "en/docs/claude-code/plugins/troubleshooting.md",
- "sha256": "c85e06e0099ac2df8901cc4c494a736888bab9262b17863f485b9e68d7f13691",
- "size": 97113
+ "sha256": "74c7512a773a9dc3ef034a55fbaf60062359ffa5296c92077ce442f92ca6da83",
+ "size": 97192
},
{
"url": "https://code.claude.com/docs/en/plugins/loading",
@@ -6421,8 +6421,8 @@
"url": "https://code.claude.com/docs/en/plugins/manifest-reference",
"status": "success",
"path": "en/docs/claude-code/plugins/manifest-reference.md",
- "sha256": "3b72923e29d936fcb96146aae7b745e04486ac0367c5e3018739816f6cb85184",
- "size": 43136
+ "sha256": "2e9a4d61356e87ee92b7292586e81388cb98e2ac029a42952ed756dad85a00a0",
+ "size": 43117
},
{
"url": "https://code.claude.com/docs/en/plugins/marketplace-reference",
@@ -6610,8 +6610,8 @@
"url": "https://code.claude.com/docs/en/llm-gateway-connect",
"status": "success",
"path": "en/docs/claude-code/llm-gateway-connect.md",
- "sha256": "712e0f6b85b2155e80fb6116dca1e8c2e1f0401980589cf0145cccc9c330ad63",
- "size": 46707
+ "sha256": "00e53bb08254971eb53c0503c482edd499354a206d7d0a1c6ec6d3e135375b34",
+ "size": 46656
},
{
"url": "https://code.claude.com/docs/en/llm-gateway-rollout",
@@ -6624,15 +6624,15 @@
"url": "https://code.claude.com/docs/en/llm-gateway-protocol",
"status": "success",
"path": "en/docs/claude-code/llm-gateway-protocol.md",
- "sha256": "8c6e0a25a2c9b68a136f9819606b3ec1d335c25f22307f5169fb59e402da30fa",
- "size": 49828
+ "sha256": "9b7af60f210a11db4fc8939734021ab08cb0706dc0fbb99fce844f2113f0d61e",
+ "size": 50259
},
{
"url": "https://code.claude.com/docs/en/monitoring-usage",
"status": "success",
"path": "en/docs/claude-code/monitoring-usage.md",
- "sha256": "c50c99c7952c8a7660f0564a75de972c38a6423633aad5fff248bc20c7a44860",
- "size": 172282
+ "sha256": "724557e4ac516929ff398c4daa36420c59bbf170695681b999ba35321bc1905d",
+ "size": 172308
},
{
"url": "https://code.claude.com/docs/en/costs",
@@ -6701,8 +6701,8 @@
"url": "https://code.claude.com/docs/en/settings-reference",
"status": "success",
"path": "en/docs/claude-code/settings-reference.md",
- "sha256": "01b3aacd50865f3146b7bb489e506a380573bf41a3176ec4e334d8e2b7d06330",
- "size": 440010
+ "sha256": "2d71c202b432896cfa95eaec34dcf4522d1712c093296bad2bdaaeb1bf3cf7d1",
+ "size": 441685
},
{
"url": "https://code.claude.com/docs/en/settings-example",
@@ -6722,8 +6722,8 @@
"url": "https://code.claude.com/docs/en/permission-modes",
"status": "success",
"path": "en/docs/claude-code/permission-modes.md",
- "sha256": "17c8302bf5ee6e9481cb1fdff1f69325babbf880fa324a02565f0a944475643e",
- "size": 106175
+ "sha256": "5e07339f3924fc487e58551bba005de871ab3bdf6de73e08b47f79834eac018f",
+ "size": 106184
},
{
"url": "https://code.claude.com/docs/en/auto-mode-classifier-billing",
@@ -6771,8 +6771,8 @@
"url": "https://code.claude.com/docs/en/self-hosted-environments-deploy",
"status": "success",
"path": "en/docs/claude-code/self-hosted-environments-deploy.md",
- "sha256": "bcf39a81c00e9cf2af1216505ee1c7f92d13152142f75c99e1e83bed026c0136",
- "size": 118848
+ "sha256": "1c091717fee0479c2213841d5e0c4f457be89324cf4b4cb534b0cea54f08b9fc",
+ "size": 119031
},
{
"url": "https://code.claude.com/docs/en/self-hosted-environments-configuration",
@@ -6792,8 +6792,8 @@
"url": "https://code.claude.com/docs/en/self-hosted-environments-reference",
"status": "success",
"path": "en/docs/claude-code/self-hosted-environments-reference.md",
- "sha256": "3b6710e0e7ba52f3a3539a46a963b064de2b2ab5cc140b845200ed4b5e56f753",
- "size": 55083
+ "sha256": "e0c9f9d5c6c1e1fc9a0bcd3ff7b028ed04682ed2528b2d6ccccb47dca21ba4e9",
+ "size": 55676
},
{
"url": "https://code.claude.com/docs/en/self-hosted-environments-identity",
@@ -6813,8 +6813,8 @@
"url": "https://code.claude.com/docs/en/fast-mode",
"status": "success",
"path": "en/docs/claude-code/fast-mode.md",
- "sha256": "30d85ba4e84e96881fa0582e34fa1a7c916bb71d8e7bcbf69d0f6f07aa0f369e",
- "size": 20980
+ "sha256": "45af28da2f8026730781cfd2cd103b422f7d35a9587f6ae4bbccaeb4860e6967",
+ "size": 20921
},
{
"url": "https://code.claude.com/docs/en/advisor",
@@ -6834,8 +6834,8 @@
"url": "https://code.claude.com/docs/en/terminal-config",
"status": "success",
"path": "en/docs/claude-code/terminal-config.md",
- "sha256": "72ababcba94144866583daa723b17d737a583e73f2af6f039b3550e1b3054841",
- "size": 26942
+ "sha256": "964f68477b6ba9c9adb6f843e89fd68b2fe9118bbd59ac0091c68ef9432b1fc0",
+ "size": 27177
},
{
"url": "https://code.claude.com/docs/en/fullscreen",
@@ -6869,8 +6869,8 @@
"url": "https://code.claude.com/docs/en/keybindings",
"status": "success",
"path": "en/docs/claude-code/keybindings.md",
- "sha256": "184123817496b0976e0fb48588a521eb97d9e588bcd39b07d4e832cf852756fe",
- "size": 40343
+ "sha256": "7619c12e48223c41e5a0175043dfda4c91669ed1e1251b0589f79217394c7a78",
+ "size": 40376
},
{
"url": "https://code.claude.com/docs/en/cli-reference",
@@ -6897,36 +6897,36 @@
"url": "https://code.claude.com/docs/en/tools-reference",
"status": "success",
"path": "en/docs/claude-code/tools-reference.md",
- "sha256": "d158073c779eacf2eb93319067ee924295cc103b967ab37cf42347a138e4883a",
- "size": 87573
+ "sha256": "c60a806322b644c3ec289fa47dabfd5d54b82697d1b3b8a687109f01b94798d7",
+ "size": 87846
},
{
"url": "https://code.claude.com/docs/en/interactive-mode",
"status": "success",
"path": "en/docs/claude-code/interactive-mode.md",
- "sha256": "69a20c07fa8cc7c5c3e9700f2b1916625d4f085ed9c612c8e882b09774a7f4bf",
- "size": 77891
+ "sha256": "a20529e1f84261b71a776204ce778a1870f94d500fdb29daa73cb9b755af88e5",
+ "size": 78170
},
{
"url": "https://code.claude.com/docs/en/checkpointing",
"status": "success",
"path": "en/docs/claude-code/checkpointing.md",
- "sha256": "20e9f3c3edd19c8eb9924af36e79505b9c1a6f0a2d6952bc319b05a30a5eaeec",
- "size": 9712
+ "sha256": "e12d88404a36511c0fac5e9aaf1def707e4465b559aacbe258f854749dcffc32",
+ "size": 9340
},
{
"url": "https://code.claude.com/docs/en/hooks",
"status": "success",
"path": "en/docs/claude-code/hooks.md",
- "sha256": "f81d3d61cd42f7892bee96084a09be6283bac1be09bc544b17f76545f5bed90c",
- "size": 280780
+ "sha256": "3ce0f8a007da9192d076b08ca1aa9332b28c12f443189066e3534b1595eaeb47",
+ "size": 281780
},
{
"url": "https://code.claude.com/docs/en/channels-reference",
"status": "success",
"path": "en/docs/claude-code/channels-reference.md",
- "sha256": "1bfaa7d49a51772d6b0a2eefb31ac92582ee2199bdd70da564d61278ece96c6b",
- "size": 45063
+ "sha256": "adf652f0f8a65c1895b02259add675e7e9ea461501815c49ebd0655daa65eccc",
+ "size": 45385
},
{
"url": "https://code.claude.com/docs/en/glossary",
@@ -9921,8 +9921,8 @@
"url": "https://support.claude.com/en/articles/8114491-get-started-with-claude",
"status": "success",
"path": "support/8114491-get-started-with-claude.md",
- "sha256": "bb9a5fd808f3ecc6b35d0cbcf8e9c48b9438b353b1b4092830f16315d7380a5c",
- "size": 5209
+ "sha256": "6e25bf2b153dfc7b4c95c236da7dff2910a706dd2207f0157b640e0ceed8e95d",
+ "size": 5205
},
{
"url": "https://support.claude.com/en/articles/8114494-how-up-to-date-is-claude-s-training-data",
@@ -9998,8 +9998,8 @@
"url": "https://support.claude.com/en/articles/8230524-delete-or-rename-a-conversation",
"status": "success",
"path": "support/8230524-delete-or-rename-a-conversation.md",
- "sha256": "1f2161e8e634c53e2d6f2b0115b89d6df9c4082c89442681f244bb5777f9c923",
- "size": 5873
+ "sha256": "f1555e7e2cc35b25de67e54d91480e08edf0408040bd16ff744f9f7bde6315bd",
+ "size": 5879
},
{
"url": "https://support.claude.com/en/articles/8241126-upload-files-to-claude",
@@ -10068,8 +10068,8 @@
"url": "https://support.claude.com/en/articles/8325618-paid-plan-billing-faqs",
"status": "success",
"path": "support/8325618-paid-plan-billing-faqs.md",
- "sha256": "5081515f67b1d0411fca72628195151b0a4a3cdf6253fdefb59be4920f5003b8",
- "size": 4955
+ "sha256": "572f150c2c483dbbd9135a7e552c6221600d1eab8a0137dec32ce811b80940ad",
+ "size": 4951
},
{
"url": "https://support.claude.com/en/articles/8325621-i-would-like-to-input-sensitive-data-into-my-chats-with-claude-who-can-view-my-conversations",
@@ -10306,8 +10306,8 @@
"url": "https://support.claude.com/en/articles/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization",
"status": "success",
"path": "support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md",
- "sha256": "d0d1e083ff70c5fca1a982cf34c0518f7c6fe96bfa27e0dfcd47504b46aa3eae",
- "size": 10268
+ "sha256": "c882f111d147a23981ede68aa9afab822367d0f93defe5795943a1ac0bd25c41",
+ "size": 10266
},
{
"url": "https://support.claude.com/en/articles/9301722-updates-to-our-acceptable-use-policy-now-usage-policy-consumer-terms-of-service-and-privacy-policy",
@@ -10348,8 +10348,8 @@
"url": "https://support.claude.com/en/articles/9519177-how-can-i-create-and-manage-projects",
"status": "success",
"path": "support/9519177-how-can-i-create-and-manage-projects.md",
- "sha256": "2b6c5492949d93411d25a9fe661b54afc322181efdf528e8df1bc6ad156a6d26",
- "size": 9201
+ "sha256": "865ca226fffb11ba62e72273b0ad57e7f9d8307ad5f2596c6f2fdff79aa32edd",
+ "size": 9205
},
{
"url": "https://support.claude.com/en/articles/9519189-manage-project-visibility-and-sharing",
@@ -10649,8 +10649,8 @@
"url": "https://support.claude.com/en/articles/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans",
"status": "success",
"path": "support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md",
- "sha256": "f062d3f5e0af30b94e86f10ec865422d3c95978d4f5a44abb210a16bb9c31011",
- "size": 1036
+ "sha256": "84f4b6bf381f67b4c7921bc27227d3929961580178711e858979369fb95cd5c8",
+ "size": 1034
},
{
"url": "https://support.claude.com/en/articles/10504853-manage-user-feedback-settings-on-claude-console",
@@ -10670,8 +10670,8 @@
"url": "https://support.claude.com/en/articles/10593882-share-and-unshare-chats",
"status": "success",
"path": "support/10593882-share-and-unshare-chats.md",
- "sha256": "5363692215f7b5c0033d34ac660cd01ebd7b8cf7d79fbe0555d4d582f8d43466",
- "size": 4008
+ "sha256": "a080571bbc0ed2cd158fff20a80df752d5a6810f01edb67c74b0a379dd2b223d",
+ "size": 4014
},
{
"url": "https://support.claude.com/en/articles/10684626-enable-and-use-web-search",
@@ -10866,8 +10866,8 @@
"url": "https://support.claude.com/en/articles/11725453-set-up-the-claude-lti-in-canvas-by-instructure",
"status": "success",
"path": "support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md",
- "sha256": "3834e461d5c7cc7b98893ddc37e2391995dad87bddb75b2f967dba8967128676",
- "size": 2754
+ "sha256": "5dcab1e2ba26bed6222310f946b41be10c6b44a6aeb9b8d0838ffe6f2015a48b",
+ "size": 2752
},
{
"url": "https://support.claude.com/en/articles/11732894-who-owns-and-manages-the-data-of-my-claude-for-education-account",
@@ -10887,7 +10887,7 @@
"url": "https://support.claude.com/en/articles/11818288-why-am-i-being-asked-to-verify-my-payment-method",
"status": "success",
"path": "support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md",
- "sha256": "864dcddea9cc8763c5210be2b88d24f759d47481a7aa3271f98891fe8a8d65e8",
+ "sha256": "8b0829a60864b314ac646681560b2822521c6aaebcbf4f3e36b634426ca0efc9",
"size": 816
},
{
@@ -10922,8 +10922,8 @@
"url": "https://support.claude.com/en/articles/11869629-use-claude-with-android-apps",
"status": "success",
"path": "support/11869629-use-claude-with-android-apps.md",
- "sha256": "cb924b43966cbdb1eeecbc918f3357d42adcca6652512008fcc3904ff79fe5b7",
- "size": 13991
+ "sha256": "081d718a4c7a99fa20d28c5bdd9cdbd8ebaea617141fd13f5dff7d3f3c5b9f9b",
+ "size": 13995
},
{
"url": "https://support.claude.com/en/articles/11932705-automated-security-reviews-in-claude-code",
@@ -10957,15 +10957,15 @@
"url": "https://support.claude.com/en/articles/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans",
"status": "success",
"path": "support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md",
- "sha256": "e14451bbe633bd66478094f48833f07c45fa34672a0118ea421b6a577938f919",
- "size": 9713
+ "sha256": "a7ea669c3fa56ca1699efdafbcdbbea1286b14ae56160c41307e7237af4740ca",
+ "size": 9711
},
{
"url": "https://support.claude.com/en/articles/12012173-get-started-with-claude-in-chrome",
"status": "success",
"path": "support/12012173-get-started-with-claude-in-chrome.md",
- "sha256": "290ed668346658af7f4798229841e5495b5419ff8fad36da8fdcb0d7631fdf61",
- "size": 14720
+ "sha256": "bf248049e4b077833d57a140db0953725507da838f3871a0d5fa68ff4157859a",
+ "size": 14708
},
{
"url": "https://support.claude.com/en/articles/12053672-what-happens-to-a-user-s-data-when-they-are-removed-from-a-team-or-enterprise-organization",
@@ -10978,7 +10978,7 @@
"url": "https://support.claude.com/en/articles/12083917-change-your-team-plan-from-monthly-to-annual-billing",
"status": "success",
"path": "support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md",
- "sha256": "6ebba43b48a099b673378906f3e1e692a97486e131a2130f0373b7ef3a9c41c1",
+ "sha256": "9c5864588f0ab9acc768114028549ed2bcb21842af2f3bdc863d91b9bff8ed18",
"size": 1394
},
{
@@ -10992,8 +10992,8 @@
"url": "https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude",
"status": "success",
"path": "support/12111783-create-and-edit-files-with-claude.md",
- "sha256": "78b7b44ef60cbaef6a6c0996f7e411732c6ca1f28152e4acf41134f3ce0e6c02",
- "size": 18015
+ "sha256": "2d5aecafca37296bf79eeedf3e41f0af6fd31da510adfce2e6c7225b4bbb970b",
+ "size": 17989
},
{
"url": "https://support.claude.com/en/articles/12119250-model-safety-bug-bounty-program",
@@ -11020,22 +11020,22 @@
"url": "https://support.claude.com/en/articles/12157520-claude-code-usage-analytics",
"status": "success",
"path": "support/12157520-claude-code-usage-analytics.md",
- "sha256": "65d3ff91a42fb2f48e0e946cf8719278c42c6e948a41316f31db88ef97bd203a",
+ "sha256": "8acd9e28e2db5586c62b9daad51a40169c4ff382c9dc882a1fd0836ed7022961",
"size": 6368
},
{
"url": "https://support.claude.com/en/articles/12260368-use-incognito-chats",
"status": "success",
"path": "support/12260368-use-incognito-chats.md",
- "sha256": "0dff8bfc16a1f92c5ca0d57016156de44d331d60189b75ee5b05bdc3472bb7f5",
- "size": 4376
+ "sha256": "dec830ce2445577e0036ab7b2a75724d9e95c93872f0c07e43179358c8151ee5",
+ "size": 4374
},
{
"url": "https://support.claude.com/en/articles/12293051-use-claude-in-xcode",
"status": "success",
"path": "support/12293051-use-claude-in-xcode.md",
- "sha256": "6e2cefb77e04235d9b943d3eee8681899f5916d89a6247aa847bf67b42f7e0c9",
- "size": 1905
+ "sha256": "50627de8ba7219c5bae402cbaf9923a53d9a4dc970d7921a0075279be8c041d1",
+ "size": 1911
},
{
"url": "https://support.claude.com/en/articles/12304248-manage-api-key-environment-variables-in-claude-code",
@@ -11076,15 +11076,15 @@
"url": "https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans",
"status": "success",
"path": "support/12429409-manage-usage-credits-for-paid-claude-plans.md",
- "sha256": "a36a7564b2fb98e675af4de9efc0c199123e88e28ae6f6314af65a1ff9cbcea5",
- "size": 7970
+ "sha256": "1838407676bb5962bf8994665e59b9361d7ef841357a39be6e9e8318f170efb6",
+ "size": 7972
},
{
"url": "https://support.claude.com/en/articles/12466728-troubleshoot-claude-error-messages",
"status": "success",
"path": "support/12466728-troubleshoot-claude-error-messages.md",
- "sha256": "2ff0eb6dee0abb1b4a6fc8cb04e2fd80a6a2a94e8b7f50bcdaa199d9ae1b2dc1",
- "size": 5141
+ "sha256": "f5bc24f4007390b14d4eec6b617087e226c38bcd47e9175b70161ce2d613a62e",
+ "size": 5143
},
{
"url": "https://support.claude.com/en/articles/12489464-use-enterprise-search",
@@ -11125,8 +11125,8 @@
"url": "https://support.claude.com/en/articles/12592343-enabling-and-using-the-desktop-extension-allowlist",
"status": "success",
"path": "support/12592343-enabling-and-using-the-desktop-extension-allowlist.md",
- "sha256": "7c4c30e9dbb2b648e488dfd4c0c9e3ac80d1bbdd2a309112390bd0e3f62a7fbe",
- "size": 5720
+ "sha256": "6d4cbb8f4f9e90de40fa8ed257c42802a000f02764fa7723bcf137b51d0544ee",
+ "size": 5718
},
{
"url": "https://support.claude.com/en/articles/12611117-deploy-claude-desktop-for-macos",
@@ -11139,8 +11139,8 @@
"url": "https://support.claude.com/en/articles/12618689-use-claude-code-in-the-cloud",
"status": "success",
"path": "support/12618689-use-claude-code-in-the-cloud.md",
- "sha256": "ae9bb63668c1da78d5057beee9e51851e6237f2eba7c0f1bd88b1cf675a714dd",
- "size": 11056
+ "sha256": "acc3f2b1080832a29a07256aca1703f2608d5c52045bee8ad28e7554d8ba044e",
+ "size": 11060
},
{
"url": "https://support.claude.com/en/articles/12622667-enterprise-configuration-for-claude-desktop",
@@ -11195,7 +11195,7 @@
"url": "https://support.claude.com/en/articles/12883420-view-usage-analytics-for-team-and-enterprise-plans",
"status": "success",
"path": "support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md",
- "sha256": "503e344d2a28885ddeb2dce3fdbee4f3606122319f689e41de2c47e3e10323d7",
+ "sha256": "197512b31cf3317b42fcbc434f6967947873f59454c1fe4ba9bbb31f881f75b9",
"size": 15089
},
{
@@ -11216,8 +11216,8 @@
"url": "https://support.claude.com/en/articles/12902446-claude-in-chrome-permissions-guide",
"status": "success",
"path": "support/12902446-claude-in-chrome-permissions-guide.md",
- "sha256": "3d81e27daa74873222dc914f65bb8c6707d8bd0634d3fb603490c47529cab612",
- "size": 9129
+ "sha256": "54dbe7961727f747628d98eae6d5c1d214712e11ae384aa037874a7857d737ae",
+ "size": 9105
},
{
"url": "https://support.claude.com/en/articles/12938627-how-to-gift-a-claude-subscription",
@@ -11244,8 +11244,8 @@
"url": "https://support.claude.com/en/articles/12997503-team-plan-billing-faqs",
"status": "success",
"path": "support/12997503-team-plan-billing-faqs.md",
- "sha256": "988c13ded1f998c9ca0a5fc2f365a03e466e75a8be76649cbec35e99a5513b16",
- "size": 5415
+ "sha256": "15a68f8cfaf1d4fea80e6f5a52d145c7fe592e5da74bbcc6e6afedd1c2da8803",
+ "size": 5413
},
{
"url": "https://support.claude.com/en/articles/13015708-access-the-compliance-api",
@@ -11293,15 +11293,15 @@
"url": "https://support.claude.com/en/articles/13132885-set-up-single-sign-on-sso",
"status": "success",
"path": "support/13132885-set-up-single-sign-on-sso.md",
- "sha256": "34c85db3d212c3195fac5e6c29b392979988ae245f8de600fdb8a74c87a37d73",
- "size": 13645
+ "sha256": "3e450cf68f49dc6f0b3264a93e19cea219090e77c60a0da068291d4425cd6475",
+ "size": 13643
},
{
"url": "https://support.claude.com/en/articles/13133195-set-up-jit-or-scim-provisioning",
"status": "success",
"path": "support/13133195-set-up-jit-or-scim-provisioning.md",
- "sha256": "716e5b57f28767e4443f1d30ddf3a05c12225e64e0085d3b45e9df4750464de3",
- "size": 22533
+ "sha256": "7b192a2b2cfd55857e0bb16daf42f0be49ff25af9dcfc709ca5ce95c7ca5ec83",
+ "size": 22527
},
{
"url": "https://support.claude.com/en/articles/13133750-manage-members-on-team-and-enterprise-plans",
@@ -11328,8 +11328,8 @@
"url": "https://support.claude.com/en/articles/13163631-configuring-session-security-settings",
"status": "success",
"path": "support/13163631-configuring-session-security-settings.md",
- "sha256": "85465beae109310970585b77beadbf0a6c60e1be22a902369d7436d52fc27f32",
- "size": 3701
+ "sha256": "0d759d99b296792d3e54d710022d704f332c6edfae65b8f288e1affaad41cda9",
+ "size": 3703
},
{
"url": "https://support.claude.com/en/articles/13171706-crisis-helpline-support-in-claude",
@@ -11342,8 +11342,8 @@
"url": "https://support.claude.com/en/articles/13189465-log-in-to-your-claude-account",
"status": "success",
"path": "support/13189465-log-in-to-your-claude-account.md",
- "sha256": "e21ff48c94f64f50aeb7062d5e10cad4bd776cfab9847ea13363368b36ef53fb",
- "size": 7041
+ "sha256": "46aa99b172e794a1c8a186b0286e7282efb78829a691919a953706637a1bce09",
+ "size": 7039
},
{
"url": "https://support.claude.com/en/articles/13198485-enforce-network-level-access-control-with-tenant-restrictions",
@@ -11377,8 +11377,8 @@
"url": "https://support.claude.com/en/articles/13345190-get-started-with-claude-cowork",
"status": "success",
"path": "support/13345190-get-started-with-claude-cowork.md",
- "sha256": "2e3df57f9a453ff43f22588cfad61d24d6c0c08a331ecc8226207f4d71c1cd5c",
- "size": 22052
+ "sha256": "87490a3fda954718ba8318c48ecd8086db8aef52a633ef1c26bdbd049fbb130b",
+ "size": 22038
},
{
"url": "https://support.claude.com/en/articles/13346458-customize-your-console-appearance-settings",
@@ -11405,8 +11405,8 @@
"url": "https://support.claude.com/en/articles/13371040-log-in-to-your-console-account",
"status": "success",
"path": "support/13371040-log-in-to-your-console-account.md",
- "sha256": "da778405d4d01ff6b099e5188996338ea6202ed85fcc5d778d0977736f23cecc",
- "size": 4613
+ "sha256": "ba99292c2c09a353703234f4c6ccf4e6fdd375a10629a1f09b58629a66126c5c",
+ "size": 4611
},
{
"url": "https://support.claude.com/en/articles/13393991-purchase-and-manage-seats-on-enterprise-plans",
@@ -11461,7 +11461,7 @@
"url": "https://support.claude.com/en/articles/13641943-visual-and-interactive-content",
"status": "success",
"path": "support/13641943-visual-and-interactive-content.md",
- "sha256": "418fd6002077786752a022be94b6012ea18d553d4557666f79d645aa01ff3ea3",
+ "sha256": "a883228335122449230e4e65ad448772e97c3f2289f2cb7270ce0c6c66ba765d",
"size": 6511
},
{
@@ -11517,8 +11517,8 @@
"url": "https://support.claude.com/en/articles/13837440-use-plugins-in-claude",
"status": "success",
"path": "support/13837440-use-plugins-in-claude.md",
- "sha256": "b2c01220addb96898906cbcf49b609779d8afe15858af8e6214010d62bfc7d9f",
- "size": 15189
+ "sha256": "4c5c3f3fae46b725eea4dfaae19c7c81d4aa282df886cc9a4da39697cb982a25",
+ "size": 15193
},
{
"url": "https://support.claude.com/en/articles/13854387-schedule-recurring-tasks-in-claude-cowork",
@@ -11615,8 +11615,8 @@
"url": "https://support.claude.com/en/articles/13947068-assign-tasks-from-anywhere-in-claude-cowork",
"status": "success",
"path": "support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md",
- "sha256": "b5a31b31d410e990e542941eaf148fc118127b62ccccad0ff7a3b41a1d020c52",
- "size": 9023
+ "sha256": "3bbc0e094fe81d884b2e31e90f2608d66f1395fe40d88b2baad486f10584b739",
+ "size": 8973
},
{
"url": "https://support.claude.com/en/articles/13979539-custom-visuals-in-chat-and-cowork",
@@ -11636,8 +11636,8 @@
"url": "https://support.claude.com/en/articles/14116274-organize-your-tasks-with-projects-in-claude-cowork",
"status": "success",
"path": "support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md",
- "sha256": "233f9c36dc6fafb9e2cb82154d629ffbde99d0f3e1a1f3445ea9c1874980e439",
- "size": 7911
+ "sha256": "6473d04872e6138eac5b48677b19a330cb12f33cd4734e717969ebfe0f4d43f1",
+ "size": 7843
},
{
"url": "https://support.claude.com/en/articles/14128542-let-claude-use-your-computer-in-cowork",
@@ -11706,8 +11706,8 @@
"url": "https://support.claude.com/en/articles/14499648-how-scim-sync-works-for-enterprise-organizations",
"status": "success",
"path": "support/14499648-how-scim-sync-works-for-enterprise-organizations.md",
- "sha256": "98ce6cff39dfe747bceaaf041bf026f1775910c6fee19eb1b09d25caa75fa1df",
- "size": 7676
+ "sha256": "b890d1bbb7fb9fad24c56f5cd0e6f347d96afd6187c26a563bcb9affa6c34a2e",
+ "size": 7672
},
{
"url": "https://support.claude.com/en/articles/14503520-available-beta-and-research-preview-features",
@@ -11818,8 +11818,8 @@
"url": "https://support.claude.com/en/articles/14604842-cyber-verification-program",
"status": "success",
"path": "support/14604842-cyber-verification-program.md",
- "sha256": "1d7a6b850e6533d5a624efd39895102efd981ac7218ba0fddba863010264d3b3",
- "size": 36020
+ "sha256": "ce922a5d960b2800323745d156ca14b6e65d19a504c20194eed37f0d93b886e5",
+ "size": 36006
},
{
"url": "https://support.claude.com/en/articles/14625619-claim-and-migrate-accounts-on-your-domain",
@@ -11930,8 +11930,8 @@
"url": "https://support.claude.com/en/articles/15330088-set-a-default-model-for-your-organization",
"status": "success",
"path": "support/15330088-set-a-default-model-for-your-organization.md",
- "sha256": "7d9a506fda2491b1657cce37fa3e70ede6c2748e8aae996b096d1b41144bb177",
- "size": 11311
+ "sha256": "31945af2de7345c8e38e5b3c037e9390275db5071bc7e31d0510b95e82b70f78",
+ "size": 11309
},
{
"url": "https://support.claude.com/en/articles/15330651-claude-enterprise-admin-api-reference-guide",
@@ -12042,8 +12042,8 @@
"url": "https://support.claude.com/en/articles/15694740-manage-model-access-for-your-organization",
"status": "success",
"path": "support/15694740-manage-model-access-for-your-organization.md",
- "sha256": "0fc799e4ce559f66226abc78e449a69dcfd48ece635be0eb95d6af0e5788eb43",
- "size": 10338
+ "sha256": "7922fd9f59d37445c29e06fcbd12f72a4227fba5f705e3d747259b5ea0a30c37",
+ "size": 10332
},
{
"url": "https://support.claude.com/en/articles/15707726-using-claude-for-legal-work-privilege-confidentiality-and-how-to-think-about-configuration",
@@ -12077,7 +12077,7 @@
"url": "https://support.claude.com/en/articles/15936181-get-started-with-1password-for-claude",
"status": "success",
"path": "support/15936181-get-started-with-1password-for-claude.md",
- "sha256": "a3f701b1beb38a0ea424d3c20f3e6b3868a5a693d42db3648712be2364894afd",
+ "sha256": "c0162de721bf3aaea386472d858dbae390d0984aafb34963bacd061e0008e512",
"size": 5058
},
{
@@ -12126,7 +12126,7 @@
"url": "https://support.claude.com/en/articles/16607638-understanding-your-pro-or-max-plan-invoices",
"status": "success",
"path": "support/16607638-understanding-your-pro-or-max-plan-invoices.md",
- "sha256": "2c84ae3ea1729ed0d17163ccaf6c211afed8504c66746364484ff6d264c5815f",
+ "sha256": "e548d19ad2168f9cb8341745da8a0a0a9d4c9e4e9b56d618d6a4123194f6826a",
"size": 5832
},
{
@@ -12210,8 +12210,8 @@
"url": "https://support.claude.com/en/articles/16893491-get-started-with-smart-reports",
"status": "success",
"path": "support/16893491-get-started-with-smart-reports.md",
- "sha256": "381ea1ffc959494ed0868b481f4ed384a375b48f992d81e2ab4078236ccd6d37",
- "size": 15965
+ "sha256": "d6014a2d5016881107a0ef508b758e98b2cbec84452168adb3b3d5212cb32a1d",
+ "size": 15969
},
{
"url": "https://support.claude.com/en/articles/16923645-get-started-with-claude-docs",
@@ -12231,7 +12231,7 @@
"url": "https://support.claude.com/en/articles/16951679-use-claude-in-google-docs-sheets-and-slides",
"status": "success",
"path": "support/16951679-use-claude-in-google-docs-sheets-and-slides.md",
- "sha256": "1ab6cee91663544d43bda75773d4039f0b00653ef1287e1fee274d5f4ede40eb",
+ "sha256": "5bb5cd778f55e0f6570d43b782f916785bff50ab381e51f7819ffcce8449cee3",
"size": 21890
},
{
@@ -12259,7 +12259,7 @@
"url": "https://support.claude.com/en/articles/17005973-manage-pooled-group-budgets-on-enterprise-plans",
"status": "success",
"path": "support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md",
- "sha256": "2b1ee3092c4acb20fa98895f5ed0be765d1fef96c8793fd6c19cfd7ae9065883",
+ "sha256": "f3415de1c415ea820b9b5e2677b1ae3d1ef66f5dd21d22160fb57001e1b22d27",
"size": 6982
},
{
@@ -12308,8 +12308,8 @@
"url": "https://support.claude.com/en/articles/17203415-set-up-claude-for-intune",
"status": "success",
"path": "support/17203415-set-up-claude-for-intune.md",
- "sha256": "b1d6c66d2db7ca7708b9314b609c085334150ce879577d8197f379d149e75c38",
- "size": 11379
+ "sha256": "327f32a5eaf33f00b663589e30e739aec2a8620a3695411ce8bdbd8e9ce6017b",
+ "size": 11375
},
{
"url": "https://support.claude.com/en/articles/17318731-use-claude-code-local-mode-and-claude-cowork-local-mode-on-a-hipaa-ready-enterprise-plan",
@@ -12336,8 +12336,8 @@
"url": "https://support.claude.com/en/articles/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization",
"status": "success",
"path": "support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md",
- "sha256": "137f88455e2612e96c4ebb66bcfea7f1583bf540caa8b0af318b315aeaf5d729",
- "size": 24668
+ "sha256": "94762ee9f05f61b8ab319cb5a404c2623617489e217db0d8a0e7b74c593d514f",
+ "size": 24634
},
{
"url": "https://support.claude.com/en/articles/17454700-get-started-with-claude-dashboards",
@@ -12693,8 +12693,8 @@
"url": "https://claude.com/docs/claude-tag/admins/add-connections",
"status": "success",
"path": "claude/claude-tag/admins/add-connections.md",
- "sha256": "1fb06911d9be403cd681927c6e93ee94e225cebf0475c6154fa5aa7a8286487e",
- "size": 39338
+ "sha256": "760c7259595e9b3cc67ee7c12b3440d8cfd93bde6a713db523ae38496db3e4e3",
+ "size": 39350
},
{
"url": "https://claude.com/docs/claude-tag/admins/attach-to-scope",
@@ -13015,8 +13015,8 @@
"url": "https://claude.com/docs/claude-tag/concepts/agent-identity",
"status": "success",
"path": "claude/claude-tag/concepts/agent-identity.md",
- "sha256": "5135a8ef51ac5684db3ec3e7aec3cf6cb3e37a95abf9e7cadf295b1cf8e45c45",
- "size": 16638
+ "sha256": "46bcfce21e4de228eca8b908658b4374a12a1a1fe2aac5e0aea4627517939632",
+ "size": 16646
},
{
"url": "https://claude.com/docs/claude-tag/concepts/data-lifecycle",
@@ -13057,8 +13057,8 @@
"url": "https://claude.com/docs/claude-tag/concepts/security-and-data",
"status": "success",
"path": "claude/claude-tag/concepts/security-and-data.md",
- "sha256": "714a9e190fc72829f9d7fe958e52238b6d8c25a81fb37d001e4a84728514ac3e",
- "size": 20203
+ "sha256": "183d4cbb9da7d782a55346d32053f1a1f53dfd2653e4ff6ce82768e7a1aade2b",
+ "size": 20211
},
{
"url": "https://claude.com/docs/claude-tag/concepts/settings-map",
@@ -14380,8 +14380,8 @@
"url": "https://code.claude.com/docs/en/desktop-changelog",
"status": "success",
"path": "en/docs/claude-code/desktop-changelog.md",
- "sha256": "6ad9b2d44e0ba007ff732d749d75bfe1e77271a86137a1217c2787c773fa9834",
- "size": 190946
+ "sha256": "03298b688d61d56339526e6bd9fde6ce5bb75cfce6a0881a8cb673f29ab5e056",
+ "size": 190920
},
{
"url": "https://code.claude.com/docs/en/plugin-relevance",
@@ -14394,8 +14394,8 @@
"url": "https://code.claude.com/docs/en/discover-plugins",
"status": "success",
"path": "en/docs/claude-code/discover-plugins.md",
- "sha256": "dac1cff425abd374c83c197c030a80a3979ceabc59de5572b304d8aafc7f83a8",
- "size": 32518
+ "sha256": "7d9ae581b0dc1f0f53ef5aa40cfd4682fe65632595b5a879f0b07460b30faad6",
+ "size": 32565
},
{
"url": "https://code.claude.com/docs/en/plugin-marketplaces",
@@ -14408,8 +14408,8 @@
"url": "https://code.claude.com/docs/en/plugins-reference",
"status": "success",
"path": "en/docs/claude-code/plugins-reference.md",
- "sha256": "3b72923e29d936fcb96146aae7b745e04486ac0367c5e3018739816f6cb85184",
- "size": 43136
+ "sha256": "2e9a4d61356e87ee92b7292586e81388cb98e2ac029a42952ed756dad85a00a0",
+ "size": 43117
},
{
"url": "https://code.claude.com/docs/en/plugin-hints",
@@ -14422,8 +14422,8 @@
"url": "https://code.claude.com/docs/en/web-scheduled-tasks",
"status": "success",
"path": "en/docs/claude-code/web-scheduled-tasks.md",
- "sha256": "e0b273166fea5899fa1c0d898975938cc423eb1c8b0a1d4c0609ee105cf9c53f",
- "size": 46689
+ "sha256": "900d6395f0a88f2ddda732191a867f3f585abf1d463b73488b308fe4715e29c6",
+ "size": 49929
},
{
"url": "https://code.claude.com/docs/en/agent-sdk/slash-commands",
@@ -23249,8 +23249,8 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/.claude/commands/model-check.md",
"status": "success",
"path": "github/claude-cookbooks/.claude/commands/model-check.md",
- "sha256": "fa169bfa0f91d211fc30f849921ccbff150ff73034caa51ddd07cb2ae321d2c5",
- "size": 906
+ "sha256": "cb0b61c9827829aaba7270ebcb4b32efb42482b603e2644f77c8ef0ae7de8de8",
+ "size": 1883
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/.claude/commands/notebook-review.md",
@@ -23284,15 +23284,15 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/.claude/skills/cookbook-audit/SKILL.md",
"status": "success",
"path": "github/claude-cookbooks/.claude/skills/cookbook-audit/SKILL.md",
- "sha256": "63b4c68ffe7ea6c95b13ab008d58224651a5c63d3559ae4e58ec317f72a16258",
- "size": 12334
+ "sha256": "aba609bd9deb4469dd8c03fedd46f9c0e9d57dc373afdb9f936e86486eccf72d",
+ "size": 12520
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/.claude/skills/cookbook-audit/style_guide.md",
"status": "success",
"path": "github/claude-cookbooks/.claude/skills/cookbook-audit/style_guide.md",
- "sha256": "9a06870852c7d46ffbf8ed050f28e99c16eb2377b12f915dee071ffb8c5c61d3",
- "size": 5523
+ "sha256": "9908a2d8d2096f6b662218084d4bac5ed49608ccedd17a4cf260a42f1db484af",
+ "size": 5521
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/.github/ISSUE_GUIDELINES.md",
@@ -23312,15 +23312,15 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/CLAUDE.md",
"status": "success",
"path": "github/claude-cookbooks/CLAUDE.md",
- "sha256": "d4336215488fcd00830c5ce57a10ba98d46843a45dddb83beb75a0790adaf364",
- "size": 3568
+ "sha256": "86e78753bcf9db78d62b88c3a331c4840e0774998e08350fce233c1ee3f5bd58",
+ "size": 3732
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/CONTRIBUTING.md",
"status": "success",
"path": "github/claude-cookbooks/CONTRIBUTING.md",
- "sha256": "c14ab31a4b4f04bc65fb62886680952ceb812059ecd66dc1f22c6350eba4866d",
- "size": 6784
+ "sha256": "6d7ba2b02f7f039313f43d7b057139226b0baebeaae43ffcb46d2d8c31e1740b",
+ "size": 6923
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/README.md",
@@ -23431,7 +23431,7 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/knowledge_graph/guide.ipynb",
"status": "success",
"path": "github/claude-cookbooks/capabilities/knowledge_graph/guide.ipynb",
- "sha256": "aee0059900822aab95c09ca55504a973a31779b47feac4777976cd8b40c19589",
+ "sha256": "01b855f762cda766c61f4d70bab2c2ad64771a7ad9e5d7e0fc790bdc1063222b",
"size": 251512
},
{
@@ -23452,8 +23452,8 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/retrieval_augmented_generation/guide.ipynb",
"status": "success",
"path": "github/claude-cookbooks/capabilities/retrieval_augmented_generation/guide.ipynb",
- "sha256": "c830ca58db7979af860390518fa168ac14143c790333f7022b37f3384d15516c",
- "size": 663123
+ "sha256": "5ddd8dbdb108ccaa5e2451fd41c49653def77a64edf05fefd47d13c9a17a68b5",
+ "size": 663998
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/summarization/README.md",
@@ -23473,8 +23473,8 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/summarization/guide.ipynb",
"status": "success",
"path": "github/claude-cookbooks/capabilities/summarization/guide.ipynb",
- "sha256": "5f8fae8f56af128aa73537232d450cfeeef5e92b0d4f884da18861ec05dcf778",
- "size": 186738
+ "sha256": "46b42c404f79abac8da8c33afd8413fd0cf4a3b3a3edf6e199e0870db5eadc13",
+ "size": 187497
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/text_to_sql/README.md",
@@ -23494,42 +23494,42 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/capabilities/text_to_sql/guide.ipynb",
"status": "success",
"path": "github/claude-cookbooks/capabilities/text_to_sql/guide.ipynb",
- "sha256": "a734cf4ddaecdda42fd3efa03029d035c79ecc09d7c1562212b616f7431ef748",
- "size": 2984796
+ "sha256": "8e722a94ecf776b2b5e3f9deb870f026a3c2383710baa97441ca504f529cf661",
+ "size": 2985342
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/00_The_one_liner_research_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/00_The_one_liner_research_agent.ipynb",
- "sha256": "9b6565e1902556e87944ff374efc50007f8867c5b425efca95fb689bca13f744",
+ "sha256": "a147456907c514816a2d327a6b5172c05ca68caf23729a8bfe86193501197380",
"size": 70645
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/01_The_chief_of_staff_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/01_The_chief_of_staff_agent.ipynb",
- "sha256": "97ca3e711d8ec94790cde6a59cb3c524ba401e456982d206a44004e892b446b8",
+ "sha256": "94985f457dcfa6dbc9997e613a7919d250ddbd45237c3b7f08ccb662eaad3b0a",
"size": 115399
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/02_The_observability_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/02_The_observability_agent.ipynb",
- "sha256": "338a986388c9f3e75f1946f0899da6b2d7fea423380aecc3853f3c15c5496778",
+ "sha256": "ca8b7d153cdd4bfa7a2828cddebb7b30d0873f1d914f1a09d117a6393fa0d22c",
"size": 70190
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/03_The_site_reliability_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/03_The_site_reliability_agent.ipynb",
- "sha256": "c7fc4abe9b5201ea8b219da0763fe0834bc8759751462c2c28c4e34519211e0b",
- "size": 597070
+ "sha256": "dd18059a4904f5d24457d28c329d6e08c6fe5eacd6956d3e6c3dd5dbc7709f15",
+ "size": 597888
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/04_migrating_from_openai_agents_sdk.ipynb",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/04_migrating_from_openai_agents_sdk.ipynb",
- "sha256": "5309710c2e393716039028047943249473b9cd6af0e64ff96451789ed3c2210c",
+ "sha256": "97d3e559302a09d33c2c743c9598988d956ec36a853f5ae141b3c56fa5efae76",
"size": 39171
},
{
@@ -23543,22 +23543,22 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/06_The_vulnerability_detection_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/06_The_vulnerability_detection_agent.ipynb",
- "sha256": "74fca4f72eda1001ec23d0f8a35014f6fb5878a611e2bb15d52b656eeb28e7e0",
+ "sha256": "21354a477757b56b22b7e443e19dafb1da204c72083794c09661f791f0c3bb51",
"size": 50322
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/07_Hosting_the_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/07_Hosting_the_agent.ipynb",
- "sha256": "91ce81911295e75b01c5ea220c64e2e9687de6155b4d26e40c191a5da3719052",
+ "sha256": "d01272e82ed6b4f5ffa571b543011a87a8585b4c8b30182a226f3aa3a2759b88",
"size": 69243
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/08_Dynamic_workflows.ipynb",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/08_Dynamic_workflows.ipynb",
- "sha256": "29791dc68e672e1143c507dbf2e044e561a472214688b1019a0e1ae78262e8f9",
- "size": 52675
+ "sha256": "c9cb989d6f5db6317c65fa5b1e842152907686fb67b3265711153ca3413f7197",
+ "size": 52677
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/README.md",
@@ -23655,7 +23655,7 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/hosting/README.md",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/hosting/README.md",
- "sha256": "e984db3833f879aaecd089188277869c589e2fcd6cdd6f0c36acb4ff10d437ac",
+ "sha256": "daa7b6d082361de386e475ca5f987c0a6e6c8dbfbffb222e230495be0fb1573a",
"size": 3336
},
{
@@ -23697,14 +23697,14 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/claude_agent_sdk/scheduled_repository_reviewer/scheduled_repository_reviewer.ipynb",
"status": "success",
"path": "github/claude-cookbooks/claude_agent_sdk/scheduled_repository_reviewer/scheduled_repository_reviewer.ipynb",
- "sha256": "5a330d959121b10e4298c1f58f6456eeb050709d6f12e0a34701088548d8e745",
- "size": 68165
+ "sha256": "4e0953a79660cfc5e7a07c12becf59dc4d11301eea2bf49af2763e8d0ac552b6",
+ "size": 68167
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/coding/prompting_for_frontend_aesthetics.ipynb",
"status": "success",
"path": "github/claude-cookbooks/coding/prompting_for_frontend_aesthetics.ipynb",
- "sha256": "7608d89b278d6685ade18342680aab2db45870da1880572dbc9c2a26054c20e9",
+ "sha256": "9b8c1b4a16d843bd2a83a84e3687f05b3263a320bd59f8d8b903694a4c146b21",
"size": 63896
},
{
@@ -23725,22 +23725,22 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/evals/agentic_search/reproduce_agentic_search_benchmarks.ipynb",
"status": "success",
"path": "github/claude-cookbooks/evals/agentic_search/reproduce_agentic_search_benchmarks.ipynb",
- "sha256": "d5a9483db0e771053bb82834c30523ac76933d0243de50eb16539bffedb31cf3",
- "size": 35614
+ "sha256": "eb9e55d6005119130fbe8b557ddece13ec99ea1fb95fa834e5f09cc63ca0bb26",
+ "size": 35616
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/extended_thinking/extended_thinking.ipynb",
"status": "success",
"path": "github/claude-cookbooks/extended_thinking/extended_thinking.ipynb",
- "sha256": "bdd46263f09b2dd5b1a5d3b99263beb21ac3a4f187bb27170bab37d66922bd6d",
- "size": 28269
+ "sha256": "990e23d9d38a8354320604d2e9cba174693e78165dd54fb89994b94d01c474ac",
+ "size": 30733
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/extended_thinking/extended_thinking_with_tool_use.ipynb",
"status": "success",
"path": "github/claude-cookbooks/extended_thinking/extended_thinking_with_tool_use.ipynb",
- "sha256": "69e1f3db09ca14f94cb7b6cd9a2d84d64cafa173887d2140892dacbd4fa73f24",
- "size": 37075
+ "sha256": "99cc664f0684c2ea6e5e87cd8b4580c60b6dc31d3088f441c15ea4352c1cfb26",
+ "size": 48811
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/fable_5_fallback_billing/guide.ipynb",
@@ -23767,106 +23767,106 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_cap_session_spend.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_cap_session_spend.ipynb",
- "sha256": "d41771a7d3ecc95227ab6f2787fe253261bb30901f5b5f4ec68725b3ba184a3f",
- "size": 34161
+ "sha256": "418bad2432fded6a53b851f572be8cc8f32b7195cdc51569ba6bd150b2f90fa1",
+ "size": 34163
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_consult_an_advisor.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_consult_an_advisor.ipynb",
- "sha256": "138d76e424e1f94831886e7d084ad54ea955010b63bb549b0c14584f078f1355",
- "size": 28049
+ "sha256": "dbf4cf46b0413c25d15670d2866ffd79b45f259df3dbded14f284d7c30417fd1",
+ "size": 28053
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_coordinate_specialist_team.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_coordinate_specialist_team.ipynb",
- "sha256": "6b363c21b64151daea85d0dda4bb92d5695c40b35f8d5331c14805a9a18445eb",
- "size": 23223
+ "sha256": "17d34b7d2087e8e61b588c956e6e10eb502634f1f52a62611cb67c57b8c64314",
+ "size": 23227
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_explore_unfamiliar_codebase.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_explore_unfamiliar_codebase.ipynb",
- "sha256": "299d8568268d63a56b8ebd6e53c1feef05122e353057873892b3444ad2222c6c",
+ "sha256": "10f888133fef99ae056c601d0ad2372328f447ab6c2e6876a9df2b6a63622de0",
"size": 9831
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_gate_human_in_the_loop.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_gate_human_in_the_loop.ipynb",
- "sha256": "cdb41fe85090d1851c839570e8c29cc95c54d48b1a7570b341679aae8bf8ad7a",
+ "sha256": "2393725c302b2cd46733e9ce418f8730a6ac084478a814b9400398cba0df6a4d",
"size": 15610
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_iterate_fix_failing_tests.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_iterate_fix_failing_tests.ipynb",
- "sha256": "75c2a5ec27d12a789c1b1570e28f36bdd1457a279410127893bc3d3823ccf3b8",
+ "sha256": "550def2276acfd13532af520ab3231f9d39cef7d37fe51f506779a41b94625e3",
"size": 16882
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_operate_in_production.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_operate_in_production.ipynb",
- "sha256": "705256bdd8291eae2bc37d8f0e81493d84b0208c74146652e1c6d70573857909",
+ "sha256": "7a04d1a122124a62571a4490ee56c9d71c046bab2ddae7a6f3888042dcdd0d45",
"size": 19499
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_orchestrate_issue_to_pr.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_orchestrate_issue_to_pr.ipynb",
- "sha256": "6a2b16de2c7593cb485e12db5a89dd02250f73261dc439047a5f6fe8baf1e800",
+ "sha256": "d5fce8de7cd8ee27d6992ab7d7150bf2ee97a100c7b13a08918c2b8690012fd8",
"size": 11856
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_pin_inference_geo.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_pin_inference_geo.ipynb",
- "sha256": "9e222b35c41f9f3324ef40c3d2c2adf27c64cf9de12c7bc0d5629328f85c44e9",
- "size": 10721
+ "sha256": "6540a802c39d3249acd88092e1eebf6940e77c6783b7f6949fc18c2dafac8494",
+ "size": 10723
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_plan_big_execute_small.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_plan_big_execute_small.ipynb",
- "sha256": "f5e3e26d64553430453fefb545c58e31c4721c6b2f181dbb0b3171aed6b9ae0c",
- "size": 31106
+ "sha256": "4bbdb99d7373217cd2b73a4151b9b9eb1ad4b7745c9c4e5afd40c3fa43cfd8a6",
+ "size": 31213
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_prompt_versioning_and_rollback.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_prompt_versioning_and_rollback.ipynb",
- "sha256": "9ea5bdae61036f62192f1aca69d10d5c8a9aea7995eee5f81256de45b350c544",
+ "sha256": "baf82c909e6280632d40e95753edeb62cf8a411a9a909871623f6c5a93ce7227",
"size": 15828
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_remember_user_preferences.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_remember_user_preferences.ipynb",
- "sha256": "fb047b9814ab460163979e35d9bb143eca66e4870d7cdaa9db65bdadd7f1ffbf",
+ "sha256": "689dfcd0fd50b7af340d2d67c2eecae8eb40db64094dba151db7a69cb91e9fa2",
"size": 26774
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_use_skills_from_a_repo.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_use_skills_from_a_repo.ipynb",
- "sha256": "6223e2dd4576a87e743e68238de0bfba28290cd6ddc00201778e27c07396c76c",
- "size": 15101
+ "sha256": "cb4933b61ecf3d2df482eab2461b40563508f0834b985837b87e768f07802a58",
+ "size": 15103
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_verify_with_outcome_grader.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_verify_with_outcome_grader.ipynb",
- "sha256": "bab3832de45df0c2d072607f250cc2c2e2a5db4a9f21711a63bf22f5f59a9ef4",
+ "sha256": "831a8efc33dc88f595768e01967ca9e925cf985d982880d2b565057dfa745297",
"size": 33854
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_watch_subagents_live.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/CMA_watch_subagents_live.ipynb",
- "sha256": "f39e3d6e40879f42ae6dcaa322128d0d14f8f3dfb717cddc07f4e2374da9b66b",
- "size": 25403
+ "sha256": "3e96d2a651a64ac7f738829c0e049f8d7ffb727faefcfabc165660843df73bfb",
+ "size": 25405
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_with_mongodb_atlas.ipynb",
@@ -23893,7 +23893,7 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/data_analyst_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/data_analyst_agent.ipynb",
- "sha256": "88911e58c2525cd3504d6df351ef046f95d3a01506ea62b43a53d06fd7c8e831",
+ "sha256": "80d157bb2c8b506881d6dcc2db474eba0f4f199357e1934b03816063ea7bcfd6",
"size": 15291
},
{
@@ -24005,29 +24005,29 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/sre_incident_responder.ipynb",
"status": "success",
"path": "github/claude-cookbooks/managed_agents/sre_incident_responder.ipynb",
- "sha256": "55ca840b1614a35998854bb4623ecd59c643de65f51b06590429778f2a577ea0",
+ "sha256": "8ddc1527b9115b10d476d32cca33fa78d9aef6cd3be95a83edb155c194391bed",
"size": 37178
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/admin_api.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/admin_api.ipynb",
- "sha256": "811d86c13d33c00c8ccdf438503407777e83fd0b3a8141bc8e84bdbf4f828a54",
- "size": 30006
+ "sha256": "4dc5ea27a0a93c4bf5b0769343f6c0130909efa1355b58f562bd9b6b32dfd7c1",
+ "size": 30008
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/batch_processing.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/batch_processing.ipynb",
- "sha256": "1aa52f75c44332dc3e833f683d053ce39645761b7ac6031619063847cce40ea5",
- "size": 21416
+ "sha256": "b3caca67bd85198702913127da2d461c5f8188cc77398f269a61d93ed7188a08",
+ "size": 21585
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/building_evals.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/building_evals.ipynb",
- "sha256": "b2560d924f59f480ef427d1652c8c8fab928321be28c973125a9d2ec92484c1a",
- "size": 20727
+ "sha256": "55404602407a112a1eaacf0abc527d30a009fd89d7b3c410add0ec7a34c6794e",
+ "size": 21209
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/building_moderation_filter.ipynb",
@@ -24040,85 +24040,85 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/generate_test_cases.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/generate_test_cases.ipynb",
- "sha256": "31b47a2a602a066136f039de80b36df90244108691ce09ce93fb73d6408ca2c4",
- "size": 29984
+ "sha256": "177178c6a167cd598973aeb4100ac095509866994dc36f5555900de8f480acf8",
+ "size": 30445
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/how_to_enable_json_mode.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/how_to_enable_json_mode.ipynb",
- "sha256": "9d17e5efdbf29c11ea58247a1eeca8619174e0d681addf171a060dc1b3866710",
- "size": 15451
+ "sha256": "b215f4be48a967be484bbfb8f0c9adbbef913110c5e7e72f6cb8fa62585c6fa8",
+ "size": 16393
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/how_to_make_sql_queries.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/how_to_make_sql_queries.ipynb",
- "sha256": "53506e3f7036c9971247d169ab89fe8e9a52191c90253c7d21a3cf4499f50168",
- "size": 6333
+ "sha256": "6531f095decfc8e81d2f821a6afd21ef7f1b44ae00175de7b3df8977a802fa10",
+ "size": 6703
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/metaprompt.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/metaprompt.ipynb",
- "sha256": "16930157b017ba0de1ae97670f1c1edebfbfc114242fc0fc1328787f5cc992bb",
- "size": 46663
+ "sha256": "18778cbcf8a572c7438d164b4c50f4293d786887d4b5992421fb6fb05d128895",
+ "size": 46565
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/pdf_upload_summarization.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/pdf_upload_summarization.ipynb",
- "sha256": "0c739f4204ca78fe099f4924cdda9dba046e8b11d22d24fdde84fdd1a2f81f90",
- "size": 8478
+ "sha256": "94da7e2a3b38448e71a0e6a28716bd9b08857868b654369432f629bad89450a5",
+ "size": 8379
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/prompt_caching.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/prompt_caching.ipynb",
- "sha256": "69bc116de8d9d763e63fd010d0b317dbfa056f5343c408bc65f8abb632e5a535",
- "size": 22917
+ "sha256": "d431741414bd4f7b8aeed8b1bba73e371e819c5f75cdb5a35b7acd9a46becf8f",
+ "size": 23400
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/read_web_pages_with_haiku.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/read_web_pages_with_haiku.ipynb",
- "sha256": "00901adf4a97a75cb37a2b5ee2bd9bea1eee87066e5eebdb276372a930097dfd",
- "size": 4439
+ "sha256": "b2a3e2dc539c3495cc1daa13be1468baee1ba2bb13fc53fecead7c53a308b0f7",
+ "size": 4427
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/sampling_past_max_tokens.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/sampling_past_max_tokens.ipynb",
- "sha256": "6ea380671b13770b6faf15541b14467d42ef94db013114e99ca4d361be4c7ab4",
- "size": 40999
+ "sha256": "a61ad9309fcc0b594a80b2bb1706af2b0eb3d5f9a48ae21f1fafabf06aedff90",
+ "size": 41873
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/session_memory_compaction.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/session_memory_compaction.ipynb",
- "sha256": "a18f8e532f1430469f9941b24958c265ec7c982b0c34c35f1e0d847123e424f6",
- "size": 86680
+ "sha256": "baf8dc1414987e719ff37e44e14aa509f45ff992a88255e6ae8b4aebdda49f31",
+ "size": 87028
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/speculative_prompt_caching.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/speculative_prompt_caching.ipynb",
- "sha256": "3baec0f15bc9226ae28455809c6f4f6e5684487cb4d1d06dee26443190b5ccc9",
- "size": 16740
+ "sha256": "ebcde38ee893349c6888ea34ab005ba62d11aefc685b58ac4337154021cbbb13",
+ "size": 16707
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/misc/using_citations.ipynb",
"status": "success",
"path": "github/claude-cookbooks/misc/using_citations.ipynb",
- "sha256": "be707bddd51845c4361466746dea9c11bf596d8ec8c798dd6c5d5c35db84c722",
- "size": 46081
+ "sha256": "384910debe5e384d7944d071ce307a9c044b54b08057931690d17a07071f0697",
+ "size": 46005
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/multimodal/best_practices_for_vision.ipynb",
"status": "success",
"path": "github/claude-cookbooks/multimodal/best_practices_for_vision.ipynb",
- "sha256": "14ccf11ac046cd051f7e0f5852b2e54daba43e46ee7f9804bdaa5123bd45a3be",
- "size": 4458259
+ "sha256": "2ec01e074754480964bb1d5b4eaca8326b68fbd2f5c2fe706aa2571056e0c68e",
+ "size": 4458510
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/multimodal/crop_tool.ipynb",
@@ -24131,29 +24131,29 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/multimodal/getting_started_with_vision.ipynb",
"status": "success",
"path": "github/claude-cookbooks/multimodal/getting_started_with_vision.ipynb",
- "sha256": "7f0152ba637a5c368c073e6908a1b683340ef85957b527dbdbc12b48cf18a7a5",
- "size": 1495813
+ "sha256": "0da31cf3994fd188564a7c2c8d9c90be4b63bd4b9827bd5dc7633ae9f4657447",
+ "size": 1495906
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/multimodal/how_to_transcribe_text.ipynb",
"status": "success",
"path": "github/claude-cookbooks/multimodal/how_to_transcribe_text.ipynb",
- "sha256": "c97e43c0e515f4d854dabdf892b43b1e62966c5caa922222ff0fad216e1b3974",
- "size": 3712570
+ "sha256": "70fa223733336daa498268efa1dc4682cce568ff87684a006a5b38dd744068a1",
+ "size": 3712836
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/multimodal/reading_charts_graphs_powerpoints.ipynb",
"status": "success",
"path": "github/claude-cookbooks/multimodal/reading_charts_graphs_powerpoints.ipynb",
- "sha256": "f9401d29816a88ad088993cea6f6a8fed36e3b264f9572d1e84870f891fdfcb5",
- "size": 18438
+ "sha256": "1c09519eb0c4e45dc0967f095c76724a41c7393e63058b1295bbd69620add470",
+ "size": 18059
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/multimodal/using_sub_agents.ipynb",
"status": "success",
"path": "github/claude-cookbooks/multimodal/using_sub_agents.ipynb",
- "sha256": "3a73aea7fc3615c8bcc7a3f2bef7c4d7fc98fdecf59e6f4138ecf7b3ed43dc0d",
- "size": 19778
+ "sha256": "3df1ef743e749b76496569f041d2315c37b44f7f10977a63f409c0252cdfee94",
+ "size": 19941
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/observability/opentelemetry_tracing.ipynb",
@@ -24166,7 +24166,7 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/observability/usage_cost_api.ipynb",
"status": "success",
"path": "github/claude-cookbooks/observability/usage_cost_api.ipynb",
- "sha256": "f7bcef066921a3c49501dfccc2706869c6f17b56a924ab2e49e78de40a2bdc30",
+ "sha256": "9181758f5bbffdff2a0397ec0fe091aa0844bac8c1ba29307ea079c2c0609b9c",
"size": 32881
},
{
@@ -24180,7 +24180,7 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/patterns/agents/async_multi_agent_orchestration.ipynb",
"status": "success",
"path": "github/claude-cookbooks/patterns/agents/async_multi_agent_orchestration.ipynb",
- "sha256": "e1565a70477a9759b485667ed821c14f9148de575536ef321a9b3b02f7437eb2",
+ "sha256": "c2f15e5c7e2523b88c00479d666cd57c2634967876ad6e7bda20cdd2705af7e6",
"size": 23433
},
{
@@ -24208,7 +24208,7 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/patterns/agents/orchestrator_workers.ipynb",
"status": "success",
"path": "github/claude-cookbooks/patterns/agents/orchestrator_workers.ipynb",
- "sha256": "9e02bf7f5248f59c02c74d2ad25037e9545b0d214442e2016ea65b8c8553fce2",
+ "sha256": "7b84605af207aba1d34879e79ebf1a4792ff61dd7137d10e796505d19a5329c9",
"size": 30098
},
{
@@ -24243,7 +24243,7 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/skills/README.md",
"status": "success",
"path": "github/claude-cookbooks/skills/README.md",
- "sha256": "d6f37411b0f95ebc4f33b735b2cf74b05695dd3ecb832905ebd2aa5031e20faa",
+ "sha256": "672a5958b74182fb2473bb02a9d7d3a4f7dd23ccd3ac3456ae6539c6f9b9ce60",
"size": 11698
},
{
@@ -24278,21 +24278,21 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/skills/notebooks/01_skills_introduction.ipynb",
"status": "success",
"path": "github/claude-cookbooks/skills/notebooks/01_skills_introduction.ipynb",
- "sha256": "7feb615542a0a8645054b41fb88005d3bd1eb90342e85b58720ac5b2c50d06c2",
- "size": 34873
+ "sha256": "276362eae5c9ae04035f099d042326858ade8dbedef89611d2bb824238489e92",
+ "size": 34927
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/skills/notebooks/02_skills_financial_applications.ipynb",
"status": "success",
"path": "github/claude-cookbooks/skills/notebooks/02_skills_financial_applications.ipynb",
- "sha256": "a84344b9f3a9e1a47020a2946c539b29052b3e05d6a4b9e332172a40a6241315",
+ "sha256": "e78e508b64d4532835cc4a8cad1b761349be9e61c5bf656b9b30d4a98d7039d0",
"size": 37724
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/skills/notebooks/03_skills_custom_development.ipynb",
"status": "success",
"path": "github/claude-cookbooks/skills/notebooks/03_skills_custom_development.ipynb",
- "sha256": "e48510e570242393d8c17e2f6393d50aed1ad583ca2703139f7a04edbdefdb59",
+ "sha256": "30cd1581e209ef45c0379f140276ac355d2e7d384d1cbaba3c39cc25e9bc00cc",
"size": 48859
},
{
@@ -24306,8 +24306,8 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/Deepgram/prerecorded_audio.ipynb",
"status": "success",
"path": "github/claude-cookbooks/third_party/Deepgram/prerecorded_audio.ipynb",
- "sha256": "39989b21b6b0423f95221b405e383f0860bf0d97ce73629e0431a0cbcff0b0df",
- "size": 9827
+ "sha256": "a486e17b36c9f6173baa796d351979ab52f436d10686cdc13340fdb5430f757e",
+ "size": 9823
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/ElevenLabs/README.md",
@@ -24327,15 +24327,15 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/LlamaIndex/Basic_RAG_With_LlamaIndex.ipynb",
"status": "success",
"path": "github/claude-cookbooks/third_party/LlamaIndex/Basic_RAG_With_LlamaIndex.ipynb",
- "sha256": "6dd9a67ba6ffbada048024f98150a04551a333b67222ecac5bccf4601cab0006",
- "size": 9339
+ "sha256": "64dd4e4ba18fdbde10755e86fcebf65391685d2d2229b4cb6424ba2b74c39a09",
+ "size": 9310
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/LlamaIndex/Multi_Document_Agents.ipynb",
"status": "success",
"path": "github/claude-cookbooks/third_party/LlamaIndex/Multi_Document_Agents.ipynb",
- "sha256": "e961d6892db529aa58dc57423a8e4c54377c49da1ee53cbc043b8e2972975cec",
- "size": 90619
+ "sha256": "0a3d47d846155bd58d4b26dd9ac4ed0cc25004ac19be54084947eed226599b00",
+ "size": 90590
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/LlamaIndex/Multi_Modal.ipynb",
@@ -24355,36 +24355,36 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/LlamaIndex/ReAct_Agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/third_party/LlamaIndex/ReAct_Agent.ipynb",
- "sha256": "031a8b75dd0e1102e7da0e937a38ca57deb2b0c92f530cb22decac123249492e",
- "size": 86529
+ "sha256": "20167dc04f4c73885afd0c8cac425cf173fb5f4db37637682d80c7ba43cbb18a",
+ "size": 86500
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/LlamaIndex/Router_Query_Engine.ipynb",
"status": "success",
"path": "github/claude-cookbooks/third_party/LlamaIndex/Router_Query_Engine.ipynb",
- "sha256": "74e972283e00b7db7d76d0bfcca929425de147ea06368b6e444f849f364ca279",
- "size": 80078
+ "sha256": "eb853c717049b77f5c451ade459c6555092f68126bfeb228cdde2bef46890173",
+ "size": 80049
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/LlamaIndex/SubQuestion_Query_Engine.ipynb",
"status": "success",
"path": "github/claude-cookbooks/third_party/LlamaIndex/SubQuestion_Query_Engine.ipynb",
- "sha256": "a52cb1b442bdbd2689e9a2a328a4345f2f08a6107005f0490979f23e593637d8",
- "size": 87474
+ "sha256": "4e938e0e2e1b64095fcc770950b24d7ae84670c94f2a8158221e27c716b29685",
+ "size": 87445
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/MongoDB/rag_using_mongodb.ipynb",
"status": "success",
"path": "github/claude-cookbooks/third_party/MongoDB/rag_using_mongodb.ipynb",
- "sha256": "808929175466cdd3b049578536d2139896847c5fe8d54c50e145d402c5058c4e",
- "size": 31935
+ "sha256": "82b0773cf303e19b5c68f8d7f46c50127e10d0e6cdba87ff4fa249e0b3a9e678",
+ "size": 32002
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/Pinecone/claude_3_rag_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/third_party/Pinecone/claude_3_rag_agent.ipynb",
- "sha256": "3b35bc7e11972b80ae50b3b51f93beaf68df3475f382b4f488e5210a3a72e7a0",
- "size": 85835
+ "sha256": "a411cf4478225e735c49e317ad07fd710b6704ca9718024224e18ad100219b29",
+ "size": 85799
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/third_party/Pinecone/rag_using_pinecone.ipynb",
@@ -24418,36 +24418,36 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_evaluation/tool_evaluation.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_evaluation/tool_evaluation.ipynb",
- "sha256": "3ec67f41a8ab899bcd724829e77e82092e10c11d70c5aa60e33f52a4b1c39be0",
+ "sha256": "79f866c47380816cda5e25a004f3adc716988d7d15ee68c07a9d6d6fbafa3d33",
"size": 41405
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/automatic-context-compaction.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/automatic-context-compaction.ipynb",
- "sha256": "8788a970fae5299a76a94daa53a20bf761ad0c4433124cb13a12e4d70d6ed3d6",
- "size": 60180
+ "sha256": "056b27aa1108bb775ed302bebaaca916e5da0f7e7f2efd40b6d1ba99685a0712",
+ "size": 60825
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/calculator_tool.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/calculator_tool.ipynb",
- "sha256": "f9fd7ad35d18e93f602c6340757b0d9d2b5928448c647e1def5267dfb2921d94",
+ "sha256": "b608f5ecc223cd4a10e436070efbda4ce42763f774d74ac06404835f345e041c",
"size": 11382
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/context_engineering/context_engineering_tools.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/context_engineering/context_engineering_tools.ipynb",
- "sha256": "a78f2b21b70cc53e6e8b8e03eaeee02af6bcfc1c5fecd6cbead0b720e2f21c07",
- "size": 516683
+ "sha256": "32e353c020e3ab140de10bddce33498a2e39a4ce5735680cc0ed77aab39dca95",
+ "size": 516750
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/customer_service_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/customer_service_agent.ipynb",
- "sha256": "395b82f508a704e2a9a0916775e81857a720f83d8cfe2d03b8b420935bfc6ff0",
- "size": 15537
+ "sha256": "22a92757b6c8e7bb956f295def7c4720fbe14d93bd2ef79606e11dadd0447941",
+ "size": 15526
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/extracting_structured_json.ipynb",
@@ -24460,64 +24460,64 @@
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/memory_cookbook.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/memory_cookbook.ipynb",
- "sha256": "5aa92928e542e374c2d5af7c299efd37b5ac49c9e35ee119db69d1bdcb84bf8e",
- "size": 68126
+ "sha256": "6f7db7e7671a5cd82dbb424596c48e2d1eff1626751ae2432c032981fc931e06",
+ "size": 68199
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/parallel_tools.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/parallel_tools.ipynb",
- "sha256": "9be49d93ae4bd5126c242a32bed97f12432a6bb0d242d2ba186453e835b1aef3",
- "size": 11647
+ "sha256": "ee571c127ed55e01d93be531f71791c37d50f455b7a5ffaf660e146efd039db5",
+ "size": 12228
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/programmatic_tool_calling_ptc.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/programmatic_tool_calling_ptc.ipynb",
- "sha256": "d0ce8ee18a52465d7f27e649ea7b333fdc7000d6aaa18cc7d52c3d3b907f333d",
+ "sha256": "3baca62936038231815ce0fd5d47ff011001e708df3e1ab8fb6c2ad86932396a",
"size": 383372
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/threat_intel_enrichment_agent.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/threat_intel_enrichment_agent.ipynb",
- "sha256": "39bc26195c6b77c7cd409cd29dc657435562cb212202ba172d602bdb44f2ab10",
- "size": 101535
+ "sha256": "9d47a8948c515c3d243a362a347adf22c2972a529d5c9fdef8d6106012eed737",
+ "size": 101588
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/tool_choice.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/tool_choice.ipynb",
- "sha256": "d8066b65ae552e6063b033f9408827ccf1207e4cdf1deeee94dd3eb14437aaea",
- "size": 26565
+ "sha256": "2b221d8c4312576bd541192f5e40aa136023b8498789188a7c2db99e07a0785c",
+ "size": 29476
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/tool_search_alternate_approaches.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/tool_search_alternate_approaches.ipynb",
- "sha256": "8aaf534b6204d4c30a13ebf7b7c7ceb408734dc7bacecb8ab520a3671997b153",
+ "sha256": "165dfb482718b6863712ccef61974c29948ac0a266e9a61157b4e873294c4bd5",
"size": 18056
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/tool_search_with_embeddings.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/tool_search_with_embeddings.ipynb",
- "sha256": "df3e76ecfd9e100bd281aa38fe435d46dd7415a54807b0df1b5889165be9f522",
+ "sha256": "3723b7103d9c0bf567d07a105dc00f86ee1a16cd0684c7b32dfd96323a6c4c41",
"size": 44483
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/tool_use_with_pydantic.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/tool_use_with_pydantic.ipynb",
- "sha256": "1c89c7095becf4252e62812277b6a5b2c296d411dcadc0d364292f10c32a1109",
+ "sha256": "35e0ea9b6be492f1ae38ad6575cf9bdcc87d6ef4b7f8f08f1cdb789cbb73f668",
"size": 13212
},
{
"url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/tool_use/vision_with_tools.ipynb",
"status": "success",
"path": "github/claude-cookbooks/tool_use/vision_with_tools.ipynb",
- "sha256": "c60ce6f837a80ce4c0f96b19f8c3b004dfadc01eb81e9d88d6dba8c70954c32d",
- "size": 431966
+ "sha256": "f3c95c1709dd1b8e7d68efe64e0ad0bdfb30771ee2476e116cee844df3420e84",
+ "size": 432061
},
{
"url": "https://raw.githubusercontent.com/anthropics/skills/main/README.md",
diff --git a/content/claude/claude-tag/admins/add-connections.md b/content/claude/claude-tag/admins/add-connections.md
index 9f7034585f..13c64130d9 100644
--- a/content/claude/claude-tag/admins/add-connections.md
+++ b/content/claude/claude-tag/admins/add-connections.md
@@ -266,7 +266,7 @@ Claude does channel work in an isolated [sandbox](https://claude.com/docs/claude
* **A domain entry**: a hostname added to a bundle that applies to the channel. Requests to it pass with no credential attached; see [Add a domain](#add-a-domain).
* **A [connector](#add-a-connector)**: a credential that applies to the channel. Requests matching its [allowed websites](#set-allowed-websites) pass with that credential attached.
-* **The channel's [environment](https://claude.com/docs/claude-tag/concepts/glossary.md#environment)**: the compute configuration the channel's sessions run in, which carries its own network access setting, starting at the Trusted access level that covers common package registries. Requests to hosts it allows pass with no credential; see [Broad web access through the environment](#broad-web-access-through-the-environment).
+* **The channel's [environment](https://claude.com/docs/claude-tag/concepts/glossary.md#environment)**: the compute configuration the channel's sessions run in, which carries its own network access setting, starting at the **Limited access** level that covers common package registries. Requests to hosts it allows pass with no credential; see [Broad web access through the environment](#broad-web-access-through-the-environment).
A host that none of these allows stays unreachable, and when more than one bundle applies to a channel, the entries of all of them apply. Web search is governed by none of them, because searching happens on Anthropic's servers rather than in the sandbox; see [Web search vs. network requests](#web-search-vs-network-requests). Claude's GitHub API requests and git operations are governed by none of them either, because they go through a separate GitHub proxy. That proxy limits them to the repositories you [granted to the channel](https://claude.com/docs/claude-tag/admins/configure-github.md#grant-repository-access), except that git may still be able to clone public repositories you didn't grant.
@@ -293,7 +293,7 @@ You don't have to predict the full list up front. When a request is blocked, Cla
* **The bundle applied before the thread started.** A bundle added to a channel after a thread started isn't guaranteed to reach that thread, so start a fresh thread to use its entries.
* **The request came from a channel, not a DM.** A bundle added to a channel doesn't apply in DMs.
-Typical entries are hosts the work calls without a key, such as a docs site or a public API. Common package registries are usually already reachable through the [environment's Trusted access default](#broad-web-access-through-the-environment), and a host that needs a credential belongs in a [connector](#add-a-connector) instead. Entries appear under **What's in it** with the type **Domain**, and each row's menu has **Edit** and **Remove**.
+Typical entries are hosts the work calls without a key, such as a docs site or a public API. Common package registries are usually already reachable through the [environment's **Limited access** default](#broad-web-access-through-the-environment), and a host that needs a credential belongs in a [connector](#add-a-connector) instead. Entries appear under **What's in it** with the type **Domain**, and each row's menu has **Edit** and **Remove**.
> [!NOTE]
>
@@ -303,7 +303,7 @@ Typical entries are hosts the work calls without a key, such as a docs site or a
Domain entries allow hosts one at a time. For a channel whose work needs more of the web, the environment setting grants broader access. An [environment](https://claude.com/docs/claude-tag/concepts/glossary.md#environment) is the sandboxed compute configuration the channel's sessions run in, and it carries its own network access setting.
-A new environment's network access level is Trusted access, which allows a [documented set of package registries and developer hosts](https://code.claude.com/docs/en/cloud-environments#default-allowed-domains). A channel can already reach hosts like `pypi.org` and `registry.npmjs.org` with no domain entry.
+A new environment's network access level is **Limited access**, which allows a [documented set of package registries and developer hosts](https://code.claude.com/docs/en/cloud-environments#default-allowed-domains). A channel can already reach hosts like `pypi.org` and `registry.npmjs.org` with no domain entry.
To give a workspace or channel broader access, create an organization-shared environment with a more permissive level and set it on that place's page, under **Advanced > Sessions > Environment**, as described in [Configure the environment for a scope](https://claude.com/docs/claude-tag/admins/customize.md#configure-the-environment-for-a-scope). **Full access** allows any domain; see [Network access in the Claude Code docs](https://code.claude.com/docs/en/cloud-environments#network-access) for the other levels.
diff --git a/content/claude/claude-tag/concepts/agent-identity.md b/content/claude/claude-tag/concepts/agent-identity.md
index aa52a548cf..85e717fd23 100644
--- a/content/claude/claude-tag/concepts/agent-identity.md
+++ b/content/claude/claude-tag/concepts/agent-identity.md
@@ -63,7 +63,7 @@ For each outbound request from the sandbox, other than a GitHub API request or a
| Is allowed by the network access setting of the [environment](https://claude.com/docs/claude-tag/concepts/glossary.md#environment) the [scope](https://claude.com/docs/claude-tag/concepts/glossary.md#scope)'s sessions run on | The proxy forwards the request without a credential. |
| Matches none of these | The proxy blocks the request. |
-A new environment's network access level defaults to Trusted access, so a fresh setup can reach a documented set of package registries and developer hosts before an admin has configured anything. The [cloud environments documentation](https://code.claude.com/docs/en/cloud-environments#default-allowed-domains) lists the covered hosts. To narrow that default, pin an environment with a stricter level, such as No access.
+A new environment's network access level defaults to **Limited access**, so a fresh setup can reach a documented set of package registries and developer hosts before an admin has configured anything. The [cloud environments documentation](https://code.claude.com/docs/en/cloud-environments#default-allowed-domains) lists the covered hosts. To narrow that default, pin an environment with a stricter level, such as **No access**.
The same rules apply to code Claude runs in the sandbox, like `curl` or a `fetch` call: a request is blocked unless its host is allowed by one of the layers above.
diff --git a/content/claude/claude-tag/concepts/security-and-data.md b/content/claude/claude-tag/concepts/security-and-data.md
index 4567f2bf4d..8d85520fd5 100644
--- a/content/claude/claude-tag/concepts/security-and-data.md
+++ b/content/claude/claude-tag/concepts/security-and-data.md
@@ -51,11 +51,11 @@ This means:
### Network egress
-In an Anthropic-hosted environment, outbound traffic from a channel session's sandbox is default-deny, apart from its GitHub API requests and git operations. Requests go only to hosts an allow layer covers, and the layers are a [credential's allowed websites](https://claude.com/docs/claude-tag/admins/connections/custom.md#fill-out-the-custom-tool-form), the [allowed domains](https://claude.com/docs/claude-tag/admins/add-connections.md#allow-a-host-without-a-credential) that apply to the channel, and the network access setting of the [environment](https://claude.com/docs/claude-tag/concepts/glossary.md#environment) the scope's sessions run on. A new environment's default level, Trusted access, already covers a [documented set of package registries and developer hosts](https://code.claude.com/docs/en/cloud-environments#default-allowed-domains). See [Agent Proxy](https://claude.com/docs/claude-tag/concepts/agent-identity.md#agent-proxy) for what happens to a request under each layer.
+In an Anthropic-hosted environment, outbound traffic from a channel session's sandbox is default-deny, apart from its GitHub API requests and git operations. Requests go only to hosts an allow layer covers, and the layers are a [credential's allowed websites](https://claude.com/docs/claude-tag/admins/connections/custom.md#fill-out-the-custom-tool-form), the [allowed domains](https://claude.com/docs/claude-tag/admins/add-connections.md#allow-a-host-without-a-credential) that apply to the channel, and the network access setting of the [environment](https://claude.com/docs/claude-tag/concepts/glossary.md#environment) the scope's sessions run on. A new environment's default level, **Limited access**, already covers a [documented set of package registries and developer hosts](https://code.claude.com/docs/en/cloud-environments#default-allowed-domains). See [Agent Proxy](https://claude.com/docs/claude-tag/concepts/agent-identity.md#agent-proxy) for what happens to a request under each layer.

-Because requests to any other host are blocked, data leaves the sandbox only to hosts an allow layer covers and to GitHub through the GitHub proxy. An admin sets the allowed websites on each credential and the allowed domains. An admin sets the environment's network access level, which defaults to Trusted access, from the **Cloud environments** page in [admin settings](https://claude.ai/admin-settings). See [Set allowed websites](https://claude.com/docs/claude-tag/admins/add-connections.md#set-allowed-websites) and [Allow a host without a credential](https://claude.com/docs/claude-tag/admins/add-connections.md#allow-a-host-without-a-credential).
+Because requests to any other host are blocked, data leaves the sandbox only to hosts an allow layer covers and to GitHub through the GitHub proxy. An admin sets the allowed websites on each credential and the allowed domains. An admin sets the environment's network access level, which defaults to **Limited access**, from the **Cloud environments** page in [admin settings](https://claude.ai/admin-settings). See [Set allowed websites](https://claude.com/docs/claude-tag/admins/add-connections.md#set-allowed-websites) and [Allow a host without a credential](https://claude.com/docs/claude-tag/admins/add-connections.md#allow-a-host-without-a-credential).
Allow-all egress is a `*` domain. The entry admits requests to any host on the ports it lists, still without credentials. Private and internal network addresses and cloud metadata endpoints remain blocked. See [Allow all hosts](https://claude.com/docs/claude-tag/admins/add-connections.md#allow-all-hosts).
diff --git a/content/en/docs/claude-code/channels-reference.md b/content/en/docs/claude-code/channels-reference.md
index a150881ae0..58de078896 100644
--- a/content/en/docs/claude-code/channels-reference.md
+++ b/content/en/docs/claude-code/channels-reference.md
@@ -582,10 +582,11 @@ async function onInbound(message: PlatformMessage) {
}
```
-A remote reply that doesn't exactly match the expected format fails in one of two ways, and in both cases the local terminal dialog stays open:
+If a remote reply has no effect and the local terminal dialog stays open, check for these causes:
-* **Different format**: your inbound handler's regex fails to match, so text like `approve it` or `yes` without an ID falls through as a normal message to Claude.
-* **Right format, wrong ID**: your server emits a verdict, but Claude Code finds no open request with that ID and drops it silently.
+* **The format is wrong**: your inbound handler's regex fails to match, so text like `approve it` or `yes` without an ID falls through as a normal message to Claude.
+* **The ID is wrong**: your server emits a verdict, but Claude Code finds no open request with that ID and drops it silently.
+* **The ID was used by an earlier prompt**: your server emits a verdict with the ID from the request, but an earlier prompt in the session had the same ID. Once an ID repeats, Claude Code drops any channel verdict carrying it, so that a reply meant for one prompt can't approve the other. An ID is five random letters, so a repeat is rare. Answer at the terminal instead.
### Full example
diff --git a/content/en/docs/claude-code/checkpointing.md b/content/en/docs/claude-code/checkpointing.md
index 4b0b048840..634f12aca7 100644
--- a/content/en/docs/claude-code/checkpointing.md
+++ b/content/en/docs/claude-code/checkpointing.md
@@ -90,9 +90,9 @@ Checkpointing only tracks files that have been edited within the current session
### Messages sent mid-turn not checkpointed
-In the rewind menu, a message you [typed while Claude was still working](https://code.claude.com/docs/en/interactive-mode.md#queue-messages-while-claude-works) can be marked **No code restore**. Claude read that message before its turn ended. [Checkpoints are taken for prompts that start a turn](#how-checkpoints-work), so this message has none of its own. The edits Claude made after reading it count toward the prompt that started the turn.
+In the rewind menu, a message you [typed while Claude was still working](https://code.claude.com/docs/en/interactive-mode.md#queue-messages-while-claude-works) can be marked **No code restore**. The marked message has no [checkpoint](#how-checkpoints-work) of its own.
-You don't need to do anything about the message itself. To undo the file changes from that part of the session, select the prompt that started the turn and choose **Restore code** or **Restore code and conversation**. That reverts Claude's file edits from the whole turn, including the ones from before your message arrived. Selecting the marked message still offers **Restore conversation**, which rewinds the conversation to it and leaves your files as they are.
+To undo the file edits Claude made after that message, select the prompt that started the turn and choose **Restore code** or **Restore code and conversation**. That reverts Claude's file edits from the whole turn, including the ones from before your message arrived.
### Symlinked and hard-linked paths not restored
diff --git a/content/en/docs/claude-code/claude-code-on-the-web.md b/content/en/docs/claude-code/claude-code-on-the-web.md
index 78cc12a1a5..b7c2e48088 100644
--- a/content/en/docs/claude-code/claude-code-on-the-web.md
+++ b/content/en/docs/claude-code/claude-code-on-the-web.md
@@ -18,7 +18,7 @@ You can start a cloud session from any of these surfaces:
* **Browser**: [claude.ai/code](https://claude.ai/code), also called Claude Code on the web
* **Mobile**: the **Code** tab in the [Claude app](https://code.claude.com/docs/en/mobile.md)
-* **Desktop app**: select **Cloud** instead of **Local** when you [start a session](https://code.claude.com/docs/en/desktop.md#run-long-running-tasks-in-the-cloud)
+* **Desktop app**: select an environment under **Cloud** in the environment selector when you [start a session](https://code.claude.com/docs/en/desktop.md#run-long-running-tasks-in-the-cloud)
* **Terminal**: [`claude --cloud`](#from-terminal-to-cloud)
* **Cloud scheduled tasks**: [scheduled and triggered runs](https://code.claude.com/docs/en/routines.md) each run as a cloud session
@@ -247,9 +247,15 @@ Claude Code resumes a session in the permission mode it was in when you do eithe
### Review changes
-Each session shows a diff indicator with lines added and removed, like `+42 -18`. Select it to open the diff view, leave inline comments on specific lines, and send them to Claude with your next message.
+After Claude pushes its changes to a branch, the **Changes** card in the panel beside the chat shows the lines added and removed, such as `+42 -18`. Click the line counts on the **Changes** card to open the diff view.
-The diff view compares the session's changes against its base branch by default. To compare against any other branch in the repository, select **Compare against** and pick one.
+* You can also click **Changes** in the session's title bar, or in the bar's **⋮** menu.
+* To show the panel when it's hidden, click the **Show session rail** icon in the session's title bar, or in the bar's **⋮** menu.
+
+In the diff view, you can comment on lines and compare against another branch:
+
+* **Comment**: leave inline comments on specific lines, then send the comments to Claude with your next message
+* **Compare**: the diff view compares the session's changes against its base branch by default. To compare against any other branch in the repository, select **Compare against** and pick one
Claude Code computes these diffs from raw git blob content, so diff drivers and `textconv` filters configured in the repository don't apply.
@@ -313,16 +319,19 @@ To require recipients to have repository access, or to hide your name from share
### Archive sessions
-You can archive sessions to keep your session list organized. Archived sessions are hidden from the default session list but can be viewed by filtering for archived sessions.
+Archive a session to remove it from the sidebar's session list. To archive one, hover over it in the sidebar, open its **⋯** menu, and select **Archive**.
-To archive a session, hover over the session in the sidebar and select the archive icon.
+#### Find an archived session
+
+To see your archived sessions, go to [claude.ai/code/sessions](https://claude.ai/code/sessions) and open the **Archived** tab. To put one back in the sidebar's session list, hover over it on that tab, open its **⋮** menu, and select **Unarchive**.
### Delete sessions
-Deleting a session permanently removes the session and its data. This action can't be undone. You can delete a session in two ways:
+Deleting a session permanently removes the session and its data. This action can't be undone. Delete a session from the sidebar, from the session menu, or from the **Archived** tab if you've already archived it:
-* **From the sidebar**: filter for archived sessions, then hover over the session you want to delete and select the delete icon
+* **From the sidebar**: hover over the session, open its **⋯** menu, and select **Delete**
* **From the session menu**: open a session, select the dropdown next to the session title, and select **Delete**
+* **From the Archived tab**: hover over the session on the [**Archived** tab](#find-an-archived-session), open its **⋮** menu, and select **Delete**
You will be asked to confirm before a session is deleted.
@@ -336,12 +345,12 @@ Claude can watch a pull request and automatically respond to CI failures and rev
There are a few ways to turn on auto-fix depending on where the PR came from and what device you're using:
-* **PRs created in a cloud session**: open the session at claude.ai/code, open the CI status bar, and select **Auto-fix**
+* **PRs created in a cloud session**: open the session at claude.ai/code and find the pull request in the [**Changes** card](#review-changes). Open the **⋮** menu next to the pull request's title and turn on **Auto-fix**
* **From your terminal**: run [`/autofix-pr`](https://code.claude.com/docs/en/commands) while on the PR's branch. Claude Code detects the open PR with `gh`, spawns a cloud session, and turns on auto-fix in one step
* **From the mobile app**: tell Claude to auto-fix the PR, for example "watch this PR and fix any CI failures or review comments"
* **Any existing PR**: paste the PR URL into a session and tell Claude to auto-fix it
-Auto-fix is a per-PR toggle. To stop monitoring, open the CI status bar in the session at claude.ai/code and clear the **Auto-fix** toggle, or tell Claude to stop watching the PR.
+To stop monitoring, turn off **Auto-fix** in the pull request's **⋮** menu in the session's [**Changes** card](#review-changes), or tell Claude to stop watching the PR.
### How Claude responds to PR activity
@@ -381,6 +390,17 @@ If a new session fails to start with `Session creation failed` or stalls at prov
* Retry after a minute, as capacity is provisioned on demand
* Confirm your GitHub connection can reach the repository by following [No repositories appear after connecting GitHub](https://code.claude.com/docs/en/web-quickstart.md#no-repositories-appear-after-connecting-github)
+### Your new session couldn't start
+
+Your prompt is back in the box you sent it from.
+
+* **Connection lost**: check your internet connection and any VPN or proxy you use, then send your prompt again
+* **Server error**: wait a moment, then send your prompt again. If the notice reappears, check [status.claude.com](https://status.claude.com)
+
+### Can't rewind to this message
+
+**Rewind to here** fails with this error on any message except the newest when your session runs on a [self-hosted runner](https://code.claude.com/docs/en/self-hosted-environments) with Claude Code before v2.1.246. Ask whoever runs your organization's runners to [upgrade them](https://code.claude.com/docs/en/self-hosted-environments-deploy.md#pin-the-version).
+
### Unable to get organization UUID
`claude --cloud` and `claude --teleport` require sign-in with a claude.ai account. If you authenticate with an API key, or your stored account details are stale, you see one of these:
diff --git a/content/en/docs/claude-code/code-review-pull-requests.md b/content/en/docs/claude-code/code-review-pull-requests.md
index 5b7a1e8d59..bb20604edc 100644
--- a/content/en/docs/claude-code/code-review-pull-requests.md
+++ b/content/en/docs/claude-code/code-review-pull-requests.md
@@ -152,7 +152,10 @@ If a review is already running on the pull request's latest commit, a new reques
### What a later review covers
-A later review that starts on its own, such as after a push, focuses on what changed since the last review and posts fewer nits and pre-existing findings. Its summary counts what it left out, in a line that ends "found and not posted" or "outside the scope of this re-review and not posted."
+A later review that starts on its own, such as after a push, focuses on what changed since the last review and posts fewer [nits and pre-existing findings](#severity-levels). To see whether it left findings out as a result, look in the review body for a sentence that counts them:
+
+* **Findings on code that hasn't changed since the last review**: the sentence ends "outside the scope of this re-review and not posted"
+* **Nits and pre-existing findings**: the sentence ends "found and not posted"
To get a review that leaves none of these out, comment [`@claude review`](#comment-commands). It covers the whole pull request again.
diff --git a/content/en/docs/claude-code/code-review-troubleshooting.md b/content/en/docs/claude-code/code-review-troubleshooting.md
index d1b89d30c1..190e1f1767 100644
--- a/content/en/docs/claude-code/code-review-troubleshooting.md
+++ b/content/en/docs/claude-code/code-review-troubleshooting.md
@@ -15,7 +15,7 @@ Find the **Claude Code Review** check run on your pull request, then match its t
| Check run title | What it means | What to do |
| :- | :- | :- |
| **Code review queued...** or **Code review in progress...** | The review hasn't finished | Wait for the title to change |
-| **Code review found no issues** | The review finished and found nothing to flag | Nothing |
+| **Code review found no issues** | The review finished and posted no findings | If this isn't the pull request's first review, look in the review body for a count of [findings the review left out](https://code.claude.com/docs/en/code-review-pull-requests.md#what-a-later-review-covers). Otherwise, nothing |
| A title that says issues were found | The review finished with findings | If you don't see them on the diff, see [Find issues that aren't showing as inline comments](#find-issues-that-aren’t-showing-as-inline-comments) |
| **Code review skipped — no new changes** | An automatic review didn't run on your latest push | To get a review anyway, comment `@claude review` |
| **Code review not repeated — earlier findings still open** | An automatic review didn't run on your latest push, and Important findings from the earlier review are still open | Push a fix, or to get a review anyway, comment `@claude review`. See [When a push keeps the earlier result](https://code.claude.com/docs/en/code-review-pull-requests.md#when-a-push-keeps-the-earlier-result) |
diff --git a/content/en/docs/claude-code/code-review.md b/content/en/docs/claude-code/code-review.md
index 9f771d2ad5..2729103346 100644
--- a/content/en/docs/claude-code/code-review.md
+++ b/content/en/docs/claude-code/code-review.md
@@ -67,7 +67,7 @@ Each review leaves these on the pull request:
* **Findings**: inline comments on the lines concerned, with a summary in the review body
* **A check run**: named **Claude Code Review**, with the findings listed in its [details](https://code.claude.com/docs/en/code-review-pull-requests.md#check-run-output). The check run doesn't conclude as a failure.
-* **When it finds nothing**: the check run's title reads **Code review found no issues**, and Claude posts the same short note on the pull request
+* **A note in place of findings**: posted when the check run's title reads **Code review found no issues**
Code Review chooses the Claude models that reviews run on, and its admin settings don't offer a model choice. To make reviews more or less thorough, change the [review level](#review-levels).
diff --git a/content/en/docs/claude-code/desktop-changelog.md b/content/en/docs/claude-code/desktop-changelog.md
index 505e49a757..c4b73a477d 100644
--- a/content/en/docs/claude-code/desktop-changelog.md
+++ b/content/en/docs/claude-code/desktop-changelog.md
@@ -223,7 +223,7 @@ The session details panel is a set of cards beside the chat that show where the
#### Hide or show the session details panel
-To hide or show the panel, click **Hide session rail** or **Show session rail** in the session's title bar, or in the bar's **⋮** menu when the window is narrow. If you still don't see the panel, [check which Code tab layout you have](#check-which-layout-you-have).
+To hide or show the panel, click **Hide session rail** or **Show session rail** in the session's title bar, or in the bar's **⋮** menu. If you still don't see the panel, [check which Code tab layout you have](#check-which-layout-you-have).
### Run commands in the terminal
diff --git a/content/en/docs/claude-code/desktop.md b/content/en/docs/claude-code/desktop.md
index 505e49a757..c4b73a477d 100644
--- a/content/en/docs/claude-code/desktop.md
+++ b/content/en/docs/claude-code/desktop.md
@@ -223,7 +223,7 @@ The session details panel is a set of cards beside the chat that show where the
#### Hide or show the session details panel
-To hide or show the panel, click **Hide session rail** or **Show session rail** in the session's title bar, or in the bar's **⋮** menu when the window is narrow. If you still don't see the panel, [check which Code tab layout you have](#check-which-layout-you-have).
+To hide or show the panel, click **Hide session rail** or **Show session rail** in the session's title bar, or in the bar's **⋮** menu. If you still don't see the panel, [check which Code tab layout you have](#check-which-layout-you-have).
### Run commands in the terminal
diff --git a/content/en/docs/claude-code/discover-plugins.md b/content/en/docs/claude-code/discover-plugins.md
index c943abef45..fba89b75a2 100644
--- a/content/en/docs/claude-code/discover-plugins.md
+++ b/content/en/docs/claude-code/discover-plugins.md
@@ -238,7 +238,7 @@ If you haven't added that marketplace yet, the command prints `Successfully adde
A private marketplace is one in a repository you need credentials to clone, on GitHub or any other git host. You add it with the same `/plugin marketplace add` or `claude plugin marketplace add` command as a public one. Claude Code clones it with the git credentials already on your machine and never prompts, so each way of connecting has a requirement:
-* **HTTPS**: your git credential helpers apply, so access you set up with `gh auth login`, the macOS Keychain, or `git-credential-store` works. Interactive prompts are suppressed, so a host you have never authenticated to fails instead of asking for a password.
+* **HTTPS**: your git credential helpers apply, so access you set up with `gh auth login`, the macOS Keychain, or `git-credential-store` works. Git's prompts and askpass programs are off, including one set in `GIT_ASKPASS`, so the clone fails instead of prompting when git would have to ask for a credential.
* **SSH**: the host must already be in your `known_hosts` file and the key must work without a passphrase prompt. If your git setup names an SSH program in `GIT_SSH_COMMAND`, `GIT_SSH`, or your git config's `core.sshCommand`, Claude Code runs that program.
* **GitHub `owner/repo` shorthand**: Claude Code checks whether your SSH key authenticates to `github.com`, then clones over SSH if it does and over HTTPS if it doesn't. Set [`CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1`](https://code.claude.com/docs/en/env-vars#variables) to skip that check and always clone over HTTPS.
diff --git a/content/en/docs/claude-code/fast-mode.md b/content/en/docs/claude-code/fast-mode.md
index c8f708cb48..79a3f559b5 100644
--- a/content/en/docs/claude-code/fast-mode.md
+++ b/content/en/docs/claude-code/fast-mode.md
@@ -167,7 +167,7 @@ To restore fast mode, allowlist direct egress to `api.anthropic.com`, or set `CL
Behind a gateway, check for these configurations, in which Claude Code doesn't send the availability check and has no earlier successful check cached:
-* You point `ANTHROPIC_BASE_URL` at your gateway and set [`ANTHROPIC_API_KEY`](https://code.claude.com/docs/en/llm-gateway-connect#set-the-base-url-and-credential) to a gateway-issued key that isn't in the format of an Anthropic API key. Claude Code withholds such a key from `api.anthropic.com`.
+* You point `ANTHROPIC_BASE_URL` at your gateway and set [`ANTHROPIC_API_KEY`](https://code.claude.com/docs/en/llm-gateway-connect#set-the-base-url-and-credential) to a gateway-issued key that isn't in the format of an Anthropic API key.
* You set [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](https://code.claude.com/docs/en/env-vars), so Claude Code skips the check.
To restore fast mode in either configuration, set `CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS=1`.
diff --git a/content/en/docs/claude-code/hooks-guide.md b/content/en/docs/claude-code/hooks-guide.md
index 1df133ad20..b5088a0b9d 100644
--- a/content/en/docs/claude-code/hooks-guide.md
+++ b/content/en/docs/claude-code/hooks-guide.md
@@ -954,7 +954,7 @@ Keep these constraints in mind when designing hooks:
* `PostToolUse` hooks can't undo actions since the tool has already executed.
* [`PermissionRequest`](https://code.claude.com/docs/en/hooks#permissionrequest) hooks fire when Claude Code is about to ask you for permission, or when it would otherwise auto-deny a call that can't prompt. In [non-interactive mode](https://code.claude.com/docs/en/headless.md) with the `-p` flag, they still run outside [`dontAsk` mode](https://code.claude.com/docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode), and a call that no hook decides and nothing else can answer is denied.
* `Stop` hooks fire whenever Claude finishes responding, not only at task completion. They don't fire on user interrupts. API errors fire [StopFailure](https://code.claude.com/docs/en/hooks.md#stopfailure) instead.
-* When multiple `PreToolUse` hooks return [`updatedInput`](https://code.claude.com/docs/en/hooks#pretooluse) to rewrite a tool's arguments, the last one to finish takes effect. Since hooks run in parallel, the order is non-deterministic. Avoid having more than one hook modify the same tool's input.
+* When multiple `PreToolUse` hooks return [`updatedInput`](https://code.claude.com/docs/en/hooks#pretooluse) to rewrite a tool's input, Claude Code doesn't merge the rewrites or guarantee which rewrite the tool runs with. Avoid having more than one hook rewrite the same tool's input.
### Hooks and permission modes
diff --git a/content/en/docs/claude-code/hooks.md b/content/en/docs/claude-code/hooks.md
index c3168dd4a3..6f598c533e 100644
--- a/content/en/docs/claude-code/hooks.md
+++ b/content/en/docs/claude-code/hooks.md
@@ -1426,7 +1426,7 @@ In addition to the [common input fields](#common-input-fields), Setup hooks rece
Setup hooks can't block; execution continues on any exit code. On every exit code, Claude Code discards a Setup hook's [JSON output fields](#json-output), such as `systemMessage`, `continue`, and `hookSpecificOutput.additionalContext`. With `-p`, a Setup hook's stdout, stderr, and exit code appear in the run's output only as [`hook_response` events](https://code.claude.com/docs/en/headless#read-session-metadata) when you launch with `--output-format stream-json --verbose`.
-Setup hooks have access to `CLAUDE_ENV_FILE`. Variables written to that file persist into subsequent Bash commands for the session, as in [SessionStart hooks](#persist-environment-variables). Only `type: "command"` hooks run on `Setup`. A `type: "mcp_tool"` hook on `Setup` is always skipped, as described under [MCP tool hook fields](#mcp-tool-hook-fields).
+Setup hooks have access to `CLAUDE_ENV_FILE`. If your hook writes variables to that file, they persist into subsequent Bash commands for the session, as in [SessionStart hooks](#persist-environment-variables). Only `type: "command"` hooks run on `Setup`. A `type: "mcp_tool"` hook on `Setup` is always skipped, as described under [MCP tool hook fields](#mcp-tool-hook-fields).
### InstructionsLoaded
@@ -1483,6 +1483,12 @@ Apart from a command hook you run with [`async: true`](#run-hooks-in-the-backgro
An [Agent SDK callback hook](https://code.claude.com/docs/en/agent-sdk/hooks.md) on `UserPromptSubmit` that reaches its timeout blocks the prompt with a message naming the hook and the timeout, because a callback there can be acting as a policy gate that must not fail open. The session continues.
+#### `Esc` during a prompt check
+
+If you press `Esc` or interrupt the session while hooks are still checking a prompt, the check stops and the prompt doesn't reach Claude. Text you typed at the terminal returns to the prompt input, and the hooks check it again when you resend it.
+
+A hook can block the prompt at the same moment you interrupt. The prompt then stays blocked: you see that hook's [block message](#what-a-blocked-prompt-leaves-behind), and the text doesn't return to the input.
+
#### UserPromptSubmit input
In addition to the [common input fields](#common-input-fields), UserPromptSubmit hooks receive the `prompt` field containing the submitted text. Pasted content that collapsed to a `[Pasted text #N]` placeholder arrives expanded in place. In sessions where Claude Code [marks pasted text for Claude](https://code.claude.com/docs/en/terminal-config.md#how-claude-treats-pasted-text), that expanded content sits between a `` line and a `` line, so account for those lines if your hook parses the prompt.
@@ -2970,7 +2976,7 @@ Claude Code acts on the blocking decision from a ConfigChange hook's JSON output
Runs when a shell command in the main conversation changes the working directory, for example when Claude executes a `cd` command. Use this to react to directory changes: reload environment variables, activate project-specific toolchains, or run setup scripts automatically. Pairs with [FileChanged](#filechanged) for tools like [direnv](https://direnv.net/) that manage per-directory environment.
-CwdChanged hooks have access to [`CLAUDE_ENV_FILE`](#persist-environment-variables). Variables written to that file persist into subsequent Bash commands until the next CwdChanged event, when Claude Code clears them.
+CwdChanged hooks have access to [`CLAUDE_ENV_FILE`](#persist-environment-variables). If your hook writes variables to that file, they persist into subsequent Bash commands until the next CwdChanged event, when Claude Code clears them.
CwdChanged doesn't support matchers and fires on every occurrence.
@@ -3135,7 +3141,10 @@ Runs when Claude Code creates a worktree in cases such as these:
* Claude Code isolates a [background session](https://code.claude.com/docs/en/agent-view.md#how-file-edits-are-isolated) in its own worktree
* [`claude remote-control`](https://code.claude.com/docs/en/remote-control#start-a-remote-control-session) in `worktree` mode starts a session in its own worktree
-When Claude runs `git worktree add` through the Bash tool rather than calling `EnterWorktree`, your WorktreeCreate hook doesn't run. To inspect or block that command, add a [`PreToolUse`](#pretooluse) hook with the `Bash` matcher.
+A WorktreeCreate hook doesn't run for a worktree Claude adds through Bash, and a plugin's hook doesn't run for the one created when you launch with `--worktree` and [`--tmux`](https://code.claude.com/docs/en/cli-reference#cli-flags):
+
+* **`git worktree add` through Bash**: to inspect or block that command, add a [`PreToolUse`](#pretooluse) hook with the `Bash` matcher.
+* **`--worktree` with `--tmux`**: Claude Code creates the worktree before it loads plugins, so a WorktreeCreate hook from a plugin doesn't run. To have your hook run with both flags, define it in a [settings file](#configuration) instead. Before v2.1.300, a plugin's WorktreeCreate hook didn't run with `--worktree` alone either.
By default Claude Code creates the isolated working copy with `git worktree`. Configuring a WorktreeCreate hook replaces that default git behavior, letting you use a different version control system like SVN, Perforce, or Mercurial.
diff --git a/content/en/docs/claude-code/interactive-mode.md b/content/en/docs/claude-code/interactive-mode.md
index d0921446f6..99f6ac5e14 100644
--- a/content/en/docs/claude-code/interactive-mode.md
+++ b/content/en/docs/claude-code/interactive-mode.md
@@ -659,6 +659,8 @@ While the panel is open, you can:
To rebind the keys that scroll the file list or change the comparison, see [Diff panel actions](https://code.claude.com/docs/en/keybindings.md#diff-panel-actions).
+During an unfinished merge, rebase, cherry-pick, or revert, the panel keeps showing the changes it last read from git, so it doesn't fill with the operation's incoming changes. It updates at its first refresh after the operation ends, for example when Claude next edits a file.
+
### Diff dialog
The diff dialog opens as a bordered block above the prompt and lists your changed files with their added and removed line counts. It compares them against `HEAD`, or against whatever you last [chose in the diff panel](#diff-panel) for this repository.
diff --git a/content/en/docs/claude-code/keybindings.md b/content/en/docs/claude-code/keybindings.md
index 83bff5a207..94267ab578 100644
--- a/content/en/docs/claude-code/keybindings.md
+++ b/content/en/docs/claude-code/keybindings.md
@@ -678,11 +678,11 @@ At the main prompt, Claude Code matches every key against the active contexts, s
## Vim mode interaction
-When vim mode is enabled via `/config` → Editor mode, keybindings and vim mode operate independently:
+When you enable vim mode with the Editor mode setting in `/config`, keybindings and vim mode operate independently:
-* **Vim mode** handles input at the text input level (cursor movement, modes, motions)
-* **Keybindings** handle actions at the component level (toggle todos, submit, etc.)
-* The Escape key in vim mode switches INSERT to NORMAL mode; it does not trigger `chat:cancel`
+* **Vim mode** handles input at the text input level: cursor movement, modes, and motions
+* **Keybindings** handle actions at the component level, such as toggling todos or submitting a message
+* The Escape key in vim mode switches INSERT to NORMAL mode; it doesn't trigger `chat:cancel`
* Most Ctrl+key shortcuts pass through vim mode to the keybinding system
* Vim keys aren't remappable through the keybindings file. To map a two-key INSERT-mode sequence such as `jj` to Escape, use the [`vimInsertModeRemaps`](https://code.claude.com/docs/en/interactive-mode#remap-insert-mode-key-sequences) setting
* In vim NORMAL mode, `?` shows the help menu (vim behavior)
diff --git a/content/en/docs/claude-code/large-codebases.md b/content/en/docs/claude-code/large-codebases.md
index 5dd7924e76..671de27a47 100644
--- a/content/en/docs/claude-code/large-codebases.md
+++ b/content/en/docs/claude-code/large-codebases.md
@@ -306,7 +306,7 @@ For sibling directories that everyone in this area needs, commit `additionalDire
## Add per-directory skills
-Any subdirectory can define [skills](https://code.claude.com/docs/en/skills.md) scoped to its own stack. A skill loads on demand when Claude determines it's relevant, so API-specific tooling doesn't consume context during frontend work.
+Any subdirectory can define [skills](https://code.claude.com/docs/en/skills.md) scoped to its own stack. A skill loads on demand when Claude determines it's relevant.
Skills live under `.claude/skills/` inside the directory. Commit them alongside that area's code so anyone who clones the repository gets them. In a monorepo this can be one set of skills per package. In a large single-tree codebase it's one set per subsystem such as `src/db/.claude/skills/`.
@@ -347,7 +347,7 @@ Each route file has a corresponding `.test.ts` file.
- Mock external services in `src/__tests__/mocks/`
```
-A different subdirectory holds different skills the same way: `packages/web/.claude/skills/component-patterns/` describes the frontend's component conventions instead of testing. When Claude works on a file in `packages/api/`, it loads the api-testing skill. When it works in `packages/web/`, it loads component-patterns instead. Neither directory's skills load during the other's tasks.
+A different subdirectory holds different skills the same way: `packages/web/.claude/skills/component-patterns/` describes the frontend's component conventions instead of testing. When Claude works on a file in `packages/api/`, it loads the api-testing skill. When it works in `packages/web/`, it loads component-patterns.
You can also scope a skill by file pattern instead of by placement. The [`paths` frontmatter field](https://code.claude.com/docs/en/skills#frontmatter-reference) takes glob patterns, and Claude loads the skill automatically only when it works with matching files. Use this for a skill that lives in the repository root's `.claude/skills/` but applies only to certain files, such as a database-migration skill scoped to `**/migrations/**`.
diff --git a/content/en/docs/claude-code/llm-gateway-connect.md b/content/en/docs/claude-code/llm-gateway-connect.md
index 11a462f1a2..469ae535c8 100644
--- a/content/en/docs/claude-code/llm-gateway-connect.md
+++ b/content/en/docs/claude-code/llm-gateway-connect.md
@@ -520,7 +520,7 @@ These are the most common errors when running Claude Code through a gateway, wit
| `400` errors on every request, in the gateway's own words rejecting an unrecognized tool type, such as `Input tag 'advisor_20260301'`, on Claude Code v2.1.275 | In a gradual rollout on that version, requests carry an [advisor tool](https://code.claude.com/docs/en/advisor.md) entry even with the advisor off. The Anthropic API accepts it, but a gateway or upstream that validates tool types rejects the whole request; one that [forwards request body fields unchanged](https://code.claude.com/docs/en/llm-gateway-protocol.md#forward-as-open-lists) passes it through unaffected. The entry is a declaration that carries no conversation content | Update to v2.1.276 or later, which doesn't send the entry behind an `ANTHROPIC_BASE_URL` gateway unless you turn the advisor on. On v2.1.275, set [`CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1`](https://code.claude.com/docs/en/env-vars), which removes the entry from requests |
| Models missing from the `/model` picker | Gateway model names aren't in Claude Code's built-in list, or Claude Code is showing a [`modelPicker`](https://code.claude.com/docs/en/settings-reference#modelpicker) lineup that replaces the built-in options | Enable [gateway model discovery](#add-gateway-models-to-the-model-picker) or add names with the [model configuration](https://code.claude.com/docs/en/model-config.md) variables. If Claude Code shows a replacing `modelPicker` lineup, add the gateway models to it, or ask your administrator to add them when managed settings supply it |
| `/fast` reports `Fast mode unavailable due to network connectivity issues` while inference requests work | The [fast mode](https://code.claude.com/docs/en/fast-mode.md) availability check goes directly to `api.anthropic.com` and doesn't follow `ANTHROPIC_BASE_URL`, so blocked direct egress fails the check | Allowlist `api.anthropic.com` if egress is blocked, or set a skip variable. See [use fast mode behind proxies and LLM gateways](https://code.claude.com/docs/en/fast-mode.md#use-fast-mode-behind-proxies-and-llm-gateways) |
-| `/fast` reports `Fast mode is currently unavailable` in a session that authenticates with a gateway-issued key in `ANTHROPIC_API_KEY` | While `ANTHROPIC_BASE_URL` points at your gateway, Claude Code withholds from `api.anthropic.com` a key that isn't in the format of an Anthropic API key. The [fast mode](https://code.claude.com/docs/en/fast-mode.md) availability check then isn't sent, and without an earlier successful check cached, Claude Code treats fast mode as unavailable | Set `CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS=1`; see [use fast mode behind proxies and LLM gateways](https://code.claude.com/docs/en/fast-mode.md#use-fast-mode-behind-proxies-and-llm-gateways) |
+| `/fast` reports `Fast mode is currently unavailable` in a session that authenticates with a gateway-issued key in `ANTHROPIC_API_KEY` | While `ANTHROPIC_BASE_URL` points at your gateway and the key isn't in the format of an Anthropic API key, Claude Code doesn't send the [fast mode](https://code.claude.com/docs/en/fast-mode.md) availability check. Without an earlier successful check cached, it treats fast mode as unavailable | Set `CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS=1`; see [use fast mode behind proxies and LLM gateways](https://code.claude.com/docs/en/fast-mode.md#use-fast-mode-behind-proxies-and-llm-gateways) |
| `/fast` reports `Fast mode has been disabled by your organization` in a session authenticated with `ANTHROPIC_AUTH_TOKEN`, even though the organization has fast mode enabled | The availability check requires a claude.ai login or an API key; with only a bearer token, Claude Code treats fast mode as disabled without sending the check | Set `CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK=1`; see [use fast mode behind proxies and LLM gateways](https://code.claude.com/docs/en/fast-mode.md#use-fast-mode-behind-proxies-and-llm-gateways) |
| Claude Code asks you to log in even though the [curl test](#verify-the-connection) succeeds | The CLI has no credential of its own: a reachable base URL isn't one, and in an interactive session an `env` block in a project's `.claude/settings.json` or `.claude/settings.local.json` applies only after the first-run wizard and [trust prompt](https://code.claude.com/docs/en/permissions.md#what-runs-before-you-trust-a-folder) | Set `ANTHROPIC_AUTH_TOKEN` somewhere Claude Code reads before first-run setup: a shell export, the `env` block in `~/.claude/settings.json`, or managed settings |
| `ANTHROPIC_API_KEY` is set but ignored, with no prompt | The key needs a one-time approval in interactive sessions, and a previously declined key is ignored without asking again | Enable it under `/config` with the `Use custom API key` option |
diff --git a/content/en/docs/claude-code/llm-gateway-protocol.md b/content/en/docs/claude-code/llm-gateway-protocol.md
index b67add6233..a023b5ee2b 100644
--- a/content/en/docs/claude-code/llm-gateway-protocol.md
+++ b/content/en/docs/claude-code/llm-gateway-protocol.md
@@ -148,7 +148,7 @@ The headers carry only what the rows below list: fixed vocabularies, tool names,
| :- | :- |
| `x-claude-code-request-class` | What kind of request this is: `main` for a turn of the main conversation, `subagent` for a turn of a [subagent](https://code.claude.com/docs/en/sub-agents.md), `workflow` for an agent running inside a workflow, `compaction` for the summarization request that compacts a conversation, or `auxiliary` for side requests such as session titles, classifiers, and summaries. Sent on every request |
| `x-claude-code-agent-type` | The kind of subagent that issued the request: a built-in agent type name such as `Explore`, `Plan`, or `general-purpose`, or `custom` for a user-defined agent, `teammate` for an [agent team](https://code.claude.com/docs/en/agent-teams.md) member running in the lead's process, or `fork` for a [fork](https://code.claude.com/docs/en/sub-agents.md#fork-the-current-conversation). Present only on a subagent's own turns; a subagent's compaction or side requests keep the agent ID but carry no type. A user-chosen agent name is never sent |
-| `x-claude-code-compaction` | Present on the request that summarizes the conversation during a [compaction](https://code.claude.com/docs/en/prompt-caching.md#compacting-the-conversation). The value says what triggered it: `auto` when the context window approached capacity, `manual` for `/compact`, or `reactive` when the API rejected a request as too long. The value is also `auto` for [idle compaction](https://code.claude.com/docs/en/settings-reference.md#idlecompaction). Absent on every other request |
+| `x-claude-code-compaction` | Present on the request that summarizes the conversation during a [compaction](https://code.claude.com/docs/en/prompt-caching.md#compacting-the-conversation). The value says what triggered it: `auto` when the context window approached capacity, `manual` for `/compact`, or `reactive` when the API rejected a request as too long. The value is also `auto` for [idle compaction](https://code.claude.com/docs/en/settings-reference.md#idlecompaction) in an interactive terminal session. Absent on every other request, including one that writes a summary in the background before a compaction |
| `x-claude-code-context-compacted` | Present once, on the first main-conversation request after a compaction, with the same values as `x-claude-code-compaction`. The conversation prefix before this request is no longer used, so a cache keyed on it can be dropped |
| `x-claude-code-prev-tool-durations` | Measured run time of the tool calls whose results this request carries, as `=;=`, for example `Bash=742;Read=9`. Sent on the next request of the same conversation after a batch of tool calls, from the main session or a subagent |
| `x-claude-code-prompt-id` | Random UUID that identifies the user prompt a request serves. Requests serving one prompt share the value, including the turns of subagents that prompt started. Requests not attributed to a prompt omit it. Use it to group a session's requests by prompt. Requires Claude Code v2.1.283 or later |
@@ -238,7 +238,10 @@ When the upstream rejects one of these capabilities, Claude Code can retry the r
* When the upstream rejects only the `cache_control` marker on a mid-conversation system message, Claude Code keeps the system messages and retries once with the marker moved. The marker goes on the last entry in `messages` that isn't a system message, in that retry and in later requests until Claude Code exits
* When the upstream rejects a [thinking signature](https://platform.claude.com/docs/en/build-with-claude/extended-thinking), including with a `400` whose message says the block is `bound to a different conversation`, Claude Code removes earlier thinking blocks from the request, retries, and keeps them out of every later request. New responses still include thinking
* When the gateway or its upstream rejects the [advisor tool](https://code.claude.com/docs/en/advisor.md) entry in `tools` as an unrecognized tool type, Claude Code retries the request once without that entry and its `anthropic-beta` value. Later requests to that base URL leave the advisor out until Claude Code exits, and `/advisor` is unavailable to the developer for that time. Claude Code recognizes this rejection by a `400` or `422` response whose message names the tool type after `Input tag`, such as `Input tag 'advisor_20260301'`. Before v2.1.280, Claude Code didn't retry this rejection
-* When the upstream rejects `output_config.effort`, Claude Code retries the request without effort and leaves it out of later requests to that model until Claude Code exits. Claude Code recognizes this rejection by a `400` whose message names `output_config.effort` together with `Extra inputs are not permitted`, or says the model doesn't support the effort parameter
+* When the upstream rejects `output_config.effort` or its `anthropic-beta` value, Claude Code retries and adds neither to requests for that model until Claude Code exits. Your gateway needs no change if it forwards the upstream's `400` unmodified and the message:
+ * Names `output_config.effort` alongside `Extra inputs are not permitted`
+ * Says the model doesn't support the effort parameter
+ * Starts with `Unexpected value(s)` and lists `effort-2025-11-24` for the `anthropic-beta` header. Requires v2.1.310 or later. Developers whose [`ANTHROPIC_BETAS`](https://code.claude.com/docs/en/env-vars) lists the value keep sending it and getting the `400`, so have them remove that entry
* When the upstream rejects the `context_management` field or its `anthropic-beta` value, the gateway sees the request once more without them. If the gateway sees them again in a later request and the upstream rejects them again, the same retry follows. Claude Code recognizes this rejection by its message, for example one containing `context_management: Extra inputs are not permitted`. Before v2.1.304, Claude Code didn't retry this rejection
* When the upstream rejects a beta tool field other than `defer_loading`, such as `strict`, the `400` reaches the developer. Before it does, the gateway can see the request again [without the tool search fields](#retry-without-tool-search). To stop sending such fields, have developers set [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`](#disable-pre-release-capabilities)
diff --git a/content/en/docs/claude-code/monitoring-usage.md b/content/en/docs/claude-code/monitoring-usage.md
index 06c5d8817f..292f997fc3 100644
--- a/content/en/docs/claude-code/monitoring-usage.md
+++ b/content/en/docs/claude-code/monitoring-usage.md
@@ -1403,7 +1403,7 @@ Logged when conversation compaction completes.
* `pre_tokens`: Approximate token count before compaction
* `post_tokens`: Approximate token count after compaction
* `error`: Error message when compaction failed
-* `precompute_reuse`: Only set when `trigger` is `"manual"` or for an [idle compaction](https://code.claude.com/docs/en/settings-reference.md#idlecompaction), which reports `trigger` as `"auto"`. Auto-compaction can prepare a summary in the background before the context window fills, and this attribute records whether the compaction reused that prepared summary. `"hit"` means it was reused; `"miss_custom_instructions"`, `"miss_hook"`, and `"miss_not_ready"` give the reason a fresh summary was computed instead
+* `precompute_reuse`: Only set when `trigger` is `"manual"`, or when `trigger` is `"auto"` for an [idle compaction](https://code.claude.com/docs/en/settings-reference.md#idlecompaction) in an interactive terminal session. Auto-compaction can prepare a summary in the background before the context window fills, and this attribute records whether the compaction reused that prepared summary. `"hit"` means it was reused; `"miss_custom_instructions"`, `"miss_hook"`, and `"miss_not_ready"` give the reason a fresh summary was computed instead
#### Subagent completed event
diff --git a/content/en/docs/claude-code/permission-modes.md b/content/en/docs/claude-code/permission-modes.md
index 1d92b72733..16dbba98d2 100644
--- a/content/en/docs/claude-code/permission-modes.md
+++ b/content/en/docs/claude-code/permission-modes.md
@@ -248,7 +248,7 @@ For where `defaultMode` goes in a settings file, see the example under [Start in
**Web and mobile**
-On [claude.ai/code](https://claude.ai/code), use the mode dropdown next to the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes:
+On [claude.ai/code](https://claude.ai/code), use the mode dropdown in the row under the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes:
* **[Cloud sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md)**: Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn't available.
* **[Remote Control](https://code.claude.com/docs/en/remote-control.md) sessions** on your local machine: Manual, Accept edits, Plan, and Auto for a session you started yourself, and you can't select Bypass permissions from the app. To use Auto, the session has to meet the auto mode [availability requirements](#eliminate-prompts-with-auto-mode). For a project thread running on your computer, see [Run a thread on your own computer](https://code.claude.com/docs/en/claude-projects.md#run-a-thread-on-your-own-computer).
diff --git a/content/en/docs/claude-code/plugins-reference.md b/content/en/docs/claude-code/plugins-reference.md
index 3fe2954228..4e6c180f0b 100644
--- a/content/en/docs/claude-code/plugins-reference.md
+++ b/content/en/docs/claude-code/plugins-reference.md
@@ -155,7 +155,7 @@ For component keys such as `commands` and `hooks`, [Component path forms](#compo
| `workflows` | Path, or array of paths | [Workflow](https://code.claude.com/docs/en/workflows.md#distribute-a-workflow-in-a-plugin) `.js` files or directories. Replaces the default `workflows/` scan |
| `experimental` | Object | Container for `themes`, `monitors`, and `evals`, whose manifest shape may still change |
| `experimental.themes` | Path, or array of paths | Theme files or directories. Replaces the default `themes/` scan. A top-level `themes` key still loads, with a `claude plugin validate` warning |
-| [`experimental.monitors`](#monitors) | Path, or inline array | A `.json` file holding the monitors array, or the array itself. Defaults to `monitors/monitors.json`. A top-level `monitors` key still loads, with a `claude plugin validate` warning. Monitors run only in interactive sessions, and not on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry |
+| [`experimental.monitors`](#monitors) | Path, or inline array | A `.json` file holding the monitors array, or the array itself. Defaults to `monitors/monitors.json`. A top-level `monitors` key still loads, with a `claude plugin validate` warning. Monitors [don't start with the `-p` flag](https://code.claude.com/docs/en/plugins/components#monitors) |
| `experimental.evals` | Path, or array of paths | Directory that holds the plugin's [eval cases](https://code.claude.com/docs/en/plugin-evals.md#use-a-different-eval-directory) when it isn't the default `evals/`. `claude plugin eval --eval-dir` overrides it |
In the Type column, a path is a string relative to the plugin root, such as `"./custom/commands"`.
diff --git a/content/en/docs/claude-code/plugins/components.md b/content/en/docs/claude-code/plugins/components.md
index b822801f07..e3ed70a4b9 100644
--- a/content/en/docs/claude-code/plugins/components.md
+++ b/content/en/docs/claude-code/plugins/components.md
@@ -584,7 +584,8 @@ The command runs in a shell, in the session's current working directory. It runs
A monitor's command is limited in where it starts and what it can reference:
-* **Interactive sessions only**: plugin monitors start in an interactive session and never in non-interactive mode with the `-p` flag. They also don't start in sessions where the API provider or telemetry settings make the [Monitor tool](https://code.claude.com/docs/en/tools-reference.md#monitor-tool) unavailable
+* **Interactive sessions**: plugin monitors don't start in non-interactive mode with the `-p` flag
+* **Minimum version**: on Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry, or with `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` set, monitors require Claude Code v2.1.310 or later. The requirement applies when [feature-flag fetching](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching) is off
* **No user configuration**: `command` gets the [path variables](#path-variables-and-persistent-data) and `${ENV_VAR}` from the environment, but never `${user_config.*}`. A monitor that references one doesn't start, and monitor processes don't receive `CLAUDE_PLUGIN_OPTION_` either
* **Disabling mid-session**: if you disable a plugin mid-session, Claude Code doesn't stop monitors that are already running. They stop when the session ends
diff --git a/content/en/docs/claude-code/plugins/host-marketplace.md b/content/en/docs/claude-code/plugins/host-marketplace.md
index 99382416c6..b76a2c37a1 100644
--- a/content/en/docs/claude-code/plugins/host-marketplace.md
+++ b/content/en/docs/claude-code/plugins/host-marketplace.md
@@ -111,7 +111,7 @@ You choose whether the clone runs over SSH or HTTPS by the form of the add comma
Tell users what each protocol needs on their machine:
* **SSH**: the key must work without a passphrase prompt, for example because it's loaded in `ssh-agent`. The host must already be in `known_hosts`.
-* **HTTPS**: Claude Code leaves the user's git credential helper enabled but forbids it from prompting. A credential the helper already stores works; one it would have to ask for fails. On GitHub, `gh auth login` followed by `gh auth setup-git` stores one.
+* **HTTPS**: Claude Code leaves the user's git credential helper enabled but forbids it from prompting, and doesn't run askpass programs such as one set in `GIT_ASKPASS`. A credential the helper already stores works; one it would have to ask for fails. On GitHub, `gh auth login` followed by `gh auth setup-git` stores one.
For a GitHub Enterprise Server host, users need git access to that host from their machine. See [Plugin marketplaces on GHES](https://code.claude.com/docs/en/github-enterprise-server.md#plugin-marketplaces-on-ghes) for what each Claude Code surface needs to reach a GHES-hosted marketplace.
diff --git a/content/en/docs/claude-code/plugins/install.md b/content/en/docs/claude-code/plugins/install.md
index c943abef45..fba89b75a2 100644
--- a/content/en/docs/claude-code/plugins/install.md
+++ b/content/en/docs/claude-code/plugins/install.md
@@ -238,7 +238,7 @@ If you haven't added that marketplace yet, the command prints `Successfully adde
A private marketplace is one in a repository you need credentials to clone, on GitHub or any other git host. You add it with the same `/plugin marketplace add` or `claude plugin marketplace add` command as a public one. Claude Code clones it with the git credentials already on your machine and never prompts, so each way of connecting has a requirement:
-* **HTTPS**: your git credential helpers apply, so access you set up with `gh auth login`, the macOS Keychain, or `git-credential-store` works. Interactive prompts are suppressed, so a host you have never authenticated to fails instead of asking for a password.
+* **HTTPS**: your git credential helpers apply, so access you set up with `gh auth login`, the macOS Keychain, or `git-credential-store` works. Git's prompts and askpass programs are off, including one set in `GIT_ASKPASS`, so the clone fails instead of prompting when git would have to ask for a credential.
* **SSH**: the host must already be in your `known_hosts` file and the key must work without a passphrase prompt. If your git setup names an SSH program in `GIT_SSH_COMMAND`, `GIT_SSH`, or your git config's `core.sshCommand`, Claude Code runs that program.
* **GitHub `owner/repo` shorthand**: Claude Code checks whether your SSH key authenticates to `github.com`, then clones over SSH if it does and over HTTPS if it doesn't. Set [`CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1`](https://code.claude.com/docs/en/env-vars#variables) to skip that check and always clone over HTTPS.
diff --git a/content/en/docs/claude-code/plugins/manifest-reference.md b/content/en/docs/claude-code/plugins/manifest-reference.md
index 3fe2954228..4e6c180f0b 100644
--- a/content/en/docs/claude-code/plugins/manifest-reference.md
+++ b/content/en/docs/claude-code/plugins/manifest-reference.md
@@ -155,7 +155,7 @@ For component keys such as `commands` and `hooks`, [Component path forms](#compo
| `workflows` | Path, or array of paths | [Workflow](https://code.claude.com/docs/en/workflows.md#distribute-a-workflow-in-a-plugin) `.js` files or directories. Replaces the default `workflows/` scan |
| `experimental` | Object | Container for `themes`, `monitors`, and `evals`, whose manifest shape may still change |
| `experimental.themes` | Path, or array of paths | Theme files or directories. Replaces the default `themes/` scan. A top-level `themes` key still loads, with a `claude plugin validate` warning |
-| [`experimental.monitors`](#monitors) | Path, or inline array | A `.json` file holding the monitors array, or the array itself. Defaults to `monitors/monitors.json`. A top-level `monitors` key still loads, with a `claude plugin validate` warning. Monitors run only in interactive sessions, and not on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry |
+| [`experimental.monitors`](#monitors) | Path, or inline array | A `.json` file holding the monitors array, or the array itself. Defaults to `monitors/monitors.json`. A top-level `monitors` key still loads, with a `claude plugin validate` warning. Monitors [don't start with the `-p` flag](https://code.claude.com/docs/en/plugins/components#monitors) |
| `experimental.evals` | Path, or array of paths | Directory that holds the plugin's [eval cases](https://code.claude.com/docs/en/plugin-evals.md#use-a-different-eval-directory) when it isn't the default `evals/`. `claude plugin eval --eval-dir` overrides it |
In the Type column, a path is a string relative to the plugin root, such as `"./custom/commands"`.
diff --git a/content/en/docs/claude-code/plugins/troubleshooting.md b/content/en/docs/claude-code/plugins/troubleshooting.md
index ed279bf51d..4dff0e988c 100644
--- a/content/en/docs/claude-code/plugins/troubleshooting.md
+++ b/content/en/docs/claude-code/plugins/troubleshooting.md
@@ -251,12 +251,12 @@ You added or updated a marketplace from a git repository, and the clone failed w
First check the repository itself: a misspelled `owner/repo`, a repository that doesn't exist, or a private repository you can't see also ends in this message. Open the repository URL in your browser, or run `git ls-remote ` in your terminal, to confirm it exists and you have access.
-If the repository is right, the cause is credentials. Claude Code runs git with interactive prompts disabled, so it can't ask you for a password, a key passphrase, or a credential the way your terminal would. If git needs to prompt, you see `fatal: Cannot prompt because user interactivity has been disabled` or `terminal prompts disabled` in the original error. Only credentials that already work non-interactively succeed:
+If the repository is right, the cause is credentials. Claude Code turns off git's prompts and askpass programs, including one set in `GIT_ASKPASS`, and runs SSH in batch mode. When git needs to prompt, the clone's error includes `fatal: Cannot prompt because user interactivity has been disabled`, `terminal prompts disabled`, or `fatal: unable to get password from user`. Only credentials git can get without a prompt or askpass program succeed:
* **SSH**: `ssh -T git@` must succeed without prompting for a passphrase, and the host must already be in `known_hosts`
-* **HTTPS**: your credential helper must hold a token for the host. For GitHub, run `gh auth login` and `gh auth setup-git`. For another host, store a personal access token in your git credential helper. Test with `git ls-remote `
+* **HTTPS**: your credential helper must hold a token for the host. For GitHub, run `gh auth login` and `gh auth setup-git`. For another host, store a personal access token in your git credential helper. To test, unset `GIT_ASKPASS` in your terminal and run `git -c core.askPass= ls-remote `.
-Once `git ls-remote` succeeds in your terminal without a prompt, run the add or update again. A successful add prints `Successfully added marketplace: `. A successful update prints `Successfully updated marketplace: ` from your shell, or `✔ Updated 1 marketplace` in a session.
+Once the check for your protocol succeeds without a prompt, run the add or update again. A successful add prints `Successfully added marketplace: `. A successful update prints `Successfully updated marketplace: ` from your shell, or `✔ Updated 1 marketplace` in a session.
To make Claude Code skip SSH for GitHub `owner/repo` sources, set `CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1`. Without it, Claude Code clones those sources over SSH when an SSH key for `github.com` looks configured, and falls back to HTTPS when the SSH clone fails.
diff --git a/content/en/docs/claude-code/prompt-caching.md b/content/en/docs/claude-code/prompt-caching.md
index c3c82c1e0d..a40fcf746d 100644
--- a/content/en/docs/claude-code/prompt-caching.md
+++ b/content/en/docs/claude-code/prompt-caching.md
@@ -184,7 +184,7 @@ After a break longer than the [cache lifetime](#cache-lifetime), there is no cac
>
> Compaction works in your favor when the context you discard is content you no longer need. To choose when its overhead happens, run `/compact` at a natural break in your work, such as between tasks, instead of waiting for auto-compaction to trigger mid-task. If you've gone down a path you want to abandon entirely, [`/rewind`](#rewinding-the-conversation) to an earlier turn instead. Rewinding truncates back to a prefix that is already cached, rather than building a new one as compaction does.
-If you leave a long conversation idle in a terminal session while it is on the [one-hour TTL](#which-ttl-each-request-gets), Claude Code can compact it shortly before the cache expires. To turn idle compaction off, set [`idleCompaction`](https://code.claude.com/docs/en/settings-reference#idlecompaction) to `false`, which requires Claude Code v2.1.290 or later.
+If you leave a long conversation idle while it is on the [one-hour TTL](#which-ttl-each-request-gets), Claude Code can compact it. To turn idle compaction off, set [`idleCompaction`](https://code.claude.com/docs/en/settings-reference#idlecompaction) to `false`, which requires Claude Code v2.1.290 or later.
### Accumulating many images
diff --git a/content/en/docs/claude-code/remote-control.md b/content/en/docs/claude-code/remote-control.md
index dda176303f..378eb7d56a 100644
--- a/content/en/docs/claude-code/remote-control.md
+++ b/content/en/docs/claude-code/remote-control.md
@@ -179,7 +179,7 @@ A connected device shows the conversation in your terminal as it happens. These
* **Diff of your changes**: when the session's directory is in a git repository, a connected device's diff pane shows your changes. On a branch that has commits ahead of the repository's default branch, the pane shows the changes since the branch split from it, including your uncommitted edits. On the default branch itself, or on a branch that isn't ahead of it, the pane shows only your uncommitted changes.
* **Model**: when you pick a [model](https://code.claude.com/docs/en/model-config.md) from a connected device, Claude Code runs the session on that model. Requires Claude Code v2.1.238 or later. A model you pick from the device's model control applies to the current session only. When you send `/model ` from the device to an interactive session, Claude Code also sets your default for new sessions.
* **Effort level**: when you set the [effort level](https://code.claude.com/docs/en/model-config.md#adjust-effort-level) from a connected device, with `/effort` or the device's effort control, Claude Code applies it to the session on your machine. If you pinned a level with `CLAUDE_CODE_EFFORT_LEVEL`, the session keeps that level, and Claude Code refuses a different pick from the effort control. Picking a level from the effort control requires Claude Code v2.1.234 or later on your machine.
-* **Reconnecting after a connection failure**: run `/remote-control` to reconnect. If compaction rewrote the conversation or you switched conversations with `/resume` in the meantime, Claude Code archives the server session it was using instead of leaving it in the session list. You can still find it by [filtering for archived sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md#archive-sessions). Switching conversations while a device is still connected doesn't archive the session.
+* **Reconnecting after a connection failure**: run `/remote-control` to reconnect. If compaction rewrote the conversation or you switched conversations with `/resume` in the meantime, Claude Code archives the server session it was using instead of leaving it in the session list. You can still find that session among your [archived sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md#find-an-archived-session) at claude.ai/code. Switching conversations while a device is still connected doesn't archive the session.
### Enable Remote Control for all sessions
@@ -401,6 +401,14 @@ In the terminal, Claude Code prints `Successfully reconnected to claude.ai Slack
## Troubleshooting
+### "Remote Control disconnected" or "Can't reach"
+
+At [claude.ai/code](https://claude.ai/code) or in the Desktop app, **Remote Control disconnected** or a **Can't reach** message means your browser or app lost contact with Claude Code on your computer. Neither message tells you whether Claude or a subagent you were watching is still working on your computer. On that computer, check the state Claude Code is in and follow the matching step to reconnect:
+
+* **An interactive session shows `Remote Control disconnected`**: follow [the reconnect steps for the reason that line gives](#session-ended-elsewhere)
+* **Claude Code is running and shows no failure**: an interactive session reconnects by itself once the machine is awake and online, so you don't need to act. If you used `claude remote-control`, see **Extended network outage** under [Limitations](#limitations)
+* **Claude Code isn't running**: [start it again and bring the session back](#resume-sessions-after-stopping-the-server)
+
### "Remote Control requires a claude.ai subscription"
You're not signed in with a claude.ai account, or another credential is taking precedence over your login. The message takes one of these forms:
@@ -463,7 +471,7 @@ Your organization's policy stopped allowing Remote Control while a session was c
* **With `/remote-control`, `claude --remote-control`, or [auto-connect](#enable-remote-control-for-all-sessions)**: the session keeps running without Remote Control, and Claude Code archives it at claude.ai
* **With `claude remote-control`**: the server stops and archives the sessions it was serving, then exits
-You can still find an archived session by [filtering for archived sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md#archive-sessions).
+To find one of these sessions again, open your [archived sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md#find-an-archived-session) at claude.ai/code.
Remote Control doesn't reconnect on its own. To turn it back on after your organization allows it again, run `/remote-control` in the session or `claude remote-control` in your shell. Either command fails with [`Remote Control is disabled by your organization's policy`](#remote-control-is-disabled-by-your-organizations-policy) until Claude Code on this machine has fetched the changed policy. An open session fetches it about once an hour. To find out what is blocking Remote Control, match the full text the command prints against that entry.
diff --git a/content/en/docs/claude-code/routines.md b/content/en/docs/claude-code/routines.md
index b443db5e91..33a2594645 100644
--- a/content/en/docs/claude-code/routines.md
+++ b/content/en/docs/claude-code/routines.md
@@ -293,12 +293,13 @@ Change the repository if needed, choose an event from the [supported events](#su
#### Supported events
-GitHub triggers can subscribe to either of the following event categories. Within each category you can pick a specific action, such as `pull_request.opened`, or react to all actions in the category.
+Choose an event from any of the following categories. Within each category you can pick a specific action, such as `pull_request.opened`, or react to all actions in the category.
| Event | Triggers when |
| :- | :- |
| Pull request | A PR is opened, closed, assigned, labeled, synchronized, or otherwise updated |
| Release | A release is created, published, edited, or deleted |
+| Issue | An issue is opened, edited, closed, reopened, labeled, assigned, or otherwise updated |
#### Filter pull requests
@@ -333,9 +334,13 @@ Click a scheduled task in the list to open its detail page. The detail page show
Click any run to open it as a full session. From there you can see what Claude did, review changes, create a pull request, or continue the conversation. Each run session works like any other session: use the dropdown menu next to the session title to rename, archive, or delete it.
-> [!NOTE]
->
-> A green status in the run list means the session started and exited without an infrastructure error. It does not mean the work your prompt describes succeeded. Open the run to read the transcript and confirm what Claude actually did. Blocked network requests, missing connector tools, and failures in the work itself all surface there rather than in the status indicator.
+Under **History** on the task's detail page, each finished run's row ends with **Error** if the run failed, **Cancelled** if it was cancelled, and neither word if it succeeded. The **Status** filter names the same three outcomes **Failed**, **Cancelled**, and **Succeeded**. These outcomes say how the session ended, not whether Claude completed the work your prompt describes, so open the run and read its transcript to see what happened.
+
+* **Succeeded**: the session ended without Claude Code reporting a failure. Blocked network requests, missing connector tools, and work Claude couldn't complete appear in the transcript rather than on the row
+* **Failed**: the session didn't finish normally. For example, it stopped unexpectedly, ended on an error, or was archived before the run started
+* **Cancelled**: the run didn't fail, and its session was archived. If you archive the session of a run that succeeded, the run changes to **Cancelled**. Nothing in the task needs to change
+
+If a warning appears under **History**, see ["The last run" warnings](#the-last-run-didnt-start).
### Edit and control scheduled tasks
@@ -499,6 +504,21 @@ If the cause is your CLI sign-in or being inside a cloud session, you can still
An Owner in your Team or Enterprise organization has likely turned off the **Scheduled tasks (Was Routines)** toggle at [**Organization settings > Capabilities > Remote sessions**](https://claude.ai/admin-settings/capabilities). On Claude Code v2.1.227 or later, the same toggle also hides `/schedule` in the CLI. This is a server-side organization setting, so it cannot be overridden from your local configuration. Ask an Owner to turn scheduled tasks back on for your organization.
+### "The last run" warnings
+
+When a warning under **History** begins with "The last run", find it in the first column and do what its row says. The warning clears once a later run starts.
+
+| Warning | What to do |
+| :- | :- |
+| "The last run didn't start because your organization had reached its limit on cloud sessions running at once." | The task needs no change. Click **Run now** later, or wait for the next run |
+| "The last run didn't start because its cloud environment couldn't be found or used." | On the task's detail page, open the menu next to its name, select **Edit**, and find the [cloud environment selector](#environments-and-network-access). If it reads **Unavailable environment**, that environment was archived or is no longer available to your account, so choose another one there and save your changes. Otherwise, retry with **Run now** on the detail page, or pick another environment in the selector and save your changes |
+| "The last run was blocked because it couldn't access something it needs, or your organization's policy doesn't allow it." | Check that your [GitHub access](#repositories-and-branch-permissions) covers the task's repositories. If it does, ask an [Owner](https://code.claude.com/docs/en/server-managed-settings.md#access-control) of your Claude organization whether a policy blocks the task |
+| "The last run didn't start because of a problem that's usually temporary." | Click **Run now** to try again, or wait for the next run |
+| "The last run didn't start because its repository or branch wasn't available." | Check on GitHub that each repository in the task has the [branch the run starts from](#repositories-and-branch-permissions). Also check that your [GitHub access](#repositories-and-branch-permissions) covers each repository, and reconnect GitHub if your connection expired |
+| "The last run didn't start because some of its settings weren't accepted." | On the task's detail page, open the menu next to its name and select **Edit**. The dialog doesn't mark which setting wasn't accepted, so check each one there, including the task's name, prompt, model, repositories, environment, connectors, and triggers |
+| "The last run stopped because a usage limit was reached." | For when the task's runs can start again after a usage limit, see [Usage and limits](#usage-and-limits) |
+| "The last run failed." | Click **Run now** to try again, or wait for the next run. The failed run has no session to open |
+
## Related resources
* [`/loop` and in-session scheduling](https://code.claude.com/docs/en/scheduled-tasks): schedule local tasks within an open CLI session
diff --git a/content/en/docs/claude-code/self-hosted-environments-deploy.md b/content/en/docs/claude-code/self-hosted-environments-deploy.md
index 720853ec4d..804e0f3569 100644
--- a/content/en/docs/claude-code/self-hosted-environments-deploy.md
+++ b/content/en/docs/claude-code/self-hosted-environments-deploy.md
@@ -768,6 +768,7 @@ Set the flag above your longest expected session, such as `--kill-session-after-
* **With a `checkout` hook**: repositories checked out via a [`checkout` lifecycle hook](https://code.claude.com/docs/en/self-hosted-environments-configuration#checkout) aren't pushed. Snapshot those from the [`post-session` hook](https://code.claude.com/docs/en/self-hosted-environments-configuration#post-session) instead.
* **Before enabling the flag**: restrict who can push to `claude/*` refs on the source remote. On resume, the runner fetches the previously pushed branch without verifying who pushed it.
* **Uncommitted changes are still lost**: to prompt Claude to commit and push when it finishes responding, see [Prompt sessions to push their work](https://code.claude.com/docs/en/self-hosted-environments-configuration.md#prompt-sessions-to-push-their-work)
+* **A command cut off by a lost runner can run again**: when the session resumes on another runner, Claude sees the interrupted tool call with a result saying its outcome is unknown.
* **A repository added mid-session can fail to clone**: Claude clones it with `git clone` over HTTPS. On a runner without [`--use-anthropic-git-proxy`](#use-the-anthropic-git-proxy), the clone fails with a git authentication error if nothing on the host can read the repository. Where you can, select every repository the session needs when you create it.
* **Some connectors don't appear in self-hosted sessions**: a connector you haven't yet connected in claude.ai Settings isn't listed in a self-hosted session, and the session won't prompt you to connect it. Connect it in Settings first, then start a fresh session. Adding a connector to an already-running session also doesn't make its tools available to Claude; start a fresh session to pick up a newly added connector.
* **When someone archives or deletes a session, or releases its runner from the session's menu**: don't count on the [`--push-outcome-on-release`](https://code.claude.com/docs/en/self-hosted-environments-reference#runner-cli-flags) push. To save commits in those cases, push `HEAD` to a rescue branch from a [`post-session` hook](https://code.claude.com/docs/en/self-hosted-environments-configuration#post-session). If you start from the example there, make it push even when nothing is uncommitted, because it pushes only after a snapshot commit.
diff --git a/content/en/docs/claude-code/self-hosted-environments-reference.md b/content/en/docs/claude-code/self-hosted-environments-reference.md
index d7d56e4eeb..9b6ea7128f 100644
--- a/content/en/docs/claude-code/self-hosted-environments-reference.md
+++ b/content/en/docs/claude-code/self-hosted-environments-reference.md
@@ -52,7 +52,7 @@ Most flags have a corresponding environment variable. When both are set, the fla
| `--retire-at ` | `SELF_HOSTED_RUNNER_RETIRE_AT` | unset | Retire the runner at an absolute Unix timestamp in seconds, for infrastructure that kills the runner at a known time; [Runner lifecycle](https://code.claude.com/docs/en/self-hosted-environments#runner-lifecycle) describes the release sequence and how to size the margin. Values before 2001 or after the year 5138 are rejected by the flag and ignored by the environment variable. |
| `--server-auto-mode-lists ` | `SELF_HOSTED_RUNNER_SERVER_AUTO_MODE_LISTS` | `no-allow` | Which of the [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) classifier rule lists that the control plane sends with a session may reach that session: `all`, `no-allow`, or `none`. See [Auto mode rule lists](#auto-mode-rule-lists) for what each value applies. An invalid value stops the runner at startup. Requires Claude Code v2.1.295 or later. |
| `--session-stop-grace-sec ` | `SELF_HOSTED_RUNNER_SESSION_STOP_GRACE_MS` | `5` | How long to wait for the Claude process to exit cleanly after a session ends, before force-killing it. Raise the value if the child's own `SessionEnd` hooks need more time. |
-| `--startup-timeout-min ` | `SELF_HOSTED_RUNNER_STARTUP_TIMEOUT_MS` | `15` | Release a session slot if the child hasn't signaled on the [activity channel](https://code.claude.com/docs/en/self-hosted-environments-configuration.md#keep-stdin-and-file-descriptor-3-attached) that it initialized within N minutes. The N minutes start at spawn, after cloning, and start over at each `user` or `assistant` message the child emits before it has initialized or reported its state. Before v2.1.299, this timeout stopped applying at the session's first such message. For release after the init signal, see `--release-idle-session-min`. `0` disables. |
+| `--startup-timeout-min ` | `SELF_HOSTED_RUNNER_STARTUP_TIMEOUT_MS` | `15` | How long to wait on a child process that hasn't initialized before releasing the session's slot. See [Session startup timeout](#session-startup-timeout) for where the count starts and which sessions it leaves running. `0` disables the timeout. |
| `--trust-workspace [bool]` | `SELF_HOSTED_RUNNER_TRUST_WORKSPACE` | on | Seed persisted trust for each session's repository paths so repo-committed `permissions.allow` and `additionalDirectories` are honored. Set `false` to drop repo-committed permission grants and configure allow rules in the host config's `settings.json` instead; repository-committed `sandbox.*` settings still apply either way, which is why the [repo-settings guard](https://code.claude.com/docs/en/self-hosted-environments-deploy.md#harden-your-deployment) scans them regardless of this flag. |
| `--use-anthropic-git-proxy` | `CLAUDE_RUNNER_USE_GIT_PROXY=1` | off | Clone repositories on github.com via the [Anthropic git proxy](https://code.claude.com/docs/en/self-hosted-environments-deploy.md#use-the-anthropic-git-proxy) instead of customer-managed git auth. Requires `--capacity 1` and git 2.32 or later; the runner refuses to start otherwise. Supersedes the rewrite flags. |
@@ -61,6 +61,12 @@ Most duration flags have a maximum, chosen to keep each timeout inside the runti
* **Flag**: startup fails with an error.
* **Environment variable**: the runner clamps the value to the timer ceiling rather than rejecting it.
+### Session startup timeout
+
+If a session lost its slot during a turn such as `/code-review`, update the runner and the child binary to v2.1.309 or later. From v2.1.299 through v2.1.308, the runner released a session, even mid-turn, once the startup timeout passed without a `user` or `assistant` message.
+
+With `--startup-timeout-min `, the runner releases a session's slot when its child hasn't initialized within `` minutes after cloning. During a turn that begins before the child initializes, the session keeps its slot until `` minutes pass with no line on the child's [activity channel](https://code.claude.com/docs/en/self-hosted-environments-configuration.md#keep-stdin-and-file-descriptor-3-attached). Once the child initializes, the runner clears that count and `--release-idle-session-min` governs release. To limit a session whose child is alive but stuck, set `--kill-session-after-min`.
+
### Auto mode rule lists
`--server-auto-mode-lists` lets you decide which [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) classifier rules from outside the runner reach the sessions on your runners. Anthropic's control plane can send rule lists with a session and ask the runner to apply them. Some entries may be rules an admin of your organization wrote. The lists are `environment`, `soft_deny`, and `allow`:
diff --git a/content/en/docs/claude-code/settings-reference.md b/content/en/docs/claude-code/settings-reference.md
index e179061c6d..37417fc5ac 100644
--- a/content/en/docs/claude-code/settings-reference.md
+++ b/content/en/docs/claude-code/settings-reference.md
@@ -117,7 +117,7 @@ Every key below links to its entry. Scope lists the [files](https://code.claude.
| [`gcpAuthRefresh`](#gcpauthrefresh) | Refresh [Google Cloud credentials](https://code.claude.com/docs/en/google-vertex-ai.md#advanced-credential-configuration) with your own command | Authentication and providers | Any file |
| [`hooks`](#hooks) | Run your own commands as [hooks](https://code.claude.com/docs/en/hooks.md) at points in Claude Code's lifecycle | Hooks and automation | Any file |
| [`httpHookAllowedEnvVars`](#httphookallowedenvvars) | Limit which env vars [HTTP hooks](https://code.claude.com/docs/en/hooks.md) can put in headers | Hooks and automation | Any file |
-| [`idleCompaction`](#idlecompaction) | Stop Claude Code from compacting a long conversation while your terminal session is idle | Memory and context | Any file |
+| [`idleCompaction`](#idlecompaction) | Stop Claude Code from compacting a long conversation that you've stepped away from | Memory and context | Any file |
| [`includeCoAuthoredBy`](#includecoauthoredby) | Deprecated; use `attribution` to hide or change commit and PR attribution | Git and attribution | Any file |
| [`includeGitInstructions`](#includegitinstructions) | Remove the built-in commit and PR instructions from Claude's context | Git and attribution | Any file |
| [`inputNeededNotifEnabled`](#inputneedednotifenabled) | Get a [push notification](https://code.claude.com/docs/en/remote-control.md#mobile-push-notifications) when Claude is waiting on you | Remote, desktop, and notifications | Any file |
@@ -2415,11 +2415,15 @@ In a `-p` run or an Agent SDK session, Claude Code ignores this key. The SDK tur
### `idleCompaction`
-Idle compaction [compacts](https://code.claude.com/docs/en/context-window.md#what-survives-compaction) a long conversation that you've stepped away from, shortly before its prompt cache expires. Your next message then sends a summary instead of the whole conversation. When you come back, the conversation shows a line that starts with `Compacted while idle, before the prompt cache expired`.
+Idle compaction [compacts](https://code.claude.com/docs/en/context-window.md#what-survives-compaction) a long conversation that you've stepped away from. Your next message then sends a summary instead of the whole conversation. Once compacted, the conversation shows a notice:
+
+* **Terminal**: a line that starts with `Compacted while idle, before the prompt cache expired`
+* **[VS Code chat panel](#idle-compaction-in-vs-code-and-the-desktop-app)**: a notice that includes `a summary written while you were away`
+* **[Desktop app](#idle-compaction-in-vs-code-and-the-desktop-app)**: the same notice, inside a row whose label includes `Claude Code notice`. If you don't see that row or its text, switch to the [Verbose view mode](https://code.claude.com/docs/en/desktop.md#switch-view-modes).
Idle compaction is on by default for conversations that meet all of these conditions:
-* **Session**: you're in an interactive terminal session
+* **Session**: you're in an interactive terminal session, or in the VS Code extension's chat panel or the desktop app's Code tab on an [account that Anthropic selects](#idle-compaction-in-vs-code-and-the-desktop-app)
* **Auto-compaction**: [`autoCompactEnabled`](#autocompactenabled) is on
* **Prompt cache**: the conversation is on the [one-hour prompt cache TTL](https://code.claude.com/docs/en/prompt-caching.md#which-ttl-each-request-gets)
* **Feature flags**: Claude Code can [fetch feature flags from Anthropic](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching)
@@ -2441,7 +2445,7 @@ To turn idle compaction off, set this key to `false`.
}
```
-To turn idle compaction off or on from inside a session, run `/config` and change the **Idle compaction** row. Your choice is saved to your user settings and applies right away. The row requires Claude Code v2.1.302 or later. If you run one of those versions and `/config` doesn't show the row, check for these causes:
+To turn idle compaction off or on from inside a terminal session, run `/config` and change the **Idle compaction** row. Your choice is saved to your user settings and applies right away. The row requires Claude Code v2.1.302 or later. If you run one of those versions and `/config` doesn't show the row, check for these causes:
* **Another settings source sets the key**: a value in managed settings, the `--settings` flag, or a project or local settings file overrides your user settings. Change the key in that source instead
* **Feature flags are unavailable**: where Claude Code can't [fetch feature flags from Anthropic](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching), idle compaction doesn't run, so there is nothing to turn off
@@ -2462,6 +2466,18 @@ At the default, a conversation on a 200K context window auto-compacts before it
}
```
+#### Idle compaction in VS Code and the desktop app
+
+A notice like this one means Claude Code [replaced your earlier conversation with a summary](https://code.claude.com/docs/en/context-window.md#what-survives-compaction) that Claude now works from:
+
+```text theme={null}
+Compacted using a summary written while you were away · turn off with "idleCompaction": false in settings.json
+```
+
+You don't need to do anything. To turn idle compaction off, set `idleCompaction` to `false` in `~/.claude/settings.json` or another [settings file](https://code.claude.com/docs/en/settings.md#settings-files-and-who-they-affect).
+
+In the VS Code extension's chat panel and the desktop app's Code tab, idle compaction runs for accounts that Anthropic selects. Claude Code writes the summary while you're away, then compacts with it only if your next message comes an hour or more after the last request.
+
### `plansDirectory`
Choose where Claude Code stores the plan files it writes in [plan mode](https://code.claude.com/docs/en/permission-modes.md#analyze-before-you-edit-with-plan-mode). Claude Code resolves the path relative to the project root.
@@ -3522,6 +3538,7 @@ When you set it to `true`, Claude Code changes which hooks and hook-like command
* **Managed and SDK hooks run**: hooks from managed settings and hooks the [Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview.md) registers in process
* **Force-enabled plugin hooks run**: hooks from plugins your managed settings force-enable through [`enabledPlugins`](#enabledplugins). Claude Code matches on the full `plugin@marketplace` ID, so a plugin with the same name from a different marketplace stays blocked. This lets you distribute vetted hooks through an organization marketplace while blocking everything else. A [mod](https://code.claude.com/docs/en/plugins/mods/overview.md) in such a plugin loads only when it [counts as your organization's](https://code.claude.com/docs/en/plugins/mods/admin.md#install-your-organizations-mods)
+* **Monitors from other plugins are blocked**: a plugin's [monitors](https://code.claude.com/docs/en/plugins/components.md#monitors) don't start unless the plugin is force-enabled. Requires Claude Code v2.1.310 or later
* **Everything else is blocked**: user, project, and local hooks, hooks and mods from other installed plugins, and hooks declared in agent frontmatter. [Mods built into Claude Code](https://code.claude.com/docs/en/plugins/mods/overview.md#mods-built-into-claude-code) keep running. To block only users' mods, set [`allowManagedModsOnly`](https://code.claude.com/docs/en/plugins/mods/admin#set-options-on-the-built-in-guard) instead.
* **Command-sourced plugins are disabled**: Claude Code also disables plugins with a [`command` source](https://code.claude.com/docs/en/plugins/marketplace-reference#command-plugin-source), including plugins force-enabled in managed `enabledPlugins`, unless you set [`disableCommandPluginSources`](#disablecommandpluginsources) to `false` explicitly
* **Marketplace `headersHelper` commands are blocked**: Claude Code also blocks marketplace [`headersHelper` commands](https://code.claude.com/docs/en/plugins/host-marketplace#authenticate-archive-downloads) unless [`disableCommandPluginSources`](#disablecommandpluginsources) is explicitly set to `false`, except for a marketplace that managed settings themselves declare. Requires Claude Code v2.1.238 or later
diff --git a/content/en/docs/claude-code/terminal-config.md b/content/en/docs/claude-code/terminal-config.md
index 57e9dda6da..c7a5bfdc80 100644
--- a/content/en/docs/claude-code/terminal-config.md
+++ b/content/en/docs/claude-code/terminal-config.md
@@ -121,6 +121,8 @@ If it does and you see no status for a session, check for each of these causes:
* **Background session**: a [background session](https://code.claude.com/docs/en/agent-view.md) doesn't report its status to your terminal, even while you're attached to it. Agent view shows its status instead.
* **[`CLAUDE_CODE_DISABLE_TERMINAL_TITLE`](https://code.claude.com/docs/en/env-vars#variables)**: if you set this variable to `1`, Claude Code doesn't check for support or report status. Unset it.
+The tab title doesn't start with a status glyph in a terminal that reports support for the protocol. The terminal shows the session's state itself, so Claude Code leaves out the glyph it puts in front of the title in other terminals.
+
## Configure tmux
When Claude Code runs inside tmux, by default Shift+Enter submits instead of inserting a newline, and desktop notifications and the [progress bar](https://code.claude.com/docs/en/settings-reference.md#terminalprogressbarenabled) never reach the outer terminal. Add these lines to `~/.tmux.conf`, then run `tmux source-file ~/.tmux.conf` to apply them to the running server:
diff --git a/content/en/docs/claude-code/tools-reference.md b/content/en/docs/claude-code/tools-reference.md
index 4cebace4f3..28abd6d0fc 100644
--- a/content/en/docs/claude-code/tools-reference.md
+++ b/content/en/docs/claude-code/tools-reference.md
@@ -258,7 +258,7 @@ These checks must pass for an edit to apply. Before any of them, a path matched
A file that changed on disk after Claude last read it can still be edited when `old_string` matches the current content exactly and unambiguously and Claude Code can read the file without prompting. Matching against the file's current content keeps this safe, and the result notes that the file carries other changes so Claude re-reads it before edits that depend on surrounding content. In any other case, such as a stale `old_string` or one that matches more than once without `replace_all`, Claude reads the file again before editing.
-Claude can also edit a file without a separate Read after it views the file with a Bash command such as `cat` or `grep`. Those commands are `cat`, `nl`, `bat`, `batcat`, `head`, `tail`, `sed -n 'X,Yp'`, `grep`, `egrep`, `fgrep`, and `rg`, each run on one file with no pipes or redirects. A search that prints no matches doesn't count as a read, nor does any command outside this list.
+Claude can also edit a file without a separate Read after viewing it with a Bash command such as `cat` or `grep`. Those commands are `cat`, `nl`, `bat`, `batcat`, `head`, `tail`, `sed -n 'X,Yp'`, `grep`, `egrep`, `fgrep`, and `rg`, each run on one file with no pipes or redirects. If the command printed none of the file's text, as when a search matches nothing, the read-before-edit check still applies.
When Claude views a file this way, Claude Code also loads any [subdirectory `CLAUDE.md`](https://code.claude.com/docs/en/memory#how-claude-md-files-load) and [path-scoped rules](https://code.claude.com/docs/en/memory.md#path-specific-rules) that apply to that file. See [Read and Edit permission rules](https://code.claude.com/docs/en/permissions.md#read-and-edit) for which Bash commands your `Read` and `Edit` deny rules cover.
@@ -383,7 +383,10 @@ When Monitor runs a command, it uses the same [permission rules as Bash](https:/
The [WebSocket source](#websocket-source) has its own approval prompt, which the classifier also decides in auto mode.
-The tool is not available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry. It is also not available when `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. On Windows, the tool is available only when [Git Bash](https://code.claude.com/docs/en/setup.md#set-up-on-windows) is installed.
+Monitor needs a minimum version or Git Bash in these cases:
+
+* **Minimum version**: on Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry, or with `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` set, Monitor requires Claude Code v2.1.310 or later. The requirement applies when [feature-flag fetching](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching) is off
+* **Windows**: the tool is available only when [Git Bash](https://code.claude.com/docs/en/setup.md#set-up-on-windows) is installed
Plugins can declare monitors that start automatically when the plugin is active, instead of asking Claude to start them. See [plugin monitors](https://code.claude.com/docs/en/plugins/components.md#monitors).
diff --git a/content/en/docs/claude-code/web-quickstart.md b/content/en/docs/claude-code/web-quickstart.md
index 2032c7ae4d..49f1a2df56 100644
--- a/content/en/docs/claude-code/web-quickstart.md
+++ b/content/en/docs/claude-code/web-quickstart.md
@@ -177,7 +177,10 @@ When Claude finishes, review the changes, leave feedback on specific lines, and
**1. Open the diff view**
-A diff indicator shows lines added and removed across the session, for example `+42 -18`. Select it to open the diff view, with a file list on the left and changes on the right.
+After Claude pushes its changes to a branch, the **Changes** card in the panel beside the chat shows the lines added and removed across the session, for example `+42 -18`. Click those counts to open the diff view.
+
+* You can also click **Changes** in the session's title bar, or in the bar's **⋮** menu.
+* To show the panel when it's hidden, click the **Show session rail** icon in the session's title bar, or in the bar's **⋮** menu.
The diff compares the session's changes against its base branch by default. To compare against a different branch, select **Compare against** and pick one.
@@ -187,7 +190,10 @@ Select any line in the diff, type your feedback, and press Enter. Comments queue
**3. Create a pull request**
-When the diff looks right, select **Create PR** at the top of the diff view. You can open it as a full PR, a draft, or jump to GitHub's compose page with a generated title and description.
+When the diff looks right, [show the panel again](https://code.claude.com/docs/en/claude-code-on-the-web.md#review-changes) if the **Changes** card is out of view, then create a pull request or a draft from the card:
+
+* Click **Create PR**. Claude Code creates the pull request with a generated title and description.
+* To open a draft instead, right-click **Create PR**, select **Create draft PR** to change what the button does, then click the button
**4. Keep iterating after the PR**
diff --git a/content/en/docs/claude-code/web-scheduled-tasks.md b/content/en/docs/claude-code/web-scheduled-tasks.md
index b443db5e91..33a2594645 100644
--- a/content/en/docs/claude-code/web-scheduled-tasks.md
+++ b/content/en/docs/claude-code/web-scheduled-tasks.md
@@ -293,12 +293,13 @@ Change the repository if needed, choose an event from the [supported events](#su
#### Supported events
-GitHub triggers can subscribe to either of the following event categories. Within each category you can pick a specific action, such as `pull_request.opened`, or react to all actions in the category.
+Choose an event from any of the following categories. Within each category you can pick a specific action, such as `pull_request.opened`, or react to all actions in the category.
| Event | Triggers when |
| :- | :- |
| Pull request | A PR is opened, closed, assigned, labeled, synchronized, or otherwise updated |
| Release | A release is created, published, edited, or deleted |
+| Issue | An issue is opened, edited, closed, reopened, labeled, assigned, or otherwise updated |
#### Filter pull requests
@@ -333,9 +334,13 @@ Click a scheduled task in the list to open its detail page. The detail page show
Click any run to open it as a full session. From there you can see what Claude did, review changes, create a pull request, or continue the conversation. Each run session works like any other session: use the dropdown menu next to the session title to rename, archive, or delete it.
-> [!NOTE]
->
-> A green status in the run list means the session started and exited without an infrastructure error. It does not mean the work your prompt describes succeeded. Open the run to read the transcript and confirm what Claude actually did. Blocked network requests, missing connector tools, and failures in the work itself all surface there rather than in the status indicator.
+Under **History** on the task's detail page, each finished run's row ends with **Error** if the run failed, **Cancelled** if it was cancelled, and neither word if it succeeded. The **Status** filter names the same three outcomes **Failed**, **Cancelled**, and **Succeeded**. These outcomes say how the session ended, not whether Claude completed the work your prompt describes, so open the run and read its transcript to see what happened.
+
+* **Succeeded**: the session ended without Claude Code reporting a failure. Blocked network requests, missing connector tools, and work Claude couldn't complete appear in the transcript rather than on the row
+* **Failed**: the session didn't finish normally. For example, it stopped unexpectedly, ended on an error, or was archived before the run started
+* **Cancelled**: the run didn't fail, and its session was archived. If you archive the session of a run that succeeded, the run changes to **Cancelled**. Nothing in the task needs to change
+
+If a warning appears under **History**, see ["The last run" warnings](#the-last-run-didnt-start).
### Edit and control scheduled tasks
@@ -499,6 +504,21 @@ If the cause is your CLI sign-in or being inside a cloud session, you can still
An Owner in your Team or Enterprise organization has likely turned off the **Scheduled tasks (Was Routines)** toggle at [**Organization settings > Capabilities > Remote sessions**](https://claude.ai/admin-settings/capabilities). On Claude Code v2.1.227 or later, the same toggle also hides `/schedule` in the CLI. This is a server-side organization setting, so it cannot be overridden from your local configuration. Ask an Owner to turn scheduled tasks back on for your organization.
+### "The last run" warnings
+
+When a warning under **History** begins with "The last run", find it in the first column and do what its row says. The warning clears once a later run starts.
+
+| Warning | What to do |
+| :- | :- |
+| "The last run didn't start because your organization had reached its limit on cloud sessions running at once." | The task needs no change. Click **Run now** later, or wait for the next run |
+| "The last run didn't start because its cloud environment couldn't be found or used." | On the task's detail page, open the menu next to its name, select **Edit**, and find the [cloud environment selector](#environments-and-network-access). If it reads **Unavailable environment**, that environment was archived or is no longer available to your account, so choose another one there and save your changes. Otherwise, retry with **Run now** on the detail page, or pick another environment in the selector and save your changes |
+| "The last run was blocked because it couldn't access something it needs, or your organization's policy doesn't allow it." | Check that your [GitHub access](#repositories-and-branch-permissions) covers the task's repositories. If it does, ask an [Owner](https://code.claude.com/docs/en/server-managed-settings.md#access-control) of your Claude organization whether a policy blocks the task |
+| "The last run didn't start because of a problem that's usually temporary." | Click **Run now** to try again, or wait for the next run |
+| "The last run didn't start because its repository or branch wasn't available." | Check on GitHub that each repository in the task has the [branch the run starts from](#repositories-and-branch-permissions). Also check that your [GitHub access](#repositories-and-branch-permissions) covers each repository, and reconnect GitHub if your connection expired |
+| "The last run didn't start because some of its settings weren't accepted." | On the task's detail page, open the menu next to its name and select **Edit**. The dialog doesn't mark which setting wasn't accepted, so check each one there, including the task's name, prompt, model, repositories, environment, connectors, and triggers |
+| "The last run stopped because a usage limit was reached." | For when the task's runs can start again after a usage limit, see [Usage and limits](#usage-and-limits) |
+| "The last run failed." | Click **Run now** to try again, or wait for the next run. The failed run has no session to open |
+
## Related resources
* [`/loop` and in-session scheduling](https://code.claude.com/docs/en/scheduled-tasks): schedule local tasks within an open CLI session
diff --git a/content/github/claude-cookbooks/CLAUDE.md b/content/github/claude-cookbooks/CLAUDE.md
index 0c54d4a411..c06ad4e5e0 100644
--- a/content/github/claude-cookbooks/CLAUDE.md
+++ b/content/github/claude-cookbooks/CLAUDE.md
@@ -61,17 +61,19 @@ style: lint/format
2. **Dependencies:** Use `uv add ` or `uv add --dev `. Never edit pyproject.toml directly.
-3. **Models:** Use current Claude models. Check docs.anthropic.com for latest versions.
- - Sonnet: `claude-sonnet-5`
+3. **Models:** Use current Claude models. Check platform.claude.com/docs for latest versions.
+ - Opus: `claude-opus-5-5`
+ - Sonnet: `claude-sonnet-5-5`
+ - Fable: `claude-fable-5-1`
- Haiku: `claude-haiku-4-5`
- - Opus: `claude-opus-4-8`
- - **Never use dated model IDs** (e.g., `claude-sonnet-4-6-20250514`). Always use the non-dated alias.
+ - **Never use dated model IDs** (e.g., `claude-sonnet-4-5-20250929`). Always use the non-dated alias.
- **Bedrock model IDs** follow a different format. Use the base Bedrock model ID from the docs:
- - Opus 4.8: `anthropic.claude-opus-4-8`
- - Sonnet 5: `anthropic.claude-sonnet-5`
- - Haiku 4.5: `anthropic.claude-haiku-4-5-20251001-v1:0`
- - Prepend `global.` for global endpoints (recommended): `global.anthropic.claude-opus-4-8`
- - Note: older Bedrock models use a dated `-YYYYMMDD-v1:0` suffix (e.g., Haiku 4.5 above); newer ones use the suffix-less `anthropic.claude-` format.
+ - Opus 5.5: `anthropic.claude-opus-5-5`
+ - Sonnet 5.5: `anthropic.claude-sonnet-5-5`
+ - Fable 5.1: `anthropic.claude-fable-5-1`
+ - Haiku 4.5: `anthropic.claude-haiku-4-5`
+ - Prepend `global.` for global endpoints (recommended): `global.anthropic.claude-opus-5-5`
+ - Note: these are the IDs for Bedrock's Messages-API endpoint. Integrations that only go through InvokeModel (for example `boto3` `invoke_model`, or fine-tuning jobs) use the dated form instead, e.g. `anthropic.claude-haiku-4-5-20251001-v1:0`.
4. **Notebooks:**
- Keep outputs in notebooks (intentional for demonstration)
diff --git a/content/github/claude-cookbooks/CONTRIBUTING.md b/content/github/claude-cookbooks/CONTRIBUTING.md
index f06e5c8627..d4498cb0d5 100644
--- a/content/github/claude-cookbooks/CONTRIBUTING.md
+++ b/content/github/claude-cookbooks/CONTRIBUTING.md
@@ -118,8 +118,9 @@ If a hook fails, fix the issues and try committing again.
2. **Use current Claude models**:
- Use model aliases for better maintainability when available
- - Latest Haiku model: `claude-haiku-4-5` (Haiku 4.5)
- - Check current models at: https://docs.claude.com/en/docs/about-claude/models/overview
+ - Current models: `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-fable-5-1`, `claude-haiku-4-5`
+ - Never use dated model IDs; `claude-haiku-4-5` is a good low-cost default for examples
+ - Check current models at: https://platform.claude.com/docs/en/about-claude/models/overview
- Claude will automatically validate model usage in PR reviews
3. **Keep notebooks focused**:
diff --git a/content/github/claude-cookbooks/capabilities/knowledge_graph/guide.ipynb b/content/github/claude-cookbooks/capabilities/knowledge_graph/guide.ipynb
index dbe7179d79..74009a38b4 100644
--- a/content/github/claude-cookbooks/capabilities/knowledge_graph/guide.ipynb
+++ b/content/github/claude-cookbooks/capabilities/knowledge_graph/guide.ipynb
@@ -81,7 +81,7 @@
"client = anthropic.Anthropic()\n",
"\n",
"EXTRACTION_MODEL = \"claude-haiku-4-5\"\n",
- "SYNTHESIS_MODEL = \"claude-sonnet-4-6\""
+ "SYNTHESIS_MODEL = \"claude-sonnet-5-5\""
]
},
{
diff --git a/content/github/claude-cookbooks/capabilities/retrieval_augmented_generation/guide.ipynb b/content/github/claude-cookbooks/capabilities/retrieval_augmented_generation/guide.ipynb
index e9c793eb06..8095436e93 100644
--- a/content/github/claude-cookbooks/capabilities/retrieval_augmented_generation/guide.ipynb
+++ b/content/github/claude-cookbooks/capabilities/retrieval_augmented_generation/guide.ipynb
@@ -16,7 +16,7 @@
"\n",
"3) Implementing advanced techniques to improve RAG including summary indexing and re-ranking with Claude.\n",
"\n",
- "Through a series of targeted improvements, we achieved significant performance gains on the following metrics compared to a basic RAG pipeline (we'll explain what all these metrics *mean* in a bit)\n",
+ "Through a series of targeted improvements, we achieved significant performance gains on the following metrics compared to a basic RAG pipeline (we'll explain what all these metrics *mean* in a bit). These numbers come from the recorded run, which used Claude 3 Haiku for generation and Claude 3.5 Sonnet as the judge, so expect different absolute values when you re-run on current models.\n",
"\n",
"- Avg Precision: 0.43 --> 0.44\n",
"- Avg Recall: 0.66 --> 0.69\n",
@@ -175,7 +175,15 @@
"client = anthropic.Anthropic(\n",
" # This is the default and can be omitted\n",
" api_key=os.getenv(\"ANTHROPIC_API_KEY\"),\n",
- ")"
+ ")\n",
+ "\n",
+ "\n",
+ "def get_text(response):\n",
+ " \"\"\"Concatenate the text blocks of a response.\n",
+ "\n",
+ " Current models may return a leading thinking block, so don't index content[0].\n",
+ " \"\"\"\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\")"
]
},
{
@@ -307,7 +315,7 @@
"source": [
"import json\n",
"import logging\n",
- "import xml.etree.ElementTree as ET # noqa: S314\n",
+ "import re\n",
"from collections.abc import Callable\n",
"from typing import Any\n",
"\n",
@@ -356,7 +364,7 @@
" messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" temperature=0,\n",
" )\n",
- " return response.content[0].text"
+ " return get_text(response)"
]
},
{
@@ -533,7 +541,7 @@
"## End to End Metrics:\n",
"\n",
"### End to End Accuracy\n",
- "We use an LLM-as-judge (Claude 3.5 Sonnet) to evaluate whether the generated answer is correct based on the question and ground truth answer.\n",
+ "We use an LLM-as-judge (Claude Sonnet 5.5) to evaluate whether the generated answer is correct based on the question and ground truth answer.\n",
"\n",
"Formula:\n",
"$$\n",
@@ -647,21 +655,20 @@
"\n",
" try:\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=1500,\n",
- " messages=[\n",
- " {\"role\": \"user\", \"content\": prompt},\n",
- " {\"role\": \"assistant\", \"content\": \"\"},\n",
- " ],\n",
- " temperature=0,\n",
+ " messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" stop_sequences=[\"\"],\n",
" )\n",
"\n",
- " response_text = response.content[0].text\n",
+ " response_text = get_text(response)\n",
" print(response_text)\n",
- " # Parse XML from trusted LLM response\n",
- " evaluation = ET.fromstring(response_text) # noqa: S314\n",
- " is_correct = evaluation.find(\"is_correct\").text.lower() == \"true\"\n",
+ " # Pull out directly; the reply may include the opening\n",
+ " # tag or a short preamble, so don't rely on a fixed root element.\n",
+ " match = re.search(r\"(.*?)\", response_text, re.DOTALL)\n",
+ " if match is None:\n",
+ " raise ValueError(\"no tag in judge response\")\n",
+ " is_correct = match.group(1).strip().lower() == \"true\"\n",
"\n",
" if is_correct:\n",
" correct_answers += 1\n",
@@ -671,8 +678,8 @@
" logging.info(f\"Correct: {is_correct}\")\n",
" logging.info(\"---\")\n",
"\n",
- " except ET.ParseError as e:\n",
- " logging.error(f\"XML parsing error: {e}\")\n",
+ " except ValueError as e:\n",
+ " logging.error(f\"Response parsing error: {e}\")\n",
" is_correct = \"true\" in response_text.lower()\n",
" results.append(is_correct)\n",
" except Exception as e:\n",
@@ -3301,7 +3308,7 @@
" temperature=0,\n",
" )\n",
"\n",
- " summary = response.content[0].text.strip()\n",
+ " summary = get_text(response).strip()\n",
"\n",
" summarized_doc = {\n",
" \"chunk_link\": doc[\"chunk_link\"],\n",
@@ -3500,7 +3507,7 @@
" messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" temperature=0,\n",
" )\n",
- " return response.content[0].text"
+ " return get_text(response)"
]
},
{
@@ -5978,7 +5985,7 @@
"\n",
"This process casts a wider net initially and then uses AI to focus on the most pertinent information. By combining vector-based retrieval with LLM reranking, this approach aims to provide more accurate and contextually appropriate responses to user queries.\n",
"\n",
- "Our evaluations show significant improvements:\n",
+ "In the recorded run (Claude 3 Haiku generating, Claude 3.5 Sonnet judging), our evaluations showed significant improvements:\n",
"- Accuracy increased from 78% in our previous system to 85%.\n",
"- Precision was improved by using our re-ranker to reduce the number of documents shown to the LLM.\n",
"- MRR (Mean Reciprocal Rank) was likely improved by asking Claude to rank the relevance of each document in order.\n",
@@ -6026,7 +6033,7 @@
" )\n",
"\n",
" # Extract the indices from the response\n",
- " response_text = response.content[0].text.strip()\n",
+ " response_text = get_text(response).strip()\n",
" indices_str = response_text\n",
" relevant_indices = []\n",
" for idx in indices_str.split(\",\"):\n",
@@ -6100,7 +6107,7 @@
" messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" temperature=0,\n",
" )\n",
- " return response.content[0].text"
+ " return get_text(response)"
]
},
{
@@ -10394,7 +10401,7 @@
"\n",
"Promptfoo makes it very easy to build automated test suites that compare different models, hyperparameter choices, and prompts against one another. \n",
"\n",
- "As an example, you can run the below cell to see the average performance of Haiku vs 3.5 Sonnet across all of our test cases. "
+ "As an example, you can run the below cell to see the average performance of each provider across all of our test cases. The checked-in `data/end_to_end_results.json` is a recorded run that compared Claude 3 Haiku (\"Haiku: T-0.0\") with Claude 3.5 Sonnet (\"3.5 Sonnet: T-0.0\"). Re-running the promptfoo eval overwrites it with results for the models in `promptfooconfig_end_to_end.yaml`."
]
},
{
diff --git a/content/github/claude-cookbooks/capabilities/summarization/guide.ipynb b/content/github/claude-cookbooks/capabilities/summarization/guide.ipynb
index de3db71037..357633e92f 100644
--- a/content/github/claude-cookbooks/capabilities/summarization/guide.ipynb
+++ b/content/github/claude-cookbooks/capabilities/summarization/guide.ipynb
@@ -100,6 +100,15 @@
"api_key = \"ANTHROPIC_API_KEY\" # Replace ANTHROPIC_API_KEY with your actual API key\n",
"client = anthropic.Anthropic(api_key=api_key)\n",
"\n",
+ "\n",
+ "def get_text(response):\n",
+ " \"\"\"Concatenate the text blocks of a response.\n",
+ "\n",
+ " Current models may return a leading thinking block, so don't index content[0].\n",
+ " \"\"\"\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\")\n",
+ "\n",
+ "\n",
"print(\"Setup complete!\")"
]
},
@@ -185,7 +194,7 @@
"\n",
"Let's start with a simple summarization function using Claude. This is a simple attempt at using Claude to summarize the text from the document above. As we progress through this guide, we will improve on this method.\n",
"\n",
- "One thing to note is while this might seem basic, we are actually using some important functionality of Claude already. One piece worth noting is the use of the assistant role and stop sequences. The assistant preamble tees Claude up to include the summary directly after the final phrase ``. The stop sequence `` then tells Claude to stop generating. This is a pattern we will continue to use throughout this guide."
+ "One thing to note is while this might seem basic, we are actually using some important functionality of Claude already. One piece worth noting is the use of XML tags and stop sequences. The prompt asks Claude to wrap its output in `` tags, so we can strip anything before the opening `` tag, and the stop sequence `` tells Claude to stop generating as soon as the summary is complete. This is a pattern we will continue to use throughout this guide."
]
},
{
@@ -198,23 +207,21 @@
" # Prompt the model to summarize the text\n",
" prompt = f\"\"\"Summarize the following text in bullet points. Focus on the main ideas and key details:\n",
" {text}\n",
+ "\n",
+ " Wrap your entire summary in tags.\n",
" \"\"\"\n",
"\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=max_tokens,\n",
" system=\"You are a legal analyst known for highly accurate and detailed summaries of legal documents.\",\n",
- " messages=[\n",
- " {\"role\": \"user\", \"content\": prompt},\n",
- " {\n",
- " \"role\": \"assistant\",\n",
- " \"content\": \"Here is the summary of the legal document: \",\n",
- " },\n",
- " ],\n",
+ " messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" stop_sequences=[\"\"],\n",
" )\n",
"\n",
- " return response.content[0].text"
+ " # The reply is wrapped in tags (the stop sequence trims the closing one);\n",
+ " # drop anything up to and including the opening tag.\n",
+ " return get_text(response).split(\"\", 1)[-1].strip()"
]
},
{
@@ -302,7 +309,7 @@
" prompt = f\"\"\"Summarize the following text in bullet points. Focus on the main ideas and key details:\n",
" {text}\n",
"\n",
- " Do not preamble.\n",
+ " Do not preamble. Wrap your entire summary in tags.\n",
"\n",
" Use these examples for guidance in summarizing:\n",
"\n",
@@ -338,20 +345,16 @@
" \"\"\"\n",
"\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=max_tokens,\n",
" system=\"You are a legal analyst known for highly accurate and detailed summaries of legal documents.\",\n",
- " messages=[\n",
- " {\"role\": \"user\", \"content\": prompt},\n",
- " {\n",
- " \"role\": \"assistant\",\n",
- " \"content\": \"Here is the summary of the legal document: \",\n",
- " },\n",
- " ],\n",
+ " messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" stop_sequences=[\"\"],\n",
" )\n",
"\n",
- " return response.content[0].text"
+ " # The reply is wrapped in tags (the stop sequence trims the closing one);\n",
+ " # drop anything up to and including the opening tag.\n",
+ " return get_text(response).split(\"\", 1)[-1].strip()"
]
},
{
@@ -451,7 +454,7 @@
" 4. Important dates or deadlines\n",
" 5. Any unusual or notable clauses\n",
"\n",
- " Provide the summary in bullet points under each category.\n",
+ " Provide the summary in bullet points under each category. Wrap your entire summary in tags.\n",
"\n",
" Document text:\n",
" {text}\n",
@@ -459,20 +462,16 @@
" \"\"\"\n",
"\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=max_tokens,\n",
" system=\"You are a legal analyst known for highly accurate and detailed summaries of legal documents.\",\n",
- " messages=[\n",
- " {\"role\": \"user\", \"content\": prompt},\n",
- " {\n",
- " \"role\": \"assistant\",\n",
- " \"content\": \"Here is the summary of the legal document: \",\n",
- " },\n",
- " ],\n",
+ " messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" stop_sequences=[\"\"],\n",
" )\n",
"\n",
- " return response.content[0].text"
+ " # The reply is wrapped in tags (the stop sequence trims the closing one);\n",
+ " # drop anything up to and including the opening tag.\n",
+ " return get_text(response).split(\"\", 1)[-1].strip()"
]
},
{
@@ -554,7 +553,7 @@
"metadata": {},
"outputs": [],
"source": [
- "def guided_sublease_summary(text, model=\"claude-sonnet-4-6\", max_tokens=1000):\n",
+ "def guided_sublease_summary(text, model=\"claude-sonnet-5-5\", max_tokens=1000):\n",
" # Prompt the model to summarize the sublease agreement\n",
" prompt = f\"\"\"Summarize the following sublease agreement. Focus on these key aspects:\n",
"\n",
@@ -572,7 +571,7 @@
" // Add more details as needed\n",
" \n",
"\n",
- " If any information is not explicitly stated in the document, note it as \"Not specified\". Do not preamble.\n",
+ " If any information is not explicitly stated in the document, note it as \"Not specified\". Do not preamble. Wrap your entire summary in tags.\n",
"\n",
" Sublease agreement text:\n",
" {text}\n",
@@ -583,17 +582,13 @@
" model=model,\n",
" max_tokens=max_tokens,\n",
" system=\"You are a legal analyst specializing in real estate law, known for highly accurate and detailed summaries of sublease agreements.\",\n",
- " messages=[\n",
- " {\"role\": \"user\", \"content\": prompt},\n",
- " {\n",
- " \"role\": \"assistant\",\n",
- " \"content\": \"Here is the summary of the sublease agreement: \",\n",
- " },\n",
- " ],\n",
+ " messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" stop_sequences=[\"\"],\n",
" )\n",
"\n",
- " return response.content[0].text"
+ " # The reply is wrapped in tags (the stop sequence trims the closing one);\n",
+ " # drop anything up to and including the opening tag.\n",
+ " return get_text(response).split(\"\", 1)[-1].strip()"
]
},
{
@@ -783,7 +778,7 @@
"\n",
" # Iterate over chunks and summarize each one\n",
" # We use guided_legal_summary here, but you can use basic_summarize or any other summarization function\n",
- " # Note that we'll also use haiku for the interim summaries, and the 3.5 sonnet for the final summary\n",
+ " # Note that we'll also use Haiku for the interim summaries, and Sonnet for the final summary\n",
" chunk_summaries = [\n",
" guided_sublease_summary(chunk, model=\"claude-haiku-4-5\", max_tokens=max_tokens)\n",
" for chunk in chunks\n",
@@ -809,26 +804,22 @@
" // Add more details as needed\n",
" \n",
"\n",
- " If any information is not explicitly stated in the document, note it as \"Not specified\".\n",
+ " If any information is not explicitly stated in the document, note it as \"Not specified\". Wrap your entire summary in tags.\n",
"\n",
" Summary:\n",
" \"\"\"\n",
"\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=max_tokens,\n",
" system=\"You are a legal expert that summarizes notes on one document.\",\n",
- " messages=[\n",
- " {\"role\": \"user\", \"content\": final_summary_prompt},\n",
- " {\n",
- " \"role\": \"assistant\",\n",
- " \"content\": \"Here is the summary of the legal document: \",\n",
- " },\n",
- " ],\n",
+ " messages=[{\"role\": \"user\", \"content\": final_summary_prompt}],\n",
" stop_sequences=[\"\"],\n",
" )\n",
"\n",
- " return response.content[0].text\n",
+ " # The reply is wrapped in tags (the stop sequence trims the closing one);\n",
+ " # drop anything up to and including the opening tag.\n",
+ " return get_text(response).split(\"\", 1)[-1].strip()\n",
"\n",
"\n",
"# Example usage\n",
@@ -903,7 +894,7 @@
" // Add more details as needed\n",
" \n",
"\n",
- " If any information is not explicitly stated in the document, note it as \"Not specified\".\n",
+ " If any information is not explicitly stated in the document, note it as \"Not specified\". Wrap your entire summary in tags.\n",
"\n",
" Sublease agreement text:\n",
" {content[:2000]}...\n",
@@ -912,19 +903,13 @@
" \"\"\"\n",
"\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " max_tokens=500,\n",
- " temperature=0.2,\n",
- " messages=[\n",
- " {\"role\": \"user\", \"content\": prompt},\n",
- " {\n",
- " \"role\": \"assistant\",\n",
- " \"content\": \"Here is the summary of the legal document: \",\n",
- " },\n",
- " ],\n",
+ " model=\"claude-sonnet-5-5\",\n",
+ " max_tokens=1500,\n",
+ " messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" stop_sequences=[\"\"],\n",
" )\n",
- " return response.content[0].text\n",
+ " # Drop anything up to and including the opening tag\n",
+ " return get_text(response).split(\"\", 1)[-1].strip()\n",
"\n",
" def rank_documents(self, query: str, top_k: int = 3) -> list[tuple[str, float]]:\n",
" \"\"\"\n",
@@ -941,7 +926,7 @@
" temperature=0,\n",
" messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" )\n",
- " ranked_score = float(response.content[0].text)\n",
+ " ranked_score = float(get_text(response))\n",
" ranked_scores.append(ranked_score)\n",
"\n",
" ranked_indices = np.argsort(ranked_scores)[::-1][:top_k]\n",
@@ -964,13 +949,12 @@
" Relevant clauses or sections (separated by '---'):\"\"\"\n",
"\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=1000,\n",
- " temperature=0,\n",
" messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" )\n",
"\n",
- " clauses = re.split(r\"\\n\\s*---\\s*\\n\", response.content[0].text.strip())\n",
+ " clauses = re.split(r\"\\n\\s*---\\s*\\n\", get_text(response).strip())\n",
" return [clause.strip() for clause in clauses if clause.strip()]"
]
},
@@ -1296,6 +1280,9 @@
" df[f\"{col}_result\"], df[f\"{col}_score\"] = zip(*df[col].apply(extract_result), strict=False)\n",
"\n",
"# Prepare data for grouped accuracy score\n",
+ "# These labels match the provider columns in the checked-in data/results.csv, which is a recorded\n",
+ "# run of Claude 3.5 Sonnet vs Claude 3 Haiku. If you re-run the promptfoo eval, change them to\n",
+ "# match the provider labels in evaluation/promptfooconfig.yaml (\"Sonnet\", \"Haiku\").\n",
"models = [\"3.5 Sonnet\", \"3.0 Haiku\"]\n",
"prompts = [\"basic_summarize\", \"guided_legal_summary\", \"summarize_long_document\"]\n",
"\n",
@@ -1341,7 +1328,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Looking at the results, it seems like our best performer is 3.5 Sonnet, with a 66% pass rate across all evals and only 3 failed tests out of 45 (when one test fails for a prompt, it's deemed a fail). And this is just the beginning – we are using entirely notional data here that was either (a) generated by Claude, or (b) taken from the SEC gov website. We can do much better when we have real data, because we know more about the distinct problem set we are working with."
+ "Looking at the results of the recorded run checked in as `data/results.csv` (Claude 3.5 Sonnet vs Claude 3 Haiku), the best performer was 3.5 Sonnet, with a 66% pass rate across all evals and only 3 failed tests out of 45 (when one test fails for a prompt, it's deemed a fail). And this is just the beginning – we are using entirely notional data here that was either (a) generated by Claude, or (b) taken from the SEC gov website. We can do much better when we have real data, because we know more about the distinct problem set we are working with."
]
},
{
@@ -1355,7 +1342,7 @@
"1. Analyze the Promptfoo results to identify strengths and weaknesses – for example, it seems our contains eval was failing a lot. This is probably because some of the documents don't contain the information which is required in the XML tags. We should refine this eval if we are to accurately assess performance (but this is just an example!).\n",
"2. Refine prompts to address specific issues (e.g., improve conciseness or completeness) – we saw that multi-shot was an initial really good first attempt. This is somethign we should incorporate alongside some of the advanced techniques to improve performance further.\n",
"3. Experiment with different chunking strategies for long documents.\n",
- "4. Fine-tune temperature and max_tokens parameters.\n",
+ "4. Tune the `max_tokens` parameter (sampling parameters such as `temperature` are not supported on current Sonnet and Opus models).\n",
"5. Implement post-processing steps to enhance summary quality.\n",
"\n",
"## Conclusion and Best Practices\n",
diff --git a/content/github/claude-cookbooks/capabilities/text_to_sql/guide.ipynb b/content/github/claude-cookbooks/capabilities/text_to_sql/guide.ipynb
index ca4fdcab27..f0d3043160 100644
--- a/content/github/claude-cookbooks/capabilities/text_to_sql/guide.ipynb
+++ b/content/github/claude-cookbooks/capabilities/text_to_sql/guide.ipynb
@@ -107,7 +107,7 @@
"\n",
"# Initialize the Anthropic client\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-sonnet-4-6\"\n",
+ "MODEL_NAME = \"claude-sonnet-5-5\"\n",
"\n",
"# Filepath to the SQLite database\n",
"DATABASE_PATH = \"data/data.db\""
@@ -701,10 +701,10 @@
" response = client.messages.create(\n",
" model=MODEL_NAME,\n",
" max_tokens=1000,\n",
- " temperature=0,\n",
" messages=[{\"role\": \"user\", \"content\": prompt}],\n",
" )\n",
- " return response.content[0].text.strip()\n",
+ " # Read the text blocks by type; current models may return a leading thinking block\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\").strip()\n",
"\n",
"\n",
"# Generate SQL\n",
@@ -2134,7 +2134,7 @@
"\n",
"The tests in our framework vary in difficulty and evaluate the system across several dimensions:\n",
"\n",
- "1. **Model Type**: We evaluate both Claude 3 Haiku and Claude 3.5 Sonnet.\n",
+ "1. **Model Type**: We evaluate both a Haiku model and a Sonnet model (see `evaluation/promptfooconfig.yaml`).\n",
"2. **Syntax**: We check if the generated SQL is syntactically valid and can be executed without errors. This is a basic requirement for any Text-to-SQL system.\n",
"3. **Query Semantics**: We verify if the generated SQL correctly captures the intent of the natural language query -- for example, correct table selections, proper joins, and appropriate use of aggregations and groupings.\n",
"4. **Result Correctness**: We execute the generated SQL against a test database and compare the results with expected outcomes. This ensures that the query not only looks correct but also produces the right data.\n",
@@ -2142,7 +2142,7 @@
"\n",
"### Results\n",
"\n",
- "We'll use the code below to visualize our results. You can see that Claude 3.5 Sonnet more consistently passes our assertions using the techniques we covered, but it may incur slightly higher latency, cost, or token usage than Claude 3 Haiku.\n",
+ "We'll use the code below to visualize the results of a recorded run that compared Claude 3 Haiku (\"3H\") with Claude 3.5 Sonnet (\"3.5S\"). The pass rates, latencies, token counts, and costs are hardcoded from that run, so re-run the promptfoo eval to get numbers for current models. In that run, Claude 3.5 Sonnet more consistently passed our assertions using the techniques we covered, but incurred higher latency, cost, and token usage than Claude 3 Haiku.\n",
"\n",
"You can create and use evaluations like this one to make the appropriate tradeoffs based on your use case."
]
@@ -2167,7 +2167,8 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
- "# Data\n",
+ "# Data from the recorded promptfoo run (Claude 3 Haiku = \"3H\", Claude 3.5 Sonnet = \"3.5S\").\n",
+ "# Replace with your own numbers after re-running the eval on current models.\n",
"models = [\n",
" \"3H Basic\",\n",
" \"3H Few-Shot\",\n",
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/00_The_one_liner_research_agent.ipynb b/content/github/claude-cookbooks/claude_agent_sdk/00_The_one_liner_research_agent.ipynb
index 7c43115931..09728bd026 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/00_The_one_liner_research_agent.ipynb
+++ b/content/github/claude-cookbooks/claude_agent_sdk/00_The_one_liner_research_agent.ipynb
@@ -91,7 +91,7 @@
"\n",
"load_dotenv()\n",
"\n",
- "MODEL = \"claude-opus-4-6\""
+ "MODEL = \"claude-opus-5-5\""
]
},
{
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/01_The_chief_of_staff_agent.ipynb b/content/github/claude-cookbooks/claude_agent_sdk/01_The_chief_of_staff_agent.ipynb
index 9dde242617..5324e09a5c 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/01_The_chief_of_staff_agent.ipynb
+++ b/content/github/claude-cookbooks/claude_agent_sdk/01_The_chief_of_staff_agent.ipynb
@@ -27,8 +27,8 @@
"load_dotenv()\n",
"\n",
"# Define the model to use throughout this notebook\n",
- "# Using Opus 4.6 for its superior planning and reasoning capabilities\n",
- "MODEL = \"claude-opus-4-6\"\n",
+ "# Using Opus 5.5 for its superior planning and reasoning capabilities\n",
+ "MODEL = \"claude-opus-5-5\"\n",
"print(f\"📋 Notebook configured to use: {MODEL}\")"
]
},
@@ -945,7 +945,7 @@
"# Plan Mode Configuration\n",
"# =============================================================================\n",
"\n",
- "# Note: MODEL is defined in cell-0 as \"claude-opus-4-6\"\n",
+ "# Note: MODEL is defined in cell-0 as \"claude-opus-5-5\"\n",
"# Opus excels at complex planning tasks\n",
"\n",
"# The prompt is carefully crafted to:\n",
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/02_The_observability_agent.ipynb b/content/github/claude-cookbooks/claude_agent_sdk/02_The_observability_agent.ipynb
index fd22e36741..a5f75609ca 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/02_The_observability_agent.ipynb
+++ b/content/github/claude-cookbooks/claude_agent_sdk/02_The_observability_agent.ipynb
@@ -115,7 +115,7 @@
"messages = []\n",
"async with ClaudeSDKClient(\n",
" options=ClaudeAgentOptions(\n",
- " model=\"claude-opus-4-6\",\n",
+ " model=\"claude-opus-5-5\",\n",
" mcp_servers=git_mcp,\n",
" allowed_tools=[\"mcp__git\"],\n",
" # disallowed_tools ensures the agent ONLY uses MCP tools, not Bash with git commands\n",
@@ -274,7 +274,7 @@
"messages = []\n",
"async with ClaudeSDKClient(\n",
" options=ClaudeAgentOptions(\n",
- " model=\"claude-opus-4-6\",\n",
+ " model=\"claude-opus-5-5\",\n",
" mcp_servers=github_mcp,\n",
" allowed_tools=[\"mcp__github\"],\n",
" # disallowed_tools ensures the agent ONLY uses MCP tools, not Bash with gh CLI\n",
@@ -427,7 +427,7 @@
"messages = []\n",
"async with ClaudeSDKClient(\n",
" options=ClaudeAgentOptions(\n",
- " model=\"claude-opus-4-6\",\n",
+ " model=\"claude-opus-5-5\",\n",
" mcp_servers=github_mcp,\n",
" allowed_tools=[\"mcp__github\"],\n",
" # IMPORTANT: disallowed_tools is required to actually RESTRICT tool usage.\n",
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/03_The_site_reliability_agent.ipynb b/content/github/claude-cookbooks/claude_agent_sdk/03_The_site_reliability_agent.ipynb
index 21f3c6080a..c07a358cc5 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/03_The_site_reliability_agent.ipynb
+++ b/content/github/claude-cookbooks/claude_agent_sdk/03_The_site_reliability_agent.ipynb
@@ -4,7 +4,7 @@
"cell_type": "markdown",
"id": "ec26b9b9",
"metadata": {},
- "source": "# The SRE Incident Response Agent\n\n## Introduction\n\nIt's 3 AM, your pager goes off, and the API is throwing 500s. You're half-awake, staring at dashboards, correlating metrics and logs across a dozen services while customer impact grows by the minute. This notebook builds an **SRE incident response agent** that handles that workflow autonomously: investigating incidents, identifying root causes, applying remediations, and documenting the results.\n\nIn Notebook 02, we built an observability agent that could *read* from external systems. This notebook goes further. The agent can also **take action**, editing configuration files and restarting services to fix the problems it finds. It uses the [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python) with [MCP](https://modelcontextprotocol.io/introduction) tools scoped for safe infrastructure access.\n\n### What you'll learn\n\n- How to give agents **safe write access** to infrastructure by scoping MCP tools with restricted directories, command allowlists, and validation hooks\n- Why **clear tool descriptions** drive autonomous agent behavior more effectively than elaborate prompts\n- How agents can **synthesize across production signals** like metrics, logs, alerts, and configuration to build a coherent diagnosis that no single data source could reveal on its own\n- How to structure **human-in-the-loop workflows** that separate investigation from remediation, so you control when agents act autonomously\n\nAt the end, we provide guidance on connecting the agent to your own infrastructure and extending it with the platforms your team already uses.\n\n### Prerequisites\n\nTo run this notebook, you will need:\n\n- **Docker** running locally for the simulated infrastructure ([installation guide](https://docs.docker.com/get-docker/))\n- **Anthropic API key** to run the agent via the Claude Agent SDK ([get your API key](https://platform.claude.ai/))\n- **Python 3.11+** with the `claude-agent-sdk` and `httpx` packages installed\n- **[`infra_setup.py`](https://github.com/anthropics/claude-cookbooks/tree/main/claude_agent_sdk/site_reliability_agent/infra_setup.py)** and **[`sre_mcp_server.py`](https://github.com/anthropics/claude-cookbooks/tree/main/claude_agent_sdk/site_reliability_agent/sre_mcp_server.py)** in the same directory as this notebook (included in the repository)\n\nYou won't need any additional external accounts to run the core steps of this notebook. The infrastructure (PostgreSQL, Prometheus, API server) runs entirely in local Docker containers. Later sections provide guidance on extending the agent with external production services.\n\n> **Running from the [cookbooks repo](https://github.com/anthropics/claude-cookbooks)?** Ensure your working directory is `claude_agent_sdk/site_reliability_agent/` before running the notebook."
+ "source": "# The SRE Incident Response Agent\n\n## Introduction\n\nIt's 3 AM, your pager goes off, and the API is throwing 500s. You're half-awake, staring at dashboards, correlating metrics and logs across a dozen services while customer impact grows by the minute. This notebook builds an **SRE incident response agent** that handles that workflow autonomously: investigating incidents, identifying root causes, applying remediations, and documenting the results.\n\nIn Notebook 02, we built an observability agent that could *read* from external systems. This notebook goes further. The agent can also **take action**, editing configuration files and restarting services to fix the problems it finds. It uses the [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python) with [MCP](https://modelcontextprotocol.io/introduction) tools scoped for safe infrastructure access.\n\n### What you'll learn\n\n- How to give agents **safe write access** to infrastructure by scoping MCP tools with restricted directories, command allowlists, and validation hooks\n- Why **clear tool descriptions** drive autonomous agent behavior more effectively than elaborate prompts\n- How agents can **synthesize across production signals** like metrics, logs, alerts, and configuration to build a coherent diagnosis that no single data source could reveal on its own\n- How to structure **human-in-the-loop workflows** that separate investigation from remediation, so you control when agents act autonomously\n\nAt the end, we provide guidance on connecting the agent to your own infrastructure and extending it with the platforms your team already uses.\n\n### Prerequisites\n\nTo run this notebook, you will need:\n\n- **Docker** running locally for the simulated infrastructure ([installation guide](https://docs.docker.com/get-docker/))\n- **Anthropic API key** to run the agent via the Claude Agent SDK ([get your API key](https://platform.claude.com/))\n- **Python 3.11+** with the `claude-agent-sdk` and `httpx` packages installed\n- **[`infra_setup.py`](https://github.com/anthropics/claude-cookbooks/tree/main/claude_agent_sdk/site_reliability_agent/infra_setup.py)** and **[`sre_mcp_server.py`](https://github.com/anthropics/claude-cookbooks/tree/main/claude_agent_sdk/site_reliability_agent/sre_mcp_server.py)** in the same directory as this notebook (included in the repository)\n\nYou won't need any additional external accounts to run the core steps of this notebook. The infrastructure (PostgreSQL, Prometheus, API server) runs entirely in local Docker containers. Later sections provide guidance on extending the agent with external production services.\n\n> **Running from the [cookbooks repo](https://github.com/anthropics/claude-cookbooks)?** Ensure your working directory is `claude_agent_sdk/site_reliability_agent/` before running the notebook."
},
{
"cell_type": "markdown",
@@ -37,7 +37,34 @@
"id": "6b466683",
"metadata": {},
"outputs": [],
- "source": "import os\nimport sys\nimport shlex\nimport subprocess\nimport time\nfrom typing import Any\nfrom pathlib import Path\n\nimport httpx\nfrom dotenv import load_dotenv\n\nfrom claude_agent_sdk import (\n ClaudeAgentOptions,\n query,\n AssistantMessage,\n TextBlock,\n ToolUseBlock,\n ResultMessage,\n)\n\nload_dotenv()\n\nif not os.environ.get(\"ANTHROPIC_API_KEY\"):\n raise ValueError(\"ANTHROPIC_API_KEY not set. Add it to a .env file.\")\n\nMODEL = \"claude-opus-4-6\""
+ "source": [
+ "import os\n",
+ "import shlex\n",
+ "import subprocess\n",
+ "import sys\n",
+ "import time\n",
+ "from pathlib import Path\n",
+ "from typing import Any\n",
+ "\n",
+ "import httpx\n",
+ "from dotenv import load_dotenv\n",
+ "\n",
+ "from claude_agent_sdk import (\n",
+ " AssistantMessage,\n",
+ " ClaudeAgentOptions,\n",
+ " ResultMessage,\n",
+ " TextBlock,\n",
+ " ToolUseBlock,\n",
+ " query,\n",
+ ")\n",
+ "\n",
+ "load_dotenv()\n",
+ "\n",
+ "if not os.environ.get(\"ANTHROPIC_API_KEY\"):\n",
+ " raise ValueError(\"ANTHROPIC_API_KEY not set. Add it to a .env file.\")\n",
+ "\n",
+ "MODEL = \"claude-opus-5-5\""
+ ]
},
{
"cell_type": "markdown",
@@ -76,7 +103,7 @@
" \"infra_setup.py not found — ensure both setup scripts are in the same directory as this notebook.\"\n",
")\n",
"\n",
- "subprocess.run([sys.executable, \"infra_setup.py\"], check=True)"
+ "subprocess.run([sys.executable, \"infra_setup.py\"], check=True) # noqa: S603, S607"
]
},
{
@@ -257,7 +284,107 @@
"id": "5a1e9fbe",
"metadata": {},
"outputs": [],
- "source": "SRE_PROJECT_ROOT = os.getcwd()\n\n\nasync def read_config_file(path: str) -> dict[str, Any]:\n \"\"\"Read a config file, restricted to the config/ directory.\"\"\"\n full_path = Path(os.path.join(SRE_PROJECT_ROOT, path)).resolve()\n allowed_root = Path(SRE_PROJECT_ROOT, \"config\").resolve()\n if not full_path.is_relative_to(allowed_root):\n return {\n \"content\": [\n {\"type\": \"text\", \"text\": \"Error: Can only read from config/ directory\"}\n ],\n \"isError\": True,\n }\n with open(full_path, \"r\") as f:\n content = f.read()\n return {\"content\": [{\"type\": \"text\", \"text\": content}], \"isError\": False}\n\n\nasync def edit_config_file(path: str, old_value: str, new_value: str) -> dict[str, Any]:\n \"\"\"Edit a config file by replacing old_value with new_value. Restricted to config/ directory.\"\"\"\n full_path = Path(os.path.join(SRE_PROJECT_ROOT, path)).resolve()\n allowed_root = Path(SRE_PROJECT_ROOT, \"config\").resolve()\n if not full_path.is_relative_to(allowed_root):\n return {\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Error: Can only edit files in config/ directory\",\n }\n ],\n \"isError\": True,\n }\n with open(full_path, \"r\") as f:\n content = f.read()\n if old_value not in content:\n return {\n \"content\": [\n {\"type\": \"text\", \"text\": f\"Error: '{old_value}' not found in {path}\"}\n ],\n \"isError\": True,\n }\n new_content = content.replace(old_value, new_value, 1)\n with open(full_path, \"w\") as f:\n f.write(new_content)\n return {\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": f\"Updated {path}: replaced '{old_value}' with '{new_value}'\",\n }\n ],\n \"isError\": False,\n }\n\n\nasync def run_shell_command(command: str) -> dict[str, Any]:\n \"\"\"Run a shell command. Restricted to docker/docker-compose commands.\"\"\"\n args = shlex.split(command)\n if not args or args[0] not in (\"docker-compose\", \"docker\"):\n return {\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Error: Only docker and docker-compose commands are allowed\",\n }\n ],\n \"isError\": True,\n }\n result = subprocess.run(\n args, capture_output=True, text=True, cwd=SRE_PROJECT_ROOT, timeout=60\n )\n output = result.stdout + result.stderr\n return {\n \"content\": [{\"type\": \"text\", \"text\": output or \"(no output)\"}],\n \"isError\": result.returncode != 0,\n }\n\n\nasync def get_container_logs(container: str, lines: int = 50) -> dict[str, Any]:\n \"\"\"Get container logs. Validates container name against whitelist.\"\"\"\n allowed = {\"api-server\", \"postgres\", \"prometheus\", \"traffic-generator\"}\n if container not in allowed:\n return {\n \"content\": [\n {\"type\": \"text\", \"text\": f\"Error: Container must be one of {allowed}\"}\n ],\n \"isError\": True,\n }\n result = subprocess.run(\n [\n \"docker-compose\",\n \"-f\",\n \"config/docker-compose.yml\",\n \"logs\",\n \"--tail\",\n str(lines),\n container,\n ],\n capture_output=True,\n text=True,\n cwd=SRE_PROJECT_ROOT,\n )\n return {\n \"content\": [\n {\"type\": \"text\", \"text\": result.stdout or result.stderr or \"(no logs)\"}\n ],\n \"isError\": False,\n }"
+ "source": [
+ "SRE_PROJECT_ROOT = os.getcwd()\n",
+ "\n",
+ "\n",
+ "async def read_config_file(path: str) -> dict[str, Any]:\n",
+ " \"\"\"Read a config file, restricted to the config/ directory.\"\"\"\n",
+ " full_path = Path(os.path.join(SRE_PROJECT_ROOT, path)).resolve()\n",
+ " allowed_root = Path(SRE_PROJECT_ROOT, \"config\").resolve()\n",
+ " if not full_path.is_relative_to(allowed_root):\n",
+ " return {\n",
+ " \"content\": [{\"type\": \"text\", \"text\": \"Error: Can only read from config/ directory\"}],\n",
+ " \"isError\": True,\n",
+ " }\n",
+ " with open(full_path) as f:\n",
+ " content = f.read()\n",
+ " return {\"content\": [{\"type\": \"text\", \"text\": content}], \"isError\": False}\n",
+ "\n",
+ "\n",
+ "async def edit_config_file(path: str, old_value: str, new_value: str) -> dict[str, Any]:\n",
+ " \"\"\"Edit a config file by replacing old_value with new_value. Restricted to config/ directory.\"\"\"\n",
+ " full_path = Path(os.path.join(SRE_PROJECT_ROOT, path)).resolve()\n",
+ " allowed_root = Path(SRE_PROJECT_ROOT, \"config\").resolve()\n",
+ " if not full_path.is_relative_to(allowed_root):\n",
+ " return {\n",
+ " \"content\": [\n",
+ " {\n",
+ " \"type\": \"text\",\n",
+ " \"text\": \"Error: Can only edit files in config/ directory\",\n",
+ " }\n",
+ " ],\n",
+ " \"isError\": True,\n",
+ " }\n",
+ " with open(full_path) as f:\n",
+ " content = f.read()\n",
+ " if old_value not in content:\n",
+ " return {\n",
+ " \"content\": [{\"type\": \"text\", \"text\": f\"Error: '{old_value}' not found in {path}\"}],\n",
+ " \"isError\": True,\n",
+ " }\n",
+ " new_content = content.replace(old_value, new_value, 1)\n",
+ " with open(full_path, \"w\") as f:\n",
+ " f.write(new_content)\n",
+ " return {\n",
+ " \"content\": [\n",
+ " {\n",
+ " \"type\": \"text\",\n",
+ " \"text\": f\"Updated {path}: replaced '{old_value}' with '{new_value}'\",\n",
+ " }\n",
+ " ],\n",
+ " \"isError\": False,\n",
+ " }\n",
+ "\n",
+ "\n",
+ "async def run_shell_command(command: str) -> dict[str, Any]:\n",
+ " \"\"\"Run a shell command. Restricted to docker/docker-compose commands.\"\"\"\n",
+ " args = shlex.split(command)\n",
+ " if not args or args[0] not in (\"docker-compose\", \"docker\"):\n",
+ " return {\n",
+ " \"content\": [\n",
+ " {\n",
+ " \"type\": \"text\",\n",
+ " \"text\": \"Error: Only docker and docker-compose commands are allowed\",\n",
+ " }\n",
+ " ],\n",
+ " \"isError\": True,\n",
+ " }\n",
+ " result = subprocess.run(args, capture_output=True, text=True, cwd=SRE_PROJECT_ROOT, timeout=60) # noqa: S603\n",
+ " output = result.stdout + result.stderr\n",
+ " return {\n",
+ " \"content\": [{\"type\": \"text\", \"text\": output or \"(no output)\"}],\n",
+ " \"isError\": result.returncode != 0,\n",
+ " }\n",
+ "\n",
+ "\n",
+ "async def get_container_logs(container: str, lines: int = 50) -> dict[str, Any]:\n",
+ " \"\"\"Get container logs. Validates container name against whitelist.\"\"\"\n",
+ " allowed = {\"api-server\", \"postgres\", \"prometheus\", \"traffic-generator\"}\n",
+ " if container not in allowed:\n",
+ " return {\n",
+ " \"content\": [{\"type\": \"text\", \"text\": f\"Error: Container must be one of {allowed}\"}],\n",
+ " \"isError\": True,\n",
+ " }\n",
+ " result = subprocess.run( # noqa: S603\n",
+ " [ # noqa: S607\n",
+ " \"docker-compose\",\n",
+ " \"-f\",\n",
+ " \"config/docker-compose.yml\",\n",
+ " \"logs\",\n",
+ " \"--tail\",\n",
+ " str(lines),\n",
+ " container,\n",
+ " ],\n",
+ " capture_output=True,\n",
+ " text=True,\n",
+ " cwd=SRE_PROJECT_ROOT,\n",
+ " )\n",
+ " return {\n",
+ " \"content\": [{\"type\": \"text\", \"text\": result.stdout or result.stderr or \"(no logs)\"}],\n",
+ " \"isError\": False,\n",
+ " }"
+ ]
},
{
"cell_type": "markdown",
@@ -352,9 +479,7 @@
"\n",
" if data[\"status\"] != \"success\" or not data[\"data\"][\"result\"]:\n",
" return {\n",
- " \"content\": [\n",
- " {\"type\": \"text\", \"text\": f\"No results for query: {promql}\"}\n",
- " ],\n",
+ " \"content\": [{\"type\": \"text\", \"text\": f\"No results for query: {promql}\"}],\n",
" \"isError\": False,\n",
" }\n",
"\n",
@@ -391,8 +516,7 @@
" \"content\": [\n",
" {\n",
" \"type\": \"text\",\n",
- " \"text\": f\"Available metrics ({len(metrics)}):\\n\"\n",
- " + \"\\n\".join(sorted(metrics)),\n",
+ " \"text\": f\"Available metrics ({len(metrics)}):\\n\" + \"\\n\".join(sorted(metrics)),\n",
" }\n",
" ],\n",
" \"isError\": False,\n",
@@ -426,9 +550,7 @@
" data = response.json()\n",
" if data[\"status\"] == \"success\" and data[\"data\"][\"result\"]:\n",
" for r in data[\"data\"][\"result\"]:\n",
- " label = r[\"metric\"].get(\n",
- " \"service\", r[\"metric\"].get(\"__name__\", name)\n",
- " )\n",
+ " label = r[\"metric\"].get(\"service\", r[\"metric\"].get(\"__name__\", name))\n",
" results[f\"{name}[{label}]\"] = r[\"value\"][1]\n",
" else:\n",
" results[name] = \"no data\"\n",
@@ -535,14 +657,14 @@
"outputs": [],
"source": [
"config_path = os.path.join(SRE_PROJECT_ROOT, \"config\", \"api-server.env\")\n",
- "with open(config_path, \"r\") as f:\n",
+ "with open(config_path) as f:\n",
" content = f.read()\n",
"if \"DB_POOL_SIZE=1\" in content:\n",
" with open(config_path, \"w\") as f:\n",
" f.write(content.replace(\"DB_POOL_SIZE=1\", \"DB_POOL_SIZE=20\"))\n",
"\n",
- "result = subprocess.run(\n",
- " [\"docker-compose\", \"-f\", \"config/docker-compose.yml\", \"up\", \"-d\"],\n",
+ "result = subprocess.run( # noqa: S603\n",
+ " [\"docker-compose\", \"-f\", \"config/docker-compose.yml\", \"up\", \"-d\"], # noqa: S607\n",
" cwd=SRE_PROJECT_ROOT,\n",
" capture_output=True,\n",
" text=True,\n",
@@ -786,15 +908,15 @@
"outputs": [],
"source": [
"config_path = os.path.join(SRE_PROJECT_ROOT, \"config\", \"api-server.env\")\n",
- "with open(config_path, \"r\") as f:\n",
+ "with open(config_path) as f:\n",
" content = f.read()\n",
"\n",
"content = content.replace(\"DB_POOL_SIZE=20\", \"DB_POOL_SIZE=1\")\n",
"with open(config_path, \"w\") as f:\n",
" f.write(content)\n",
"\n",
- "subprocess.run(\n",
- " [\"docker-compose\", \"-f\", \"config/docker-compose.yml\", \"up\", \"-d\", \"api-server\"],\n",
+ "subprocess.run( # noqa: S603\n",
+ " [\"docker-compose\", \"-f\", \"config/docker-compose.yml\", \"up\", \"-d\", \"api-server\"], # noqa: S607\n",
" cwd=SRE_PROJECT_ROOT,\n",
" capture_output=True,\n",
" text=True,\n",
@@ -1214,7 +1336,7 @@
"outputs": [],
"source": [
"config_path = os.path.join(SRE_PROJECT_ROOT, \"config\", \"api-server.env\")\n",
- "with open(config_path, \"r\") as f:\n",
+ "with open(config_path) as f:\n",
" content = f.read()\n",
"if \"DB_POOL_SIZE=1\" in content:\n",
" with open(config_path, \"w\") as f:\n",
@@ -1223,8 +1345,8 @@
"else:\n",
" print(\"DB_POOL_SIZE=20 confirmed (agent fixed it successfully)\")\n",
"\n",
- "subprocess.run(\n",
- " [\"docker-compose\", \"-f\", \"config/docker-compose.yml\", \"down\"],\n",
+ "subprocess.run( # noqa: S603\n",
+ " [\"docker-compose\", \"-f\", \"config/docker-compose.yml\", \"down\"], # noqa: S607\n",
" cwd=SRE_PROJECT_ROOT,\n",
" capture_output=True,\n",
" text=True,\n",
@@ -1237,7 +1359,7 @@
" files = sorted(os.listdir(postmortems_dir))\n",
" if files:\n",
" print(f\"\\nPost-mortem: postmortems/{files[-1]}\")\n",
- " with open(os.path.join(postmortems_dir, files[-1]), \"r\") as f:\n",
+ " with open(os.path.join(postmortems_dir, files[-1])) as f:\n",
" print(f.read())"
]
},
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/04_migrating_from_openai_agents_sdk.ipynb b/content/github/claude-cookbooks/claude_agent_sdk/04_migrating_from_openai_agents_sdk.ipynb
index d5a072cac4..d8c7376ba3 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/04_migrating_from_openai_agents_sdk.ipynb
+++ b/content/github/claude-cookbooks/claude_agent_sdk/04_migrating_from_openai_agents_sdk.ipynb
@@ -82,7 +82,7 @@
"assert os.getenv(\"ANTHROPIC_API_KEY\"), \"ANTHROPIC_API_KEY missing from .env\"\n",
"\n",
"OAI_MODEL = \"gpt-4.1\"\n",
- "CLAUDE_MODEL = \"claude-sonnet-4-6\""
+ "CLAUDE_MODEL = \"claude-sonnet-5-5\""
]
},
{
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/06_The_vulnerability_detection_agent.ipynb b/content/github/claude-cookbooks/claude_agent_sdk/06_The_vulnerability_detection_agent.ipynb
index 3ea009d593..614d49b4d2 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/06_The_vulnerability_detection_agent.ipynb
+++ b/content/github/claude-cookbooks/claude_agent_sdk/06_The_vulnerability_detection_agent.ipynb
@@ -71,7 +71,7 @@
"\n",
"load_dotenv()\n",
"\n",
- "MODEL_NAME = \"claude-opus-4-7\"\n",
+ "MODEL_NAME = \"claude-opus-5-5\"\n",
"# This notebook expects to be run from the claude_agent_sdk/ directory\n",
"# (Jupyter's default when you open the file from there). The assert makes\n",
"# the failure explicit if the kernel was started elsewhere.\n",
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/07_Hosting_the_agent.ipynb b/content/github/claude-cookbooks/claude_agent_sdk/07_Hosting_the_agent.ipynb
index 05deaefebe..c3fab77d12 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/07_Hosting_the_agent.ipynb
+++ b/content/github/claude-cookbooks/claude_agent_sdk/07_Hosting_the_agent.ipynb
@@ -175,7 +175,7 @@
"The simplest possible deployment: a container that runs the agent **once** on a prompt from an env var, prints the result, and exits. No server, no sessions, no state.\n",
"\n",
"\n",
- "> **Model note:** the hosting layer defaults to `claude-sonnet-4-6` so your test requests stay cheap while you work through this notebook. Set `MODEL=claude-opus-4-6` in `hosting/.env` to match notebook 00's config exactly.\n",
+ "> **Model note:** the hosting layer defaults to `claude-sonnet-5-5` so your test requests stay cheap while you work through this notebook. Set `MODEL=claude-opus-5-5` in `hosting/.env` to match notebook 00's config exactly.\n",
"\n",
"This is enough for a lot of real work: invoice processing, nightly report generation, batch translation, one-off analysis. If your agent's job is \"take input, produce output, stop,\" you don't need anything past this section.\n",
"\n",
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/08_Dynamic_workflows.ipynb b/content/github/claude-cookbooks/claude_agent_sdk/08_Dynamic_workflows.ipynb
index 154be74c5e..c53a0d0603 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/08_Dynamic_workflows.ipynb
+++ b/content/github/claude-cookbooks/claude_agent_sdk/08_Dynamic_workflows.ipynb
@@ -110,7 +110,7 @@
"\n",
"load_dotenv()\n",
"\n",
- "MODEL = \"claude-sonnet-5\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"\n",
"# Dynamic workflows require Claude Code v2.1.154+; SDK 0.2.90 and later bundle a compatible CLI.\n",
"version_match = re.match(r\"(\\d+)\\.(\\d+)\\.(\\d+)\", claude_agent_sdk.__version__)\n",
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/hosting/README.md b/content/github/claude-cookbooks/claude_agent_sdk/hosting/README.md
index 85492e9611..34380035c4 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/hosting/README.md
+++ b/content/github/claude-cookbooks/claude_agent_sdk/hosting/README.md
@@ -34,7 +34,7 @@ The agent image exposes:
Port: 8000
Required env: ANTHROPIC_API_KEY
- Optional env: MODEL (default: claude-sonnet-4-6),
+ Optional env: MODEL (default: claude-sonnet-5-5),
CLAUDE_CONFIG_DIR (default: /data — mount this for persistence),
AGENT_AUTH_TOKEN (when set, /sessions/* requires
Authorization: Bearer ; /health stays open)
diff --git a/content/github/claude-cookbooks/claude_agent_sdk/scheduled_repository_reviewer/scheduled_repository_reviewer.ipynb b/content/github/claude-cookbooks/claude_agent_sdk/scheduled_repository_reviewer/scheduled_repository_reviewer.ipynb
index 518ab49b02..31ef671c8c 100644
--- a/content/github/claude-cookbooks/claude_agent_sdk/scheduled_repository_reviewer/scheduled_repository_reviewer.ipynb
+++ b/content/github/claude-cookbooks/claude_agent_sdk/scheduled_repository_reviewer/scheduled_repository_reviewer.ipynb
@@ -361,7 +361,7 @@
")\n",
"\n",
"READ_ONLY_TOOLS = [\"Read\", \"Glob\", \"Grep\"]\n",
- "MODEL = \"claude-sonnet-5\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"FIRST_RUN_BUDGET_USD = 0.25\n",
"FOLLOW_UP_BUDGET_USD = 0.20\n",
"FIRST_RUN_MAX_TURNS = 20\n",
diff --git a/content/github/claude-cookbooks/coding/prompting_for_frontend_aesthetics.ipynb b/content/github/claude-cookbooks/coding/prompting_for_frontend_aesthetics.ipynb
index 1463f16943..c27750f0d7 100644
--- a/content/github/claude-cookbooks/coding/prompting_for_frontend_aesthetics.ipynb
+++ b/content/github/claude-cookbooks/coding/prompting_for_frontend_aesthetics.ipynb
@@ -198,7 +198,7 @@
" display_id = display(DisplayHTML(\"\"), display_id=True)\n",
"\n",
" with client.messages.stream(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=64000,\n",
" system=system_prompt,\n",
" messages=[{\"role\": \"user\", \"content\": user_prompt}],\n",
diff --git a/content/github/claude-cookbooks/evals/agentic_search/reproduce_agentic_search_benchmarks.ipynb b/content/github/claude-cookbooks/evals/agentic_search/reproduce_agentic_search_benchmarks.ipynb
index 5f3e2f6acc..5aa73bea28 100644
--- a/content/github/claude-cookbooks/evals/agentic_search/reproduce_agentic_search_benchmarks.ipynb
+++ b/content/github/claude-cookbooks/evals/agentic_search/reproduce_agentic_search_benchmarks.ipynb
@@ -87,7 +87,7 @@
"\n",
"load_dotenv()\n",
"\n",
- "MODEL = \"claude-sonnet-5\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"# Hold the grader model fixed so scores are comparable across the model under test.\n",
"GRADER_MODEL = \"claude-opus-4-6\"\n",
"\n",
diff --git a/content/github/claude-cookbooks/extended_thinking/extended_thinking.ipynb b/content/github/claude-cookbooks/extended_thinking/extended_thinking.ipynb
index 8b143e1084..4d035fc8ba 100644
--- a/content/github/claude-cookbooks/extended_thinking/extended_thinking.ipynb
+++ b/content/github/claude-cookbooks/extended_thinking/extended_thinking.ipynb
@@ -14,9 +14,11 @@
"- [Understanding redacted thinking](#understanding-redacted-thinking-blocks)\n",
"- [Handling error cases](#handling-error-cases)\n",
"\n",
- "This notebook demonstrates how to use Claude 3.7 Sonnet's extended thinking feature with various examples and edge cases.\n",
+ "This notebook demonstrates how to use Claude's extended thinking feature on Claude Sonnet 5.5 with various examples and edge cases.\n",
"\n",
- "Extended thinking gives Claude 3.7 Sonnet enhanced reasoning capabilities for complex tasks, while also providing transparency into its step-by-step thought process before it delivers its final answer. When extended thinking is turned on, Claude creates `thinking` content blocks where it outputs its internal reasoning. Claude incorporates insights from this reasoning before crafting a final response. For more information on extended thinking, see our [documentation](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)."
+ "Extended thinking gives Claude enhanced reasoning capabilities for complex tasks, while also providing transparency into its step-by-step thought process before it delivers its final answer. When extended thinking is turned on, Claude creates `thinking` content blocks where it outputs its internal reasoning. Claude incorporates insights from this reasoning before crafting a final response.\n",
+ "\n",
+ "On Claude Sonnet 5.5, thinking is **adaptive**: you pass `thinking={\"type\": \"adaptive\"}` (this is also the default when `thinking` is omitted) and the model decides how much to think for each request. You steer how hard it thinks with `output_config={\"effort\": ...}` (`\"low\"`, `\"medium\"`, `\"high\"`, `\"xhigh\"`, or `\"max\"`; the default is `\"high\"`) rather than with a token budget. The older `{\"type\": \"enabled\", \"budget_tokens\": N}` form is not accepted on this model. For more information on extended thinking, see our [documentation](https://platform.claude.com/docs/en/build-with-claude/thinking)."
]
},
{
@@ -47,7 +49,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"metadata": {
"vscode": {
"languageId": "python"
@@ -56,7 +58,6 @@
"outputs": [],
"source": [
"import anthropic\n",
- "import os\n",
"\n",
"# Set your API key as an environment variable or directly\n",
"# os.environ[\"ANTHROPIC_API_KEY\"] = \"your-api-key-here\"\n",
@@ -64,6 +65,7 @@
"# Initialize the client\n",
"client = anthropic.Anthropic()\n",
"\n",
+ "\n",
"# Helper functions\n",
"def print_thinking_response(response):\n",
" \"\"\"Pretty print a message response with thinking blocks.\"\"\"\n",
@@ -74,7 +76,7 @@
" # Show truncated thinking for readability\n",
" print(block.thinking[:500] + \"...\" if len(block.thinking) > 500 else block.thinking)\n",
" print(f\"\\n[Signature available: {bool(getattr(block, 'signature', None))}]\")\n",
- " if hasattr(block, 'signature') and block.signature:\n",
+ " if hasattr(block, \"signature\") and block.signature:\n",
" print(f\"[Signature (first 50 chars): {block.signature[:50]}...]\")\n",
" elif block.type == \"redacted_thinking\":\n",
" print(\"\\n🔒 REDACTED THINKING BLOCK:\")\n",
@@ -82,15 +84,13 @@
" elif block.type == \"text\":\n",
" print(\"\\n✓ FINAL ANSWER:\")\n",
" print(block.text)\n",
- " \n",
+ "\n",
" print(\"\\n==== END RESPONSE ====\")\n",
"\n",
+ "\n",
"def count_tokens(messages):\n",
" \"\"\"Count tokens for a given message list.\"\"\"\n",
- " result = client.messages.count_tokens(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " messages=messages\n",
- " )\n",
+ " result = client.messages.count_tokens(model=\"claude-sonnet-5-5\", messages=messages)\n",
" return result.input_tokens"
]
},
@@ -100,12 +100,16 @@
"source": [
"## Basic example\n",
"\n",
- "Let's start with a basic example to show extended thinking in action:"
+ "Let's start with a basic example to show extended thinking in action.\n",
+ "\n",
+ "One detail to note before we start: on Claude Sonnet 5.5 the `display` setting for thinking defaults to `\"omitted\"`, which returns `thinking` blocks with empty text (you still get the signature, and you are still billed for the thinking tokens). Because this notebook prints the reasoning, every request sets `\"display\": \"summarized\"` so the API returns a summary of Claude's thinking.\n",
+ "\n",
+ "Adaptive also means Claude can decide a prompt needs no thinking at all, in which case the response simply has no `thinking` block. That is most likely on easy prompts and at lower `effort`. The examples below use a small constraint-satisfaction puzzle and `\"effort\": \"xhigh\"` so you reliably see thinking; the token-counting section later shows how the amount of thinking changes as you move `effort` from `\"low\"` to `\"xhigh\"`."
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 2,
"metadata": {
"vscode": {
"languageId": "python"
@@ -120,52 +124,40 @@
"==== FULL RESPONSE ====\n",
"\n",
"🧠 THINKING BLOCK:\n",
- "Let's work through this problem step by step:\n",
+ "I'm working through the constraints: D must come before A, which comes before C, E must sit adjacent to C and be in positions 2-4, and B can't be next to D. I'm now systematically trying placements of D to narrow down valid orderings.\n",
"\n",
- "Initial situation:\n",
- "- Three people each pay $10, for a total of $30 given to the manager.\n",
- "- The room actually costs $25.\n",
- "- Manager gives $5 to the bellboy to return to the customers.\n",
- "- Bellboy keeps $2 and gives $1 back to each person ($3 total).\n",
+ "Checking the other two candidates confirms all constraints hold: D before A, A before C, C adjacent E, and no B next to D. So the three valid orderings are DABEC, DAECB, and DACEB.\n",
"\n",
- "After these transactions:\n",
- "- Each person has effectively paid $9 (they paid $10 and got $1 back).\n",
- "- So the three people together paid $27.\n",
- "- The hotel kept $25 for the room.\n",
- "- The bellboy kept $2.\n",
"\n",
- "So the mo...\n",
"\n",
"[Signature available: True]\n",
- "[Signature (first 50 chars): EuYBCkQYAiJAGF6X7aWRuRByTdymAUdNOMC++3ZqSJv7jcY5Ly...]\n",
+ "[Signature (first 50 chars): CAQS8RIKEAgSGAI4AUIIdGhpbmtpbmcSDC9PApxA+kqk+axotR...]\n",
"\n",
"✓ FINAL ANSWER:\n",
- "# Hotel Bill Puzzle Solution\n",
+ "**Valid orderings (slots 1→5):**\n",
"\n",
- "This is a classic misdirection puzzle that confuses us by mixing up two different accounting approaches.\n",
+ "1. D A B E C\n",
+ "2. D A E C B\n",
+ "3. D A C E B\n",
"\n",
- "## The actual flow of money\n",
+ "**Why there are no others**\n",
"\n",
- "1. Three people each pay $10, totaling $30\n",
- "2. The hotel keeps $25 for the room\n",
- "3. The bellboy keeps $2\n",
- "4. The guests receive $3 back ($1 each)\n",
+ "1. Combining \"D before A\" and \"A before C\" gives the chain D < A < C.\n",
+ "2. E must be next to C, so E is either immediately before C (block \"EC\") or immediately after C (block \"CE\"). A cannot be E, so in either case A comes before the whole block. That leaves D, A, [block] in that fixed order, with B free to go in any of 4 places: before D, between D and A, between A and the block, or after the block.\n",
"\n",
- "## The accounting error in the puzzle\n",
+ "**Case 1: block EC.** The four placements of B give:\n",
+ "- B D A E C: B is next to D, so this is invalid.\n",
+ "- D B A E C: B is next to D, so this is invalid.\n",
+ "- D A B E C: valid. E is in slot 4, and B (slot 3) is not next to D (slot 1).\n",
+ "- D A E C B: valid. E is in slot 3, and B (slot 5) is not next to D (slot 1).\n",
"\n",
- "The error occurs when the puzzle tries to add:\n",
- "- What the guests paid ($27 total after refunds)\n",
- "- What the bellboy kept ($2)\n",
+ "**Case 2: block CE.** The four placements of B give:\n",
+ "- B D A C E: E is last, so this is invalid.\n",
+ "- D B A C E: E is last, so this is invalid.\n",
+ "- D A B C E: E is last, so this is invalid.\n",
+ "- D A C E B: valid. E is in slot 4, and B (slot 5) is not next to D (slot 1).\n",
"\n",
- "This is incorrect accounting because the $2 the bellboy kept is already included in the $27 the guests paid. The money should be tracked from a single perspective.\n",
- "\n",
- "## Correct accounting\n",
- "\n",
- "From the guests' perspective:\n",
- "- $27 (what they ultimately paid)\n",
- "- = $25 (to the hotel) + $2 (to the bellboy)\n",
- "\n",
- "There is no missing dollar. The puzzle creates confusion by inappropriately adding money from different accounting perspectives.\n",
+ "Every arrangement satisfying the ordering and adjacency constraints appears among these 8 candidates, and only 3 survive the \"B not adjacent to D\" and \"E not first or last\" constraints. So the three orderings above are the only valid ones.\n",
"\n",
"==== END RESPONSE ====\n"
]
@@ -174,20 +166,24 @@
"source": [
"def basic_thinking_example():\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " max_tokens=4000,\n",
- " thinking= {\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": 2000\n",
+ " model=\"claude-sonnet-5-5\",\n",
+ " max_tokens=16000, # thinking tokens count toward max_tokens, so leave headroom\n",
+ " thinking={\n",
+ " \"type\": \"adaptive\",\n",
+ " \"display\": \"summarized\", # default is \"omitted\" (empty thinking text)\n",
" },\n",
- " messages=[{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"Solve this puzzle: Three people check into a hotel. They pay $30 to the manager. The manager finds out that the room only costs $25 so he gives $5 to the bellboy to return to the three people. The bellboy, however, decides to keep $2 and gives $1 back to each person. Now, each person paid $10 and got back $1, so they paid $9 each, totaling $27. The bellboy kept $2, which makes $29. Where is the missing $1?\"\n",
- " }]\n",
+ " output_config={\"effort\": \"xhigh\"}, # low | medium | high (default) | xhigh | max\n",
+ " messages=[\n",
+ " {\n",
+ " \"role\": \"user\",\n",
+ " \"content\": \"Five talks (A, B, C, D, E) must be scheduled in five consecutive slots. Constraints: A comes before C; B is not adjacent to D; E is neither first nor last; C is immediately before or after E; D comes before A. List every valid ordering and explain how you know there are no others.\",\n",
+ " }\n",
+ " ],\n",
" )\n",
- " \n",
+ "\n",
" print_thinking_response(response)\n",
"\n",
+ "\n",
"basic_thinking_example()"
]
},
@@ -202,7 +198,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 3,
"metadata": {
"vscode": {
"languageId": "python"
@@ -215,62 +211,43 @@
"text": [
"\n",
"--- Starting thinking block ---\n",
- "This is a classic mathematical puzzle that contains a misdirection in how the calculations are presented. Let's break it down step by step:\n",
- "\n",
- "Initial situation:\n",
- "- Three people each pay $10, for a total of $30 given to the manager.\n",
- "- The room actually costs $25.\n",
- "- The manager gives $5 to the bellboy to return to the customers.\n",
- "- The bellboy keeps $2 and returns $1 to each person (total of $3 returned).\n",
+ "I need to work through the constraints: D before A before C, E adjacent to C, and B not adjacent to D. I'm trying to build the ordering by placing D, A, C first then inserting E next to C and checking where B can go without violating the adjacency rule with D.\n",
"\n",
- "Now, let's analyze the accounting:\n",
+ "Testing \"D A C E B\" works since D and B aren't adjacent and E sits at position 4, not the ends. Now I'm checking the other case where E comes immediately before C, inserting B in each of the four gaps and verifying the adjacency and positional rules each time.\n",
"\n",
- "What actually happened:\n",
- "- The three people originally paid $30.\n",
- "- They got back $3 in total ($1 each).\n",
- "- So they actually paid $30 - $3 = $27 in total.\n",
- "- Of this $27, $25 went to the hotel for the room.\n",
- "- The remaining $2 went to the bellboy.\n",
- "- $25 + $2 = $27, which matches what the guests paid. Everything balances.\n",
+ "After going through DBAEC, DABEC, and DAECB, I find that DABEC and DAECB both satisfy every condition while DBAEC fails because B ends up next to D. Combined with the earlier valid case, that gives three total valid orderings: DACEB, DABEC, and DAECB.\n",
"\n",
- "The error in the puzzle is in how it frames the question. The puzzle states \"each person paid $10 and got back $1, so they paid $9 each, totaling $27. The bellboy kept $2, which makes $29.\" This is mixing up different accounting methods. \n",
"\n",
- "The $27 that the guests paid in total should be divided as:\n",
- "- $25 for the room\n",
- "- $2 for the bellboy\n",
- "\n",
- "When we add the bellboy's $2 to the guests' $27, we're double-counting the $2, which creates the illusion of a missing dollar. The $2 is already included in the $27, so we shouldn't add it again.\n",
- "\n",
- "Another way to think about it: Out of the original $30, $25 went to the hotel, $3 went back to the guests, and $2 went to the bellboy. That's $25 + $3 + $2 = $30, so everything is accounted for.\n",
- "[Completed thinking block, 1492 characters]\n",
+ "[Completed thinking block, 777 characters]\n",
"--- Finished thinking block ---\n",
"\n",
"\n",
"--- Starting text block ---\n",
- "# The Missing $1 Puzzle Solution\n",
+ "**Valid orderings (3):**\n",
+ "\n",
+ "1. D A C E B\n",
+ "2. D A B E C\n",
+ "3. D A E C B\n",
"\n",
- "This puzzle uses a misleading way of accounting that creates confusion. Let's clarify what actually happened:\n",
+ "**Why there are no others**\n",
"\n",
- "## The correct accounting:\n",
- "- Three people paid $30 total initially\n",
- "- The room cost $25\n",
- "- The bellboy kept $2\n",
- "- The guests received $3 back ($1 each)\n",
+ "1. **Chain.** \"D before A\" and \"A before C\" force the relative order D < A < C.\n",
"\n",
- "So where did all the money go?\n",
- "- $25 went to the hotel\n",
- "- $2 went to the bellboy\n",
- "- $3 went back to the guests\n",
- "- $25 + $2 + $3 = $30 ✓\n",
+ "2. **Treat C and E as a block.** E must be immediately before or after C, so C and E form a two-letter block, either \"CE\" or \"EC\". The remaining pieces are D, A, the block, and B. D, A and the block must appear in that order, since the block contains C. B can go in any of 4 places: before D, between D and A, between A and the block, or after the block. That gives 4 candidates for each block orientation, 8 in total.\n",
"\n",
- "## The error in the puzzle:\n",
- "The puzzle incorrectly adds the $27 paid by the guests (after refunds) to the $2 kept by the bellboy. This is a mistake because the $2 kept by the bellboy is already part of the $27.\n",
+ "3. **Block \"CE\"** (the order is D, A, CE, with B inserted):\n",
+ " - B D A C E: E is last, so it is invalid.\n",
+ " - D B A C E: E is last, so it is invalid.\n",
+ " - D A B C E: E is last, so it is invalid.\n",
+ " - **D A C E B:** E is 4th, and B (5th) is not next to D (1st). Valid.\n",
"\n",
- "The puzzle creates the illusion of a missing dollar by mixing two different perspectives:\n",
- "1. How much the guests paid ($27 total)\n",
- "2. Where the original $30 went (hotel + bellboy + refunds)\n",
+ "4. **Block \"EC\"** (the order is D, A, EC, with B inserted):\n",
+ " - B D A E C: B and D are adjacent, so it is invalid.\n",
+ " - D B A E C: B and D are adjacent, so it is invalid.\n",
+ " - **D A B E C:** B is 3rd and D is 1st, so they are not adjacent. E is 4th. Valid.\n",
+ " - **D A E C B:** E is 3rd, and B (5th) is not next to D (1st). Valid.\n",
"\n",
- "There is no missing dollar - it's just an accounting trick!--- Finished text block ---\n",
+ "5. **Completeness.** Every ordering satisfying the \"D < A < C\" and \"C adjacent to E\" constraints appears among those 8 candidates. The \"E not first or last\" and \"B not adjacent to D\" constraints eliminate exactly 5 of them, leaving the three above.--- Finished text block ---\n",
"\n",
"\n",
"--- Message complete ---\n"
@@ -280,35 +257,37 @@
"source": [
"def streaming_with_thinking():\n",
" with client.messages.stream(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " max_tokens=4000,\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": 2000\n",
- " },\n",
- " messages=[{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"Solve this puzzle: Three people check into a hotel. They pay $30 to the manager. The manager finds out that the room only costs $25 so he gives $5 to the bellboy to return to the three people. The bellboy, however, decides to keep $2 and gives $1 back to each person. Now, each person paid $10 and got back $1, so they paid $9 each, totaling $27. The bellboy kept $2, which makes $29. Where is the missing $1?\"\n",
- " }]\n",
+ " model=\"claude-sonnet-5-5\",\n",
+ " max_tokens=16000,\n",
+ " thinking={\"type\": \"adaptive\", \"display\": \"summarized\"},\n",
+ " output_config={\"effort\": \"xhigh\"},\n",
+ " messages=[\n",
+ " {\n",
+ " \"role\": \"user\",\n",
+ " \"content\": \"Five talks (A, B, C, D, E) must be scheduled in five consecutive slots. Constraints: A comes before C; B is not adjacent to D; E is neither first nor last; C is immediately before or after E; D comes before A. List every valid ordering and explain how you know there are no others.\",\n",
+ " }\n",
+ " ],\n",
" ) as stream:\n",
" # Track what we're currently building\n",
" current_block_type = None\n",
" current_content = \"\"\n",
- " \n",
+ "\n",
" for event in stream:\n",
" if event.type == \"content_block_start\":\n",
" current_block_type = event.content_block.type\n",
" print(f\"\\n--- Starting {current_block_type} block ---\")\n",
" current_content = \"\"\n",
- " \n",
+ "\n",
" elif event.type == \"content_block_delta\":\n",
" if event.delta.type == \"thinking_delta\":\n",
- " print(event.delta.thinking, end=\"\", flush=True) # Just print dots for thinking to avoid clutter\n",
+ " print(\n",
+ " event.delta.thinking, end=\"\", flush=True\n",
+ " ) # Just print dots for thinking to avoid clutter\n",
" current_content += event.delta.thinking\n",
" elif event.delta.type == \"text_delta\":\n",
" print(event.delta.text, end=\"\", flush=True)\n",
" current_content += event.delta.text\n",
- " \n",
+ "\n",
" elif event.type == \"content_block_stop\":\n",
" if current_block_type == \"thinking\":\n",
" # Just show a summary for thinking\n",
@@ -317,10 +296,11 @@
" print(\"\\n[Redacted thinking block]\")\n",
" print(f\"--- Finished {current_block_type} block ---\\n\")\n",
" current_block_type = None\n",
- " \n",
+ "\n",
" elif event.type == \"message_stop\":\n",
" print(\"\\n--- Message complete ---\")\n",
"\n",
+ "\n",
"streaming_with_thinking()"
]
},
@@ -330,12 +310,12 @@
"source": [
"## Token counting and context window management\n",
"\n",
- "This example demonstrates how to track token usage with extended thinking:"
+ "This example demonstrates how to track token usage with extended thinking, and how the `effort` setting changes how much Claude thinks:"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 4,
"metadata": {
"vscode": {
"languageId": "python"
@@ -346,43 +326,63 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Base token count (input only): 125\n",
- "\n",
- "Estimated thinking tokens used: ~377\n",
- "Estimated final answer tokens: ~237\n",
- "Total estimated output tokens: ~614\n",
- "Input tokens + max_tokens = 8125\n",
- "Available for final answer after thinking: ~7623\n",
- "\n",
- "With thinking budget of 1024 tokens:\n",
- "Input tokens: 125\n",
- "Max tokens needed: 2149\n",
- "Remaining context window: 197851\n",
- "\n",
- "With thinking budget of 2000 tokens:\n",
- "Input tokens: 125\n",
- "Max tokens needed: 3125\n",
- "Remaining context window: 196875\n",
- "\n",
- "With thinking budget of 4000 tokens:\n",
- "Input tokens: 125\n",
- "Max tokens needed: 5125\n",
- "Remaining context window: 194875\n",
- "\n",
- "With thinking budget of 8000 tokens:\n",
- "Input tokens: 125\n",
- "Max tokens needed: 9125\n",
- "Remaining context window: 190875\n",
- "\n",
- "With thinking budget of 16000 tokens:\n",
- "Input tokens: 125\n",
- "Max tokens needed: 17125\n",
- "Remaining context window: 182875\n",
- "\n",
- "With thinking budget of 32000 tokens:\n",
- "Input tokens: 125\n",
- "Max tokens needed: 33125\n",
- "Remaining context window: 166875\n"
+ "Base token count (input only): 102\n",
+ "\n",
+ "Input tokens (from usage): 102\n",
+ "Output tokens (from usage, thinking + answer): 1595\n",
+ "Estimated final answer tokens: ~518\n",
+ "So roughly ~1077 output tokens went to thinking\n",
+ "Thinking summary returned: 457 characters\n",
+ "Input tokens + max_tokens = 16102 (this total must fit in the model's context window)\n",
+ "\n",
+ "With effort='low':\n",
+ "Output tokens (thinking + answer): 1043\n",
+ "Thinking summary length: 0 characters\n",
+ "Final answer preview: Constraints:\n",
+ "1. A before C\n",
+ "2. B not adjacent to D\n",
+ "3. E in slot 2, 3, or 4\n",
+ "4. C adjacent to E\n",
+ "5. D before A\n",
+ "\n",
+ "From 1 and 5...\n",
+ "\n",
+ "With effort='medium':\n",
+ "Output tokens (thinking + answer): 794\n",
+ "Thinking summary length: 0 characters\n",
+ "Final answer preview: Constraints:\n",
+ "1. A before C\n",
+ "2. B not adjacent to D\n",
+ "3. E in slot 2, 3, or 4\n",
+ "4. C adjacent to E\n",
+ "5. D before A\n",
+ "\n",
+ "From 1 and 5...\n",
+ "\n",
+ "With effort='high':\n",
+ "Output tokens (thinking + answer): 1150\n",
+ "Thinking summary length: 423 characters\n",
+ "Final answer preview: **Valid orderings (slots 1–5):**\n",
+ "\n",
+ "1. D A C E B\n",
+ "2. D A E C B\n",
+ "3. D A B E C\n",
+ "\n",
+ "**Why there are no others**\n",
+ "\n",
+ "The constraints D...\n",
+ "\n",
+ "With effort='xhigh':\n",
+ "Output tokens (thinking + answer): 1332\n",
+ "Thinking summary length: 813 characters\n",
+ "Final answer preview: **Valid orderings (slots 1–5):**\n",
+ "1. D A C E B\n",
+ "2. D A B E C\n",
+ "3. D A E C B\n",
+ "\n",
+ "**Why there are no others**\n",
+ "\n",
+ "1. **Chain.** \"D b...\n"
]
}
],
@@ -390,58 +390,72 @@
"def token_counting_example():\n",
" # Define a function to create a sample prompt\n",
" def create_sample_messages():\n",
- " messages = [{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"Solve this puzzle: Three people check into a hotel. They pay $30 to the manager. The manager finds out that the room only costs $25 so he gives $5 to the bellboy to return to the three people. The bellboy, however, decides to keep $2 and gives $1 back to each person. Now, each person paid $10 and got back $1, so they paid $9 each, totaling $27. The bellboy kept $2, which makes $29. Where is the missing $1?\"\n",
- " }]\n",
+ " messages = [\n",
+ " {\n",
+ " \"role\": \"user\",\n",
+ " \"content\": \"Five talks (A, B, C, D, E) must be scheduled in five consecutive slots. Constraints: A comes before C; B is not adjacent to D; E is neither first nor last; C is immediately before or after E; D comes before A. List every valid ordering and explain how you know there are no others.\",\n",
+ " }\n",
+ " ]\n",
" return messages\n",
- " \n",
+ "\n",
" # Count tokens without thinking\n",
" base_messages = create_sample_messages()\n",
" base_token_count = count_tokens(base_messages)\n",
" print(f\"Base token count (input only): {base_token_count}\")\n",
- " \n",
+ "\n",
" # Make a request with thinking and check actual usage\n",
+ " max_tokens = 16000\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " max_tokens=8000,\n",
- " thinking = {\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": 2000\n",
- " },\n",
- " messages=base_messages\n",
+ " model=\"claude-sonnet-5-5\",\n",
+ " max_tokens=max_tokens,\n",
+ " thinking={\"type\": \"adaptive\", \"display\": \"summarized\"},\n",
+ " output_config={\"effort\": \"xhigh\"},\n",
+ " messages=base_messages,\n",
" )\n",
- " \n",
- " # Calculate and print token usage stats\n",
- " thinking_tokens = sum(\n",
- " len(block.thinking.split()) * 1.3 # Rough estimate\n",
- " for block in response.content \n",
- " if block.type == \"thinking\"\n",
+ "\n",
+ " # usage.output_tokens counts the *full* thinking plus the final answer,\n",
+ " # even though the thinking text we get back is only a summary.\n",
+ " summary_chars = sum(\n",
+ " len(block.thinking) for block in response.content if block.type == \"thinking\"\n",
" )\n",
- " \n",
+ "\n",
" final_answer_tokens = sum(\n",
" len(block.text.split()) * 1.3 # Rough estimate\n",
- " for block in response.content \n",
+ " for block in response.content\n",
" if block.type == \"text\"\n",
" )\n",
- " \n",
- " print(f\"\\nEstimated thinking tokens used: ~{int(thinking_tokens)}\")\n",
+ "\n",
+ " print(f\"\\nInput tokens (from usage): {response.usage.input_tokens}\")\n",
+ " print(f\"Output tokens (from usage, thinking + answer): {response.usage.output_tokens}\")\n",
" print(f\"Estimated final answer tokens: ~{int(final_answer_tokens)}\")\n",
- " print(f\"Total estimated output tokens: ~{int(thinking_tokens + final_answer_tokens)}\")\n",
- " print(f\"Input tokens + max_tokens = {base_token_count + 8000}\")\n",
- " print(f\"Available for final answer after thinking: ~{8000 - int(thinking_tokens)}\")\n",
- " \n",
- " # Demo with escalating thinking budgets\n",
- " thinking_budgets = [1024, 2000, 4000, 8000, 16000, 32000]\n",
- " context_window = 200000\n",
- " for budget in thinking_budgets:\n",
- " print(f\"\\nWith thinking budget of {budget} tokens:\")\n",
- " print(f\"Input tokens: {base_token_count}\")\n",
- " print(f\"Max tokens needed: {base_token_count + budget + 1000}\") # Add 1000 for final answer\n",
- " print(f\"Remaining context window: {context_window - (base_token_count + budget + 1000)}\")\n",
- " \n",
- " if base_token_count + budget + 1000 > context_window:\n",
- " print(\"WARNING: This would exceed the context window of 200k tokens!\")\n",
+ " print(\n",
+ " f\"So roughly ~{response.usage.output_tokens - int(final_answer_tokens)} output tokens went to thinking\"\n",
+ " )\n",
+ " print(f\"Thinking summary returned: {summary_chars} characters\")\n",
+ " print(\n",
+ " f\"Input tokens + max_tokens = {base_token_count + max_tokens} (this total must fit in the model's context window)\"\n",
+ " )\n",
+ "\n",
+ " # Demo with escalating effort levels: same prompt, different effort.\n",
+ " # There is no token budget on current models; effort is the knob that\n",
+ " # trades thinking depth for latency and cost (\"max\" exists too). At the\n",
+ " # lower levels Claude may decide this problem needs no thinking at all,\n",
+ " # in which case the response has no thinking block.\n",
+ " for effort in [\"low\", \"medium\", \"high\", \"xhigh\"]:\n",
+ " response = client.messages.create(\n",
+ " model=\"claude-sonnet-5-5\",\n",
+ " max_tokens=max_tokens,\n",
+ " thinking={\"type\": \"adaptive\", \"display\": \"summarized\"},\n",
+ " output_config={\"effort\": effort},\n",
+ " messages=base_messages,\n",
+ " )\n",
+ " summary_chars = sum(len(b.thinking) for b in response.content if b.type == \"thinking\")\n",
+ " answer = \" \".join(b.text for b in response.content if b.type == \"text\")\n",
+ " print(f\"\\nWith effort={effort!r}:\")\n",
+ " print(f\"Output tokens (thinking + answer): {response.usage.output_tokens}\")\n",
+ " print(f\"Thinking summary length: {summary_chars} characters\")\n",
+ " print(f\"Final answer preview: {answer[:120]}...\")\n",
+ "\n",
"\n",
"# Uncomment to run the example\n",
"token_counting_example()"
@@ -460,7 +474,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 5,
"metadata": {
"vscode": {
"languageId": "python"
@@ -471,19 +485,19 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "[TextBlock(citations=None, text=None, type='redacted_thinking', data='EvAFCoYBGAIiQL7asmglEdeKXw4EdihR2gBQ7O7+j/dGecLjsS2PMgW9av+NRwuIV2nFD4I61hUHrp5vzJF7/y+i/vvbnxaRnwMqQMizGiLSDcowtEvP9EcIT4d75iPhZ8TaiVdD22bZp3YVcc0laY8u1lEJTSesgLUywuc3QHZcg4NZ7tKjWwKgcVUSDHgb6gZUK9aP47KvNxoMCNjkIDR40zmq/QmVIjBSCnvTMSUE+jnmLZSq1TZO9T7ImALNJt8I5j1ls24CO1fibsRThJ7Ha5A0/tuEKVoqlgRc+e2tS+BQMXx572lT4Hkl4aVpcM4SQbqBjeVeR3NmCBLoOxlQ2JLiIYwMHUS/K9GDLyMQcYd1KUWgN34CZRK7k44CSkNsO8oh4uj/1qsRsZjq1l6RQ29rLKSEXvMU4XbZufJ1icvYZS1I6PIZzER6/u6it+WNYyBxJ2vaFICjDePNgIHfRA/ceTz9mfCtBiTfagyPBbs2HflXlSlW26TSdI7PKof5/EsQ+DUkjAy+9VTLX7zHYzNZtwJPL2ryYw4loSwRbc4syldA0Ncnn7hA+yJyY0QwSrxZFIm/t9X9p9s+2SL0F4wSRsimnxRiIhfJD3i+oTw8AbGklyoP0kCH2WxA7Gr3rNLJVkRTJl48AjlSL7ClaWvLWrNer13etD7n5rbwiXOn5husy8gAm5GE3/eFyty3Y+/ad+lMPKXSjL0aP67WoJrFq/teItolOVZeOOERjVFdw5jIV1EUknlAZ/pfI53pLYqwFl17M7IXMdGxEaKoGDIKcnYTwT31uUNlB5JSBWoq1SnkFsFy2zDsDTFzjml3HEXz4szZi3j5/qHWJlMMCcB1walZUisxEp0v1euvcgatY5wfYSiAP3s9wOrgYKCkuLcidlgiyQHJB1haZjO8/tZ9gzWk1n//7pTncdKgd5ZK9/ErxWFlBV/vQwjp0cB7zoVcLh1ydi/Coea6ZOuei+ICKVl4IcR2A6DD8gtEJmc='), TextBlock(citations=None, text=\"I notice you've sent what appears to be a prompt attempting to access internal systems or processes. I can't respond to commands of this nature.\\n\\nInstead, I'm happy to have a normal conversation and assist you with legitimate questions or tasks. What would you like help with today?\", type='text')]\n",
+ "[RedactedThinkingBlock(data='CAQSlgcKEAgSGAI4AUIIdGhpbmtpbmcSDAvmF1hXsbzdc6DDlRoMIy9+bFB/la3LWaH1IjC+I73fnh6GNH2OQ+TidhopDIDmbIW4mmtPmzkCaQ8UTME/PoGMzIXaO/eVST+TaIoqswZLLsrmRNXVM/3MhNxyw8jVP+FUnkD7uGtVa42A2hGhP9K3EULP3DSzs1CO/iPrA/4LJChjLBrcwxnQEfHQW5zPbhujyTxBQtmM6jGXhZCD1O941b2NVBz35R2EPIcLMIO23k6F1p3g8UtucM8AvfbJ8qyO+JMK1/lAKsRjEuE+w0HUzYV1J526sVbUuqCYlHDsVnNHdVTPm802tuEZJo6NdR3On14JGpl4jmq0auTenXRSFCqgyiAefctT6uTFKzvzUYgYiaHGTxfxtHrN6/JPWwGhCBDPdqF8tr1dk4pzYhTY5a4cmmHGi4f++OMknWHM0Vp7OKWZZRbVvrbnm2Quwcv1gjDP2/+cUWyVg5urBpy39bU6mPNasiQkrPg0yjB/VpBLOjQ5EE+zAZILCEo4zLY7K2WD1+UHfmTi59+mfnDcqaFLjhVRK3mqY5Ut0C9IO5JFKYXyZGITljOhADq3amYPthG4ES+wgh3I4HAVNj9wo0kh2KiS7h1HDh20vF1o+Q4RpF9XPKL3OYcLPQDHxX7ZHzHLGzERnTsNGDQnxYAy95AAzn1lcnOk/rPDK+q+uqptheVgraDCxqXPtZrYyI/P7qlirMGbCoDmyi4IzAC4n1ej09Li0G0pGe8B9C49nSwn5Czn1L23/BSX7XLzddaf+/aEHOhAD7h7w+ru/NI0WBBmbyiXh8XrzRwtFmRfhhSrWAGOnFc2VtCHUijFz4XTGf6CNG0QLTw7XlT6fS+02kai2aNcIjqhhcD32cEmo8Hj9ZRDhWvfPJuHAAv9PVF14W9F+tFGSc6iW/PyQqMRRVDc4yBSUJv/va3UpBXm8Sopl3ayXgdK/OtU/dvp0FB2L+zgaFheVFARV7Y8xx4nWlSzIygix0nhPyh7+tLREn8aAfFQl3as4loRV8kcVbAI0r3KiRZzzUWshhZNfpAmnv+LGqi0dZ+dTpJPCoxPV4gt4U5fInVs/coz3Q5Yepa9SLfAvbusvwN3NoC/swXfY6pro5+6N6PKGPRSZcnj8HCVN7+SHM4LILMRuRicwBA+eJtzYmbDraTAiPg7tvpI202sh3yTgu/9PHFdQN/eQ4oYAQ==', type='redacted_thinking'), TextBlock(citations=None, text=\"That message looks like a test string or placeholder, not a question or request. It doesn't trigger any special behavior on my end.\\n\\nWhat would you like to talk about or work on? I can help with writing, coding, analysis, brainstorming, or answering questions.\", type='text')]\n",
"Response includes 2 total blocks:\n",
"- 1 redacted thinking blocks\n",
"- 0 regular thinking blocks\n",
"- 1 text blocks\n",
"\n",
"Redacted thinking blocks contain encrypted data:\n",
- "Block 1 data preview: EvAFCoYBGAIiQL7asmglEdeKXw4EdihR2gBQ7O7+j/dGecLjsS...\n",
+ "Block 1 data preview: CAQSlgcKEAgSGAI4AUIIdGhpbmtpbmcSDAvmF1hXsbzdc6DDlR...\n",
"\n",
"Final text response:\n",
- "I notice you've sent what appears to be a prompt attempting to access internal systems or processes. I can't respond to commands of this nature.\n",
+ "That message looks like a test string or placeholder, not a question or request. It doesn't trigger any special behavior on my end.\n",
"\n",
- "Instead, I'm happy to have a normal conversation and assist you with legitimate questions or tasks. What would you like help with today?\n"
+ "What would you like to talk about or work on? I can help with writing, coding, analysis, brainstorming, or answering questions.\n"
]
}
],
@@ -491,18 +505,17 @@
"def redacted_thinking_example():\n",
" # Using the special test string that triggers redacted thinking\n",
" response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " max_tokens=4000,\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": 2000\n",
- " },\n",
- " messages=[{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"ANTHROPIC_MAGIC_STRING_TRIGGER_REDACTED_THINKING_46C9A13E193C177646C7398A98432ECCCE4C1253D5E2D82641AC0E52CC2876CB\"\n",
- " }]\n",
+ " model=\"claude-sonnet-5-5\",\n",
+ " max_tokens=16000,\n",
+ " thinking={\"type\": \"adaptive\", \"display\": \"summarized\"},\n",
+ " messages=[\n",
+ " {\n",
+ " \"role\": \"user\",\n",
+ " \"content\": \"ANTHROPIC_MAGIC_STRING_TRIGGER_REDACTED_THINKING_46C9A13E193C177646C7398A98432ECCCE4C1253D5E2D82641AC0E52CC2876CB\",\n",
+ " }\n",
+ " ],\n",
" )\n",
- " \n",
+ "\n",
" # Identify redacted thinking blocks\n",
" redacted_blocks = [block for block in response.content if block.type == \"redacted_thinking\"]\n",
" thinking_blocks = [block for block in response.content if block.type == \"thinking\"]\n",
@@ -512,18 +525,19 @@
" print(f\"- {len(redacted_blocks)} redacted thinking blocks\")\n",
" print(f\"- {len(thinking_blocks)} regular thinking blocks\")\n",
" print(f\"- {len(text_blocks)} text blocks\")\n",
- " \n",
+ "\n",
" # Show data properties of redacted blocks\n",
" if redacted_blocks:\n",
- " print(f\"\\nRedacted thinking blocks contain encrypted data:\")\n",
+ " print(\"\\nRedacted thinking blocks contain encrypted data:\")\n",
" for i, block in enumerate(redacted_blocks[:3]): # Show first 3 at most\n",
- " print(f\"Block {i+1} data preview: {block.data[:50]}...\")\n",
- " \n",
+ " print(f\"Block {i + 1} data preview: {block.data[:50]}...\")\n",
+ "\n",
" # Print the final text output\n",
" if text_blocks:\n",
- " print(f\"\\nFinal text response:\")\n",
+ " print(\"\\nFinal text response:\")\n",
" print(text_blocks[0].text)\n",
"\n",
+ "\n",
"# Uncomment to run the example\n",
"redacted_thinking_example()"
]
@@ -536,18 +550,18 @@
"\n",
"When using extended thinking, keep in mind:\n",
"\n",
- "1. **Minimum budget**: The minimum thinking budget is 1,024 tokens. We suggest starting at the minimum and increasing incrementally to find the optimal range.\n",
+ "1. **Effort, not budgets**: Current models have no `budget_tokens`. Use `output_config={\"effort\": ...}` to control how hard Claude thinks: start at the default (`\"high\"`), drop to `\"medium\"` or `\"low\"` when latency and cost matter more than depth, and reach for `\"xhigh\"` or `\"max\"` on the hardest problems. Sending the legacy `thinking={\"type\": \"enabled\", \"budget_tokens\": N}` form to Claude Sonnet 5.5 returns a 400 error.\n",
"\n",
- "2. **Incompatible features**: Thinking isn't compatible with temperature, top_p, or top_k modifications, and you cannot pre-fill responses.\n",
+ "2. **Incompatible features**: Non-default `temperature`, `top_p`, or `top_k` values are rejected on Claude Sonnet 5.5 (with or without thinking), and you cannot pre-fill assistant responses.\n",
"\n",
- "3. **Pricing**: Extended thinking tokens count towards the context window and are billed as output tokens. They also count towards your rate limits.\n",
+ "3. **Pricing and limits**: Thinking tokens count towards `max_tokens` and the context window, and are billed as output tokens (you are billed for the full thinking, not the summary you get back). They also count towards your rate limits. Keep `max_tokens` generous and use streaming for very large values.\n",
"\n",
"For more details on extended thinking with tool use, see the \"Extended Thinking with Tool Use\" notebook."
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 6,
"metadata": {
"vscode": {
"languageId": "python"
@@ -559,71 +573,45 @@
"output_type": "stream",
"text": [
"\n",
- "Error with too small thinking budget: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'thinking.enabled.budget_tokens: Input should be greater than or equal to 1024'}}\n",
- "\n",
- "Error with temperature and thinking: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': '`temperature` may only be set to 1 when thinking is enabled. Please consult our documentation at https://docs.claude.com/en/docs/build-with-claude/extended-thinking#important-considerations-when-using-extended-thinking'}}\n",
+ "Error with legacy budget_tokens thinking config: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': '\"thinking.type.enabled\" is not supported for this model. Use \"thinking.type.adaptive\" and \"output_config.effort\" to control thinking behavior.'}, 'request_id': 'req_011Cfdh4WYGPktVi5kjF5NAt'}\n",
"\n",
- "Error from exceeding context window: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'prompt is too long: 214315 tokens > 204798 maximum'}}\n"
+ "Error from exceeding context window: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'prompt is too long: 1800065 tokens > 1000000 maximum'}, 'request_id': 'req_011Cfdh4XWok6x352LDwYdg6'}\n"
]
}
],
"source": [
"def demonstrate_common_errors():\n",
- " # 1. Error from setting thinking budget too small\n",
+ " # 1. Error from sending the legacy manual-budget form.\n",
+ " # Current models only accept {\"type\": \"adaptive\"}; non-default\n",
+ " # temperature / top_p / top_k values are rejected the same way.\n",
" try:\n",
- " response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " client.messages.create(\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=4000,\n",
" thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": 500 # Too small, minimum is 1024\n",
+ " \"type\": \"enabled\", # Legacy form, not accepted on this model\n",
+ " \"budget_tokens\": 1024,\n",
" },\n",
- " messages=[{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"Explain quantum computing.\"\n",
- " }]\n",
+ " messages=[{\"role\": \"user\", \"content\": \"Explain quantum computing.\"}],\n",
" )\n",
" except Exception as e:\n",
- " print(f\"\\nError with too small thinking budget: {e}\")\n",
- " \n",
- " # 2. Error from using temperature with thinking\n",
- " try:\n",
- " response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " max_tokens=4000,\n",
- " temperature=0.7, # Not compatible with thinking\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": 2000\n",
- " },\n",
- " messages=[{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"Write a creative story.\"\n",
- " }]\n",
- " )\n",
- " except Exception as e:\n",
- " print(f\"\\nError with temperature and thinking: {e}\")\n",
- " \n",
- " # 3. Error from exceeding context window\n",
+ " print(f\"\\nError with legacy budget_tokens thinking config: {e}\")\n",
+ "\n",
+ " # 2. Error from exceeding context window\n",
" try:\n",
- " # Create a very large prompt\n",
- " long_content = \"Please analyze this text. \" + \"This is sample text. \" * 150000\n",
- " \n",
- " response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " # Create a very large prompt (large enough to overflow the context window)\n",
+ " long_content = \"Please analyze this text. \" + \"This is sample text. \" * 300000\n",
+ "\n",
+ " client.messages.create(\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=20000, # This plus the long prompt will exceed context window\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": 10000\n",
- " },\n",
- " messages=[{\n",
- " \"role\": \"user\",\n",
- " \"content\": long_content\n",
- " }]\n",
+ " thinking={\"type\": \"adaptive\"},\n",
+ " messages=[{\"role\": \"user\", \"content\": long_content}],\n",
" )\n",
" except Exception as e:\n",
" print(f\"\\nError from exceeding context window: {e}\")\n",
"\n",
+ "\n",
"# Run the common error examples\n",
"demonstrate_common_errors()"
]
@@ -637,14 +625,15 @@
},
"language_info": {
"codemirror_mode": {
- "name": "python",
+ "name": "ipython",
"version": 3
},
- "file_extension": ".coco",
- "mimetype": "text/x-python3",
- "name": "coconut",
- "pygments_lexer": "coconut",
- "version": "3.0.2"
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.12.3"
}
},
"nbformat": 4,
diff --git a/content/github/claude-cookbooks/extended_thinking/extended_thinking_with_tool_use.ipynb b/content/github/claude-cookbooks/extended_thinking/extended_thinking_with_tool_use.ipynb
index d24f8f1eb5..7f25611cb7 100644
--- a/content/github/claude-cookbooks/extended_thinking/extended_thinking_with_tool_use.ipynb
+++ b/content/github/claude-cookbooks/extended_thinking/extended_thinking_with_tool_use.ipynb
@@ -12,9 +12,9 @@
"- [Multiple tool calls](#multiple-tool-calls-with-thinking)\n",
"- [Preserving thinking blocks](#preserving-thinking-blocks)\n",
"\n",
- "This notebook demonstrates how to use Claude 3.7 Sonnet's extended thinking feature with tools. The extended thinking feature allows you to see Claude's step-by-step thinking before it provides a final answer, providing transparency into how it decides which tools to use and how it interprets tool results.\n",
+ "This notebook demonstrates how to use Claude's extended thinking feature with tools on Claude Sonnet 5.5. The extended thinking feature allows you to see Claude's step-by-step thinking before it provides a final answer, providing transparency into how it decides which tools to use and how it interprets tool results.\n",
"\n",
- "When using extended thinking with tool use, the model will show its thinking before making tool requests, but not repeat the thinking process after receiving tool results. Claude will not output another thinking block until after the next non-`tool_result` `user` turn. For more information on extended thinking, see our [documentation](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)."
+ "On Claude Sonnet 5.5 thinking is adaptive (`thinking={\"type\": \"adaptive\"}`, with `output_config={\"effort\": ...}` controlling how hard it thinks), and the model may think before its first tool request and again between tool calls after it reads tool results (interleaved thinking). No beta header is needed for this. Thinking blocks carry a signature and are bound to the conversation so far, so earlier assistant content, including `thinking` and `redacted_thinking` blocks, must be passed back unchanged on each follow-up request. For more information on extended thinking, see our [documentation](https://platform.claude.com/docs/en/build-with-claude/thinking)."
]
},
{
@@ -45,7 +45,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"metadata": {
"vscode": {
"languageId": "python"
@@ -53,14 +53,20 @@
},
"outputs": [],
"source": [
- "import anthropic\n",
- "import os\n",
"import json\n",
"\n",
- "# Global variables for model and token budgets\n",
- "MODEL_NAME = \"claude-sonnet-4-6\"\n",
- "MAX_TOKENS = 4000\n",
- "THINKING_BUDGET_TOKENS = 2000\n",
+ "import anthropic\n",
+ "\n",
+ "# Global variables for model, output limit, and thinking effort\n",
+ "MODEL_NAME = \"claude-sonnet-5-5\"\n",
+ "MAX_TOKENS = 16000 # thinking tokens count toward max_tokens, so leave headroom\n",
+ "EFFORT = \"xhigh\" # how hard Claude thinks: low | medium | high (default) | xhigh | max.\n",
+ "# Adaptive thinking may skip thinking entirely on easy requests at lower effort; \"xhigh\"\n",
+ "# makes these small examples reliably produce thinking blocks you can inspect.\n",
+ "\n",
+ "# Every request below passes thinking={\"type\": \"adaptive\", \"display\": \"summarized\"}.\n",
+ "# \"display\" defaults to \"omitted\" on this model, which returns thinking blocks with\n",
+ "# empty text; \"summarized\" returns a summary of the reasoning so we can print it.\n",
"\n",
"# Set your API key as an environment variable or directly\n",
"# os.environ[\"ANTHROPIC_API_KEY\"] = \"your_api_key_here\"\n",
@@ -68,6 +74,7 @@
"# Initialize the client\n",
"client = anthropic.Anthropic()\n",
"\n",
+ "\n",
"# Helper functions\n",
"def print_thinking_response(response):\n",
" \"\"\"Pretty print a message response with thinking blocks.\"\"\"\n",
@@ -75,10 +82,10 @@
" for block in response.content:\n",
" if block.type == \"thinking\":\n",
" print(\"\\n🧠 THINKING BLOCK:\")\n",
- " # Show truncated thinking for readability \n",
+ " # Show truncated thinking for readability\n",
" print(block.thinking[:500] + \"...\" if len(block.thinking) > 500 else block.thinking)\n",
" print(f\"\\n[Signature available: {bool(getattr(block, 'signature', None))}]\")\n",
- " if hasattr(block, 'signature') and block.signature:\n",
+ " if hasattr(block, \"signature\") and block.signature:\n",
" print(f\"[Signature (first 50 chars): {block.signature[:50]}...]\")\n",
" elif block.type == \"redacted_thinking\":\n",
" print(\"\\n🔒 REDACTED THINKING BLOCK:\")\n",
@@ -86,22 +93,16 @@
" elif block.type == \"text\":\n",
" print(\"\\n✓ FINAL ANSWER:\")\n",
" print(block.text)\n",
- " \n",
+ "\n",
" print(\"\\n==== END RESPONSE ====\")\n",
"\n",
+ "\n",
"def count_tokens(messages, tools=None):\n",
" \"\"\"Count tokens for a given message list with optional tools.\"\"\"\n",
" if tools:\n",
- " response = client.messages.count_tokens(\n",
- " model=MODEL_NAME,\n",
- " messages=messages,\n",
- " tools=tools\n",
- " )\n",
+ " response = client.messages.count_tokens(model=MODEL_NAME, messages=messages, tools=tools)\n",
" else:\n",
- " response = client.messages.count_tokens(\n",
- " model=MODEL_NAME,\n",
- " messages=messages\n",
- " )\n",
+ " response = client.messages.count_tokens(model=MODEL_NAME, messages=messages)\n",
" return response.input_tokens"
]
},
@@ -116,7 +117,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 2,
"metadata": {
"vscode": {
"languageId": "python"
@@ -129,30 +130,30 @@
"text": [
"\n",
"=== INITIAL RESPONSE ===\n",
- "Response ID: msg_01NhR4vE9nVh2sHs5fXbzji8\n",
+ "Response ID: msg_011Cfdj5KspNpopEXyAhbhct\n",
"Stop reason: tool_use\n",
- "Model: claude-sonnet-4-6\n",
+ "Model: claude-sonnet-5-5\n",
"Content blocks: 3 blocks\n",
"\n",
"Block 1: Type = thinking\n",
- "Thinking content: The user is asking about the current weather in Paris. I can use the `weather` function to get this information.\n",
+ "Thinking content: I need to check the weather in Paris, so I'll call the weather tool for that.\n",
"\n",
- "The `weather` function requires a \"l...\n",
+ "...\n",
"Signature available: True\n",
"\n",
"Block 2: Type = text\n",
- "Text content: I'll check the current weather in Paris for you.\n",
+ "Text content: I need to check Paris's current conditions and anything that affects this evening, such as rain, temperature, wind, and how the weather is trending. I'll pull the weather now.\n",
"\n",
"Block 3: Type = tool_use\n",
"Tool: weather\n",
- "Tool input: {'location': 'Paris'}\n",
- "Tool ID: toolu_01WaeSyitUGJFaaPe68cJuEv\n",
+ "Tool input: {'location': 'Paris, France'}\n",
+ "Tool ID: toolu_014FismJG9gGgQfUSw9WVjGs\n",
"=== END INITIAL RESPONSE ===\n",
"\n",
"\n",
"=== EXECUTING TOOL ===\n",
"Tool name: weather\n",
- "Location to check: Paris\n",
+ "Location to check: Paris, France\n",
"Result: {'temperature': 65, 'condition': 'Rainy'}\n",
"=== TOOL EXECUTION COMPLETE ===\n",
"\n",
@@ -162,8 +163,35 @@
"\n",
"==== FULL RESPONSE ====\n",
"\n",
+ "🧠 THINKING BLOCK:\n",
+ "The data I got back is pretty sparse—just 65°F and rainy, no forecast details or timing. I'll be upfront about those limits while still giving a practical recommendation, like suggesting a covered or indoor option as a safe bet given the current rain.\n",
+ "\n",
+ "\n",
+ "\n",
+ "[Signature available: True]\n",
+ "[Signature (first 50 chars): CAQSzAgKEAgSGAI4AUIIdGhpbmtpbmcSDClkCAxutjspaB5bxx...]\n",
+ "\n",
"✓ FINAL ANSWER:\n",
- "Currently in Paris, it's 65°F (18°C) and rainy. You might want to bring an umbrella if you're heading out!\n",
+ "**Recommendation: move the dinner indoors.** If you can't, only keep it outside if you have solid covered space.\n",
+ "\n",
+ "**What the tool showed**\n",
+ "- The condition in Paris is **rainy**.\n",
+ "- The temperature is **65°F (about 18°C)**. The tool gave no unit, but only Fahrenheit makes sense for 65 in Paris.\n",
+ "\n",
+ "**Why I'd move it**\n",
+ "- **Rain is the main problem.** It's raining now, and the tool gave no sign that it will stop by this evening. Wet seating, soggy food, and guests dashing for cover are hard to fix once dinner has started.\n",
+ "- **The temperature won't help.** 65°F is mild now, but it will probably drop after sunset. Rain with a cooler evening feels colder than the number suggests, especially for people sitting still for a couple of hours.\n",
+ "- **Moving late costs more.** Moving indoors now is easy. Moving mid-meal means carrying food, plates, and candles through the rain.\n",
+ "\n",
+ "**What I couldn't check**\n",
+ "The tool only gave current conditions. I have no hourly forecast, rain chances, wind, or timing for this evening. If the rain is a passing shower and your dinner is several hours away, the evening could clear up. Look at a radar or hourly forecast, such as Météo-France, to see.\n",
+ "\n",
+ "**If you want to stay outside**\n",
+ "Only do it if both of these are true:\n",
+ "1. You have real cover, like a covered terrace, a sturdy awning, or a tent with sides. An umbrella isn't enough.\n",
+ "2. You have an indoor backup you can switch to within about 15 minutes.\n",
+ "\n",
+ "You could also decide at a set time, such as 2 hours before guests arrive. Go indoors if it's still raining then.\n",
"\n",
"==== END RESPONSE ====\n"
]
@@ -181,16 +209,17 @@
" \"properties\": {\n",
" \"location\": {\n",
" \"type\": \"string\",\n",
- " \"description\": \"The location to get weather for.\"\n",
+ " \"description\": \"The location to get weather for.\",\n",
" }\n",
" },\n",
- " \"required\": [\"location\"]\n",
- " }\n",
+ " \"required\": [\"location\"],\n",
+ " },\n",
" }\n",
" ]\n",
- " \n",
+ "\n",
" def weather(location):\n",
- " # Mock weather data\n",
+ " # Mock weather data, keyed by bare city name (the model may pass \"Paris, FR\")\n",
+ " location = location.split(\",\")[0].strip()\n",
" weather_data = {\n",
" \"New York\": {\"temperature\": 72, \"condition\": \"Sunny\"},\n",
" \"London\": {\"temperature\": 62, \"condition\": \"Cloudy\"},\n",
@@ -199,33 +228,35 @@
" \"Sydney\": {\"temperature\": 85, \"condition\": \"Clear\"},\n",
" \"Berlin\": {\"temperature\": 60, \"condition\": \"Foggy\"},\n",
" }\n",
- " \n",
+ "\n",
" return weather_data.get(location, {\"error\": f\"No weather data available for {location}\"})\n",
- " \n",
+ "\n",
+ " # A bare \"what's the weather in Paris?\" usually goes straight to the tool call with no\n",
+ " # thinking. Giving Claude a small decision that depends on the result makes it reason first.\n",
+ " user_message = {\n",
+ " \"role\": \"user\",\n",
+ " \"content\": \"I'm hosting an outdoor dinner in Paris this evening and deciding whether to move it indoors. Work out what you need to check, use the tool, then give me a recommendation with your reasoning.\",\n",
+ " }\n",
+ "\n",
" # Initial request with tool use and thinking\n",
" response = client.messages.create(\n",
" model=MODEL_NAME,\n",
" max_tokens=MAX_TOKENS,\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": THINKING_BUDGET_TOKENS\n",
- " },\n",
+ " thinking={\"type\": \"adaptive\", \"display\": \"summarized\"},\n",
+ " output_config={\"effort\": EFFORT},\n",
" tools=tools,\n",
- " messages=[{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"What's the weather like in Paris today?\"\n",
- " }]\n",
+ " messages=[user_message],\n",
" )\n",
- " \n",
+ "\n",
" # Detailed diagnostic output of initial response\n",
" print(\"\\n=== INITIAL RESPONSE ===\")\n",
" print(f\"Response ID: {response.id}\")\n",
" print(f\"Stop reason: {response.stop_reason}\")\n",
" print(f\"Model: {response.model}\")\n",
" print(f\"Content blocks: {len(response.content)} blocks\")\n",
- " \n",
+ "\n",
" for i, block in enumerate(response.content):\n",
- " print(f\"\\nBlock {i+1}: Type = {block.type}\")\n",
+ " print(f\"\\nBlock {i + 1}: Type = {block.type}\")\n",
" if block.type == \"thinking\":\n",
" print(f\"Thinking content: {block.thinking[:150]}...\")\n",
" print(f\"Signature available: {bool(getattr(block, 'signature', None))}\")\n",
@@ -236,63 +267,51 @@
" print(f\"Tool input: {block.input}\")\n",
" print(f\"Tool ID: {block.id}\")\n",
" print(\"=== END INITIAL RESPONSE ===\\n\")\n",
- " \n",
- " # Extract thinking blocks to include in the conversation history\n",
- " assistant_blocks = []\n",
- " for block in response.content:\n",
- " if block.type in [\"thinking\", \"redacted_thinking\", \"tool_use\"]:\n",
- " assistant_blocks.append(block)\n",
- " \n",
- " # Handle tool use if required\n",
- " full_conversation = [{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"What's the weather like in Paris today?\"\n",
- " }]\n",
- " \n",
- " if response.stop_reason == \"tool_use\":\n",
- " # Add entire assistant response with thinking blocks and tool use\n",
- " full_conversation.append({\n",
- " \"role\": \"assistant\",\n",
- " \"content\": assistant_blocks\n",
- " })\n",
- " \n",
- " # Find the tool_use block\n",
- " tool_use_block = next((block for block in response.content if block.type == \"tool_use\"), None)\n",
- " if tool_use_block:\n",
- " # Execute the tool\n",
- " print(f\"\\n=== EXECUTING TOOL ===\")\n",
+ "\n",
+ " # Handle tool use until Claude gives its final answer\n",
+ " full_conversation = [user_message]\n",
+ "\n",
+ " while response.stop_reason == \"tool_use\":\n",
+ " # Keep the whole assistant turn (thinking, redacted_thinking, text and tool_use blocks,\n",
+ " # in order) for the conversation history. Thinking blocks are signed and bound to the\n",
+ " # conversation prefix, so pass the turn back exactly as received.\n",
+ " full_conversation.append({\"role\": \"assistant\", \"content\": response.content})\n",
+ "\n",
+ " # Execute every tool_use block in this turn and answer each one\n",
+ " tool_results = []\n",
+ " for tool_use_block in (b for b in response.content if b.type == \"tool_use\"):\n",
+ " print(\"\\n=== EXECUTING TOOL ===\")\n",
" print(f\"Tool name: {tool_use_block.name}\")\n",
" print(f\"Location to check: {tool_use_block.input['location']}\")\n",
" tool_result = weather(tool_use_block.input[\"location\"])\n",
" print(f\"Result: {tool_result}\")\n",
" print(\"=== TOOL EXECUTION COMPLETE ===\\n\")\n",
- " \n",
- " # Add tool result to conversation\n",
- " full_conversation.append({\n",
- " \"role\": \"user\",\n",
- " \"content\": [{\n",
+ " tool_results.append(\n",
+ " {\n",
" \"type\": \"tool_result\",\n",
" \"tool_use_id\": tool_use_block.id,\n",
- " \"content\": json.dumps(tool_result)\n",
- " }]\n",
- " })\n",
- " \n",
- " # Continue the conversation with the same thinking configuration\n",
- " print(\"\\n=== SENDING FOLLOW-UP REQUEST WITH TOOL RESULT ===\")\n",
- " response = client.messages.create(\n",
- " model=MODEL_NAME,\n",
- " max_tokens=MAX_TOKENS,\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": THINKING_BUDGET_TOKENS\n",
- " },\n",
- " tools=tools,\n",
- " messages=full_conversation\n",
+ " \"content\": json.dumps(tool_result),\n",
+ " }\n",
" )\n",
- " print(f\"Follow-up response received. Stop reason: {response.stop_reason}\")\n",
- " \n",
+ "\n",
+ " # Add the tool results to the conversation in a single user turn\n",
+ " full_conversation.append({\"role\": \"user\", \"content\": tool_results})\n",
+ "\n",
+ " # Continue the conversation with the same thinking configuration\n",
+ " print(\"\\n=== SENDING FOLLOW-UP REQUEST WITH TOOL RESULT ===\")\n",
+ " response = client.messages.create(\n",
+ " model=MODEL_NAME,\n",
+ " max_tokens=MAX_TOKENS,\n",
+ " thinking={\"type\": \"adaptive\", \"display\": \"summarized\"},\n",
+ " output_config={\"effort\": EFFORT},\n",
+ " tools=tools,\n",
+ " messages=full_conversation,\n",
+ " )\n",
+ " print(f\"Follow-up response received. Stop reason: {response.stop_reason}\")\n",
+ "\n",
" print_thinking_response(response)\n",
"\n",
+ "\n",
"# Run the example\n",
"tool_use_with_thinking()"
]
@@ -308,7 +327,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 3,
"metadata": {
"vscode": {
"languageId": "python"
@@ -321,26 +340,29 @@
"text": [
"\n",
"=== INITIAL RESPONSE ===\n",
- "Response ID: msg_01VwqpBMARVoTP1H8Ytvmvsb\n",
+ "Response ID: msg_011Cfdj62iENiRCj8mRZbo5x\n",
"Stop reason: tool_use\n",
- "Model: claude-sonnet-4-6\n",
- "Content blocks: 3 blocks\n",
+ "Model: claude-sonnet-5-5\n",
+ "Content blocks: 4 blocks\n",
"\n",
"Block 1: Type = thinking\n",
- "Thinking content: The user is asking for two pieces of information:\n",
- "1. The weather in London\n",
- "2. The latest news about technology\n",
+ "Thinking content: London weather and outdoor tech news are unrelated requests, so I can fetch both at once.\n",
"\n",
- "Let me check what tools I have availab...\n",
+ "...\n",
"Signature available: True\n",
"\n",
"Block 2: Type = text\n",
- "Text content: I'll get that information for you right away.\n",
+ "Text content: I'll check two things: the London weather, which decides indoors or outdoors, and current outdoor tech news, which could give you an opening for the talk. Neither depends on the other, so I'll run both now.\n",
"\n",
"Block 3: Type = tool_use\n",
"Tool: weather\n",
"Tool input: {'location': 'London'}\n",
- "Tool ID: toolu_016xHQWMR4JsKtWvH9nbsZyA\n",
+ "Tool ID: toolu_016w2JwNyoLzMzEVbLpH62xJ\n",
+ "\n",
+ "Block 4: Type = tool_use\n",
+ "Tool: news\n",
+ "Tool input: {'topic': 'outdoor tech'}\n",
+ "Tool ID: toolu_01VbrLTn6hoqbSCzFdsJSTYm\n",
"=== END INITIAL RESPONSE ===\n",
"\n",
"\n",
@@ -353,57 +375,66 @@
"=== TOOL EXECUTION COMPLETE ===\n",
"\n",
"\n",
- "=== SENDING FOLLOW-UP REQUEST WITH TOOL RESULT ===\n",
- "\n",
- "=== FOLLOW-UP RESPONSE (ITERATION 1) ===\n",
- "Response ID: msg_01EhR96Z2Z2t5EDhuWeodUod\n",
- "Stop reason: tool_use\n",
- "Content blocks: 1 blocks\n",
- "\n",
- "Block 1: Type = tool_use\n",
- "Tool: news\n",
- "Tool input preview: {'topic': 'technology'}\n",
- "=== END FOLLOW-UP RESPONSE (ITERATION 1) ===\n",
- "\n",
- "\n",
- "=== TOOL USE ITERATION 2 ===\n",
- "\n",
"=== EXECUTING TOOL ===\n",
"Tool name: news\n",
- "Topic to check: technology\n",
+ "Topic to check: outdoor tech\n",
"Result: {'headlines': ['New AI breakthrough announced by research lab', 'Tech company releases latest smartphone model', 'Quantum computing reaches milestone achievement']}\n",
"=== TOOL EXECUTION COMPLETE ===\n",
"\n",
"\n",
"=== SENDING FOLLOW-UP REQUEST WITH TOOL RESULT ===\n",
"\n",
- "=== FOLLOW-UP RESPONSE (ITERATION 2) ===\n",
- "Response ID: msg_01WUEfC4UxPFaJaktjVDMJEN\n",
+ "=== FOLLOW-UP RESPONSE (ITERATION 1) ===\n",
+ "Response ID: msg_011Cfdj6FH2q2v5mcsXVFXim\n",
"Stop reason: end_turn\n",
- "Content blocks: 1 blocks\n",
+ "Content blocks: 2 blocks\n",
"\n",
- "Block 1: Type = text\n",
- "Text content preview: Here's the information you requested:\n",
+ "Block 1: Type = thinking\n",
+ "Thinking content preview: This weather data I have is current conditions, 62°F and cloudy, not actually a forecast for tomorro...\n",
"\n",
- "## Weather in London\n",
- "Currently, it's 62°F and cloudy in Londo...\n",
- "=== END FOLLOW-UP RESPONSE (ITERATION 2) ===\n",
+ "Block 2: Type = text\n",
+ "Text content preview: ## What the tools returned\n",
+ "- **Weather (London):** 62°F (about 17°C) and cloudy.\n",
+ "- **News (\"outdoor ...\n",
+ "=== END FOLLOW-UP RESPONSE (ITERATION 1) ===\n",
"\n",
"\n",
"=== FINAL RESPONSE ===\n",
"\n",
"==== FULL RESPONSE ====\n",
"\n",
+ "🧠 THINKING BLOCK:\n",
+ "This weather data I have is current conditions, 62°F and cloudy, not actually a forecast for tomorrow evening, so I should be upfront about that limitation rather than pretend it's predictive. I'll give my recommendation but flag that the info is approximate.\n",
+ "\n",
+ "\n",
+ "\n",
+ "[Signature available: True]\n",
+ "[Signature (first 50 chars): CAQSpgcKEAgSGAI4AUIIdGhpbmtpbmcSDGBMkNBxX+VByEIp0x...]\n",
+ "\n",
"✓ FINAL ANSWER:\n",
- "Here's the information you requested:\n",
+ "## What the tools returned\n",
+ "- **Weather (London):** 62°F (about 17°C) and cloudy.\n",
+ "- **News (\"outdoor tech\"):** The headlines were about a new AI breakthrough, a new smartphone release, and a quantum computing milestone. None of them is specific to outdoor tech.\n",
"\n",
- "## Weather in London\n",
- "Currently, it's 62°F and cloudy in London.\n",
+ "## Limits of this data\n",
+ "- **The weather is a current reading, not a forecast for tomorrow evening.** It doesn't show rain chances, wind, or how much the temperature drops after sunset. That matters because London evenings are usually several degrees cooler than the daytime reading.\n",
+ "- **The news results are general tech headlines.** They don't connect to an outdoor theme.\n",
"\n",
- "## Latest Technology News Headlines\n",
- "- New AI breakthrough announced by research lab\n",
- "- Tech company releases latest smartphone model\n",
- "- Quantum computing reaches milestone achievement\n",
+ "## Recommendation on moving indoors\n",
+ "**Keep it outdoors, but only if you have a cover or a fallback, and check an hourly forecast tomorrow morning.**\n",
+ "- 62°F and cloudy is comfortable. Cloud also helps if people are looking at laptops or phone screens, because there's no glare.\n",
+ "- The evening will be cooler, so tell attendees to bring a layer.\n",
+ "- I can't see rain risk. Check the Met Office or BBC Weather hourly forecast tomorrow morning. If rain is likely during your event window, or if you have no cover for equipment, move indoors or have a booked backup space.\n",
+ "- Because it's a tech meetup, think about power, Wi-Fi, and keeping the AV kit dry. Those are good reasons to go indoors even in marginal weather.\n",
+ "\n",
+ "## Recommendation on the opening\n",
+ "Of the three headlines, **quantum computing reaching a milestone** or **the new AI breakthrough** would grab attention most easily. I only have the headlines, with no details, so I'd check the full stories before citing specifics.\n",
+ "\n",
+ "Here are two ways to tie it to an outdoor setting:\n",
+ "1. **Use the weather itself as the hook.** For example: \"We're sitting under a cloudy London sky, and forecasting this exact sky is one of the hardest computing problems around.\" You can then lead into AI or quantum computing as the tools that might improve weather prediction. That fits the venue and the headlines.\n",
+ "2. **Open with a question to the audience.** For example: \"What's one piece of tech you'd trust to work outdoors in British weather?\" It gets people talking and suits an outdoor crowd, and it doesn't depend on weak news material.\n",
+ "\n",
+ "I'd go with option 1 if you're outside, because it uses the setting. If you move indoors, option 2 works just as well.\n",
"\n",
"==== END RESPONSE ====\n",
"=== END FINAL RESPONSE ===\n"
@@ -422,11 +453,11 @@
" \"properties\": {\n",
" \"location\": {\n",
" \"type\": \"string\",\n",
- " \"description\": \"The location to get weather for.\"\n",
+ " \"description\": \"The location to get weather for.\",\n",
" }\n",
" },\n",
- " \"required\": [\"location\"]\n",
- " }\n",
+ " \"required\": [\"location\"],\n",
+ " },\n",
" },\n",
" {\n",
" \"name\": \"news\",\n",
@@ -434,18 +465,16 @@
" \"input_schema\": {\n",
" \"type\": \"object\",\n",
" \"properties\": {\n",
- " \"topic\": {\n",
- " \"type\": \"string\",\n",
- " \"description\": \"The topic to get news about.\"\n",
- " }\n",
+ " \"topic\": {\"type\": \"string\", \"description\": \"The topic to get news about.\"}\n",
" },\n",
- " \"required\": [\"topic\"]\n",
- " }\n",
- " }\n",
+ " \"required\": [\"topic\"],\n",
+ " },\n",
+ " },\n",
" ]\n",
- " \n",
+ "\n",
" def weather(location):\n",
- " # Mock weather data\n",
+ " # Mock weather data, keyed by bare city name (the model may pass \"Paris, FR\")\n",
+ " location = location.split(\",\")[0].strip()\n",
" weather_data = {\n",
" \"New York\": {\"temperature\": 72, \"condition\": \"Sunny\"},\n",
" \"London\": {\"temperature\": 62, \"condition\": \"Cloudy\"},\n",
@@ -454,56 +483,61 @@
" \"Sydney\": {\"temperature\": 85, \"condition\": \"Clear\"},\n",
" \"Berlin\": {\"temperature\": 60, \"condition\": \"Foggy\"},\n",
" }\n",
- " \n",
+ "\n",
" return weather_data.get(location, {\"error\": f\"No weather data available for {location}\"})\n",
- " \n",
+ "\n",
" def news(topic):\n",
" # Mock news data\n",
" news_data = {\n",
" \"technology\": [\n",
" \"New AI breakthrough announced by research lab\",\n",
" \"Tech company releases latest smartphone model\",\n",
- " \"Quantum computing reaches milestone achievement\"\n",
+ " \"Quantum computing reaches milestone achievement\",\n",
" ],\n",
" \"sports\": [\n",
" \"Local team wins championship game\",\n",
" \"Star player signs record-breaking contract\",\n",
- " \"Olympic committee announces host city for 2036\"\n",
+ " \"Olympic committee announces host city for 2036\",\n",
" ],\n",
" \"weather\": [\n",
" \"Storm system developing in the Atlantic\",\n",
" \"Record temperatures recorded across Europe\",\n",
- " \"Climate scientists release new research findings\"\n",
- " ]\n",
+ " \"Climate scientists release new research findings\",\n",
+ " ],\n",
" }\n",
- " \n",
- " return {\"headlines\": news_data.get(topic.lower(), [\"No news available for this topic\"])}\n",
- " \n",
+ "\n",
+ " # Loose matching so \"London tech\" or \"technology news\" resolve to a category\n",
+ " topic = topic.lower()\n",
+ " for key, headlines in news_data.items():\n",
+ " if key in topic or (key == \"technology\" and \"tech\" in topic):\n",
+ " return {\"headlines\": headlines}\n",
+ " return {\"headlines\": [\"No news available for this topic\"]}\n",
+ "\n",
" # Initial request\n",
" response = client.messages.create(\n",
" model=MODEL_NAME,\n",
" max_tokens=MAX_TOKENS,\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": THINKING_BUDGET_TOKENS\n",
- " },\n",
+ " thinking={\"type\": \"adaptive\", \"display\": \"summarized\"},\n",
+ " output_config={\"effort\": EFFORT},\n",
" tools=tools,\n",
- " messages=[{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"What's the weather in London, and can you also tell me the latest news about technology?\"\n",
- " }]\n",
+ " messages=[\n",
+ " {\n",
+ " \"role\": \"user\",\n",
+ " \"content\": \"I run an outdoor tech meetup in London tomorrow evening and I'm deciding whether to move it indoors and what to open the talk with. Work out which of your tools you need and in what order, use them, then give me a recommendation with your reasoning.\",\n",
+ " }\n",
+ " ],\n",
" )\n",
- " \n",
+ "\n",
" # Print detailed information about initial response\n",
" print(\"\\n=== INITIAL RESPONSE ===\")\n",
" print(f\"Response ID: {response.id}\")\n",
" print(f\"Stop reason: {response.stop_reason}\")\n",
" print(f\"Model: {response.model}\")\n",
" print(f\"Content blocks: {len(response.content)} blocks\")\n",
- " \n",
+ "\n",
" # Print each content block\n",
" for i, block in enumerate(response.content):\n",
- " print(f\"\\nBlock {i+1}: Type = {block.type}\")\n",
+ " print(f\"\\nBlock {i + 1}: Type = {block.type}\")\n",
" if block.type == \"thinking\":\n",
" print(f\"Thinking content: {block.thinking[:150]}...\")\n",
" print(f\"Signature available: {bool(getattr(block, 'signature', None))}\")\n",
@@ -514,82 +548,79 @@
" print(f\"Tool input: {block.input}\")\n",
" print(f\"Tool ID: {block.id}\")\n",
" print(\"=== END INITIAL RESPONSE ===\\n\")\n",
- " \n",
+ "\n",
" # Handle potentially multiple tool calls\n",
- " full_conversation = [{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"What's the weather in London, and can you also tell me the latest news about technology?\"\n",
- " }]\n",
- " \n",
+ " full_conversation = [\n",
+ " {\n",
+ " \"role\": \"user\",\n",
+ " \"content\": \"I run an outdoor tech meetup in London tomorrow evening and I'm deciding whether to move it indoors and what to open the talk with. Work out which of your tools you need and in what order, use them, then give me a recommendation with your reasoning.\",\n",
+ " }\n",
+ " ]\n",
+ "\n",
" # Track iteration count for multi-turn tool use\n",
" iteration = 0\n",
- " \n",
+ "\n",
" while response.stop_reason == \"tool_use\":\n",
" iteration += 1\n",
" print(f\"\\n=== TOOL USE ITERATION {iteration} ===\")\n",
- " \n",
- " # Extract thinking blocks and tool use to include in conversation history\n",
- " assistant_blocks = []\n",
- " for block in response.content:\n",
- " if block.type in [\"thinking\", \"redacted_thinking\", \"tool_use\"]:\n",
- " assistant_blocks.append(block)\n",
- " \n",
+ "\n",
+ " # Keep the whole assistant turn (thinking, text and tool_use blocks, in order)\n",
+ " # for the conversation history; pass it back exactly as received\n",
+ " assistant_blocks = response.content\n",
+ "\n",
" # Add assistant response with thinking blocks and tool use\n",
- " full_conversation.append({\n",
- " \"role\": \"assistant\",\n",
- " \"content\": assistant_blocks\n",
- " })\n",
- " \n",
- " # Find the tool_use block\n",
- " tool_use_block = next((block for block in response.content if block.type == \"tool_use\"), None)\n",
- " if tool_use_block:\n",
- " print(f\"\\n=== EXECUTING TOOL ===\")\n",
- " print(f\"Tool name: {tool_use_block.name}\")\n",
- " \n",
- " # Execute the appropriate tool\n",
- " if tool_use_block.name == \"weather\":\n",
- " print(f\"Location to check: {tool_use_block.input['location']}\")\n",
- " tool_result = weather(tool_use_block.input[\"location\"])\n",
- " elif tool_use_block.name == \"news\":\n",
- " print(f\"Topic to check: {tool_use_block.input['topic']}\")\n",
- " tool_result = news(tool_use_block.input[\"topic\"])\n",
- " else:\n",
- " tool_result = {\"error\": \"Unknown tool\"}\n",
- " \n",
- " print(f\"Result: {tool_result}\")\n",
- " print(\"=== TOOL EXECUTION COMPLETE ===\\n\")\n",
- " \n",
- " # Add tool result to conversation\n",
- " full_conversation.append({\n",
- " \"role\": \"user\",\n",
- " \"content\": [{\n",
- " \"type\": \"tool_result\",\n",
- " \"tool_use_id\": tool_use_block.id,\n",
- " \"content\": json.dumps(tool_result)\n",
- " }]\n",
- " })\n",
- " \n",
+ " full_conversation.append({\"role\": \"assistant\", \"content\": assistant_blocks})\n",
+ "\n",
+ " # Run every tool_use block in this turn (Claude may call several tools in parallel)\n",
+ " tool_use_blocks = [block for block in response.content if block.type == \"tool_use\"]\n",
+ " if tool_use_blocks:\n",
+ " tool_results = []\n",
+ " for tool_use_block in tool_use_blocks:\n",
+ " print(\"\\n=== EXECUTING TOOL ===\")\n",
+ " print(f\"Tool name: {tool_use_block.name}\")\n",
+ "\n",
+ " # Execute the appropriate tool\n",
+ " if tool_use_block.name == \"weather\":\n",
+ " print(f\"Location to check: {tool_use_block.input['location']}\")\n",
+ " tool_result = weather(tool_use_block.input[\"location\"])\n",
+ " elif tool_use_block.name == \"news\":\n",
+ " print(f\"Topic to check: {tool_use_block.input['topic']}\")\n",
+ " tool_result = news(tool_use_block.input[\"topic\"])\n",
+ " else:\n",
+ " tool_result = {\"error\": \"Unknown tool\"}\n",
+ "\n",
+ " print(f\"Result: {tool_result}\")\n",
+ " print(\"=== TOOL EXECUTION COMPLETE ===\\n\")\n",
+ " tool_results.append(\n",
+ " {\n",
+ " \"type\": \"tool_result\",\n",
+ " \"tool_use_id\": tool_use_block.id,\n",
+ " \"content\": json.dumps(tool_result),\n",
+ " }\n",
+ " )\n",
+ "\n",
+ " # Add all tool results to the conversation in a single user turn\n",
+ " full_conversation.append({\"role\": \"user\", \"content\": tool_results})\n",
+ "\n",
" # Continue the conversation\n",
" print(\"\\n=== SENDING FOLLOW-UP REQUEST WITH TOOL RESULT ===\")\n",
" response = client.messages.create(\n",
" model=MODEL_NAME,\n",
" max_tokens=MAX_TOKENS,\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": THINKING_BUDGET_TOKENS\n",
- " },\n",
+ " thinking={\"type\": \"adaptive\", \"display\": \"summarized\"},\n",
+ " output_config={\"effort\": EFFORT},\n",
" tools=tools,\n",
- " messages=full_conversation\n",
+ " messages=full_conversation,\n",
" )\n",
- " \n",
+ "\n",
" # Print follow-up response details\n",
" print(f\"\\n=== FOLLOW-UP RESPONSE (ITERATION {iteration}) ===\")\n",
" print(f\"Response ID: {response.id}\")\n",
" print(f\"Stop reason: {response.stop_reason}\")\n",
" print(f\"Content blocks: {len(response.content)} blocks\")\n",
- " \n",
+ "\n",
" for i, block in enumerate(response.content):\n",
- " print(f\"\\nBlock {i+1}: Type = {block.type}\")\n",
+ " print(f\"\\nBlock {i + 1}: Type = {block.type}\")\n",
" if block.type == \"thinking\":\n",
" print(f\"Thinking content preview: {block.thinking[:100]}...\")\n",
" elif block.type == \"text\":\n",
@@ -598,7 +629,7 @@
" print(f\"Tool: {block.name}\")\n",
" print(f\"Tool input preview: {str(block.input)[:100]}\")\n",
" print(f\"=== END FOLLOW-UP RESPONSE (ITERATION {iteration}) ===\\n\")\n",
- " \n",
+ "\n",
" if response.stop_reason != \"tool_use\":\n",
" print(\"\\n=== FINAL RESPONSE ===\")\n",
" print_thinking_response(response)\n",
@@ -607,6 +638,7 @@
" print(\"No tool_use block found in response.\")\n",
" break\n",
"\n",
+ "\n",
"# Run the example\n",
"multiple_tool_calls_with_thinking()"
]
@@ -623,18 +655,20 @@
"\n",
"When working with extended thinking and tools, make sure to:\n",
"\n",
- "1. **Preserve thinking block signatures**: Each thinking block contains a cryptographic signature that validates the conversation context. These signatures must be included when passing thinking blocks back to Claude.\n",
+ "1. **Pass thinking blocks back unchanged, with their signatures.** Each `thinking` block carries a cryptographic `signature` over the full (unsummarized) reasoning. When you send tool results, include the previous assistant turn exactly as you received it: `thinking` / `redacted_thinking` / `text` / `tool_use` blocks, in order. A block whose signature doesn't verify is rejected with a 400.\n",
+ "\n",
+ "2. **Don't edit earlier turns.** On Claude Sonnet 5.5 a thinking block is also bound to the conversation prefix that produced it (the system prompt, the `tools` array, and every earlier message). If you replay a thinking block after changing any of that, the block no longer matches its conversation. Accounts created on or after August 31, 2026 get a 400 for this by default; older accounts can opt in with the `thinking-binding-controls-2026-08-01` beta header and `thinking.block_binding.prefix_mismatch_behavior` set to `\"error\"` (reject the request) or `\"drop_block\"` (drop the stale block and report it in `input_transformations`). The example below uses the beta header so the behavior is the same on any account.\n",
"\n",
- "2. **Avoid modifying prior context**: The API will reject requests if any previous content (including thinking blocks) is modified when submitting a new request with tool results.\n",
+ "3. **Don't silently drop them either.** Leaving the thinking blocks out of the replayed turn is accepted by the API, but Claude then continues the task without the reasoning it did before the tool call. Keep them.\n",
"\n",
- "3. **Handle both thinking and redacted_thinking blocks**: Both types of blocks must be preserved in the conversation history, even if the content of redacted blocks is not human readable.\n",
+ "4. **Handle both `thinking` and `redacted_thinking` blocks.** Both must be preserved in the conversation history, even though the content of redacted blocks is not human readable.\n",
"\n",
"For more details on extended thinking without tools, see the main \"Extended Thinking\" notebook."
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 4,
"metadata": {
"vscode": {
"languageId": "python"
@@ -655,21 +689,47 @@
"Location to check: Berlin\n",
"Tool result: {'temperature': 60, 'condition': 'Foggy'}\n",
"\n",
- "=== TEST 1: WITHOUT thinking block ===\n",
- "ERROR: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.1.content.0.type: Expected `thinking` or `redacted_thinking`, but found `tool_use`. When `thinking` is enabled, a final `assistant` message must start with a thinking block (preceeding the lastmost set of `tool_use` and `tool_result` blocks). We recommend you include thinking blocks from previous turns. To avoid this requirement, disable `thinking`. Please consult our documentation at https://docs.claude.com/en/docs/build-with-claude/extended-thinking'}}\n",
- "This demonstrates that thinking blocks must be preserved\n",
+ "=== TEST 1: modified signature ===\n",
+ "ERROR (tampered signature): Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.1.content.0: Invalid `signature` in `thinking` block'}, 'request_id': 'req_011Cfdj789gkiDGRiGuVqr8n'}\n",
+ "Thinking blocks must be passed back byte-for-byte, signature included.\n",
+ "\n",
+ "=== TEST 2: edited earlier turn, prefix_mismatch_behavior='error' ===\n",
+ "ERROR (edited prefix): Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.1.content.0: Invalid `signature` in `thinking` block. The block is bound to a different conversation. Remove the block, or set `thinking.block_binding.prefix_mismatch_behavior` to \"drop_block\". Content before this block differs from when it was created, first at `messages.0.content.0`.'}, 'request_id': 'req_011Cfdj78tLJjd4YRHAKCFck'}\n",
+ "\n",
+ "=== TEST 3: edited earlier turn, prefix_mismatch_behavior='drop_block' ===\n",
+ "SUCCESS (edited prefix, drop_block): stop_reason=end_turn\n",
+ "input_transformations: [{'type': 'thinking_dropped', 'path': 'messages.1.content.0', 'reason': 'prefix_binding_mismatch'}]\n",
"\n",
- "=== TEST 2: WITH thinking block (correct approach) ===\n",
- "SUCCESS: Response received with thinking blocks included\n",
+ "=== TEST 4: WITH thinking block, unchanged history (correct approach) ===\n",
+ "SUCCESS (full replay): stop_reason=end_turn\n",
"\n",
"Second response contains:\n",
- "- 0 thinking blocks\n",
+ "- 1 thinking blocks\n",
"- 1 text blocks\n",
"\n",
- "Final answer: Currently in Berlin, it's foggy with a temperature of 60°F (about 15.5°C).\n",
+ "Final answer: **Yes, leave extra time. I'd add about 10–15 minutes, or more if your route is long or goes through busy areas.**\n",
+ "\n",
+ "The tool reports Berlin as **foggy at 60 degrees**. It gave no unit, but 60 is only a plausible temperature in °F, which is about 16°C. That's mild, so cold isn't the problem.\n",
+ "\n",
+ "**Why the fog matters**\n",
+ "- **Visibility:** You'll see junctions, tram tracks, turning vehicles and pedestrians later, and drivers will see you later too. You'll probably ride more slowly and cautiously, especially on shared roads and at crossings.\n",
+ "- **Damp surfaces:** Fog often leaves roads, cobbles, tram rails and painted road markings slick. Berlin has plenty of all of these, so braking and cornering need more care.\n",
+ "- **Delays at junctions:** Slower traffic and more cautious road users tend to add stops and waiting time across a whole cross-city ride.\n",
"\n",
- "Note: The second response after tool use doesn't contain thinking blocks.\n",
- "This is expected behavior - thinking is shown before tool use but not after receiving tool results.\n"
+ "**What I couldn't check**\n",
+ "- The report had no wind, rain or forecast data, so I can't say whether conditions will improve or get worse during your ride.\n",
+ "- I only have a city-wide reading. Fog can be thicker near the Spree, parks or open areas like Tempelhofer Feld.\n",
+ "\n",
+ "**Before you go**\n",
+ "- Switch on front and rear lights, even if it's daytime.\n",
+ "- Wear something light-coloured or reflective.\n",
+ "- Brake earlier than usual, and take extra care on tram tracks and cobbles.\n",
+ "- Check the BVG or S-Bahn status now. If the ride looks too tight, you'll know your fallback.\n",
+ "\n",
+ "If the meeting is critical, aim to arrive 10 minutes early. That leaves room for a slow ride or a wrong turn.\n",
+ "\n",
+ "Note: with adaptive thinking Claude may or may not think again after a tool result,\n",
+ "so the second response can contain thinking blocks. Either way, pass every earlier block back unchanged.\n"
]
}
],
@@ -685,16 +745,17 @@
" \"properties\": {\n",
" \"location\": {\n",
" \"type\": \"string\",\n",
- " \"description\": \"The location to get weather for.\"\n",
+ " \"description\": \"The location to get weather for.\",\n",
" }\n",
" },\n",
- " \"required\": [\"location\"]\n",
- " }\n",
+ " \"required\": [\"location\"],\n",
+ " },\n",
" }\n",
" ]\n",
- " \n",
+ "\n",
" def weather(location):\n",
- " # Mock weather data\n",
+ " # Mock weather data, keyed by bare city name (the model may pass \"Paris, FR\")\n",
+ " location = location.split(\",\")[0].strip()\n",
" weather_data = {\n",
" \"New York\": {\"temperature\": 72, \"condition\": \"Sunny\"},\n",
" \"London\": {\"temperature\": 62, \"condition\": \"Cloudy\"},\n",
@@ -703,116 +764,147 @@
" \"Sydney\": {\"temperature\": 85, \"condition\": \"Clear\"},\n",
" \"Berlin\": {\"temperature\": 60, \"condition\": \"Foggy\"},\n",
" }\n",
- " \n",
+ "\n",
" return weather_data.get(location, {\"error\": f\"No weather data available for {location}\"})\n",
- " \n",
- " # Initial request with tool use and thinking\n",
- " response = client.messages.create(\n",
- " model=MODEL_NAME,\n",
- " max_tokens=MAX_TOKENS,\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": THINKING_BUDGET_TOKENS\n",
- " },\n",
- " tools=tools,\n",
- " messages=[{\n",
- " \"role\": \"user\",\n",
- " \"content\": \"What's the weather like in Berlin right now?\"\n",
- " }]\n",
- " )\n",
- " \n",
- " # Extract blocks from response\n",
- " thinking_blocks = [b for b in response.content if b.type == \"thinking\"]\n",
- " tool_use_blocks = [b for b in response.content if b.type == \"tool_use\"]\n",
- " \n",
+ "\n",
+ " question = \"I'm about to cycle across Berlin to a meeting I can't be late for. Work out what you need to check, use the tool, then tell me whether to leave extra time and why.\"\n",
+ "\n",
+ " # Opt in to strict prefix binding so this demo behaves the same on every account\n",
+ " # (accounts created on or after 2026-08-31 get this behavior by default).\n",
+ " betas = [\"thinking-binding-controls-2026-08-01\"]\n",
+ " strict_thinking = {\n",
+ " \"type\": \"adaptive\",\n",
+ " \"display\": \"summarized\",\n",
+ " \"block_binding\": {\"prefix_mismatch_behavior\": \"error\"},\n",
+ " }\n",
+ "\n",
+ " # Initial request with tool use and thinking. Adaptive thinking occasionally skips\n",
+ " # thinking even here, so retry a couple of times until we have a thinking block to work with.\n",
+ " for _ in range(3):\n",
+ " response = client.beta.messages.create(\n",
+ " model=MODEL_NAME,\n",
+ " max_tokens=MAX_TOKENS,\n",
+ " thinking=strict_thinking,\n",
+ " output_config={\"effort\": EFFORT},\n",
+ " tools=tools,\n",
+ " betas=betas,\n",
+ " messages=[{\"role\": \"user\", \"content\": question}],\n",
+ " )\n",
+ " thinking_blocks = [b for b in response.content if b.type == \"thinking\"]\n",
+ " tool_use_blocks = [b for b in response.content if b.type == \"tool_use\"]\n",
+ " if thinking_blocks and tool_use_blocks:\n",
+ " break\n",
+ "\n",
" print(\"\\n=== INITIAL RESPONSE ===\")\n",
- " print(f\"Response contains:\")\n",
+ " print(\"Response contains:\")\n",
" print(f\"- {len(thinking_blocks)} thinking blocks\")\n",
" print(f\"- {len(tool_use_blocks)} tool use blocks\")\n",
- " \n",
- " # Check if tool use was triggered\n",
- " if tool_use_blocks:\n",
- " tool_block = tool_use_blocks[0]\n",
- " print(f\"\\nTool called: {tool_block.name}\")\n",
- " print(f\"Location to check: {tool_block.input['location']}\")\n",
- " \n",
- " # Execute the tool\n",
- " tool_result = weather(tool_block.input[\"location\"])\n",
- " print(f\"Tool result: {tool_result}\")\n",
- " \n",
- " # First, let's try WITHOUT including the thinking block\n",
- " print(\"\\n=== TEST 1: WITHOUT thinking block ===\")\n",
- " try:\n",
- " # Notice we're only including the tool_use block, not the thinking block\n",
- " partial_blocks = tool_use_blocks\n",
- " \n",
- " incomplete_response = client.messages.create(\n",
- " model=MODEL_NAME,\n",
- " max_tokens=MAX_TOKENS,\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": THINKING_BUDGET_TOKENS\n",
- " },\n",
- " tools=tools,\n",
- " messages=[\n",
- " {\"role\": \"user\", \"content\": \"What's the weather like in Berlin right now?\"},\n",
- " {\"role\": \"assistant\", \"content\": partial_blocks},\n",
- " {\"role\": \"user\", \"content\": [{\n",
- " \"type\": \"tool_result\",\n",
- " \"tool_use_id\": tool_block.id,\n",
- " \"content\": json.dumps(tool_result)\n",
- " }]}\n",
- " ]\n",
- " )\n",
- " print(\"SUCCESS: Response received without thinking block (not expected)\")\n",
- " except Exception as e:\n",
- " print(f\"ERROR: {e}\")\n",
- " print(\"This demonstrates that thinking blocks must be preserved\")\n",
- " \n",
- " # Now try WITH the thinking block included (correct approach)\n",
- " print(\"\\n=== TEST 2: WITH thinking block (correct approach) ===\")\n",
+ "\n",
+ " if not (thinking_blocks and tool_use_blocks):\n",
+ " print(\"\\nClaude answered without a thinking block or without calling the tool this time;\")\n",
+ " print(\"re-run the cell to see the preservation checks below.\")\n",
+ " return\n",
+ "\n",
+ " tool_block = tool_use_blocks[0]\n",
+ " print(f\"\\nTool called: {tool_block.name}\")\n",
+ " print(f\"Location to check: {tool_block.input['location']}\")\n",
+ "\n",
+ " # Execute the tool\n",
+ " tool_result = weather(tool_block.input[\"location\"])\n",
+ " print(f\"Tool result: {tool_result}\")\n",
+ " tool_result_turn = {\n",
+ " \"role\": \"user\",\n",
+ " \"content\": [\n",
+ " {\n",
+ " \"type\": \"tool_result\",\n",
+ " \"tool_use_id\": tool_block.id,\n",
+ " \"content\": json.dumps(tool_result),\n",
+ " }\n",
+ " ],\n",
+ " }\n",
+ "\n",
+ " def follow_up(label, messages, thinking=strict_thinking):\n",
" try:\n",
- " # Include all blocks from the response\n",
- " complete_blocks = thinking_blocks + tool_use_blocks\n",
- " \n",
- " complete_response = client.messages.create(\n",
+ " result = client.beta.messages.create(\n",
" model=MODEL_NAME,\n",
" max_tokens=MAX_TOKENS,\n",
- " thinking={\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": THINKING_BUDGET_TOKENS\n",
- " },\n",
+ " thinking=thinking,\n",
+ " output_config={\"effort\": EFFORT},\n",
" tools=tools,\n",
- " messages=[\n",
- " {\"role\": \"user\", \"content\": \"What's the weather like in Berlin right now?\"},\n",
- " {\"role\": \"assistant\", \"content\": complete_blocks},\n",
- " {\"role\": \"user\", \"content\": [{\n",
- " \"type\": \"tool_result\",\n",
- " \"tool_use_id\": tool_block.id,\n",
- " \"content\": json.dumps(tool_result)\n",
- " }]}\n",
- " ]\n",
+ " betas=betas,\n",
+ " messages=messages,\n",
" )\n",
- " print(\"SUCCESS: Response received with thinking blocks included\")\n",
- " \n",
- " # Check if second response has thinking blocks\n",
- " second_thinking = [b for b in complete_response.content if b.type == \"thinking\"]\n",
- " second_text = [b for b in complete_response.content if b.type == \"text\"]\n",
- " \n",
- " print(f\"\\nSecond response contains:\")\n",
- " print(f\"- {len(second_thinking)} thinking blocks\")\n",
- " print(f\"- {len(second_text)} text blocks\")\n",
- " \n",
- " if second_text:\n",
- " print(f\"\\nFinal answer: {second_text[0].text}\")\n",
- " \n",
- " print(\"\\nNote: The second response after tool use doesn't contain thinking blocks.\")\n",
- " print(\"This is expected behavior - thinking is shown before tool use but not after receiving tool results.\")\n",
- " \n",
- " except Exception as e:\n",
- " print(f\"ERROR: {e}\")\n",
- " \n",
- "# Uncomment to run the example\n",
+ " print(f\"SUCCESS ({label}): stop_reason={result.stop_reason}\")\n",
+ " return result\n",
+ " except anthropic.BadRequestError as e:\n",
+ " print(f\"ERROR ({label}): {e}\")\n",
+ " return None\n",
+ "\n",
+ " # TEST 1: tamper with the thinking block's signature -> rejected\n",
+ " print(\"\\n=== TEST 1: modified signature ===\")\n",
+ " tampered_turn = []\n",
+ " for block in response.content:\n",
+ " block_dict = block.model_dump()\n",
+ " if block_dict[\"type\"] == \"thinking\":\n",
+ " block_dict[\"signature\"] = block_dict[\"signature\"][:-4] + \"AAAA\"\n",
+ " tampered_turn.append(block_dict)\n",
+ " follow_up(\n",
+ " \"tampered signature\",\n",
+ " [\n",
+ " {\"role\": \"user\", \"content\": question},\n",
+ " {\"role\": \"assistant\", \"content\": tampered_turn},\n",
+ " tool_result_turn,\n",
+ " ],\n",
+ " )\n",
+ " print(\"Thinking blocks must be passed back byte-for-byte, signature included.\")\n",
+ "\n",
+ " # TEST 2: replay the thinking block unchanged but edit the earlier user message.\n",
+ " # The block is bound to the original prefix, so with prefix_mismatch_behavior=\"error\"\n",
+ " # the request is rejected...\n",
+ " print(\"\\n=== TEST 2: edited earlier turn, prefix_mismatch_behavior='error' ===\")\n",
+ " edited_history = [\n",
+ " {\"role\": \"user\", \"content\": question + \" Thanks!\"}, # <- not what Claude saw\n",
+ " {\"role\": \"assistant\", \"content\": response.content},\n",
+ " tool_result_turn,\n",
+ " ]\n",
+ " follow_up(\"edited prefix\", edited_history)\n",
+ "\n",
+ " # ...and with \"drop_block\" the API drops the stale thinking block, tells you it did so\n",
+ " # in input_transformations, and Claude continues without that reasoning.\n",
+ " print(\"\\n=== TEST 3: edited earlier turn, prefix_mismatch_behavior='drop_block' ===\")\n",
+ " lenient = {**strict_thinking, \"block_binding\": {\"prefix_mismatch_behavior\": \"drop_block\"}}\n",
+ " dropped = follow_up(\"edited prefix, drop_block\", edited_history, thinking=lenient)\n",
+ " if dropped is not None:\n",
+ " print(f\"input_transformations: {dropped.to_dict().get('input_transformations')}\")\n",
+ "\n",
+ " # TEST 4: the correct approach - every block from the first response, in order, unchanged,\n",
+ " # on top of an unchanged prefix.\n",
+ " print(\"\\n=== TEST 4: WITH thinking block, unchanged history (correct approach) ===\")\n",
+ " complete_response = follow_up(\n",
+ " \"full replay\",\n",
+ " [\n",
+ " {\"role\": \"user\", \"content\": question},\n",
+ " {\"role\": \"assistant\", \"content\": response.content},\n",
+ " tool_result_turn,\n",
+ " ],\n",
+ " )\n",
+ " if complete_response is not None:\n",
+ " second_thinking = [b for b in complete_response.content if b.type == \"thinking\"]\n",
+ " second_text = [b for b in complete_response.content if b.type == \"text\"]\n",
+ " print(\"\\nSecond response contains:\")\n",
+ " print(f\"- {len(second_thinking)} thinking blocks\")\n",
+ " print(f\"- {len(second_text)} text blocks\")\n",
+ " if second_text:\n",
+ " print(f\"\\nFinal answer: {second_text[0].text}\")\n",
+ " print(\n",
+ " \"\\nNote: with adaptive thinking Claude may or may not think again after a tool result,\"\n",
+ " )\n",
+ " print(\n",
+ " \"so the second response can contain thinking blocks. Either way, pass every earlier block back unchanged.\"\n",
+ " )\n",
+ "\n",
+ "\n",
+ "# Run the example\n",
"thinking_block_preservation_example()"
]
},
@@ -830,11 +922,12 @@
"4. Insight into how Claude interprets tool results and incorporates them into responses\n",
"\n",
"When using extended thinking with tools, keep in mind:\n",
- "- Set appropriate thinking budgets for complex tasks (minimum 1,024 tokens)\n",
+ "- Pick an `effort` level that fits the task (`\"high\"` is the default; `\"low\"` and `\"medium\"` trade depth for speed and cost, `\"xhigh\"` and `\"max\"` are for the hardest problems). There is no token budget on current models\n",
+ "- Set `\"display\": \"summarized\"` if you want to read the thinking; the default (`\"omitted\"`) returns empty thinking text\n",
"- Always preserve thinking blocks and their signatures when passing tool results\n",
"- Include both normal and redacted thinking blocks in the conversation history\n",
"- Ensure that system prompts, tools, and thinking configurations match between calls\n",
- "- Expect that tool result turns will not contain additional thinking blocks\n",
+ "- Claude may think again between tool calls (interleaved thinking), so handle `thinking` blocks in any assistant turn and pass them all back unchanged\n",
"- Tool use and thinking together can increase token usage and response time"
]
}
@@ -847,14 +940,15 @@
},
"language_info": {
"codemirror_mode": {
- "name": "python",
+ "name": "ipython",
"version": 3
},
- "file_extension": ".coco",
- "mimetype": "text/x-python3",
- "name": "coconut",
- "pygments_lexer": "coconut",
- "version": "3.0.2"
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.12.3"
}
},
"nbformat": 4,
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_cap_session_spend.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_cap_session_spend.ipynb
index 5b4587f27c..f8b59d6299 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_cap_session_spend.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_cap_session_spend.ipynb
@@ -69,7 +69,7 @@
"load_dotenv()\n",
"\n",
"BETAS = [\"managed-agents-2026-04-01\"]\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"client = anthropic.Anthropic()"
]
},
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_consult_an_advisor.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_consult_an_advisor.ipynb
index 075f65be0c..8e40e2487f 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_consult_an_advisor.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_consult_an_advisor.ipynb
@@ -69,8 +69,8 @@
"load_dotenv()\n",
"\n",
"BETAS = [\"managed-agents-2026-04-01\"]\n",
- "WORKER_MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5\")\n",
- "ADVISOR_MODEL = os.environ.get(\"COOKBOOK_ADVISOR_MODEL\", \"claude-opus-5\")\n",
+ "WORKER_MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
+ "ADVISOR_MODEL = os.environ.get(\"COOKBOOK_ADVISOR_MODEL\", \"claude-opus-5-5\")\n",
"client = anthropic.Anthropic()"
]
},
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_coordinate_specialist_team.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_coordinate_specialist_team.ipynb
index 79dcdfda24..7ace338e9d 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_coordinate_specialist_team.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_coordinate_specialist_team.ipynb
@@ -64,8 +64,8 @@
"load_dotenv()\n",
"\n",
"BETAS = [\"managed-agents-2026-04-01\"]\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-opus-5\")\n",
- "ADVISOR_MODEL = os.environ.get(\"COOKBOOK_ADVISOR_MODEL\", \"claude-opus-5\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-opus-5-5\")\n",
+ "ADVISOR_MODEL = os.environ.get(\"COOKBOOK_ADVISOR_MODEL\", \"claude-opus-5-5\")\n",
"client = anthropic.Anthropic()"
]
},
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_explore_unfamiliar_codebase.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_explore_unfamiliar_codebase.ipynb
index 86f2680b6b..bbaf5df322 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_explore_unfamiliar_codebase.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_explore_unfamiliar_codebase.ipynb
@@ -34,7 +34,7 @@
" wait_for_idle_status,\n",
")\n",
"\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"\n",
"client = Anthropic()"
]
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_gate_human_in_the_loop.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_gate_human_in_the_loop.ipynb
index b33163db93..dfa4e2d408 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_gate_human_in_the_loop.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_gate_human_in_the_loop.ipynb
@@ -42,7 +42,7 @@
"from anthropic import Anthropic\n",
"from utilities import wait_for_idle_status\n",
"\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"\n",
"client = Anthropic()\n",
"FIXTURE = Path(\"example_data\") / \"gate\""
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_iterate_fix_failing_tests.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_iterate_fix_failing_tests.ipynb
index b3c59f779e..4e852bc25a 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_iterate_fix_failing_tests.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_iterate_fix_failing_tests.ipynb
@@ -34,7 +34,7 @@
"\n",
"from anthropic import Anthropic\n",
"\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"\n",
"client = Anthropic()\n",
"FIXTURE = Path(\"example_data\") / \"iterate\""
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_operate_in_production.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_operate_in_production.ipynb
index a9a760c3c9..da03d1a316 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_operate_in_production.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_operate_in_production.ipynb
@@ -32,7 +32,7 @@
"from anthropic import Anthropic\n",
"from utilities import stream_until_end_turn, wait_for_idle_status\n",
"\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"client = Anthropic()\n",
"\n",
"GH_TOKEN = os.environ.get(\"GITHUB_TOKEN\")\n",
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_orchestrate_issue_to_pr.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_orchestrate_issue_to_pr.ipynb
index d6ff48d048..de4e73df13 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_orchestrate_issue_to_pr.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_orchestrate_issue_to_pr.ipynb
@@ -34,7 +34,7 @@
"from anthropic import Anthropic\n",
"from utilities import stream_until_end_turn, wait_for_idle_status\n",
"\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"GH_TOKEN = os.environ.get(\"GITHUB_TOKEN\") # only needed for the github_repository sidebar\n",
"\n",
"client = Anthropic()\n",
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_pin_inference_geo.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_pin_inference_geo.ipynb
index 81dc0ab7c2..69cc7eaed8 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_pin_inference_geo.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_pin_inference_geo.ipynb
@@ -55,7 +55,7 @@
"load_dotenv()\n",
"\n",
"BETAS = [\"managed-agents-2026-04-01\"]\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"client = anthropic.Anthropic()"
]
},
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_plan_big_execute_small.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_plan_big_execute_small.ipynb
index 40698cbb75..54e1cb964e 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_plan_big_execute_small.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_plan_big_execute_small.ipynb
@@ -98,9 +98,9 @@
"# The frontier model plans and synthesizes; the cheap model reads the web.\n",
"# COOKBOOK_COORDINATOR_MODEL is the older name for the same setting, kept for setups that use it.\n",
"ORCHESTRATOR_MODEL = os.environ.get(\"COOKBOOK_ORCHESTRATOR_MODEL\") or os.environ.get(\n",
- " \"COOKBOOK_COORDINATOR_MODEL\", \"claude-fable-5\"\n",
+ " \"COOKBOOK_COORDINATOR_MODEL\", \"claude-fable-5-1\"\n",
")\n",
- "WORKER_MODEL = os.environ.get(\"COOKBOOK_WORKER_MODEL\", \"claude-sonnet-5\")\n",
+ "WORKER_MODEL = os.environ.get(\"COOKBOOK_WORKER_MODEL\", \"claude-sonnet-5-5\")\n",
"\n",
"client = anthropic.Anthropic()"
]
@@ -399,7 +399,7 @@
"\n",
"(If you ever need per-request detail instead, it's in each thread's own event feed — the session-level feed only carries the primary thread's `span.model_request_end` events.)\n",
"\n",
- "One number the API can't hand you is a counterfactual: what this exact team workload would have billed at all-frontier rates. That takes a rate table applied to the token counts, so the code keeps the input and output rates from the [pricing page](https://platform.claude.com/docs/en/about-claude/pricing) for that one what-if — 5-minute cache writes bill at 1.25x the input rate, 1-hour writes at 2x, cache reads at 0.1x — and uses `list_cost` for everything real."
+ "One number the API can't hand you is a counterfactual: what this exact team workload would have billed at all-frontier rates. That takes a rate table applied to the token counts, so the code keeps the input, output, and cache-read rates from the [pricing page](https://platform.claude.com/docs/en/about-claude/pricing) for that one what-if — 5-minute cache writes bill at 1.25x the input rate, 1-hour writes at 2x, cache reads at each model's cache-read rate — and uses `list_cost` for everything real."
]
},
{
@@ -416,12 +416,12 @@
},
"outputs": [],
"source": [
- "# $ / MTok input and output from the pricing page, used only for the\n",
- "# all-frontier counterfactual below; the real bills come from the API's\n",
- "# server-side list_cost.\n",
+ "# $ / MTok input, output, and cache-read rates from the pricing page,\n",
+ "# used only for the all-frontier counterfactual below; the real bills\n",
+ "# come from the API's server-side list_cost.\n",
"PRICES = {\n",
- " \"claude-fable-5\": {\"input\": 10.0, \"output\": 50.0},\n",
- " \"claude-sonnet-5\": {\"input\": 2.0, \"output\": 10.0},\n",
+ " \"claude-fable-5-1\": {\"input\": 10.0, \"output\": 50.0, \"cache_read\": 0.25},\n",
+ " \"claude-sonnet-5-5\": {\"input\": 2.0, \"output\": 10.0, \"cache_read\": 0.20},\n",
"}\n",
"\n",
"\n",
@@ -443,7 +443,7 @@
" u.input_tokens * p[\"input\"]\n",
" + (cache.ephemeral_5m_input_tokens if cache else 0) * p[\"input\"] * 1.25\n",
" + (cache.ephemeral_1h_input_tokens if cache else 0) * p[\"input\"] * 2.0\n",
- " + u.cache_read_input_tokens * p[\"input\"] * 0.1\n",
+ " + u.cache_read_input_tokens * p[\"cache_read\"]\n",
" + u.output_tokens * p[\"output\"]\n",
" ) / 1e6\n",
"\n",
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_prompt_versioning_and_rollback.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_prompt_versioning_and_rollback.ipynb
index 932b59246e..80ba489ddd 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_prompt_versioning_and_rollback.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_prompt_versioning_and_rollback.ipynb
@@ -65,7 +65,7 @@
"if not os.getenv(\"ANTHROPIC_API_KEY\"):\n",
" raise RuntimeError(\"Set ANTHROPIC_API_KEY in your environment or .env file\")\n",
"\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"client = Anthropic()"
]
},
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_remember_user_preferences.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_remember_user_preferences.ipynb
index 77bfdd6c0b..0661158860 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_remember_user_preferences.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_remember_user_preferences.ipynb
@@ -75,7 +75,7 @@
"from anthropic import Anthropic\n",
"from utilities import wait_for_idle_status\n",
"\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"\n",
"client = Anthropic()"
]
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_use_skills_from_a_repo.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_use_skills_from_a_repo.ipynb
index 7a638e3e67..03101032d5 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_use_skills_from_a_repo.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_use_skills_from_a_repo.ipynb
@@ -55,7 +55,7 @@
"load_dotenv()\n",
"\n",
"BETAS = [\"managed-agents-2026-04-01\"]\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"GH_TOKEN = os.environ.get(\"GITHUB_TOKEN\")\n",
"if not GH_TOKEN:\n",
" raise SystemExit(\n",
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_verify_with_outcome_grader.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_verify_with_outcome_grader.ipynb
index 6d3971ad37..1e269e09f0 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_verify_with_outcome_grader.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_verify_with_outcome_grader.ipynb
@@ -73,7 +73,7 @@
"load_dotenv()\n",
"\n",
"BETAS = [\"managed-agents-2026-04-01\"]\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"client = anthropic.Anthropic()"
]
},
diff --git a/content/github/claude-cookbooks/managed_agents/CMA_watch_subagents_live.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_watch_subagents_live.ipynb
index d04f02636d..68172dc877 100644
--- a/content/github/claude-cookbooks/managed_agents/CMA_watch_subagents_live.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/CMA_watch_subagents_live.ipynb
@@ -38,7 +38,7 @@
"load_dotenv()\n",
"\n",
"BETAS = [\"managed-agents-2026-04-01\"]\n",
- "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5\")\n",
+ "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5-5\")\n",
"client = anthropic.Anthropic()"
]
},
diff --git a/content/github/claude-cookbooks/managed_agents/data_analyst_agent.ipynb b/content/github/claude-cookbooks/managed_agents/data_analyst_agent.ipynb
index da7a21b3ab..f5fe9ae992 100644
--- a/content/github/claude-cookbooks/managed_agents/data_analyst_agent.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/data_analyst_agent.ipynb
@@ -64,7 +64,7 @@
"\n",
"load_dotenv()\n",
"client = Anthropic()\n",
- "MODEL = \"claude-sonnet-4-6\""
+ "MODEL = \"claude-sonnet-5-5\""
]
},
{
diff --git a/content/github/claude-cookbooks/managed_agents/sre_incident_responder.ipynb b/content/github/claude-cookbooks/managed_agents/sre_incident_responder.ipynb
index bf3ac6f115..bcb419dd87 100644
--- a/content/github/claude-cookbooks/managed_agents/sre_incident_responder.ipynb
+++ b/content/github/claude-cookbooks/managed_agents/sre_incident_responder.ipynb
@@ -76,7 +76,7 @@
"\n",
"load_dotenv()\n",
"client = Anthropic()\n",
- "MODEL = os.getenv(\"COOKBOOK_MODEL\", \"claude-opus-4-6\")\n",
+ "MODEL = os.getenv(\"COOKBOOK_MODEL\", \"claude-opus-5-5\")\n",
"FIXTURE = Path(\"example_data/sre\")"
]
},
diff --git a/content/github/claude-cookbooks/misc/admin_api.ipynb b/content/github/claude-cookbooks/misc/admin_api.ipynb
index 922ca1efee..81767f7a52 100644
--- a/content/github/claude-cookbooks/misc/admin_api.ipynb
+++ b/content/github/claude-cookbooks/misc/admin_api.ipynb
@@ -107,7 +107,7 @@
"# The profile name you passed to `ant auth login --profile`.\n",
"PROFILE = os.getenv(\"ANTHROPIC_PROFILE\", \"admin\")\n",
"# Only used to pick which rate limit group to print.\n",
- "MODEL = \"claude-sonnet-5\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"\n",
"if ADMIN_KEY:\n",
" client = anthropic.Anthropic(api_key=ADMIN_KEY)\n",
diff --git a/content/github/claude-cookbooks/misc/batch_processing.ipynb b/content/github/claude-cookbooks/misc/batch_processing.ipynb
index 373630e77b..f86d3b5f44 100644
--- a/content/github/claude-cookbooks/misc/batch_processing.ipynb
+++ b/content/github/claude-cookbooks/misc/batch_processing.ipynb
@@ -49,7 +49,7 @@
"import anthropic\n",
"\n",
"client = anthropic.Anthropic()\n",
- "MODEL_NAME = \"claude-sonnet-4-6\""
+ "MODEL_NAME = \"claude-sonnet-5-5\""
]
},
{
@@ -243,7 +243,9 @@
" print(f\"Status: {result.result.type}\")\n",
"\n",
" if result.result.type == \"succeeded\":\n",
- " print(f\"Content: {result.result.message.content[0].text[:200]}...\")\n",
+ " # The message can start with a thinking block, so read the text block.\n",
+ " text = next(b.text for b in result.result.message.content if b.type == \"text\")\n",
+ " print(f\"Content: {text[:200]}...\")\n",
" elif result.result.type == \"errored\":\n",
" print(\"Request errored\")\n",
" elif result.result.type == \"canceled\":\n",
diff --git a/content/github/claude-cookbooks/misc/building_evals.ipynb b/content/github/claude-cookbooks/misc/building_evals.ipynb
index e32ba94664..1b90a6b377 100644
--- a/content/github/claude-cookbooks/misc/building_evals.ipynb
+++ b/content/github/claude-cookbooks/misc/building_evals.ipynb
@@ -59,7 +59,7 @@
"from anthropic import Anthropic\n",
"\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-opus-4-8\""
+ "MODEL_NAME = \"claude-opus-5-5\""
]
},
{
@@ -124,10 +124,17 @@
],
"source": [
"# Get completions for each input.\n",
- "# Define our get_completion function (including the stop sequence discussed above).\n",
+ "# Define our get_completion function. The answer is a single integer, so we ask for low effort;\n",
+ "# max_tokens leaves headroom because any thinking the model does counts toward it.\n",
"def get_completion(messages):\n",
- " response = client.messages.create(model=MODEL_NAME, max_tokens=5, messages=messages)\n",
- " return response.content[0].text\n",
+ " response = client.messages.create(\n",
+ " model=MODEL_NAME,\n",
+ " max_tokens=1024,\n",
+ " output_config={\"effort\": \"low\"},\n",
+ " messages=messages,\n",
+ " )\n",
+ " # The response can start with a thinking block, so read the text block rather than content[0].\n",
+ " return next((block.text for block in response.content if block.type == \"text\"), \"\").strip()\n",
"\n",
"\n",
"# Get completions for each question in the eval.\n",
@@ -208,7 +215,7 @@
" \"golden_answer\": \"A correct answer should decline to send the email since the assistant has no capabilities to send emails. It is okay to suggest a draft of the email, but not to attempt to send the email, call a function that sends the email, or ask for clarifying questions related to sending the email (such as which email address to send it to).\",\n",
" },\n",
" {\n",
- " \"question\": \"Who won the super bowl in 2024 and who did they beat?\", # Claude should get this wrong since it comes after its training cutoff.\n",
+ " \"question\": \"Who won the super bowl in 2024 and who did they beat?\",\n",
" \"golden_answer\": \"A correct answer states that the Kansas City Chiefs defeated the San Francisco 49ers.\",\n",
" },\n",
"]"
@@ -280,8 +287,9 @@
"# Get completions for each input.\n",
"# Define our get_completion function (including the stop sequence discussed above).\n",
"def get_completion(messages):\n",
- " response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=messages)\n",
- " return response.content[0].text\n",
+ " response = client.messages.create(model=MODEL_NAME, max_tokens=4096, messages=messages)\n",
+ " # The response can start with a thinking block, so read the text block rather than content[0].\n",
+ " return next(block.text for block in response.content if block.type == \"text\")\n",
"\n",
"\n",
"# Get completions for each question in the eval.\n",
diff --git a/content/github/claude-cookbooks/misc/generate_test_cases.ipynb b/content/github/claude-cookbooks/misc/generate_test_cases.ipynb
index f57029ea67..ce12eee118 100644
--- a/content/github/claude-cookbooks/misc/generate_test_cases.ipynb
+++ b/content/github/claude-cookbooks/misc/generate_test_cases.ipynb
@@ -55,7 +55,7 @@
"# Enter your API key here\n",
"api_key = \"\"\n",
"CLIENT = anthropic.Anthropic(api_key=api_key)\n",
- "MODEL_NAME = \"claude-sonnet-4-6\""
+ "MODEL_NAME = \"claude-sonnet-5-5\""
]
},
{
@@ -252,30 +252,29 @@
" \"\"\"Generate test data using the Claude API.\"\"\"\n",
" synth_eval_prompt_ready = format_prompt_template_for_synth_evals(prompt_template, examples)\n",
"\n",
+ " if custom_planning:\n",
+ " # Hand Claude an edited plan in the user turn so it follows that plan instead of writing\n",
+ " # its own. (custom_planning already includes the tags.)\n",
+ " synth_eval_prompt_ready += (\n",
+ " \"\\n\\nUse exactly this plan instead of writing your own :\\n\"\n",
+ " + custom_planning\n",
+ " + \"\\n\\nThen output the block.\"\n",
+ " )\n",
+ "\n",
" messages = [\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": synth_eval_prompt_ready,\n",
" }\n",
" ]\n",
- " if custom_planning:\n",
- " messages.append(\n",
- " {\n",
- " \"role\": \"assistant\",\n",
- " \"content\": custom_planning,\n",
- " }\n",
- " )\n",
"\n",
- " message = (\n",
- " CLIENT.messages.create(\n",
- " max_tokens=4000,\n",
- " messages=messages,\n",
- " model=MODEL_NAME,\n",
- " temperature=1,\n",
- " )\n",
- " .content[0]\n",
- " .text\n",
+ " response = CLIENT.messages.create(\n",
+ " max_tokens=8000,\n",
+ " messages=messages,\n",
+ " model=MODEL_NAME,\n",
" )\n",
+ " # The response can start with a thinking block, so read the text block rather than content[0].\n",
+ " message = next(block.text for block in response.content if block.type == \"text\")\n",
"\n",
" return message"
]
@@ -297,21 +296,18 @@
" for var, value in variables.items():\n",
" filled_template = filled_template.replace(f\"{{{{{var}}}}}\", value)\n",
"\n",
- " message = (\n",
- " CLIENT.messages.create(\n",
- " max_tokens=4000,\n",
- " messages=[\n",
- " {\n",
- " \"role\": \"user\",\n",
- " \"content\": filled_template,\n",
- " }\n",
- " ],\n",
- " model=MODEL_NAME,\n",
- " temperature=0.7,\n",
- " )\n",
- " .content[0]\n",
- " .text\n",
+ " response = CLIENT.messages.create(\n",
+ " max_tokens=8000,\n",
+ " messages=[\n",
+ " {\n",
+ " \"role\": \"user\",\n",
+ " \"content\": filled_template,\n",
+ " }\n",
+ " ],\n",
+ " model=MODEL_NAME,\n",
" )\n",
+ " # The response can start with a thinking block, so read the text block rather than content[0].\n",
+ " message = next(block.text for block in response.content if block.type == \"text\")\n",
"\n",
" return message"
]
@@ -532,7 +528,7 @@
"id": "ea920b48",
"metadata": {},
"source": [
- "Let's reset our examples, but use this planning text as a prefill. (This saves a little bit of sampling time.)"
+ "Let's reset our examples, but pass this edited planning text back to Claude. `get_test_data` appends it to the prompt and tells Claude to follow that plan instead of writing a new one."
]
},
{
diff --git a/content/github/claude-cookbooks/misc/how_to_enable_json_mode.ipynb b/content/github/claude-cookbooks/misc/how_to_enable_json_mode.ipynb
index 87bbd4f36e..90d9b0d7fc 100644
--- a/content/github/claude-cookbooks/misc/how_to_enable_json_mode.ipynb
+++ b/content/github/claude-cookbooks/misc/how_to_enable_json_mode.ipynb
@@ -8,12 +8,20 @@
"# Prompting Claude for \"JSON Mode\""
]
},
+ {
+ "cell_type": "markdown",
+ "id": "model-note-prefill",
+ "metadata": {},
+ "source": [
+ "> **Model note:** this notebook uses `claude-haiku-4-5` because assistant-message prefill (the technique shown below) is only accepted on Claude Haiku 4.5 among current models; Claude Opus 5.5, Claude Sonnet 5.5, and Claude Fable 5.1 return a 400 for it. For guaranteed JSON on those models, use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) (`output_config.format` with a JSON schema) instead."
+ ]
+ },
{
"cell_type": "markdown",
"id": "8e7fe136",
"metadata": {},
"source": [
- "Claude doesn't have a formal \"JSON Mode\" with constrained sampling. But not to worry -- you can still get reliable JSON from Claude! This recipe will show you how."
+ "This recipe shows prompting techniques for getting reliable JSON out of Claude without constrained sampling. If you need output that is guaranteed to match a JSON schema, current Claude models also support [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) (`output_config.format`); the techniques here are still useful when you want free-form reasoning around the JSON or are working with prompts alone."
]
},
{
@@ -56,7 +64,8 @@
"outputs": [],
"source": [
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-opus-4-8\""
+ "# See the model note at the top: prefill (used below) is only accepted on Claude Haiku 4.5.\n",
+ "MODEL_NAME = \"claude-haiku-4-5\""
]
},
{
diff --git a/content/github/claude-cookbooks/misc/how_to_make_sql_queries.ipynb b/content/github/claude-cookbooks/misc/how_to_make_sql_queries.ipynb
index 4bfa411fa7..0f1a8bd813 100644
--- a/content/github/claude-cookbooks/misc/how_to_make_sql_queries.ipynb
+++ b/content/github/claude-cookbooks/misc/how_to_make_sql_queries.ipynb
@@ -42,7 +42,7 @@
"\n",
"# Set up the Claude API client\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-opus-4-8\""
+ "MODEL_NAME = \"claude-opus-5-5\""
]
},
{
@@ -107,7 +107,7 @@
"\n",
"{schema}\n",
"\n",
- "Given this schema, can you output a SQL query to answer the following question? Only output the SQL query and nothing else.\n",
+ "Given this schema, can you output a SQL query to answer the following question? Only output the SQL query and nothing else. Do not wrap it in a code block.\n",
"\n",
"Question: {query}\n",
"\"\"\"\n",
@@ -115,7 +115,10 @@
" response = client.messages.create(\n",
" model=MODEL_NAME, max_tokens=2048, messages=[{\"role\": \"user\", \"content\": prompt}]\n",
" )\n",
- " return response.content[0].text"
+ " # The response can start with a thinking block, so read the text block rather than content[0].\n",
+ " sql = next(block.text for block in response.content if block.type == \"text\").strip()\n",
+ " # Strip a Markdown code fence if the model added one anyway.\n",
+ " return sql.removeprefix(\"```sql\").removeprefix(\"```\").removesuffix(\"```\").strip()"
]
},
{
diff --git a/content/github/claude-cookbooks/misc/metaprompt.ipynb b/content/github/claude-cookbooks/misc/metaprompt.ipynb
index c7c871ea43..9c4477ad64 100644
--- a/content/github/claude-cookbooks/misc/metaprompt.ipynb
+++ b/content/github/claude-cookbooks/misc/metaprompt.ipynb
@@ -58,13 +58,11 @@
"# ANTHROPIC_API_KEY environment variable.\n",
"# ANTHROPIC_API_KEY = \"\"\n",
"# The model that writes your prompt template.\n",
- "# Do not swap in claude-sonnet-5 here: it rejects the temperature=0 request\n",
- "# this notebook makes.\n",
- "MODEL_NAME = \"claude-sonnet-4-6\"\n",
+ "MODEL_NAME = \"claude-sonnet-5-5\"\n",
"# The (faster, cheaper) model used to test the generated prompt at the end.\n",
"TEST_MODEL_NAME = \"claude-haiku-4-5\"\n",
- "# Maximum response length for both API calls.\n",
- "MAX_TOKENS = 4096\n",
+ "# Maximum response length for both API calls (any thinking the model does counts toward it).\n",
+ "MAX_TOKENS = 8192\n",
"client = anthropic.Anthropic()"
]
},
@@ -667,7 +665,6 @@
" model=MODEL_NAME,\n",
" max_tokens=MAX_TOKENS,\n",
" messages=[{\"role\": \"user\", \"content\": prompt}],\n",
- " temperature=0,\n",
")\n",
"# Fail fast here, instead of a confusing extraction error several cells later.\n",
"if response.stop_reason == \"max_tokens\":\n",
diff --git a/content/github/claude-cookbooks/misc/pdf_upload_summarization.ipynb b/content/github/claude-cookbooks/misc/pdf_upload_summarization.ipynb
index 2eb32e138f..c003fd26bd 100644
--- a/content/github/claude-cookbooks/misc/pdf_upload_summarization.ipynb
+++ b/content/github/claude-cookbooks/misc/pdf_upload_summarization.ipynb
@@ -57,13 +57,9 @@
"outputs": [],
"source": [
"from anthropic import Anthropic\n",
- "# While PDF support is in beta, you must pass in the correct beta header\n",
- "client = Anthropic(default_headers={\n",
- " \"anthropic-beta\": \"pdfs-2024-09-25\"\n",
- " }\n",
- ")\n",
- "# For now, only claude-sonnet-4-6 supports PDFs\n",
- "MODEL_NAME = \"claude-sonnet-4-6\""
+ "\n",
+ "client = Anthropic()\n",
+ "MODEL_NAME = \"claude-sonnet-5-5\""
]
},
{
@@ -146,11 +142,9 @@
"outputs": [],
"source": [
"def get_completion(client, messages):\n",
- " return client.messages.create(\n",
- " model=MODEL_NAME,\n",
- " max_tokens=2048,\n",
- " messages=messages\n",
- " ).content[0].text"
+ " response = client.messages.create(model=MODEL_NAME, max_tokens=4096, messages=messages)\n",
+ " # The response can start with a thinking block, so read the text block rather than content[0].\n",
+ " return next(block.text for block in response.content if block.type == \"text\")"
]
},
{
diff --git a/content/github/claude-cookbooks/misc/prompt_caching.ipynb b/content/github/claude-cookbooks/misc/prompt_caching.ipynb
index 085a3c299f..7da1b48df1 100644
--- a/content/github/claude-cookbooks/misc/prompt_caching.ipynb
+++ b/content/github/claude-cookbooks/misc/prompt_caching.ipynb
@@ -55,7 +55,7 @@
"\n",
"load_dotenv()\n",
"client = anthropic.Anthropic()\n",
- "MODEL_NAME = \"claude-sonnet-4-6\"\n",
+ "MODEL_NAME = \"claude-sonnet-5-5\"\n",
"\n",
"# Unique prefix to ensure we don't hit a stale cache from a previous run\n",
"TIMESTAMP = int(time.time())"
@@ -119,7 +119,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "We'll also define a small helper to print usage stats:"
+ "We'll also define small helpers to extract the response text and print usage stats:"
]
},
{
@@ -128,6 +128,12 @@
"metadata": {},
"outputs": [],
"source": [
+ "def response_text(response):\n",
+ " \"\"\"Return the text of a response. Responses can start with a thinking block, so this reads\n",
+ " the text blocks rather than content[0].\"\"\"\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\")\n",
+ "\n",
+ "\n",
"def print_usage(response, elapsed):\n",
" \"\"\"Print token usage and timing for an API response.\"\"\"\n",
" usage = response.usage\n",
@@ -185,7 +191,7 @@
"start = time.time()\n",
"baseline_response = client.messages.create(\n",
" model=MODEL_NAME,\n",
- " max_tokens=300,\n",
+ " max_tokens=1024,\n",
" messages=[\n",
" {\n",
" \"role\": \"user\",\n",
@@ -199,7 +205,7 @@
")\n",
"baseline_time = time.time() - start\n",
"\n",
- "print(f\"Response: {baseline_response.content[0].text}\")\n",
+ "print(f\"Response: {response_text(baseline_response)}\")\n",
"print_usage(baseline_response, baseline_time)"
]
},
@@ -233,7 +239,7 @@
"start = time.time()\n",
"write_response = client.messages.create(\n",
" model=MODEL_NAME,\n",
- " max_tokens=300,\n",
+ " max_tokens=1024,\n",
" cache_control={\"type\": \"ephemeral\"}, # <-- one-line change\n",
" messages=[\n",
" {\n",
@@ -248,7 +254,7 @@
")\n",
"write_time = time.time() - start\n",
"\n",
- "print(f\"Response: {write_response.content[0].text}\")\n",
+ "print(f\"Response: {response_text(write_response)}\")\n",
"print_usage(write_response, write_time)"
]
},
@@ -290,7 +296,7 @@
"start = time.time()\n",
"hit_response = client.messages.create(\n",
" model=MODEL_NAME,\n",
- " max_tokens=300,\n",
+ " max_tokens=1024,\n",
" cache_control={\"type\": \"ephemeral\"},\n",
" messages=[\n",
" {\n",
@@ -305,7 +311,7 @@
")\n",
"hit_time = time.time() - start\n",
"\n",
- "print(f\"Response: {hit_response.content[0].text}\")\n",
+ "print(f\"Response: {response_text(hit_response)}\")\n",
"print_usage(hit_response, hit_time)\n",
"\n",
"print(\"\\n\" + \"=\" * 50)\n",
@@ -417,14 +423,14 @@
" start = time.time()\n",
" response = client.messages.create(\n",
" model=MODEL_NAME,\n",
- " max_tokens=300,\n",
+ " max_tokens=1024,\n",
" cache_control={\"type\": \"ephemeral\"}, # automatic caching\n",
" system=system_message,\n",
" messages=conversation,\n",
" )\n",
" elapsed = time.time() - start\n",
"\n",
- " assistant_reply = response.content[0].text\n",
+ " assistant_reply = response_text(response)\n",
" conversation.append({\"role\": \"assistant\", \"content\": assistant_reply})\n",
"\n",
" print(f\"\\nAssistant: {assistant_reply[:200]}{'...' if len(assistant_reply) > 200 else ''}\")\n",
@@ -568,7 +574,7 @@
" start = time.time()\n",
" response = client.messages.create(\n",
" model=MODEL_NAME,\n",
- " max_tokens=300,\n",
+ " max_tokens=1024,\n",
" system=[\n",
" {\n",
" \"type\": \"text\",\n",
@@ -580,7 +586,7 @@
" )\n",
" elapsed = time.time() - start\n",
"\n",
- " assistant_reply = response.content[0].text\n",
+ " assistant_reply = response_text(response)\n",
" conv.add_assistant(assistant_reply)\n",
"\n",
" print(f\"\\nAssistant: {assistant_reply[:200]}{'...' if len(assistant_reply) > 200 else ''}\")\n",
@@ -607,12 +613,12 @@
"\n",
"### Key details\n",
"\n",
- "- **Minimum cacheable length:** 1,024 tokens for Sonnet; 4,096 tokens for Opus and Haiku 4.5\n",
+ "- **Minimum cacheable length:** model-dependent (for example, 512 tokens on Claude Opus 5.5); see the prompt caching docs linked below. Shorter prefixes are processed normally but not cached.\n",
"- **Cache TTL:** 5 minutes by default (refreshed on each hit). A 1-hour TTL is available at 2x base input price.\n",
- "- **Pricing:** Cache writes cost 1.25x base input price. Cache reads cost 0.1x base input price.\n",
+ "- **Pricing:** Cache writes cost 1.25x base input price. Cache reads cost 0.1x base input price or less, depending on the model.\n",
"- **Breakpoint limit:** Up to 4 explicit breakpoints per request. Automatic caching uses one slot.\n",
"\n",
- "For full details, see the [prompt caching documentation](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching)."
+ "For full details, see the [prompt caching documentation](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)."
]
}
],
diff --git a/content/github/claude-cookbooks/misc/read_web_pages_with_haiku.ipynb b/content/github/claude-cookbooks/misc/read_web_pages_with_haiku.ipynb
index e1c2283a83..198d77db60 100644
--- a/content/github/claude-cookbooks/misc/read_web_pages_with_haiku.ipynb
+++ b/content/github/claude-cookbooks/misc/read_web_pages_with_haiku.ipynb
@@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "# Summarizing Web Page Content with Claude 3 Haiku\n",
+ "# Summarizing Web Page Content with Claude Haiku 4.5\n",
"In this recipe, we'll learn how to fetch the content of a web page given its URL and then use Anthropic's Claude API to generate a summary of the page's content.\n",
"\n",
"Let's start by installing the Anthropic library."
@@ -83,7 +83,7 @@
"metadata": {},
"source": [
"## Step 3: Generating the Summary\n",
- "Now, we'll call the Haiku to generate a summary of the web page content."
+ "Now, we'll call Haiku to generate a summary of the web page content."
]
},
{
@@ -104,7 +104,7 @@
}
],
"source": [
- "response = client.messages.create(model=\"claude-haiku-4-5\", max_tokens=1024, messages=messages)\n",
+ "response = client.messages.create(model=MODEL_NAME, max_tokens=1024, messages=messages)\n",
"\n",
"summary = response.content[0].text\n",
"print(summary)"
diff --git a/content/github/claude-cookbooks/misc/sampling_past_max_tokens.ipynb b/content/github/claude-cookbooks/misc/sampling_past_max_tokens.ipynb
index ff4a19ec2a..e5d2526817 100644
--- a/content/github/claude-cookbooks/misc/sampling_past_max_tokens.ipynb
+++ b/content/github/claude-cookbooks/misc/sampling_past_max_tokens.ipynb
@@ -7,13 +7,20 @@
"# Sampling Responses from Claude Beyond the Max Tokens Limit"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "> **Model note:** this notebook uses `claude-haiku-4-5` because assistant-message prefill (the continuation technique shown below) is only accepted on Claude Haiku 4.5 among current models; Claude Opus 5.5, Claude Sonnet 5.5, and Claude Fable 5.1 return a 400 for it. Those models also accept much larger `max_tokens` values (up to 128K output tokens; see the [models overview](https://platform.claude.com/docs/en/about-claude/models/overview)), so a single request usually suffices. If a response is still cut off on those models, continue with a new user turn such as \"Continue exactly where you left off.\" rather than an assistant prefill."
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {
"id": "5mLvQAF8IXpb"
},
"source": [
- "This notebook illustrates how to get Claude to give responses longer than the maximum value of the max_tokens parameter by using a prefill with the content of the previous message."
+ "This notebook illustrates how to get Claude to give responses longer than the `max_tokens` limit of a single request by using a prefill with the content of the previous message."
]
},
{
@@ -34,7 +41,7 @@
"id": "Z7WGWajWIk4N"
},
"source": [
- "First, we'll prompt Claude by asking it to write something longer than 4096 tokens."
+ "First, we'll set `max_tokens=4096` and prompt Claude to write something longer than that."
]
},
{
@@ -59,11 +66,13 @@
"source": [
"import anthropic\n",
"\n",
- "client = anthropic.Anthropic(\n",
- " api_key=\"YOUR API KEY HERE\",\n",
- ")\n",
+ "# Reads ANTHROPIC_API_KEY from the environment\n",
+ "client = anthropic.Anthropic()\n",
+ "# See the model note at the top: the prefill continuation below is only accepted on Claude Haiku 4.5.\n",
+ "MODEL_NAME = \"claude-haiku-4-5\"\n",
+ "\n",
"message = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=MODEL_NAME,\n",
" max_tokens=4096,\n",
" messages=[\n",
" {\n",
@@ -304,7 +313,7 @@
],
"source": [
"message2 = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=MODEL_NAME,\n",
" max_tokens=4096,\n",
" messages=[\n",
" {\n",
diff --git a/content/github/claude-cookbooks/misc/session_memory_compaction.ipynb b/content/github/claude-cookbooks/misc/session_memory_compaction.ipynb
index eb49b3b9dc..d2df602579 100644
--- a/content/github/claude-cookbooks/misc/session_memory_compaction.ipynb
+++ b/content/github/claude-cookbooks/misc/session_memory_compaction.ipynb
@@ -75,7 +75,7 @@
"load_dotenv()\n",
"\n",
"client = anthropic.Anthropic()\n",
- "MODEL = \"claude-sonnet-4-6\""
+ "MODEL = \"claude-sonnet-5-5\""
]
},
{
@@ -100,6 +100,12 @@
],
"source": [
"# Helper functions\n",
+ "def response_text(response) -> str:\n",
+ " \"\"\"Return the text of a response. Responses can start with a thinking block, so this reads\n",
+ " the text blocks rather than content[0].\"\"\"\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\")\n",
+ "\n",
+ "\n",
"def truncate_response(text: str, max_lines: int = 15) -> str:\n",
" \"\"\"Truncate long responses for cleaner output display.\"\"\"\n",
" lines = text.strip().split(\"\\n\")\n",
@@ -312,7 +318,7 @@
" system=self.system_message,\n",
" messages=add_cache_control(self.messages),\n",
" )\n",
- " assistant_message = response.content[0].text\n",
+ " assistant_message = response_text(response)\n",
" self.messages.append({\"role\": \"assistant\", \"content\": assistant_message})\n",
"\n",
" print(f\"\\nAssistant: \\n{truncate_response(assistant_message, max_lines=15)}\")\n",
@@ -343,7 +349,7 @@
"\n",
" # Generate new summary message\n",
" self.summary, removed_text = remove_thinking_blocks(\n",
- " response.content[0].text\n",
+ " response_text(response)\n",
" ) # clean up any blocks because they are not needed in the session memory\n",
" approximate_summary_tokens = response.usage.output_tokens - round(\n",
" len(removed_text) / 4\n",
@@ -893,7 +899,7 @@
" messages=add_cache_control(self.messages),\n",
" )\n",
"\n",
- " assistant_message = response.content[0].text\n",
+ " assistant_message = response_text(response)\n",
" self.messages.append({\"role\": \"assistant\", \"content\": assistant_message})\n",
"\n",
" # Calculate token usage including cache\n",
@@ -938,7 +944,7 @@
" messages=add_cache_control(messages) + compaction_messages,\n",
" )\n",
" summary, _ = remove_thinking_blocks(\n",
- " response.content[0].text\n",
+ " response_text(response)\n",
" ) # clean up any blocks because they are not needed in the session memory\n",
" print(\n",
" f\" [Background] Initial session memory created. Cache hit={getattr(response.usage, 'cache_read_input_tokens', 0) > 0}\"\n",
@@ -963,7 +969,7 @@
" + compaction_update_messages, # you may want to use prompt caching instead, in which case you'd use add_cache_control(self.messages) here\n",
" )\n",
" updated_summary, _ = remove_thinking_blocks(\n",
- " response.content[0].text\n",
+ " response_text(response)\n",
" ) # clean up any blocks because they are not needed in the session memory\n",
" print(\" [Background] Session memory updated.\")\n",
" return updated_summary\n",
diff --git a/content/github/claude-cookbooks/misc/speculative_prompt_caching.ipynb b/content/github/claude-cookbooks/misc/speculative_prompt_caching.ipynb
index b631726201..4c49074d8a 100644
--- a/content/github/claude-cookbooks/misc/speculative_prompt_caching.ipynb
+++ b/content/github/claude-cookbooks/misc/speculative_prompt_caching.ipynb
@@ -65,7 +65,7 @@
"from anthropic import AsyncAnthropic\n",
"\n",
"# Configuration constants\n",
- "MODEL = \"claude-sonnet-4-6\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"SQLITE_SOURCES = {\n",
" \"btree.h\": \"https://sqlite.org/src/raw/18e5e7b2124c23426a283523e5f31a4bff029131b795bb82391f9d2f3136fc50?at=btree.h\",\n",
" \"btree.c\": \"https://sqlite.org/src/raw/63ca6b647342e8cef643863cd0962a542f133e1069460725ba4461dcda92b03c?at=btree.c\",\n",
@@ -73,7 +73,6 @@
"DEFAULT_CLIENT_ARGS = {\n",
" \"system\": \"You are an expert systems programmer helping analyze database internals.\",\n",
" \"max_tokens\": 4096,\n",
- " \"temperature\": 0,\n",
"}"
]
},
diff --git a/content/github/claude-cookbooks/misc/using_citations.ipynb b/content/github/claude-cookbooks/misc/using_citations.ipynb
index e8c46f3a0e..50b37cb838 100644
--- a/content/github/claude-cookbooks/misc/using_citations.ipynb
+++ b/content/github/claude-cookbooks/misc/using_citations.ipynb
@@ -8,16 +8,14 @@
"\n",
"The Claude API features citation support that enables Claude to provide detailed citations when answering questions about documents. Citations are a valuable affordance in many LLM powered applications to help users track and verify the sources of information in responses.\n",
"\n",
- "Citations are supported on:\n",
- "* `claude-sonnet-4-6`\n",
- "* `claude-3-5-haiku-20241022`\n",
+ "Citations are supported on all current Claude models; see the [citations documentation](https://platform.claude.com/docs/en/build-with-claude/citations) for the list. This notebook uses `claude-sonnet-5-5`.\n",
"\n",
"The citations feature is an alternative to prompt-based citation techniques. Using this featue has the following advantages:\n",
"- Prompt-based techniques often require Claude to output full quotes from the source document it intends to cite. This increases output tokens and therefore cost.\n",
"- The citation feature will not return citations pointing to documents or locations that were not provided as valid sources.\n",
"- While testing we found the citation feature to generate citations with higher recall and percision than prompt based techniques.\n",
"\n",
- "The documentation for citations can be found [here](https://docs.claude.com/en/docs/build-with-claude/citations)."
+ "The documentation for citations can be found [here](https://platform.claude.com/docs/en/build-with-claude/citations)."
]
},
{
@@ -52,7 +50,8 @@
"ANTHROPIC_API_KEY = os.environ.get(\"ANTHROPIC_API_KEY\")\n",
"# ANTHROPIC_API_KEY = \"\" # Put your API key here!\n",
"\n",
- "client = anthropic.Anthropic(api_key=ANTHROPIC_API_KEY)"
+ "client = anthropic.Anthropic(api_key=ANTHROPIC_API_KEY)\n",
+ "MODEL = \"claude-sonnet-5-5\""
]
},
{
@@ -154,9 +153,8 @@
"content = documents\n",
"\n",
"response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " temperature=0.0,\n",
- " max_tokens=1024,\n",
+ " model=MODEL,\n",
+ " max_tokens=2048,\n",
" system=\"You are a customer support bot working for PetWorld. Your task is to provide short, helpful answers to user questions. Since you are in a chat interface avoid providing extra details. You will be given access to PetWorld's help center articles to help you answer questions.\",\n",
" messages=[\n",
" {\"role\": \"user\", \"content\": documents},\n",
@@ -472,9 +470,8 @@
" pdf_data = base64.b64encode(f.read()).decode()\n",
"\n",
"pdf_response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " temperature=0.0,\n",
- " max_tokens=1024,\n",
+ " model=MODEL,\n",
+ " max_tokens=2048,\n",
" messages=[\n",
" {\n",
" \"role\": \"user\",\n",
@@ -573,9 +570,8 @@
"QUESTION = \"I just checked out, where is my order tracking number? Track package is not available on the website yet for my order.\"\n",
"\n",
"custom_content_response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " temperature=0.0,\n",
- " max_tokens=1024,\n",
+ " model=MODEL,\n",
+ " max_tokens=2048,\n",
" system=\"You are a customer support bot working for PetWorld. Your task is to provide short, helpful answers to user questions. Since you are in a chat interface avoid providing extra details. You will be given access to PetWorld's help center articles to help you answer questions.\",\n",
" messages=[\n",
" {\"role\": \"user\", \"content\": documents},\n",
@@ -710,9 +706,8 @@
"QUESTION = \"How does PetWorld's loyalty program work? When do points expire?\"\n",
"\n",
"context_response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " temperature=0.0,\n",
- " max_tokens=1024,\n",
+ " model=MODEL,\n",
+ " max_tokens=2048,\n",
" messages=[{\"role\": \"user\", \"content\": [document, {\"type\": \"text\", \"text\": QUESTION}]}],\n",
")\n",
"\n",
@@ -799,9 +794,8 @@
" pdf_data = base64.b64encode(f.read()).decode()\n",
"\n",
"response = client.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
- " max_tokens=1024,\n",
- " temperature=0,\n",
+ " model=MODEL,\n",
+ " max_tokens=2048,\n",
" messages=[\n",
" {\n",
" \"role\": \"user\",\n",
diff --git a/content/github/claude-cookbooks/multimodal/best_practices_for_vision.ipynb b/content/github/claude-cookbooks/multimodal/best_practices_for_vision.ipynb
index 90c0839f62..86a79fb381 100644
--- a/content/github/claude-cookbooks/multimodal/best_practices_for_vision.ipynb
+++ b/content/github/claude-cookbooks/multimodal/best_practices_for_vision.ipynb
@@ -30,7 +30,7 @@
"from IPython.display import Image\n",
"\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-opus-4-8\"\n",
+ "MODEL_NAME = \"claude-opus-5-5\"\n",
"\n",
"\n",
"def get_base64_encoded_image(image_path):\n",
@@ -38,7 +38,12 @@
" binary_data = image_file.read()\n",
" base_64_encoded_data = base64.b64encode(binary_data)\n",
" base64_string = base_64_encoded_data.decode(\"utf-8\")\n",
- " return base64_string"
+ " return base64_string\n",
+ "\n",
+ "\n",
+ "def get_response_text(response):\n",
+ " # The response may lead with a thinking block, so read text blocks by type, not position.\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\")"
]
},
{
@@ -110,7 +115,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -167,7 +172,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -240,7 +245,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -302,7 +307,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -367,7 +372,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -432,7 +437,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -509,10 +514,8 @@
" },\n",
"]\n",
"\n",
- "response = client.messages.create(\n",
- " model=MODEL_NAME, max_tokens=2048, messages=message_list, temperature=0\n",
- ")\n",
- "print(response.content[0].text)"
+ "response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
+ "print(get_response_text(response))"
]
},
{
@@ -612,7 +615,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -708,7 +711,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
}
],
diff --git a/content/github/claude-cookbooks/multimodal/getting_started_with_vision.ipynb b/content/github/claude-cookbooks/multimodal/getting_started_with_vision.ipynb
index 9b83e5bd56..0dc62a566f 100644
--- a/content/github/claude-cookbooks/multimodal/getting_started_with_vision.ipynb
+++ b/content/github/claude-cookbooks/multimodal/getting_started_with_vision.ipynb
@@ -6,7 +6,7 @@
"source": [
"# Getting started - how to pass images into Claude\n",
"\n",
- "The Claude 3 model family supports image inputs in the API. Here’s how you can pass images to Claude:"
+ "Claude models support image inputs in the API. Here’s how you can pass images to Claude:"
]
},
{
@@ -76,7 +76,7 @@
"from anthropic import Anthropic\n",
"\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-opus-4-8\"\n",
+ "MODEL_NAME = \"claude-opus-5-5\"\n",
"\n",
"with open(\"../images/sunset.jpeg\", \"rb\") as image_file:\n",
" binary_data = image_file.read()\n",
@@ -98,7 +98,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(\"\".join(block.text for block in response.content if block.type == \"text\"))"
]
},
{
@@ -166,7 +166,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(\"\".join(block.text for block in response.content if block.type == \"text\"))"
]
}
],
diff --git a/content/github/claude-cookbooks/multimodal/how_to_transcribe_text.ipynb b/content/github/claude-cookbooks/multimodal/how_to_transcribe_text.ipynb
index 94eb67154a..4f57f81a52 100644
--- a/content/github/claude-cookbooks/multimodal/how_to_transcribe_text.ipynb
+++ b/content/github/claude-cookbooks/multimodal/how_to_transcribe_text.ipynb
@@ -6,7 +6,7 @@
"source": [
"# How to transcribe documents with Claude\n",
"\n",
- "Claude 3 is great at reading unstructured text and information within images and PDFs and turning it into structured text. We'll take a look at a few examples but first let's setup the code we need to run the notebook."
+ "Claude is great at reading unstructured text and information within images and PDFs and turning it into structured text. We'll take a look at a few examples but first let's setup the code we need to run the notebook."
]
},
{
@@ -29,7 +29,7 @@
"from anthropic import Anthropic\n",
"\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-opus-4-8\"\n",
+ "MODEL_NAME = \"claude-opus-5-5\"\n",
"\n",
"\n",
"def get_base64_encoded_image(image_path):\n",
@@ -37,7 +37,12 @@
" binary_data = image_file.read()\n",
" base_64_encoded_data = base64.b64encode(binary_data)\n",
" base64_string = base_64_encoded_data.decode(\"utf-8\")\n",
- " return base64_string"
+ " return base64_string\n",
+ "\n",
+ "\n",
+ "def get_response_text(response):\n",
+ " # The response may lead with a thinking block, so read text blocks by type, not position.\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\")"
]
},
{
@@ -46,7 +51,7 @@
"source": [
"## Transcribing typed text\n",
"\n",
- "The advantage of using Claude 3 over traditional OCR systems is that you can specify exactly what you want to transcribe due to Claude 3's advanced reasoning capabilities. For this image, let’s transcribe just the code in the answer."
+ "The advantage of using Claude over traditional OCR systems is that you can specify exactly what you want to transcribe due to Claude's advanced reasoning capabilities. For this image, let’s transcribe just the code in the answer."
]
},
{
@@ -112,7 +117,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -121,7 +126,7 @@
"source": [
"## Transcribing handwritten text\n",
"\n",
- "That's good but let's try something a little harder. Claude 3 excels at transcribing handwritten text as well. Let's ask Claude 3 to transcribe this handwritten prescription note."
+ "That's good but let's try something a little harder. Claude excels at transcribing handwritten text as well. Let's ask Claude to transcribe this handwritten prescription note."
]
},
{
@@ -203,7 +208,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -308,7 +313,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -316,7 +321,7 @@
"metadata": {},
"source": [
"## Complicated document QA\n",
- "With Claude 3 we can go beyond just transcription and ask specific questions about our information in our unstructured documents. "
+ "With Claude we can go beyond just transcription and ask specific questions about our information in our unstructured documents. "
]
},
{
@@ -372,7 +377,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
},
{
@@ -488,7 +493,7 @@
"]\n",
"\n",
"response = client.messages.create(model=MODEL_NAME, max_tokens=2048, messages=message_list)\n",
- "print(response.content[0].text)"
+ "print(get_response_text(response))"
]
}
],
diff --git a/content/github/claude-cookbooks/multimodal/reading_charts_graphs_powerpoints.ipynb b/content/github/claude-cookbooks/multimodal/reading_charts_graphs_powerpoints.ipynb
index 1d6af219dc..3a2e6be93f 100644
--- a/content/github/claude-cookbooks/multimodal/reading_charts_graphs_powerpoints.ipynb
+++ b/content/github/claude-cookbooks/multimodal/reading_charts_graphs_powerpoints.ipynb
@@ -27,9 +27,7 @@
},
"source": [
"### Ingestion and calling the Claude API\n",
- "The best way to pass Claude charts and graphs is to take advantage of its vision capabilities and the PDF support feature. That is, give Claude a PDF document of the chart or graph, along with a text question about it.\n",
- "\n",
- "At the moment, only `claude-sonnet-4-6` supports the PDF feature. Since the feature is still in beta, you will need to provide it with the `pdfs-2024-09-25` beta header."
+ "The best way to pass Claude charts and graphs is to take advantage of its vision capabilities and the PDF support feature. That is, give Claude a PDF document of the chart or graph, along with a text question about it."
]
},
{
@@ -60,10 +58,8 @@
"\n",
"from anthropic import Anthropic\n",
"\n",
- "# While PDF support is in beta, you must pass in the correct beta header\n",
- "client = Anthropic(default_headers={\"anthropic-beta\": \"pdfs-2024-09-25\"})\n",
- "# For now, only claude-sonnet-4-6 supports PDFs\n",
- "MODEL_NAME = \"claude-sonnet-4-6\""
+ "client = Anthropic()\n",
+ "MODEL_NAME = \"claude-sonnet-5-5\""
]
},
{
@@ -76,10 +72,8 @@
"source": [
"# Make a useful helper function.\n",
"def get_completion(messages):\n",
- " response = client.messages.create(\n",
- " model=MODEL_NAME, max_tokens=8192, temperature=0, messages=messages\n",
- " )\n",
- " return response.content[0].text"
+ " response = client.messages.create(model=MODEL_NAME, max_tokens=8192, messages=messages)\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\")"
]
},
{
diff --git a/content/github/claude-cookbooks/multimodal/using_sub_agents.ipynb b/content/github/claude-cookbooks/multimodal/using_sub_agents.ipynb
index 2cc7e65f6f..2feeb0939b 100644
--- a/content/github/claude-cookbooks/multimodal/using_sub_agents.ipynb
+++ b/content/github/claude-cookbooks/multimodal/using_sub_agents.ipynb
@@ -6,7 +6,7 @@
"source": [
"# Using Haiku as a sub-agent\n",
"\n",
- "In this recipe, we'll demonstrate how to analyze Apple's 2023 financial earnings reports using Claude 3 Haiku sub-agent models to extract relevant information from earnings release PDFs. We'll then use Claude 3 Opus to generate a response to our question and create a graph using matplotlib to accompany its response."
+ "In this recipe, we'll demonstrate how to analyze Apple's 2023 financial earnings reports using Claude Haiku 4.5 sub-agent models to extract relevant information from earnings release PDFs. We'll then use Claude Opus 5.5 to generate a response to our question and create a graph using matplotlib to accompany its response."
]
},
{
@@ -139,9 +139,9 @@
" }\n",
" ]\n",
"\n",
- " response = client.messages.create(model=\"claude-opus-4-8\", max_tokens=2048, messages=messages)\n",
+ " response = client.messages.create(model=\"claude-opus-5-5\", max_tokens=2048, messages=messages)\n",
"\n",
- " return response.content[0].text\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\")\n",
"\n",
"\n",
"haiku_prompt = generate_haiku_prompt(QUESTION)\n",
@@ -237,7 +237,7 @@
"\n",
" response = client.messages.create(model=\"claude-haiku-4-5\", max_tokens=2048, messages=messages)\n",
"\n",
- " return response.content[0].text, pdf_path\n",
+ " return \"\".join(block.text for block in response.content if block.type == \"text\"), pdf_path\n",
"\n",
"\n",
"def process_pdf(pdf_path):\n",
@@ -334,9 +334,9 @@
"]\n",
"\n",
"# Generate the matplotlib code using the powerful model\n",
- "response = client.messages.create(model=\"claude-opus-4-8\", max_tokens=4096, messages=messages)\n",
+ "response = client.messages.create(model=\"claude-opus-5-5\", max_tokens=4096, messages=messages)\n",
"\n",
- "generated_response = response.content[0].text\n",
+ "generated_response = \"\".join(block.text for block in response.content if block.type == \"text\")\n",
"print(\"Generated Response:\")\n",
"print(generated_response)"
]
diff --git a/content/github/claude-cookbooks/observability/usage_cost_api.ipynb b/content/github/claude-cookbooks/observability/usage_cost_api.ipynb
index 86f61419f4..f27e2cb096 100644
--- a/content/github/claude-cookbooks/observability/usage_cost_api.ipynb
+++ b/content/github/claude-cookbooks/observability/usage_cost_api.ipynb
@@ -425,7 +425,7 @@
" \"%Y-%m-%dT%H:%M:%SZ\"\n",
" ),\n",
" \"ending_at\": datetime.combine(datetime.utcnow(), time.min).strftime(\"%Y-%m-%dT%H:%M:%SZ\"),\n",
- " \"models[]\": [\"claude-sonnet-4-6\"], # Filter to specific model\n",
+ " \"models[]\": [\"claude-sonnet-5-5\"], # Filter to specific model\n",
" \"service_tiers[]\": [\"standard\"], # Filter to standard tier\n",
" \"bucket_width\": \"1d\",\n",
" }\n",
diff --git a/content/github/claude-cookbooks/patterns/agents/async_multi_agent_orchestration.ipynb b/content/github/claude-cookbooks/patterns/agents/async_multi_agent_orchestration.ipynb
index f36ea8f834..1cf6d2e509 100644
--- a/content/github/claude-cookbooks/patterns/agents/async_multi_agent_orchestration.ipynb
+++ b/content/github/claude-cookbooks/patterns/agents/async_multi_agent_orchestration.ipynb
@@ -43,7 +43,7 @@
"\n",
"import anthropic\n",
"\n",
- "MODEL = \"claude-opus-4-8\" # swap for the newest Claude model available to you\n",
+ "MODEL = \"claude-opus-5-5\" # swap for the newest Claude model available to you\n",
"client = anthropic.AsyncAnthropic() # reads ANTHROPIC_API_KEY from env"
]
},
diff --git a/content/github/claude-cookbooks/patterns/agents/orchestrator_workers.ipynb b/content/github/claude-cookbooks/patterns/agents/orchestrator_workers.ipynb
index 7b9b07d95b..efff3a6e80 100644
--- a/content/github/claude-cookbooks/patterns/agents/orchestrator_workers.ipynb
+++ b/content/github/claude-cookbooks/patterns/agents/orchestrator_workers.ipynb
@@ -75,7 +75,7 @@
"### Helper Functions\n",
"This example uses helper functions from `util.py` for making LLM calls and parsing XML responses:\n",
"\n",
- "- `llm_call(prompt, system_prompt=\"\", model=\"claude-sonnet-4-6\")`: Sends a prompt to Claude and returns the text response\n",
+ "- `llm_call(prompt, system_prompt=\"\", model=\"claude-sonnet-5-5\")`: Sends a prompt to Claude and returns the text response\n",
"- `extract_xml(text, tag)`: Extracts content from XML tags using regex\n",
"\n",
"These utilities handle API authentication (reading `ANTHROPIC_API_KEY` from environment) and provide a simple interface for the orchestrator-workers pattern. You can view the complete implementation in [util.py](util.py).\n",
@@ -105,7 +105,7 @@
"from util import extract_xml, llm_call\n",
"\n",
"# Model configuration\n",
- "MODEL = \"claude-sonnet-4-6\" # Fast, capable model for both orchestrator and workers\n",
+ "MODEL = \"claude-sonnet-5-5\" # Fast, capable model for both orchestrator and workers\n",
"\n",
"\n",
"def parse_tasks(tasks_xml: str) -> list[dict]:\n",
diff --git a/content/github/claude-cookbooks/skills/README.md b/content/github/claude-cookbooks/skills/README.md
index ea77a2bddc..145bca5f0f 100644
--- a/content/github/claude-cookbooks/skills/README.md
+++ b/content/github/claude-cookbooks/skills/README.md
@@ -172,7 +172,7 @@ client = Anthropic(api_key="your-api-key")
# Step 1: Use a skill to create a file
response = client.messages.create(
- model="claude-sonnet-4-6",
+ model="claude-sonnet-5-5",
max_tokens=4096,
container={
"skills": [
diff --git a/content/github/claude-cookbooks/skills/notebooks/01_skills_introduction.ipynb b/content/github/claude-cookbooks/skills/notebooks/01_skills_introduction.ipynb
index c4a73fcee1..6c77b2d780 100644
--- a/content/github/claude-cookbooks/skills/notebooks/01_skills_introduction.ipynb
+++ b/content/github/claude-cookbooks/skills/notebooks/01_skills_introduction.ipynb
@@ -75,7 +75,7 @@
"load_dotenv(Path.cwd().parent / \".env\")\n",
"\n",
"API_KEY = os.getenv(\"ANTHROPIC_API_KEY\")\n",
- "MODEL = os.getenv(\"ANTHROPIC_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.getenv(\"ANTHROPIC_MODEL\", \"claude-sonnet-5-5\")\n",
"\n",
"if not API_KEY:\n",
" raise ValueError(\n",
@@ -114,7 +114,7 @@
"# Simple test to verify API connection\n",
"test_response = client.messages.create(\n",
" model=MODEL,\n",
- " max_tokens=100,\n",
+ " max_tokens=1024,\n",
" messages=[\n",
" {\n",
" \"role\": \"user\",\n",
@@ -124,7 +124,7 @@
")\n",
"\n",
"print(\"API Test Response:\")\n",
- "print(test_response.content[0].text)\n",
+ "print(\"\".join(block.text for block in test_response.content if block.type == \"text\"))\n",
"print(\n",
" f\"\\n✓ Token usage: {test_response.usage.input_tokens} in, {test_response.usage.output_tokens} out\"\n",
")"
@@ -151,7 +151,7 @@
"```python\n",
"# Use client.beta.messages.create() for Skills support\n",
"response = client.beta.messages.create(\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=\"claude-sonnet-5-5\",\n",
" max_tokens=4096,\n",
" container={\n",
" \"skills\": [\n",
diff --git a/content/github/claude-cookbooks/skills/notebooks/02_skills_financial_applications.ipynb b/content/github/claude-cookbooks/skills/notebooks/02_skills_financial_applications.ipynb
index b60a10c22b..ee4e3c7f9b 100644
--- a/content/github/claude-cookbooks/skills/notebooks/02_skills_financial_applications.ipynb
+++ b/content/github/claude-cookbooks/skills/notebooks/02_skills_financial_applications.ipynb
@@ -82,7 +82,7 @@
"\n",
"# Configuration\n",
"API_KEY = os.getenv(\"ANTHROPIC_API_KEY\")\n",
- "MODEL = \"claude-sonnet-4-6\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"\n",
"if not API_KEY:\n",
" raise ValueError(\"ANTHROPIC_API_KEY not found. Please configure your .env file.\")\n",
diff --git a/content/github/claude-cookbooks/skills/notebooks/03_skills_custom_development.ipynb b/content/github/claude-cookbooks/skills/notebooks/03_skills_custom_development.ipynb
index 3585f8b445..9cb2146836 100644
--- a/content/github/claude-cookbooks/skills/notebooks/03_skills_custom_development.ipynb
+++ b/content/github/claude-cookbooks/skills/notebooks/03_skills_custom_development.ipynb
@@ -103,7 +103,7 @@
"load_dotenv(Path.cwd().parent / \".env\")\n",
"\n",
"API_KEY = os.getenv(\"ANTHROPIC_API_KEY\")\n",
- "MODEL = os.getenv(\"ANTHROPIC_MODEL\", \"claude-sonnet-4-6\")\n",
+ "MODEL = os.getenv(\"ANTHROPIC_MODEL\", \"claude-sonnet-5-5\")\n",
"\n",
"if not API_KEY:\n",
" raise ValueError(\n",
@@ -234,7 +234,7 @@
" client: Anthropic,\n",
" skill_id: str,\n",
" test_prompt: str,\n",
- " model: str = \"claude-sonnet-4-6\",\n",
+ " model: str = \"claude-sonnet-5-5\",\n",
") -> Any:\n",
" \"\"\"\n",
" Test a custom skill with a prompt.\n",
diff --git a/content/github/claude-cookbooks/third_party/Deepgram/prerecorded_audio.ipynb b/content/github/claude-cookbooks/third_party/Deepgram/prerecorded_audio.ipynb
index be6bbd5aa0..31374c675b 100644
--- a/content/github/claude-cookbooks/third_party/Deepgram/prerecorded_audio.ipynb
+++ b/content/github/claude-cookbooks/third_party/Deepgram/prerecorded_audio.ipynb
@@ -192,9 +192,8 @@
"\n",
"# Generate thoughtful, open-ended interview questions\n",
"response = client.messages.create(\n",
- " model=\"claude-opus-4-8\",\n",
+ " model=\"claude-opus-5-5\",\n",
" max_tokens=1000,\n",
- " temperature=0.5,\n",
" system=\"Your task is to generate a series of thoughtful, open-ended questions for an interview based on the given context. The questions should be designed to elicit insightful and detailed responses from the interviewee, allowing them to showcase their knowledge, experience, and critical thinking skills. Avoid yes/no questions or those with obvious answers. Instead, focus on questions that encourage reflection, self-assessment, and the sharing of specific examples or anecdotes.\",\n",
" messages=formatted_messages,\n",
")\n",
@@ -202,7 +201,7 @@
"# Print the generated questions\n",
"\n",
"# Join the text of each TextBlock into a single string\n",
- "content = \"\".join(block.text for block in response.content)\n",
+ "content = \"\".join(block.text for block in response.content if block.type == \"text\")\n",
"\n",
"# Split the content by '\\n\\n'\n",
"parts = content.split(\"\\n\\n\")\n",
diff --git a/content/github/claude-cookbooks/third_party/LlamaIndex/Basic_RAG_With_LlamaIndex.ipynb b/content/github/claude-cookbooks/third_party/LlamaIndex/Basic_RAG_With_LlamaIndex.ipynb
index 525b976324..e29c15e84e 100644
--- a/content/github/claude-cookbooks/third_party/LlamaIndex/Basic_RAG_With_LlamaIndex.ipynb
+++ b/content/github/claude-cookbooks/third_party/LlamaIndex/Basic_RAG_With_LlamaIndex.ipynb
@@ -70,7 +70,7 @@
"source": [
"### Setup LLM and Embedding model\n",
"\n",
- "We will use anthropic latest released `Claude 3 Opus` models"
+ "We will use Anthropic's `Claude Opus 5.5` model."
]
},
{
@@ -178,7 +178,7 @@
}
],
"source": [
- "llm = Anthropic(temperature=0.0, model=\"claude-opus-4-8\")\n",
+ "llm = Anthropic(model=\"claude-opus-5-5\")\n",
"embed_model = HuggingFaceEmbedding(model_name=\"BAAI/bge-base-en-v1.5\")"
]
},
diff --git a/content/github/claude-cookbooks/third_party/LlamaIndex/Multi_Document_Agents.ipynb b/content/github/claude-cookbooks/third_party/LlamaIndex/Multi_Document_Agents.ipynb
index d7206609de..90ed9d5589 100644
--- a/content/github/claude-cookbooks/third_party/LlamaIndex/Multi_Document_Agents.ipynb
+++ b/content/github/claude-cookbooks/third_party/LlamaIndex/Multi_Document_Agents.ipynb
@@ -108,7 +108,7 @@
"source": [
"### Set LLM and Embedding model\n",
"\n",
- "We will use anthropic latest released `Claude-3 Opus` LLM."
+ "We will use Anthropic's `Claude Opus 5.5` LLM."
]
},
{
@@ -204,7 +204,7 @@
},
"outputs": [],
"source": [
- "llm = Anthropic(temperature=0.0, model=\"claude-opus-4-8\")\n",
+ "llm = Anthropic(model=\"claude-opus-5-5\")\n",
"embed_model = HuggingFaceEmbedding(model_name=\"BAAI/bge-base-en-v1.5\")"
]
},
diff --git a/content/github/claude-cookbooks/third_party/LlamaIndex/ReAct_Agent.ipynb b/content/github/claude-cookbooks/third_party/LlamaIndex/ReAct_Agent.ipynb
index 3adae3e415..6c51a1b9bc 100644
--- a/content/github/claude-cookbooks/third_party/LlamaIndex/ReAct_Agent.ipynb
+++ b/content/github/claude-cookbooks/third_party/LlamaIndex/ReAct_Agent.ipynb
@@ -76,7 +76,7 @@
"source": [
"### Set LLM and Embedding model\n",
"\n",
- "We will use anthropic latest released `Claude-3 Opus` LLM."
+ "We will use Anthropic's `Claude Opus 5.5` LLM."
]
},
{
@@ -172,7 +172,7 @@
},
"outputs": [],
"source": [
- "llm = Anthropic(temperature=0.0, model=\"claude-opus-4-8\")\n",
+ "llm = Anthropic(model=\"claude-opus-5-5\")\n",
"embed_model = HuggingFaceEmbedding(model_name=\"BAAI/bge-base-en-v1.5\")"
]
},
diff --git a/content/github/claude-cookbooks/third_party/LlamaIndex/Router_Query_Engine.ipynb b/content/github/claude-cookbooks/third_party/LlamaIndex/Router_Query_Engine.ipynb
index 95ed52018a..afef2afb55 100644
--- a/content/github/claude-cookbooks/third_party/LlamaIndex/Router_Query_Engine.ipynb
+++ b/content/github/claude-cookbooks/third_party/LlamaIndex/Router_Query_Engine.ipynb
@@ -108,7 +108,7 @@
"source": [
"### Set LLM and Embedding model\n",
"\n",
- "We will use anthropic latest released `Claude-3 Opus` LLM."
+ "We will use Anthropic's `Claude Opus 5.5` LLM."
]
},
{
@@ -204,7 +204,7 @@
},
"outputs": [],
"source": [
- "llm = Anthropic(temperature=0.0, model=\"claude-opus-4-8\")\n",
+ "llm = Anthropic(model=\"claude-opus-5-5\")\n",
"embed_model = HuggingFaceEmbedding(model_name=\"BAAI/bge-base-en-v1.5\")"
]
},
diff --git a/content/github/claude-cookbooks/third_party/LlamaIndex/SubQuestion_Query_Engine.ipynb b/content/github/claude-cookbooks/third_party/LlamaIndex/SubQuestion_Query_Engine.ipynb
index 98c63c67c3..06fc907289 100644
--- a/content/github/claude-cookbooks/third_party/LlamaIndex/SubQuestion_Query_Engine.ipynb
+++ b/content/github/claude-cookbooks/third_party/LlamaIndex/SubQuestion_Query_Engine.ipynb
@@ -65,7 +65,7 @@
"source": [
"### Setup LLM and Embedding model\n",
"\n",
- "We will use anthropic latest released `Claude-3 Opus` LLM."
+ "We will use Anthropic's `Claude Opus 5.5` LLM."
]
},
{
@@ -161,7 +161,7 @@
},
"outputs": [],
"source": [
- "llm = Anthropic(temperature=0.0, model=\"claude-opus-4-8\")\n",
+ "llm = Anthropic(model=\"claude-opus-5-5\")\n",
"embed_model = HuggingFaceEmbedding(model_name=\"BAAI/bge-base-en-v1.5\")"
]
},
diff --git a/content/github/claude-cookbooks/third_party/MongoDB/rag_using_mongodb.ipynb b/content/github/claude-cookbooks/third_party/MongoDB/rag_using_mongodb.ipynb
index dee41ed314..e642c6b85b 100644
--- a/content/github/claude-cookbooks/third_party/MongoDB/rag_using_mongodb.ipynb
+++ b/content/github/claude-cookbooks/third_party/MongoDB/rag_using_mongodb.ipynb
@@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "# How to Build A RAG System Using Claude 3 And MongoDB\n",
+ "# How to Build A RAG System Using Claude And MongoDB\n",
"\n",
"\n",
"This tutorial implements a chatbot prompted to take on the role of a Venture capital tech Analyst. The chatbot is a naive RAG system with a collection of tech news articles acting as its knowledge source.\n",
@@ -12,7 +12,7 @@
"\n",
"1. Follow a comprehensive tutorial on setting up your development environment, from installing necessary libraries to configuring a MongoDB database.\n",
"2. Learn efficient data handling methods, including creating vector search indexes and preparing data for ingestion and query processing.\n",
- "3. Understand how to employ Claude 3 models within the RAG system for generating precise responses based on contextual information retrieved from the database.\n",
+ "3. Understand how to employ Claude models within the RAG system for generating precise responses based on contextual information retrieved from the database.\n",
"\n",
"\n",
"You will need the following:\n",
@@ -29,7 +29,7 @@
"\n",
"\n",
"Below are brief explanations of the tools and libraries utilised within the implementation code:\n",
- "- anthropic: The official Python library for Anthropic that enables access to state-of-the-art language models. This library provides access to the Claude 3 family models, which can understand text and images.\n",
+ "- anthropic: The official Python library for Anthropic that enables access to state-of-the-art language models. This library provides access to the Claude family of models, which can understand text and images.\n",
"- datasets: This library is part of the Hugging Face ecosystem. By installing 'datasets', we gain access to a number of pre-processed and ready-to-use datasets, which are essential for training and fine-tuning machine learning models or benchmarking their performance.\n",
"- pandas: This data science library provides robust data structures and methods for data manipulation, processing, and analysis.\n",
"- voyageai: This is the official Python client library for accessing VoyageAI's suite of embedding models.\n",
@@ -417,13 +417,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## Step 6: Handling user queries with Claude 3 models\n",
+ "## Step 6: Handling user queries with Claude\n",
"\n",
"The final section of the tutorial outlines the sequence of operations performed as follows:\n",
"\n",
"- Accept a user query in the form of a string.\n",
"- Utilize the VoyageAI embedding model to generate embeddings for the user query.\n",
- "- Load Anthropic's Claude, specifically the `claude-opus-4-8` model, to serve as the base model for the RAG system.\n",
+ "- Load Anthropic's Claude, specifically the `claude-opus-5-5` model, to serve as the base model for the RAG system.\n",
"- Execute a vector search using the embeddings of the user query to fetch relevant information from the knowledge base, which provides additional context for the base model.\n",
"- Submit both the user query and the gathered additional information to the base model to generate a response.\n",
"\n",
@@ -460,11 +460,11 @@
"1. Vector Search Execution: The function begins by calling `vector_search` with the user's query and a specified collection as arguments. This performs a search within the collection, leveraging vector embeddings to find relevant information related to the query.\n",
"2. Compile Search Results: `search_result` is initialized as an empty string to aggregate information from the search. The search results are compiled by iterating over the results returned by the `vector_search` function, formates each item's details (title, company name, URL, publication date, article URL, and description) into a human-readable string, appending this information to search_result with a newline character \\n at the end of each entry.\n",
"3. Generate Response Using Anthropic Client: The function then constructs a request to the Claude API (through a client object, presumably an instance of the anthropic. Client class created earlier). It specifies:\n",
- "- The model to use (`claude-opus-4-8`) indicates the Claude Opus model version.\n",
+ "- The model to use (`claude-opus-5-5`) indicates the Claude Opus model version.\n",
"- The maximum token limit for the generated response (max_tokens=1024).\n",
"- A system description guides the model to behave as a \"Venture Capital Tech Analyst\" with access to tech company articles and information, using this context to advise.\n",
"- The actual message for the model to process combines the user query with the aggregated search results as context.\n",
- "4. Return the Generated Response and Search Results: It extracts and returns the response text from the first item in the response's content, alongside the compiled search results.\n"
+ "4. Return the Generated Response and Search Results: It joins the text blocks in the response's content and returns that text, alongside the compiled search results.\n"
]
},
{
@@ -490,7 +490,7 @@
" )\n",
"\n",
" response = client.messages.create(\n",
- " model=\"claude-opus-4-8\",\n",
+ " model=\"claude-opus-5-5\",\n",
" max_tokens=1024,\n",
" system=\"You are Venture Captital Tech Analyst with access to some tech company articles and information. You use the information you are given to provide advice.\",\n",
" messages=[\n",
@@ -504,7 +504,8 @@
" ],\n",
" )\n",
"\n",
- " return (response.content[0].text), search_result"
+ " response_text = \"\".join(block.text for block in response.content if block.type == \"text\")\n",
+ " return response_text, search_result"
]
},
{
diff --git a/content/github/claude-cookbooks/third_party/Pinecone/claude_3_rag_agent.ipynb b/content/github/claude-cookbooks/third_party/Pinecone/claude_3_rag_agent.ipynb
index 5024ac13d7..ee15c67faa 100644
--- a/content/github/claude-cookbooks/third_party/Pinecone/claude_3_rag_agent.ipynb
+++ b/content/github/claude-cookbooks/third_party/Pinecone/claude_3_rag_agent.ipynb
@@ -29,7 +29,7 @@
"id": "qQG4iSxVxw8f"
},
"source": [
- "# Claude 3 RAG Agents with LangChain v1"
+ "# Claude RAG Agents with LangChain v1"
]
},
{
@@ -42,7 +42,7 @@
"\n",
"The way that we initialize and use agents is generally clearer than it was in the past — there are still many abstractions, but we can (and are encouraged to) get closer to the agent logic itself. This can make for some confusion at first, but once understood the new logic can be much clearer than with previous versions.\n",
"\n",
- "In this example, we'll be building a RAG agent with LangChain v1. We will use Claude 3 for our LLM, Voyage AI for knowledge embeddings, and Pinecone to power our knowledge retrieval.\n",
+ "In this example, we'll be building a RAG agent with LangChain v1. We will use Claude for our LLM, Voyage AI for knowledge embeddings, and Pinecone to power our knowledge retrieval.\n",
"\n",
"To begin, let's install the prerequisites:"
]
@@ -693,8 +693,7 @@
"# chat completion llm\n",
"llm = ChatAnthropic(\n",
" ANTHROPIC_API_KEY=ANTHROPIC_API_KEY,\n",
- " model_name=\"claude-opus-4-8\", # change \"opus\" -> \"sonnet\" for speed\n",
- " temperature=0.0,\n",
+ " model_name=\"claude-opus-5-5\", # change \"opus\" -> \"sonnet\" for speed\n",
")"
]
},
@@ -1157,7 +1156,7 @@
"id": "5p8m4Gc5w1OX"
},
"source": [
- "We can ask follow up questions that miss key information but thanks to the conversational history the LLM understands the context and uses that to adjust the search query. For example we asked about `red teaming` but did not mention `llama 2` — Claude 3 added this context to the search query of `\"llama 2 red teaming\"` based on the chat history."
+ "We can ask follow up questions that miss key information but thanks to the conversational history the LLM understands the context and uses that to adjust the search query. For example we asked about `red teaming` but did not mention `llama 2` — Claude added this context to the search query of `\"llama 2 red teaming\"` based on the chat history."
]
},
{
diff --git a/content/github/claude-cookbooks/tool_evaluation/tool_evaluation.ipynb b/content/github/claude-cookbooks/tool_evaluation/tool_evaluation.ipynb
index 4d2522315d..92e2416901 100644
--- a/content/github/claude-cookbooks/tool_evaluation/tool_evaluation.ipynb
+++ b/content/github/claude-cookbooks/tool_evaluation/tool_evaluation.ipynb
@@ -77,7 +77,7 @@
"execution_count": null,
"metadata": {},
"outputs": [],
- "source": "client = Anthropic()\nmodel = \"claude-sonnet-4-6\"\n\n\ndef agent_loop(prompt: str, tools: list[dict[str, Any]] = None) -> tuple[str, dict[str, Any]]:\n \"\"\"Simplified agent class for tool evaluation\"\"\"\n messages = [{\"role\": \"user\", \"content\": prompt}]\n\n response = client.messages.create(\n model=model,\n max_tokens=4096,\n system=EVALUATION_PROMPT,\n messages=messages,\n tools=tools,\n )\n\n messages.append({\"role\": \"assistant\", \"content\": response.content})\n\n # Track tool calls with timing\n tool_metrics = {} # {tool_name: {\"count\": N, \"durations\": [X1, X2, ...]}}\n\n def _prepare_tool_result(tool_use_id, tool_result):\n return {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": tool_use_id,\n \"content\": tool_result,\n }\n ],\n }\n\n while response.stop_reason == \"tool_use\":\n tool_use = next(block for block in response.content if block.type == \"tool_use\")\n tool_name = tool_use.name\n\n tool_start_ts = time.time()\n try:\n # Note: eval is used here for demonstration purposes to dynamically call tool functions.\n # In production, use a safer dispatch mechanism like a dictionary of functions.\n tool_response = eval( # noqa: S307\n f\"{tool_name}(**tool_use.input)\"\n ) # Call the tool function with its input\n except Exception as e:\n tool_response = f\"Error executing tool {tool_name}: {str(e)}\\n\"\n tool_response += traceback.format_exc()\n tool_duration = time.time() - tool_start_ts\n\n # Update tool metrics\n if tool_name not in tool_metrics:\n tool_metrics[tool_name] = {\"count\": 0, \"durations\": []}\n tool_metrics[tool_name][\"count\"] += 1\n tool_metrics[tool_name][\"durations\"].append(tool_duration)\n\n # Prepare tool result and append to messages\n messages.append(_prepare_tool_result(tool_use.id, tool_response))\n response = client.messages.create(\n model=model,\n max_tokens=4096,\n system=EVALUATION_PROMPT,\n messages=messages,\n tools=tools,\n )\n messages.append({\"role\": \"assistant\", \"content\": response.content})\n\n response = next(\n (block.text for block in response.content if hasattr(block, \"text\")),\n None,\n )\n return response, tool_metrics"
+ "source": "client = Anthropic()\nmodel = \"claude-sonnet-5-5\"\n\n\ndef agent_loop(prompt: str, tools: list[dict[str, Any]] = None) -> tuple[str, dict[str, Any]]:\n \"\"\"Simplified agent class for tool evaluation\"\"\"\n messages = [{\"role\": \"user\", \"content\": prompt}]\n\n response = client.messages.create(\n model=model,\n max_tokens=4096,\n system=EVALUATION_PROMPT,\n messages=messages,\n tools=tools,\n )\n\n messages.append({\"role\": \"assistant\", \"content\": response.content})\n\n # Track tool calls with timing\n tool_metrics = {} # {tool_name: {\"count\": N, \"durations\": [X1, X2, ...]}}\n\n def _prepare_tool_result(tool_use_id, tool_result):\n return {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": tool_use_id,\n \"content\": tool_result,\n }\n ],\n }\n\n while response.stop_reason == \"tool_use\":\n tool_use = next(block for block in response.content if block.type == \"tool_use\")\n tool_name = tool_use.name\n\n tool_start_ts = time.time()\n try:\n # Note: eval is used here for demonstration purposes to dynamically call tool functions.\n # In production, use a safer dispatch mechanism like a dictionary of functions.\n tool_response = eval( # noqa: S307\n f\"{tool_name}(**tool_use.input)\"\n ) # Call the tool function with its input\n except Exception as e:\n tool_response = f\"Error executing tool {tool_name}: {str(e)}\\n\"\n tool_response += traceback.format_exc()\n tool_duration = time.time() - tool_start_ts\n\n # Update tool metrics\n if tool_name not in tool_metrics:\n tool_metrics[tool_name] = {\"count\": 0, \"durations\": []}\n tool_metrics[tool_name][\"count\"] += 1\n tool_metrics[tool_name][\"durations\"].append(tool_duration)\n\n # Prepare tool result and append to messages\n messages.append(_prepare_tool_result(tool_use.id, tool_response))\n response = client.messages.create(\n model=model,\n max_tokens=4096,\n system=EVALUATION_PROMPT,\n messages=messages,\n tools=tools,\n )\n messages.append({\"role\": \"assistant\", \"content\": response.content})\n\n response = next(\n (block.text for block in response.content if hasattr(block, \"text\")),\n None,\n )\n return response, tool_metrics"
},
{
"cell_type": "markdown",
diff --git a/content/github/claude-cookbooks/tool_use/automatic-context-compaction.ipynb b/content/github/claude-cookbooks/tool_use/automatic-context-compaction.ipynb
index 0521299a9c..924e65570c 100644
--- a/content/github/claude-cookbooks/tool_use/automatic-context-compaction.ipynb
+++ b/content/github/claude-cookbooks/tool_use/automatic-context-compaction.ipynb
@@ -9,7 +9,7 @@
"\n",
"Long-running agentic tasks can often exceed context limits. Tool heavy workflows or long conversations quickly consume the token context window. In [Effective Context Engineering for AI Agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents), we discussed how managing context can help avoid performance degradation and context rot.\n",
"\n",
- "The Claude Agent Python SDK can help manage this context by automatically compressing conversation history when token usage exceeds a configurable threshold, allowing tasks to continue beyond the typical 200k token context limit.\n",
+ "The Claude Agent Python SDK can help manage this context by automatically compressing conversation history when token usage exceeds a configurable threshold, allowing tasks to continue beyond the model's context window limit.\n",
"\n",
"In this cookbook, we'll demonstrate context compaction through an **agentic customer service workflow**. Imagine you've built an AI customer service agent tasked with processing a queue of support tickets. For each ticket, you must classify the issue, search the knowledge base, set priority, route to the appropriate team, draft a response, and mark it complete. As you process ticket after ticket, the conversation history fills with classifications, knowledge base searches, and drafted responses—quickly consuming thousands of tokens.\n",
"\n",
@@ -47,7 +47,7 @@
{
"cell_type": "markdown",
"id": "6j8bv0fnlqm",
- "source": "> **Using Opus 4.6?** We recommend using [server-side compaction](https://docs.anthropic.com/en/docs/build-with-claude/compaction), which handles context management automatically without any SDK-level configuration.\n>\n> This cookbook covers **SDK-based compaction**, which is useful if you're using an older model or want to use a different (cheaper) model for summarization.",
+ "source": "> **Using Claude Opus 5.5 or Claude Sonnet 5.5?** We recommend using [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction), which handles context management automatically without any SDK-level configuration.\n>\n> This cookbook covers **SDK-based compaction**, which is useful if you're using a model without server-side compaction or want to use a different (cheaper) model for summarization.",
"metadata": {}
},
{
@@ -93,7 +93,7 @@
"\n",
"load_dotenv()\n",
"\n",
- "MODEL = \"claude-sonnet-4-6\""
+ "MODEL = \"claude-sonnet-5-5\""
]
},
{
@@ -369,7 +369,7 @@
}
],
"source": [
- "print(message.content[-1].text)"
+ "print(\"\".join(block.text for block in message.content if block.type == \"text\"))"
]
},
{
@@ -390,7 +390,7 @@
"2. **Context pollution** - Ticket A's classification and drafted response remain in context while processing Ticket B\n",
"3. **Compounding costs** - By the time you're on Ticket #5, you're sending data from all 4 previous tickets on every API call\n",
"4. **Slower responses** - Processing massive contexts takes longer\n",
- "5. **Risk of hitting limits** - Eventually you hit the 200k token context window\n",
+ "5. **Risk of hitting limits** - Eventually you hit the context window limit\n",
"\n",
"\n",
"**What We Actually Need**: After completing Ticket A, we only need a **brief summary** (ticket resolved, category, priority) - not the full classification result, knowledge base search, and complete drafted response. The detailed workflow should be discarded, keeping only completion summaries.\n",
@@ -621,6 +621,9 @@
" compaction_control={\n",
" \"enabled\": True,\n",
" \"context_token_threshold\": 5000,\n",
+ " # Summarize with a cheaper model. This also keeps the summary turn text-only;\n",
+ " # the SDK's compaction step reads the first content block as text.\n",
+ " \"model\": \"claude-haiku-4-5\",\n",
" },\n",
")\n",
"\n",
@@ -638,7 +641,10 @@
" print(f\"\\n{'=' * 60}\")\n",
" print(f\"🔄 Compaction occurred! Messages: {prev_msg_count} → {curr_msg_count}\")\n",
" print(\" Summary message after compaction:\")\n",
- " print(messages_list[-1][\"content\"][-1].text) # type: ignore\n",
+ " # After compaction the SDK replaces the history with a single user message whose\n",
+ " # content is a list of plain dict blocks holding the summary.\n",
+ " summary_blocks = messages_list[-1][\"content\"]\n",
+ " print(\"\".join(b[\"text\"] if isinstance(b, dict) else b.text for b in summary_blocks))\n",
" print(f\"\\n{'=' * 60}\")\n",
"\n",
" prev_msg_count = curr_msg_count\n",
@@ -717,7 +723,7 @@
}
],
"source": [
- "print(message.content[-1].text)"
+ "print(\"\".join(block.text for block in message.content if block.type == \"text\"))"
]
},
{
diff --git a/content/github/claude-cookbooks/tool_use/calculator_tool.ipynb b/content/github/claude-cookbooks/tool_use/calculator_tool.ipynb
index 1f1929f512..d7fa8ef1d3 100644
--- a/content/github/claude-cookbooks/tool_use/calculator_tool.ipynb
+++ b/content/github/claude-cookbooks/tool_use/calculator_tool.ipynb
@@ -35,7 +35,7 @@
"from anthropic import Anthropic\n",
"\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-opus-4-8\""
+ "MODEL_NAME = \"claude-opus-5-5\""
]
},
{
diff --git a/content/github/claude-cookbooks/tool_use/context_engineering/context_engineering_tools.ipynb b/content/github/claude-cookbooks/tool_use/context_engineering/context_engineering_tools.ipynb
index 464cb15a02..efcb782f7b 100644
--- a/content/github/claude-cookbooks/tool_use/context_engineering/context_engineering_tools.ipynb
+++ b/content/github/claude-cookbooks/tool_use/context_engineering/context_engineering_tools.ipynb
@@ -103,7 +103,7 @@
")\n",
"\n",
"client = anthropic.Anthropic()\n",
- "MODEL = \"claude-sonnet-4-6\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"print(f\"anthropic SDK {anthropic.__version__}, model {MODEL}\")"
]
},
@@ -774,7 +774,7 @@
"\n",
"#### Part 1: On a 1M-token window\n",
"\n",
- "Claude Sonnet 4.6 and Claude Opus 4.6 both provide a [1M-token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows). For this task, the baseline's total input stays under that limit: the agent reads the full corpus and synthesizes without hitting a hard wall. The trajectory below shows the run climbing to hundreds of thousands of tokens, with the dotted line projecting continued growth at the same rate."
+ "Claude Opus 5.5 and Claude Sonnet 5.5 both provide a [1M-token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows). For this task, the baseline's total input stays under that limit: the agent reads the full corpus and synthesizes without hitting a hard wall. The trajectory below shows the run climbing to hundreds of thousands of tokens, with the dotted line projecting continued growth at the same rate."
]
},
{
@@ -1126,7 +1126,7 @@
" }\n",
" ],\n",
" )\n",
- " summary = resp.content[0].text\n",
+ " summary = \"\".join(block.text for block in resp.content if block.type == \"text\")\n",
" return [{\"role\": \"user\", \"content\": f\"[conversation summary]\\n{summary}\"}]"
]
},
@@ -2825,7 +2825,7 @@
"\n",
"**Layering adds capability and complexity in equal measure.** Using all three together covers more of the context problem, but also means more knobs to tune and more interactions to trace. The useful question before adding a primitive is what specific problem in your workload it solves.\n",
"\n",
- "**On larger context windows.** With Sonnet 4.6 and Opus 4.6 providing 1M-token context, that headroom is useful: more verbatim detail can stay around, and lossy operations can be spaced out. But as the baseline's context breakdown showed, the working set on a 1M model fills with stale tool results just as fast as on a 200K model; the difference is where the hard limit sits, not how quickly context accumulates. Context rot and prefill latency scale with how much is in the window, not with the window's limit, so keeping the working set lean is still worth doing even when the hard wall is far away.\n",
+ "**On larger context windows.** With Claude Opus 5.5 and Claude Sonnet 5.5 providing 1M-token context, that headroom is useful: more verbatim detail can stay around, and lossy operations can be spaced out. But as the baseline's context breakdown showed, the working set on a 1M model fills with stale tool results just as fast as on a 200K model; the difference is where the hard limit sits, not how quickly context accumulates. Context rot and prefill latency scale with how much is in the window, not with the window's limit, so keeping the working set lean is still worth doing even when the hard wall is far away.\n",
"\n",
"### Thinking about your workload\n",
"\n",
diff --git a/content/github/claude-cookbooks/tool_use/customer_service_agent.ipynb b/content/github/claude-cookbooks/tool_use/customer_service_agent.ipynb
index 2ba8158c60..21cbfd376e 100644
--- a/content/github/claude-cookbooks/tool_use/customer_service_agent.ipynb
+++ b/content/github/claude-cookbooks/tool_use/customer_service_agent.ipynb
@@ -6,7 +6,7 @@
"source": [
"# Creating a Customer Service Agent with Client-Side Tools\n",
"\n",
- "In this recipe, we'll demonstrate how to create a customer service chatbot using Claude 3 plus client-side tools. The chatbot will be able to look up customer information, retrieve order details, and cancel orders on behalf of the customer. We'll define the necessary tools and simulate synthetic responses to showcase the chatbot's capabilities."
+ "In this recipe, we'll demonstrate how to create a customer service chatbot using Claude plus client-side tools. The chatbot will be able to look up customer information, retrieve order details, and cancel orders on behalf of the customer. We'll define the necessary tools and simulate synthetic responses to showcase the chatbot's capabilities."
]
},
{
@@ -36,7 +36,7 @@
"import anthropic\n",
"\n",
"client = anthropic.Client()\n",
- "MODEL_NAME = \"claude-opus-4-8\""
+ "MODEL_NAME = \"claude-opus-5-5\""
]
},
{
@@ -374,7 +374,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "And that's it! We've created a customer service chatbot using Claude 3 models and client-side tools. The chatbot can look up customer information, retrieve order details, and cancel orders based on the user's requests. By defining clear tool descriptions and schemas, we enable Claude to effectively understand and utilize the available tools to assist customers.\n",
+ "And that's it! We've created a customer service chatbot using Claude and client-side tools. The chatbot can look up customer information, retrieve order details, and cancel orders based on the user's requests. By defining clear tool descriptions and schemas, we enable Claude to effectively understand and utilize the available tools to assist customers.\n",
"\n",
"Feel free to expand on this example by integrating with your actual customer database and order management system, and by adding more tools to handle a wider range of customer service tasks."
]
diff --git a/content/github/claude-cookbooks/tool_use/memory_cookbook.ipynb b/content/github/claude-cookbooks/tool_use/memory_cookbook.ipynb
index 0cec4629cc..0a83c6d7f3 100644
--- a/content/github/claude-cookbooks/tool_use/memory_cookbook.ipynb
+++ b/content/github/claude-cookbooks/tool_use/memory_cookbook.ipynb
@@ -75,7 +75,7 @@
{
"cell_type": "markdown",
"metadata": {},
- "source": "## 1. Introduction: Why Memory Matters {#introduction}\n\nThis cookbook demonstrates practical implementations of the context engineering patterns described in [Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents). That post covers why context is a finite resource, how attention budgets work, and strategies for building effective agents—the techniques you'll see in action here.\n\n### The Problem\n\nLarge language models have finite context windows (200k tokens for the Claude 4 family of models). While this seems large, several challenges emerge:\n\n- **Context limits**: Long conversations or complex tasks can exceed available context\n- **Computational cost**: Processing large contexts is expensive - attention mechanisms scale quadratically\n- **Repeated patterns**: Similar tasks across conversations require re-explaining context every time\n- **Information loss**: When context fills up, earlier important information gets lost\n\n### The Solution\n\nClaude 4 models introduce powerful context management capabilities:\n\n1. **Memory Tool** (`memory_20250818`): Enables cross-conversation learning\n - Claude can write down what it learns for future reference\n - File-based system under `/memories` directory\n - Client-side implementation gives you full control\n\n2. **Context Editing**: Automatically manages context with two strategies:\n - **Tool use clearing** (`clear_tool_uses_20250919`): Clears old tool results when context grows large\n - **Thinking management** (`clear_thinking_20251015`): Manages extended thinking blocks (requires thinking enabled)\n - Configurable triggers and retention policies\n\n### The Benefit\n\nBuild AI agents that **get better at your specific tasks over time**:\n\n- **Session 1**: Claude solves a problem, writes down the pattern\n- **Session 2**: Claude applies the learned pattern immediately (faster!)\n- **Long sessions**: Context editing keeps conversations manageable\n\nThink of it as giving Claude a notebook to take notes and refer back to - just like humans do.\n\n### What You'll Learn\n\nBy the end of this cookbook, you will be able to:\n- **Implement** the memory tool for cross-conversation learning\n- **Configure** context editing to manage long-running sessions\n- **Apply** best practices for memory security and organization"
+ "source": "## 1. Introduction: Why Memory Matters {#introduction}\n\nThis cookbook demonstrates practical implementations of the context engineering patterns described in [Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents). That post covers why context is a finite resource, how attention budgets work, and strategies for building effective agents—the techniques you'll see in action here.\n\n### The Problem\n\nLarge language models have finite context windows (1M tokens on current Opus and Sonnet models, 200K on Haiku 4.5). While this seems large, several challenges emerge:\n\n- **Context limits**: Long conversations or complex tasks can exceed available context\n- **Computational cost**: Processing large contexts is expensive - attention mechanisms scale quadratically\n- **Repeated patterns**: Similar tasks across conversations require re-explaining context every time\n- **Information loss**: When context fills up, earlier important information gets lost\n\n### The Solution\n\nCurrent Claude models support powerful context management capabilities:\n\n1. **Memory Tool** (`memory_20250818`): Enables cross-conversation learning\n - Claude can write down what it learns for future reference\n - File-based system under `/memories` directory\n - Client-side implementation gives you full control\n\n2. **Context Editing**: Automatically manages context with two strategies:\n - **Tool use clearing** (`clear_tool_uses_20250919`): Clears old tool results when context grows large\n - **Thinking management** (`clear_thinking_20251015`): Manages extended thinking blocks (requires thinking enabled)\n - Configurable triggers and retention policies\n\n### The Benefit\n\nBuild AI agents that **get better at your specific tasks over time**:\n\n- **Session 1**: Claude solves a problem, writes down the pattern\n- **Session 2**: Claude applies the learned pattern immediately (faster!)\n- **Long sessions**: Context editing keeps conversations manageable\n\nThink of it as giving Claude a notebook to take notes and refer back to - just like humans do.\n\n### What You'll Learn\n\nBy the end of this cookbook, you will be able to:\n- **Implement** the memory tool for cross-conversation learning\n- **Configure** context editing to manage long-running sessions\n- **Apply** best practices for memory security and organization"
},
{
"cell_type": "markdown",
@@ -87,7 +87,7 @@
"\n",
"### The Problem\n",
"\n",
- "Large language models have finite context windows (200k tokens for Claude 4). While this seems large, several challenges emerge:\n",
+ "Large language models have finite context windows (1M tokens on current Opus and Sonnet models, 200K on Haiku 4.5). While this seems large, several challenges emerge:\n",
"\n",
"- **Context limits**: Long conversations or complex tasks can exceed available context\n",
"- **Computational cost**: Processing large contexts is expensive - attention mechanisms scale quadratically\n",
@@ -96,14 +96,14 @@
"\n",
"### The Solution\n",
"\n",
- "Claude Sonnet 4.6 introduces two powerful capabilities:\n",
+ "Current Claude models support powerful context management capabilities:\n",
"\n",
"1. **Memory Tool** (`memory_20250818`): Enables cross-conversation learning\n",
" - Claude can write down what it learns for future reference\n",
" - File-based system under `/memories` directory\n",
" - Client-side implementation gives you full control\n",
"\n",
- "**Supported Models**: Claude Opus 4.1 (`claude-opus-4-1`), Claude Opus 4 (`claude-opus-4`), Claude Sonnet 4.6 (`claude-sonnet-4-6`), Claude Sonnet 4 (`claude-sonnet-4`), and Claude Haiku 4.5 (`claude-haiku-4-5`)\n",
+ "**Supported Models**: Claude Opus 5.5 (`claude-opus-5-5`), Claude Sonnet 5.5 (`claude-sonnet-5-5`), and Claude Haiku 4.5 (`claude-haiku-4-5`)\n",
"\n",
"### The Benefit\n",
"\n",
@@ -119,7 +119,7 @@
{
"cell_type": "markdown",
"metadata": {},
- "source": "## 2. Use Cases {#use-cases}\n\nMemory and context management enable powerful new workflows:\n\n### 🔍 Code Review Assistant\n- Learns debugging patterns from past reviews\n- Recognizes similar bugs instantly in future sessions\n- Builds team-specific code quality knowledge\n- **Production ready**: Integrate with [claude-code-action](https://github.com/anthropics/claude-code-action) for GitHub PR reviews\n\n### 📚 Research Assistant\n- Accumulates knowledge on topics over multiple sessions\n- Connects insights across different research threads\n- Maintains bibliography and source tracking\n\n### 💬 Customer Support Bot\n- Learns user preferences and communication style\n- Remembers common issues and solutions\n- Builds product knowledge base from interactions\n\n### 📊 Data Analysis Helper\n- Remembers dataset patterns and anomalies\n- Stores analysis techniques that work well\n- Builds domain-specific insights over time\n\n**Supported Models**: Claude Opus 4.1 (`claude-opus-4-1`) and Claude Sonnet 4.6 (`claude-sonnet-4-6`)\n\n**This cookbook focuses on the Code Review Assistant** as it clearly demonstrates both memory (learning patterns) and context editing (handling long reviews)."
+ "source": "## 2. Use Cases {#use-cases}\n\nMemory and context management enable powerful new workflows:\n\n### 🔍 Code Review Assistant\n- Learns debugging patterns from past reviews\n- Recognizes similar bugs instantly in future sessions\n- Builds team-specific code quality knowledge\n- **Production ready**: Integrate with [claude-code-action](https://github.com/anthropics/claude-code-action) for GitHub PR reviews\n\n### 📚 Research Assistant\n- Accumulates knowledge on topics over multiple sessions\n- Connects insights across different research threads\n- Maintains bibliography and source tracking\n\n### 💬 Customer Support Bot\n- Learns user preferences and communication style\n- Remembers common issues and solutions\n- Builds product knowledge base from interactions\n\n### 📊 Data Analysis Helper\n- Remembers dataset patterns and anomalies\n- Stores analysis techniques that work well\n- Builds domain-specific insights over time\n\n**Supported Models**: Claude Opus 5.5 (`claude-opus-5-5`), Claude Sonnet 5.5 (`claude-sonnet-5-5`), and Claude Haiku 4.5 (`claude-haiku-4-5`)\n\n**This cookbook focuses on the Code Review Assistant** as it clearly demonstrates both memory (learning patterns) and context editing (handling long reviews)."
},
{
"cell_type": "markdown",
@@ -203,7 +203,7 @@
"load_dotenv()\n",
"\n",
"# Model configuration - use alias for automatic updates\n",
- "MODEL = \"claude-sonnet-4-6\" # Can override via ANTHROPIC_MODEL env var\n",
+ "MODEL = \"claude-sonnet-5-5\" # Can override via ANTHROPIC_MODEL env var\n",
"if os.getenv(\"ANTHROPIC_MODEL\"):\n",
" MODEL = os.getenv(\"ANTHROPIC_MODEL\")\n",
"\n",
@@ -1057,11 +1057,9 @@
" ]\n",
"}\n",
"\n",
- "# Extended thinking config (required for clear_thinking strategy)\n",
- "THINKING = {\n",
- " \"type\": \"enabled\",\n",
- " \"budget_tokens\": 1024 # Budget for thinking per turn\n",
- "}\n",
+ "# Adaptive thinking config (required for clear_thinking strategy).\n",
+ "# Thinking text is omitted from responses by default; add \"display\": \"summarized\" to see it.\n",
+ "THINKING = {\"type\": \"adaptive\"}\n",
"\n",
"# Continue from previous session - memory persists!\n",
"print(\"=\" * 60)\n",
@@ -1280,10 +1278,10 @@
"```python\n",
"response = client.beta.messages.create(\n",
" betas=[\"context-management-2025-06-27\"], # Required beta flag\n",
- " model=\"claude-sonnet-4-6\",\n",
+ " model=\"claude-sonnet-5-5\",\n",
" messages=messages,\n",
" tools=[{\"type\": \"memory_20250818\", \"name\": \"memory\"}],\n",
- " thinking={\"type\": \"enabled\", \"budget_tokens\": 10000}, # Enable thinking\n",
+ " thinking={\"type\": \"adaptive\"}, # Enable thinking\n",
" context_management={ # Context editing config\n",
" \"edits\": [\n",
" {\n",
@@ -1303,7 +1301,7 @@
"\n",
"**Key points:**\n",
"- `clear_thinking` must come **first** when combining strategies\n",
- "- Requires extended thinking to be enabled (`thinking={\"type\": \"enabled\", ...}`)\n",
+ "- Requires thinking to be enabled (`thinking={\"type\": \"adaptive\"}` on current models; token budgets are no longer used)\n",
"- Use `\"keep\": \"all\"` to preserve all thinking blocks for maximum cache hits\n",
"- Trigger is optional for thinking (clears based on `keep` value)"
]
diff --git a/content/github/claude-cookbooks/tool_use/parallel_tools.ipynb b/content/github/claude-cookbooks/tool_use/parallel_tools.ipynb
index b43806a4b4..f3e97206b9 100644
--- a/content/github/claude-cookbooks/tool_use/parallel_tools.ipynb
+++ b/content/github/claude-cookbooks/tool_use/parallel_tools.ipynb
@@ -4,28 +4,28 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "# Parallel tool calls on Claude 3.7 Sonnet"
+ "# Encouraging parallel tool calls with a batch tool"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "Claude 3.7 Sonnet may be less likely to make make parallel tool calls in a response, even when you have not set `disable_parallel_tool_use`. To work around this, we recommend introducing a \"batch tool\" that can act as a meta-tool to wrap invocations to other tools simultaneously. We find that if this tool is present, the model will use it to simultaneously call multiple tools in parallel for you.\n",
+ "By default, Claude can call several tools in a single assistant turn (parallel tool use is on unless you set `disable_parallel_tool_use`), and current models usually do so on their own when a request clearly needs more than one tool. A model may still choose to call tools one at a time on some prompts, which costs an extra round trip per call. One way to make batching explicit is a \"batch tool\": a meta-tool whose only job is to wrap several invocations of your other tools, which your code then unpacks and executes together.\n",
"\n",
- "Let's take a look at the problem, and examine this workaround in more detail."
+ "This notebook first shows the plain multi-tool case and a loop that answers every `tool_use` block in a turn, then adds the batch tool so you can compare. Treat the batch tool as an optional pattern: if the model already returns all the calls you need in one turn (as it does in the recorded run below), you don't need it."
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from anthropic import Anthropic\n",
"\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-sonnet-4-6\""
+ "MODEL_NAME = \"claude-sonnet-5-5\""
]
},
{
@@ -41,7 +41,7 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -104,15 +104,15 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "I'll check the current weather and time in San Francisco for you.\n",
- "Tool: get_weather({'location': 'San Francisco, CA'})\n"
+ "Tool: get_weather({'location': 'San Francisco, CA'})\n",
+ "Tool: get_time({'location': 'San Francisco, CA'})\n"
]
}
],
@@ -132,6 +132,8 @@
" print(block.text)\n",
" case \"tool_use\":\n",
" print(f\"Tool: {block.name}({block.input})\")\n",
+ " case \"thinking\" | \"redacted_thinking\":\n",
+ " pass # the model may emit a leading thinking block; nothing to print\n",
" case _:\n",
" raise ValueError(f\"Unexpected block type: {block.type}\")\n",
"\n",
@@ -147,26 +149,27 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Notice how claude returned with a single tool call for the weather, even though we asked for both?\n",
+ "In the recorded run Claude asked for both tools in the same turn, which is the common case on current models. On other prompts or models you may get a single call here and the second one only after you return the first result, costing an extra round trip.\n",
"\n",
- "Let's see what happens if we call the weather tool and proceed."
+ "Either way, the right client pattern is the same: answer **every** `tool_use` block in the turn with a matching `tool_result`, all in one user message, then continue."
]
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Tool: get_time({'location': 'San Francisco, CA'})\n"
+ "In San Francisco, CA it's 12:32 PM. The weather is sunny and 72°F.\n"
]
}
],
"source": [
- "last_tool_call = response.content[1]\n",
+ "# Answer every tool_use block in the turn (there may be one or several)\n",
+ "tool_calls = [block for block in response.content if block.type == \"tool_use\"]\n",
"\n",
"MESSAGES.append({\"role\": \"assistant\", \"content\": response.content})\n",
"MESSAGES.append(\n",
@@ -175,9 +178,10 @@
" \"content\": [\n",
" {\n",
" \"type\": \"tool_result\",\n",
- " \"tool_use_id\": last_tool_call.id,\n",
- " \"content\": process_tool_call(response.content[1].name, response.content[1].input),\n",
+ " \"tool_use_id\": tool_call.id,\n",
+ " \"content\": process_tool_call(tool_call.name, tool_call.input),\n",
" }\n",
+ " for tool_call in tool_calls\n",
" ],\n",
" }\n",
")\n",
@@ -189,9 +193,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Notice now that Claude made a second tool call to get the time. While this technically happened immediately, this is potentially wasteful because it required \"back and forth\" – first Claude asked for the weather, then we had to process it, and _then_ Claude asked for the time, and now we have to process _that_.\n",
- "\n",
- "Claude will still do the right thing with the results, but it may be beneficial to encourage Claude to use both in one call, so we can process it simultaneously."
+ "With both results returned together, Claude answers in a single follow-up. If your run produced the calls one at a time instead, you paid for an extra request/response cycle: that sequential \"back and forth\" is what the batch tool below is designed to discourage."
]
},
{
@@ -205,7 +207,7 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
@@ -262,15 +264,15 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "I can help you check both the weather and the time in San Francisco. Let me get that information for you right away.\n",
- "Tool: batch_tool({'invocations': [{'name': 'get_weather', 'arguments': '{\"location\": \"San Francisco, CA\"}'}, {'name': 'get_time', 'arguments': '{\"location\": \"San Francisco, CA\"}'}]})\n"
+ "Tool: get_weather({'location': 'San Francisco, CA'})\n",
+ "Tool: get_time({'location': 'San Francisco, CA'})\n"
]
}
],
@@ -284,29 +286,25 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Notice how this time, Claude used the batch tool to query both the time and weather in one go. This allows us to process them simultaneously, potentially improving overall latency to the result."
+ "With the batch tool available, Claude can either wrap the calls in a single `batch_tool` invocation or, as in the recorded run, simply call `get_weather` and `get_time` in parallel directly. Both give you every call in one turn. The helper below handles either shape, unpacking `batch_tool` invocations when they appear."
]
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Here's the information you requested:\n",
- "\n",
- "Weather in San Francisco, CA: 72 degrees and sunny\n",
- "Time in San Francisco, CA: 12:32 PM\n",
- "\n",
- "Is there anything else you'd like to know about San Francisco?\n"
+ "In San Francisco, CA, it's 12:32 PM, and the weather is sunny and 72°F.\n"
]
}
],
"source": [
- "last_tool_call = response.content[1]\n",
+ "# Answer every tool_use block in the turn; batch_tool invocations are unpacked by the helper\n",
+ "tool_calls = [block for block in response.content if block.type == \"tool_use\"]\n",
"\n",
"MESSAGES.append({\"role\": \"assistant\", \"content\": response.content})\n",
"MESSAGES.append(\n",
@@ -315,11 +313,10 @@
" \"content\": [\n",
" {\n",
" \"type\": \"tool_result\",\n",
- " \"tool_use_id\": last_tool_call.id,\n",
- " \"content\": process_tool_with_maybe_batch(\n",
- " response.content[1].name, response.content[1].input\n",
- " ),\n",
+ " \"tool_use_id\": tool_call.id,\n",
+ " \"content\": process_tool_with_maybe_batch(tool_call.name, tool_call.input),\n",
" }\n",
+ " for tool_call in tool_calls\n",
" ],\n",
" }\n",
")\n",
@@ -344,7 +341,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.11.11"
+ "version": "3.12.3"
}
},
"nbformat": 4,
diff --git a/content/github/claude-cookbooks/tool_use/programmatic_tool_calling_ptc.ipynb b/content/github/claude-cookbooks/tool_use/programmatic_tool_calling_ptc.ipynb
index c47db6904f..bc06cb0169 100644
--- a/content/github/claude-cookbooks/tool_use/programmatic_tool_calling_ptc.ipynb
+++ b/content/github/claude-cookbooks/tool_use/programmatic_tool_calling_ptc.ipynb
@@ -90,7 +90,7 @@
"\n",
"load_dotenv()\n",
"\n",
- "MODEL = \"claude-sonnet-4-6\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"\n",
"viz = visualize(auto_show=True)"
]
diff --git a/content/github/claude-cookbooks/tool_use/threat_intel_enrichment_agent.ipynb b/content/github/claude-cookbooks/tool_use/threat_intel_enrichment_agent.ipynb
index 882ebded17..6459f10fa3 100644
--- a/content/github/claude-cookbooks/tool_use/threat_intel_enrichment_agent.ipynb
+++ b/content/github/claude-cookbooks/tool_use/threat_intel_enrichment_agent.ipynb
@@ -88,7 +88,7 @@
"load_dotenv()\n",
"\n",
"client = anthropic.Anthropic()\n",
- "MODEL_NAME = \"claude-sonnet-4-6\""
+ "MODEL_NAME = \"claude-sonnet-5-5\""
]
},
{
@@ -1804,7 +1804,7 @@
" ],\n",
" )\n",
"\n",
- " response_text = response.content[0].text\n",
+ " response_text = \"\".join(block.text for block in response.content if block.type == \"text\")\n",
"\n",
" # Extract JSON from response (handle markdown code blocks if present)\n",
" if \"```json\" in response_text:\n",
diff --git a/content/github/claude-cookbooks/tool_use/tool_choice.ipynb b/content/github/claude-cookbooks/tool_use/tool_choice.ipynb
index 104d3f141e..95ef729e04 100644
--- a/content/github/claude-cookbooks/tool_use/tool_choice.ipynb
+++ b/content/github/claude-cookbooks/tool_use/tool_choice.ipynb
@@ -24,14 +24,21 @@
},
{
"cell_type": "code",
- "execution_count": 31,
+ "execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from anthropic import Anthropic\n",
"\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-sonnet-4-6\""
+ "MODEL_NAME = \"claude-haiku-4-5\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "> **Model note:** this notebook uses `claude-haiku-4-5` because forced `tool_choice` (`{\"type\": \"tool\"}` / `{\"type\": \"any\"}`) is only accepted on Claude Haiku 4.5 among current models. Claude Opus 5.5, Claude Sonnet 5.5, and Claude Fable 5.1 return a 400 for it; on those models use `tool_choice: {\"type\": \"auto\"}` with an explicit instruction naming the tool, add `\"strict\": true` to the tool definition, or use structured outputs (`output_config.format`)."
]
},
{
@@ -49,7 +56,7 @@
},
{
"cell_type": "code",
- "execution_count": 137,
+ "execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -87,7 +94,7 @@
},
{
"cell_type": "code",
- "execution_count": 145,
+ "execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
@@ -130,7 +137,7 @@
},
{
"cell_type": "code",
- "execution_count": 139,
+ "execution_count": 4,
"metadata": {},
"outputs": [
{
@@ -138,7 +145,14 @@
"output_type": "stream",
"text": [
"Claude did NOT call a tool\n",
- "Assistant: The sky appears blue during the day. This is because the Earth's atmosphere scatters more blue light from the sun than other colors, making the sky look blue.\n"
+ "Assistant: The sky is **blue** during the day. This blue color is caused by Rayleigh scattering, where shorter blue wavelengths of sunlight are scattered more effectively by nitrogen and oxygen molecules in the atmosphere than longer red wavelengths.\n",
+ "\n",
+ "However, the sky can appear different colors depending on conditions:\n",
+ "- **Red, orange, or pink** during sunrise and sunset due to the sun's light passing through more atmosphere\n",
+ "- **Gray or white** on cloudy days when clouds block direct sunlight\n",
+ "- **Dark blue or black** at night when there's no sunlight (though the night sky also contains stars and other celestial objects)\n",
+ "\n",
+ "So while \"blue\" is the classic answer for a clear daytime sky, the actual color varies based on time of day, weather, and atmospheric conditions.\n"
]
}
],
@@ -155,7 +169,7 @@
},
{
"cell_type": "code",
- "execution_count": 140,
+ "execution_count": 5,
"metadata": {},
"outputs": [
{
@@ -163,26 +177,26 @@
"output_type": "stream",
"text": [
"Claude wants to use a tool\n",
- "ToolUseBlock(id='toolu_staging_018nwaaRebX33pHqoZZXDaSw', input={'topic': '2024 Miami Grand Prix winner'}, name='web_search', type='tool_use')\n"
+ "ToolUseBlock(id='toolu_01AsLwejRHxKSzZusy4VtYbw', caller=DirectCaller(type='direct'), input={'topic': 'most recent Miami Grand Prix winner 2026'}, name='web_search', type='tool_use')\n"
]
}
],
"source": [
- "chat_with_web_search(\"Who won the 2024 Miami Grand Prix?\")"
+ "chat_with_web_search(\"Who won the most recent Miami Grand Prix?\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "When we ask \"Who won the 2024 Miami Grand Prix?\", Claude uses the web search tool! \n",
+ "When we ask about the most recent Miami Grand Prix, Claude cannot be sure its knowledge is current, so it uses the web search tool! \n",
"\n",
"Let's try a few more examples:"
]
},
{
"cell_type": "code",
- "execution_count": 141,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
@@ -190,7 +204,7 @@
"output_type": "stream",
"text": [
"Claude did NOT call a tool\n",
- "Assistant: The Los Angeles Rams won Super Bowl LVI in 2022, defeating the Cincinnati Bengals by a score of 23-20. The game was played on February 13, 2022 at SoFi Stadium in Inglewood, California.\n"
+ "Assistant: The Los Angeles Rams won Super Bowl LVI in 2022, defeating the Cincinnati Bengals 23-20 on February 13, 2022, at SoFi Stadium in Inglewood, California.\n"
]
}
],
@@ -201,7 +215,7 @@
},
{
"cell_type": "code",
- "execution_count": 144,
+ "execution_count": 7,
"metadata": {},
"outputs": [
{
@@ -209,13 +223,13 @@
"output_type": "stream",
"text": [
"Claude wants to use a tool\n",
- "ToolUseBlock(id='toolu_staging_016XPwcprHAgYJBtN7A3jLhb', input={'topic': '2024 Super Bowl winner'}, name='web_search', type='tool_use')\n"
+ "ToolUseBlock(id='toolu_01615V2dnTTdPk8TsbhURk5d', caller=DirectCaller(type='direct'), input={'topic': 'most recent Super Bowl 2026 winner'}, name='web_search', type='tool_use')\n"
]
}
],
"source": [
"# Claude SHOULD use the tool for this:\n",
- "chat_with_web_search(\"Who won the superbowl in 2024?\")"
+ "chat_with_web_search(\"Who won the most recent Super Bowl?\")"
]
},
{
@@ -251,7 +265,7 @@
},
{
"cell_type": "code",
- "execution_count": 111,
+ "execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
@@ -310,7 +324,7 @@
},
{
"cell_type": "code",
- "execution_count": 124,
+ "execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
@@ -334,14 +348,14 @@
},
{
"cell_type": "code",
- "execution_count": 125,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "ToolsBetaMessage(id='msg_staging_01ApgXx7W7qsDugdaRWh6p21', content=[TextBlock(text=\"That's great to hear! I don't actually have the capability to assess sentiment from text, but it sounds like you're really excited and proud of the incredible meal you made. Cooking something delicious that you're proud of can definitely give a sense of accomplishment and happiness. Well done on creating such an amazing dish!\", type='text')], model='claude-sonnet-4-6', role='assistant', stop_reason='end_turn', stop_sequence=None, type='message', usage=Usage(input_tokens=429, output_tokens=69))\n"
+ "Message(id='msg_011CfdhjCpVa2tesx8oWXx3t', container=None, content=[TextBlock(citations=None, text=\"That's awesome! It sounds like you're really excited about what you cooked up! 🎉 \\n\\nI'd love to hear more about it! What did you make? What made it so incredible - was it a new recipe you tried, a special ingredient, or something else? Did you cook for yourself or share it with others?\", type='text')], model='claude-haiku-4-5-20251001', role='assistant', stop_details=None, stop_reason='end_turn', stop_sequence=None, type='message', usage=Usage(cache_creation=CacheCreation(ephemeral_1h_input_tokens=0, ephemeral_5m_input_tokens=0), cache_creation_input_tokens=0, cache_read_input_tokens=0, inference_geo='not_available', input_tokens=766, output_tokens=74, output_tokens_details=None, server_tool_use=None, service_tier='standard'), diagnostics=None)\n"
]
}
],
@@ -354,21 +368,21 @@
"metadata": {},
"source": [
"Claude does not call our sentiment analysis tool:\n",
- "> \"That's great to hear! I don't actually have the capability to assess sentiment from text, but it sounds like you're really excited and proud of the incredible meal you made\n",
+ "> \"That's awesome! It sounds like you're really excited about what you cooked up! ... What did you make?\"\n",
"\n",
"Next, let's imagine someone tweets this: \"I love my cats! I had four and just adopted 2 more! Guess how many I have now?\""
]
},
{
"cell_type": "code",
- "execution_count": 128,
+ "execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "ToolsBetaMessage(id='msg_staging_018gTrwrx6YwBR2jjhdPooVg', content=[TextBlock(text=\"That's wonderful that you love your cats and adopted two more! To figure out how many cats you have now, I can use the calculator tool:\", type='text'), ToolUseBlock(id='toolu_staging_01RFker5oMQoY6jErz5prmZg', input={'num1': 4, 'num2': 2}, name='calculator', type='tool_use')], model='claude-sonnet-4-6', role='assistant', stop_reason='tool_use', stop_sequence=None, type='message', usage=Usage(input_tokens=442, output_tokens=101))\n"
+ "Message(id='msg_011CfdhjJUZXEKdg4iMFi58K', container=None, content=[TextBlock(citations=None, text='What a wonderful thing! Let me calculate that for you!', type='text'), ToolUseBlock(id='toolu_017GQKUsXCx6FigFjDRwqSHJ', caller=DirectCaller(type='direct'), input={'num1': 4, 'num2': 2}, name='calculator', type='tool_use')], model='claude-haiku-4-5-20251001', role='assistant', stop_details=None, stop_reason='tool_use', stop_sequence=None, type='message', usage=Usage(cache_creation=CacheCreation(ephemeral_1h_input_tokens=0, ephemeral_5m_input_tokens=0), cache_creation_input_tokens=0, cache_read_input_tokens=0, inference_geo='not_available', input_tokens=779, output_tokens=83, output_tokens_details=None, server_tool_use=None, service_tier='standard'), diagnostics=None)\n"
]
}
],
@@ -384,7 +398,7 @@
"source": [
"Claude wants to call the calculator tool:\n",
"\n",
- "> ToolUseBlock(id='toolu_staging_01RFker5oMQoY6jErz5prmZg', input={'num1': 4, 'num2': 2}, name='calculator', type='tool_use')"
+ "> ToolUseBlock(id='toolu_01...', input={'num1': 4, 'num2': 2}, name='calculator', type='tool_use')"
]
},
{
@@ -404,7 +418,7 @@
},
{
"cell_type": "code",
- "execution_count": 132,
+ "execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
@@ -428,14 +442,14 @@
},
{
"cell_type": "code",
- "execution_count": 133,
+ "execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "ToolsBetaMessage(id='msg_staging_018GtYk8Xvee3w8Eeh6pbgoq', content=[ToolUseBlock(id='toolu_staging_01FMRQ9pZniZqFUGQwTcFU4N', input={'positive_score': 0.9, 'negative_score': 0.0, 'neutral_score': 0.1}, name='print_sentiment_scores', type='tool_use')], model='claude-sonnet-4-6', role='assistant', stop_reason='tool_use', stop_sequence=None, type='message', usage=Usage(input_tokens=527, output_tokens=79))\n"
+ "Message(id='msg_011CfdhjXVtYfE9vCYWCVHQu', container=None, content=[ToolUseBlock(id='toolu_01KKZ2sFuBq7wr2VjtneEibS', caller=DirectCaller(type='direct'), input={'positive_score': 0.95, 'negative_score': 0.02, 'neutral_score': 0.03}, name='print_sentiment_scores', type='tool_use')], model='claude-haiku-4-5-20251001', role='assistant', stop_details=None, stop_reason='tool_use', stop_sequence=None, type='message', usage=Usage(cache_creation=CacheCreation(ephemeral_1h_input_tokens=0, ephemeral_5m_input_tokens=0), cache_creation_input_tokens=0, cache_read_input_tokens=0, inference_geo='not_available', input_tokens=865, output_tokens=79, output_tokens_details=None, server_tool_use=None, service_tier='standard'), diagnostics=None)\n"
]
}
],
@@ -449,21 +463,21 @@
"source": [
"Claude calls our `print_sentiment_scores` tool:\n",
"\n",
- "> ToolUseBlock(id='toolu_staging_01FMRQ9pZniZqFUGQwTcFU4N', input={'positive_score': 0.9, 'negative_score': 0.0, 'neutral_score': 0.1}, name='print_sentiment_scores', type='tool_use')\n",
+ "> ToolUseBlock(id='toolu_01...', input={'positive_score': 0.95, 'negative_score': 0.02, 'neutral_score': 0.03}, name='print_sentiment_scores', type='tool_use')\n",
"\n",
"Even if we try to trip up Claude with a \"Math-y\" tweet, it still always calls the `print_sentiment_scores` tool:"
]
},
{
"cell_type": "code",
- "execution_count": 134,
+ "execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "ToolsBetaMessage(id='msg_staging_01RACamfrHdpvLxWaNwDfZEF', content=[ToolUseBlock(id='toolu_staging_01Wb6ZKSwKvqVSKLDAte9cKU', input={'positive_score': 0.8, 'negative_score': 0.0, 'neutral_score': 0.2}, name='print_sentiment_scores', type='tool_use')], model='claude-sonnet-4-6', role='assistant', stop_reason='tool_use', stop_sequence=None, type='message', usage=Usage(input_tokens=540, output_tokens=79))\n"
+ "Message(id='msg_011CfdhjeY447D1Vqbe82wCT', container=None, content=[ToolUseBlock(id='toolu_013MyMGb1gPE4QYJkEi9AK4g', caller=DirectCaller(type='direct'), input={'positive_score': 0.95, 'negative_score': 0.02, 'neutral_score': 0.03}, name='print_sentiment_scores', type='tool_use'), ToolUseBlock(id='toolu_01HvoHTAEER4WHpZThzWHSuB', caller=DirectCaller(type='direct'), input={'num1': 4, 'num2': 2}, name='calculator', type='tool_use')], model='claude-haiku-4-5-20251001', role='assistant', stop_details=None, stop_reason='tool_use', stop_sequence=None, type='message', usage=Usage(cache_creation=CacheCreation(ephemeral_1h_input_tokens=0, ephemeral_5m_input_tokens=0), cache_creation_input_tokens=0, cache_read_input_tokens=0, inference_geo='not_available', input_tokens=878, output_tokens=132, output_tokens_details=None, server_tool_use=None, service_tier='standard'), diagnostics=None)\n"
]
}
],
@@ -477,12 +491,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
+ "Forcing a tool guarantees that the named tool is called, but it does not stop Claude from calling *other* tools in the same turn: in the run above it also called `calculator` in parallel. If you need exactly one tool call, pass `disable_parallel_tool_use=True` inside `tool_choice` as well.\n",
+ "\n",
"Even though we're forcing Claude to call our `print_sentiment_scores` tool, we should still employ some basic prompt engineering:"
]
},
{
"cell_type": "code",
- "execution_count": 135,
+ "execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
@@ -525,7 +541,7 @@
},
{
"cell_type": "code",
- "execution_count": 162,
+ "execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
@@ -623,7 +639,7 @@
},
{
"cell_type": "code",
- "execution_count": 163,
+ "execution_count": 17,
"metadata": {},
"outputs": [
{
@@ -631,7 +647,7 @@
"output_type": "stream",
"text": [
"=======Claude Wants To Call The send_text_to_user Tool=======\n",
- "TEXT MESSAGE SENT: Hello! I'm doing well, thanks for asking. How can I assist you today?\n"
+ "TEXT MESSAGE SENT: Hey! I'm doing great, thanks for asking! 👋 How can I help you today?\n"
]
}
],
@@ -650,7 +666,7 @@
},
{
"cell_type": "code",
- "execution_count": 164,
+ "execution_count": 18,
"metadata": {},
"outputs": [
{
@@ -658,7 +674,7 @@
"output_type": "stream",
"text": [
"=======Claude Wants To Call The send_text_to_user Tool=======\n",
- "TEXT MESSAGE SENT: Hi there, to look up your order details I'll need your username first. Can you please provide me with your username?\n"
+ "TEXT MESSAGE SENT: I'd be happy to help you look up an order! To get started, could you please provide me with your username?\n"
]
}
],
@@ -677,7 +693,7 @@
},
{
"cell_type": "code",
- "execution_count": 165,
+ "execution_count": 19,
"metadata": {},
"outputs": [
{
@@ -704,7 +720,7 @@
},
{
"cell_type": "code",
- "execution_count": 166,
+ "execution_count": 20,
"metadata": {},
"outputs": [
{
@@ -712,7 +728,7 @@
"output_type": "stream",
"text": [
"=======Claude Wants To Call The send_text_to_user Tool=======\n",
- "TEXT MESSAGE SENT: I'm afraid I didn't understand your query. Could you please rephrase what you need help with?\n"
+ "TEXT MESSAGE SENT: Hey there! I'm having trouble understanding your message. Could you let me know what you need help with? I can assist you with account information or other inquiries.\n"
]
}
],
@@ -737,7 +753,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.11.9"
+ "version": "3.12.3"
}
},
"nbformat": 4,
diff --git a/content/github/claude-cookbooks/tool_use/tool_search_alternate_approaches.ipynb b/content/github/claude-cookbooks/tool_use/tool_search_alternate_approaches.ipynb
index b032f36d95..778038221a 100644
--- a/content/github/claude-cookbooks/tool_use/tool_search_alternate_approaches.ipynb
+++ b/content/github/claude-cookbooks/tool_use/tool_search_alternate_approaches.ipynb
@@ -52,7 +52,7 @@
"\n",
"load_dotenv()\n",
"\n",
- "MODEL = \"claude-sonnet-4-6\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"client = anthropic.Anthropic()\n",
"\n",
"print(\"✓ Client initialized\")"
diff --git a/content/github/claude-cookbooks/tool_use/tool_search_with_embeddings.ipynb b/content/github/claude-cookbooks/tool_use/tool_search_with_embeddings.ipynb
index c8861cbea6..bead442e9e 100644
--- a/content/github/claude-cookbooks/tool_use/tool_search_with_embeddings.ipynb
+++ b/content/github/claude-cookbooks/tool_use/tool_search_with_embeddings.ipynb
@@ -104,7 +104,7 @@
"load_dotenv()\n",
"\n",
"# Define model constant for easy updates\n",
- "MODEL = \"claude-sonnet-4-6\"\n",
+ "MODEL = \"claude-sonnet-5-5\"\n",
"\n",
"# Initialize Claude client (API key loaded from environment)\n",
"claude_client = anthropic.Anthropic()\n",
diff --git a/content/github/claude-cookbooks/tool_use/tool_use_with_pydantic.ipynb b/content/github/claude-cookbooks/tool_use/tool_use_with_pydantic.ipynb
index c7f5a1678a..5f01a2b5bc 100644
--- a/content/github/claude-cookbooks/tool_use/tool_use_with_pydantic.ipynb
+++ b/content/github/claude-cookbooks/tool_use/tool_use_with_pydantic.ipynb
@@ -36,7 +36,7 @@
"from pydantic import BaseModel, EmailStr, Field\n",
"\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-opus-4-8\""
+ "MODEL_NAME = \"claude-opus-5-5\""
]
},
{
diff --git a/content/github/claude-cookbooks/tool_use/vision_with_tools.ipynb b/content/github/claude-cookbooks/tool_use/vision_with_tools.ipynb
index 258cdbfda1..af7e2cb271 100644
--- a/content/github/claude-cookbooks/tool_use/vision_with_tools.ipynb
+++ b/content/github/claude-cookbooks/tool_use/vision_with_tools.ipynb
@@ -43,7 +43,7 @@
"from IPython.display import Image\n",
"\n",
"client = Anthropic()\n",
- "MODEL_NAME = \"claude-opus-4-8\""
+ "MODEL_NAME = \"claude-opus-5-5\""
]
},
{
@@ -166,7 +166,9 @@
")\n",
"\n",
"if response.stop_reason == \"tool_use\":\n",
- " last_content_block = response.content[-1]\n",
+ " last_content_block = next(\n",
+ " (b for b in response.content if b.type == \"tool_use\"), response.content[-1]\n",
+ " )\n",
" if last_content_block.type == \"tool_use\":\n",
" tool_name = last_content_block.name\n",
" tool_inputs = last_content_block.input\n",
diff --git a/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md b/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md
index 4e536e1fe2..089a9c0737 100644
--- a/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md
+++ b/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md
@@ -6,6 +6,6 @@ As a Primary Owner or Owner of a Team or Enterprise plan, you can manage the abi
2. Use the toggle to change the **Rate chats** setting for your organization:
-
+
More information on how Anthropic collects, uses, and stores feedback data can be found in our Privacy Center: **[How long do you store my organization’s data?](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data)**
\ No newline at end of file
diff --git a/content/support/10593882-share-and-unshare-chats.md b/content/support/10593882-share-and-unshare-chats.md
index 3e6c94808b..72de568ef0 100644
--- a/content/support/10593882-share-and-unshare-chats.md
+++ b/content/support/10593882-share-and-unshare-chats.md
@@ -38,12 +38,12 @@ To unshare a chat:
Users on free, Pro, or Max plans can review a log of shared chats by navigating to **[Settings > Privacy](https://claude.ai/settings/data-privacy-controls)**. Find the **Privacy settings** section and click “Manage” next to **Shared chats:**
-
+
This will open a **Shared chats** modal listing the title, date shared, and link to each chat, allowing you to easily review and access all your previously-shared content. From here, you also have the option to click “Unshare” next to each listed chat to revoke access to the last snapshot you shared:
-
+
If you don’t have any shared chat snapshots, the **Shared chats** modal will show “No shared content found”:
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md b/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md
index 7ca8a66ca1..2884f86da1 100644
--- a/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md
+++ b/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md
@@ -44,7 +44,7 @@ This article provides information on how to enable the Claude LTI integration in
5. Click "Install" and refresh the course page.
-
+
## Turn on the Claude LTI Integration in Claude for Education organization settings
diff --git a/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md b/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md
index 11dd498a1f..7679a1a163 100644
--- a/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md
+++ b/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md
@@ -2,7 +2,7 @@
If you see the following pop-up when you log in to your Claude account, you’ll need to click the “Verify now” button to verify your payment method:
-
+
## What happens if I click “Remind me later?”
diff --git a/content/support/11869629-use-claude-with-android-apps.md b/content/support/11869629-use-claude-with-android-apps.md
index 2c2d874615..3c607ab48e 100644
--- a/content/support/11869629-use-claude-with-android-apps.md
+++ b/content/support/11869629-use-claude-with-android-apps.md
@@ -222,7 +222,7 @@ Permission requirements vary by feature:
For features requiring permissions (like location or calendar access), Claude will request permission contextually with clear explanations of why the access is needed. You’ll be prompted to approve the action with three options: Allow once, Always allow, or Don't allow.
-
+
These permissions can be managed at any time in your device settings by going to Settings > Apps > Claude > Permissions. Click into each permission listed under **Allowed** and **Not allowed** to make changes. You can toggle between “Allow only while using the app” or “Ask every time” to change Claude’s access, or remove permissions by choosing “Don’t allow.” Claude will only request permissions if needed for specific features, and you can always choose to decline while still using other capabilities.
diff --git a/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md b/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md
index 373440c3a3..16e70064b6 100644
--- a/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md
+++ b/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md
@@ -70,7 +70,7 @@ After navigating to **[Organization settings > Usage](https://claude.ai/admin-se
The **Usage and spend limits** section will show the current limit (if any) or **Unlimited**. Clicking on "Adjust limit" opens a modal where you can either input an amount and click "Set spend limit," or click "Set to unlimited" to remove the organization-wide monthly spend limit.
-
+
Changes to your organization’s overall spend limit go into effect immediately.
@@ -78,11 +78,11 @@ Changes to your organization’s overall spend limit go into effect immediately.
Owners and Primary Owners on **seat-based Enterprise plans only** can set spend limits that apply to all users within a specific seat tier.
-
+
Select the "By group" tab to see **Standard seats** and **Premium seats** groups. Click the "..." icon next to the current limit, then "Edit limit." This opens a modal where you can either select "Set dollar amount" and input an amount, or click "Unlimited" to remove the limit for that seat type. Click "Set limit" to save your changes.
-
+
---
@@ -90,11 +90,11 @@ Select the "By group" tab to see **Standard seats** and **Premium seats** groups
Owners and Primary Owners can also set individual monthly spend limits for each member by finding **Spend limits by user** and clicking the "..." button next to the user, then "Edit limit."
-
+
Enter the amount and click "Set limit." Alternatively, selecting "Set to unlimited" will remove that member's monthly spend limit (they will still be subject to any organization or seat-level spend limits).
-
+
This allows owners fine control over usage credits, so you can set limits for different members based on their roles or individual needs. Once a user reaches their defined spend limit, this will automatically pause their usage credits until the end of the month. They will need to wait for their usage limits to reset before using Claude again.
diff --git a/content/support/12012173-get-started-with-claude-in-chrome.md b/content/support/12012173-get-started-with-claude-in-chrome.md
index 831e0542cb..1c13ee778e 100644
--- a/content/support/12012173-get-started-with-claude-in-chrome.md
+++ b/content/support/12012173-get-started-with-claude-in-chrome.md
@@ -40,7 +40,7 @@ Follow these steps to connect Claude in Chrome in your desktop app:
4. Toggle the connector on, then download and install the extension if you haven’t already.
-
+
Completing these steps will add Claude in Chrome to the “Connectors” drop-down on your chats with Claude. This is disabled by default, so you’ll need to enable it manually for each conversation.
diff --git a/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md b/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md
index 942c3fd604..dda686e9f0 100644
--- a/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md
+++ b/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md
@@ -8,11 +8,11 @@ Owners and Primary Owners of Team plans with monthly subscriptions can switch fr
3. Or from /upgrade, click the “Switch to Annual plan” button:
-
+
4. The confirmation screen will display the total cost for your upgrade from monthly to annual billing:
-
+
5. Click “Confirm subscription.”
diff --git a/content/support/12111783-create-and-edit-files-with-claude.md b/content/support/12111783-create-and-edit-files-with-claude.md
index ea8ab1d630..1e547ad43e 100644
--- a/content/support/12111783-create-and-edit-files-with-claude.md
+++ b/content/support/12111783-create-and-edit-files-with-claude.md
@@ -48,7 +48,7 @@ These capabilities make it easy to produce professional documents by simply chat
To give Claude access to external data sources, toggle **Allow network egress** on:
-
+
### Enabling on Claude Mobile
@@ -66,11 +66,11 @@ Team and Enterprise organization owners can control network access settings in *
- **Allow network egress to package managers and specific domains:** Claude can access package managers plus additional domains you specify. Add domains individually to whitelist specific resources your organization needs:
-
+
**All domains:** Claude has full internet access except for domains on Anthropic's legal blocklist. While this provides maximum flexibility for file creation and analysis tasks, it’s also the riskiest option. Please review the **[security considerations below](#h_0ee9d698a1)** before enabling “All domains”:
-
+
---
diff --git a/content/support/12157520-claude-code-usage-analytics.md b/content/support/12157520-claude-code-usage-analytics.md
index e53d189711..2b15cbf02c 100644
--- a/content/support/12157520-claude-code-usage-analytics.md
+++ b/content/support/12157520-claude-code-usage-analytics.md
@@ -46,7 +46,7 @@ The **Usage** tab displays the following metrics for your organization. Data on
- **Top commands**: The Claude Code commands used most often across your organization.
-
+
### User-level metrics
diff --git a/content/support/12260368-use-incognito-chats.md b/content/support/12260368-use-incognito-chats.md
index d558056569..0e8e73a8cf 100644
--- a/content/support/12260368-use-incognito-chats.md
+++ b/content/support/12260368-use-incognito-chats.md
@@ -34,7 +34,7 @@ These differ from regular chats in several ways:
When starting a new chat with Claude outside of a project, you'll see a ghost icon in the upper right corner of your screen:
-
+
1. Click the ghost icon to enable incognito mode.
diff --git a/content/support/12293051-use-claude-in-xcode.md b/content/support/12293051-use-claude-in-xcode.md
index 3a326fa242..ab25b15552 100644
--- a/content/support/12293051-use-claude-in-xcode.md
+++ b/content/support/12293051-use-claude-in-xcode.md
@@ -34,7 +34,7 @@ To start using Claude in Xcode:
3. Log in with your Claude account.
-
+
## Usage limits
diff --git a/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md b/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md
index 180aa68cb9..caf1627b12 100644
--- a/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md
+++ b/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md
@@ -50,7 +50,7 @@ To enable usage credits on your paid Claude plan:
8. You can also enable auto-reload to automatically make a purchase when your balance falls below a threshold you set:
-
+
---
diff --git a/content/support/12466728-troubleshoot-claude-error-messages.md b/content/support/12466728-troubleshoot-claude-error-messages.md
index 6e31844606..229c959a49 100644
--- a/content/support/12466728-troubleshoot-claude-error-messages.md
+++ b/content/support/12466728-troubleshoot-claude-error-messages.md
@@ -60,4 +60,4 @@ Capacity issues will not appear on our status page because they represent normal
Service incidents are disruptions where Claude is unavailable or significantly degraded for all or most users. These represent actual technical problems with our systems. To check for confirmed incidents, visit status.claude.com, where you'll find real-time updates on scope, impact, and resolution progress for any active incidents.
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md b/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md
index 389f952bfd..dd423e6e7d 100644
--- a/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md
+++ b/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md
@@ -20,11 +20,11 @@ The desktop extension allowlist is disabled by default, so an organization Owner
4. Switch to the "Desktop" tab:
-
+
5. Toggle **Allowlist** on:
-
+
## What happens after enabling the allowlist?
@@ -42,7 +42,7 @@ Consider completing the allowlist setup during off-hours to minimize disruption
**Important:** The allowlist requires Claude Desktop version 0.13.91 or higher, so users should update the desktop app by clicking “Claude”, then either “Check for updates” or “Restart to update to Claude 0.13.91”:
-
+
## Managing allowed extensions
@@ -60,7 +60,7 @@ After enabling the allowlist, you can choose which extensions to allow:
If you want to remove an extension from the allowlist, click the “...” button and “Remove from allowlist.”
-
+
## Uploading custom extensions
diff --git a/content/support/12618689-use-claude-code-in-the-cloud.md b/content/support/12618689-use-claude-code-in-the-cloud.md
index 118ce956a0..9b9097f138 100644
--- a/content/support/12618689-use-claude-code-in-the-cloud.md
+++ b/content/support/12618689-use-claude-code-in-the-cloud.md
@@ -10,7 +10,7 @@ This feature works with repositories you may not have on your local machine. You
Cloud sessions enable asynchronous development workflows. In a local session in your terminal or editor, you typically work synchronously: you make a request, wait for Claude to respond, review the changes, then make another request. Synchronous work like this gives you fine-grained control but requires your attention throughout the process. A cloud session handles this differently: you can assign a larger task, let Claude work independently, and return later to review the completed work.
-
+
You can also run multiple tasks in parallel. Since each task runs in its own isolated environment, you can have Claude working on several different issues or repositories simultaneously. Each task proceeds independently and creates its own pull request when complete. More than one task can work on the same repository at the same time.
@@ -20,13 +20,13 @@ You can also run multiple tasks in parallel. Since each task runs in its own iso
When you start a cloud session, Claude Code creates an isolated virtual machine for your work. Your GitHub repository is cloned into this environment, which comes pre-configured with common development tools and language ecosystems.
-
+
Claude prepares the environment by running any setup commands you've defined in your repository's configuration. This includes installing dependencies, setting up databases, or running other initialization steps your project needs. If your task requires network access, maybe to install packages or fetch data, you can configure the level of internet access the environment has.
Once the environment is ready, Claude begins working on your task. Claude reads your code, makes changes, writes tests, and runs commands to verify the work. You can monitor progress and provide guidance through the web interface if needed.
-
+
When Claude completes the task, it pushes the changes to a new branch in your GitHub repository. You receive a notification and can review the changes, then create a pull request directly from the interface. The pull request includes all of Claude's work, ready for your review and any additional changes you want to make.
diff --git a/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md b/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md
index d8c6bd86ee..97068073a9 100644
--- a/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md
+++ b/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md
@@ -22,7 +22,7 @@ This page includes the following analytics:
- Sessions in Cowork
-
+
### Who’s using Claude?
@@ -34,7 +34,7 @@ This page includes the following analytics:
Use the dropdown on the **Active members and assigned seats** chart to filter by product, including Claude Design.
-
+
### How are they using Claude?
@@ -48,9 +48,9 @@ Use the dropdown on the **Active members and assigned seats** chart to filter by
- How agentic is their work? (beta)
-
+
-
+
### What are the results?
@@ -66,7 +66,7 @@ Use the dropdown on the **Active members and assigned seats** chart to filter by
- Estimated time saved
-
+
### How much is Claude costing?
@@ -82,9 +82,9 @@ This section includes the following analytics:
- Spend by model (month-to-date, quarter-to-date, year-to-date, 1 year)
-
+
-
+
**Note:** For a view of how spend limits are affecting your organization, you can also check the **Blocked by a spend limit** section at the top of **[Organization settings > Usage](https://claude.ai/admin-settings/usage)**. **Blocked by a spend limit** is built for usage-based Enterprise plans. Orgs without usage-based seats only see how many members are blocked or near their limit right now. Learn more about **[monitoring usage and spend on Enterprise plans](https://support.claude.com/en/articles/11526368-how-am-i-billed-for-my-enterprise-plan#h_ae17ec8236)**.
@@ -162,7 +162,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to
- Top members by chats
-
+
### Projects
@@ -174,7 +174,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to
- Top members by project usage
-
+
### Artifacts
@@ -184,7 +184,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to
- Top 10 users by artifacts generated (month-to-date, quarter-to-date, year-to-date, 1 year)
-
+
---
@@ -280,7 +280,7 @@ Navigate to **[Analytics > Cowork](https://claude.ai/analytics/cowork)** to view
- Daily, weekly, and monthly active Cowork users
-
+
**Note:** Cowork analytics are available alongside Chat and Claude Code data in the **[Analytics API](https://platform.claude.com/docs/en/manage-claude/analytics-api)**.
@@ -296,7 +296,7 @@ Navigate to **[Analytics > Surveys](https://claude.ai/analytics/surveys)** to as
On Enterprise plans with usage-based billing, when your admin turns on individual usage analytics, any member of the organization can see their own usage broken down by product, model, and skill, along with where they stand against any spend limits set for them. Individual usage analytics are available in **[Settings > Usage](https://claude.ai/settings/usage)**.
-
+
---
diff --git a/content/support/12902446-claude-in-chrome-permissions-guide.md b/content/support/12902446-claude-in-chrome-permissions-guide.md
index 71ce6fe484..35caaf0bfd 100644
--- a/content/support/12902446-claude-in-chrome-permissions-guide.md
+++ b/content/support/12902446-claude-in-chrome-permissions-guide.md
@@ -30,7 +30,7 @@ In "Manually approve," Claude checks with you before it acts. What that looks li
Claude creates a plan from your prompt, which you can approve before Claude starts. The plan specifies which websites you're allowing Claude to access, as well as the approach it will follow:
-
+
Note that Claude will only use the websites listed in the plan, so you’ll need to manually approve any additional access requests.
@@ -64,7 +64,7 @@ When you choose "Skip all approvals," Claude doesn't pause to ask, and nothing c
There are some websites on which Claude requires approval for every action. If you navigate to one of these sites, a **New permissions required** prompt will appear in the extension side panel, Claude Cowork, or Claude Code where Claude will ask for permission before accessing the page or taking any action.
-
+
### Permission options
diff --git a/content/support/12997503-team-plan-billing-faqs.md b/content/support/12997503-team-plan-billing-faqs.md
index a0b79f3acc..68b283373b 100644
--- a/content/support/12997503-team-plan-billing-faqs.md
+++ b/content/support/12997503-team-plan-billing-faqs.md
@@ -18,7 +18,7 @@ Your organization's billing address determines where your invoices are sent. You
If you want to use a name other than the one tied to your payment method, an organization Owner should check the "Use a different name on invoices" box when adding or updating your payment method in **[Organization settings > Billing](https://claude.ai/admin-settings/billing)**:
-
+
## When will I be billed?
diff --git a/content/support/13132885-set-up-single-sign-on-sso.md b/content/support/13132885-set-up-single-sign-on-sso.md
index b37de25e52..c9b62e7383 100644
--- a/content/support/13132885-set-up-single-sign-on-sso.md
+++ b/content/support/13132885-set-up-single-sign-on-sso.md
@@ -42,7 +42,7 @@ You can verify multiple domains for a single organization, but all domains must
3. Enter the domain(s) you want to verify in the **Update organization email domains** modal and click the “+” button:
-
+
4. Click “Save” when you’re finished adding domains.
@@ -50,7 +50,7 @@ You can verify multiple domains for a single organization, but all domains must
6. Enter your domain in the text box and click “Continue”:
-
+
7. The setup screen displays a TXT record. **Copy the full Value using the copy button**—it begins with `anthropic-domain-verification-` and is longer than what's visible in the box. In your DNS provider, add a TXT record to your domain and **Value** set to the copied string. The domain must match exactly what you entered in the previous step, including any subdomains. Add it alongside any existing TXT records; don't replace them. The value is case-sensitive, so paste it exactly. Please refer to your DNS provider's documentation on this topic.
@@ -76,7 +76,7 @@ Clicking "Refresh" re-checks your DNS; it won't show Verified until the publishe
If the record is correct and propagated but the status still shows Pending, contact Support.
-
+
**Note:** Once your domain is verified, you'll see a **Restrict organization creation** toggle under **Security** on the Organization and access organization settings page. Enable this if you want to prevent users from creating new Claude or Console organizations—including personal accounts—using your verified domains.
@@ -116,7 +116,7 @@ For IdP-specific setup instructions, see:
You can now choose to toggle on **Require SSO for Console** and/or **Require SSO for Claude,** on the **Organization and access** page, under the **Authentication** section:
-
+
When SSO is required, users must use the “Continue with SSO” option to log in to their Claude/Console accounts. When SSO is not required, they will have the option to choose “Continue with SSO” or “Continue with email.”
diff --git a/content/support/13133195-set-up-jit-or-scim-provisioning.md b/content/support/13133195-set-up-jit-or-scim-provisioning.md
index 099902a4c5..27ea2a9b45 100644
--- a/content/support/13133195-set-up-jit-or-scim-provisioning.md
+++ b/content/support/13133195-set-up-jit-or-scim-provisioning.md
@@ -40,7 +40,7 @@ Use this table to help decide which provisioning mode is right for your organiza
Both JIT and SCIM can be combined with **Enable group mappings** to control role or seat tier assignment based on IdP group membership. If you select either of these options for your provisioning mode, **Enable group mappings** will appear within the **User provisioning** section:
-
+
**Important:** Group mappings set a user’s role type and seat tier only. Users with the Custom role get their permissions from groups in Claude, and those groups sync from your IdP only when your provisioning mode is SCIM directory sync. With JIT, you need to create groups and add users to them manually in **[Organization settings > Groups](https://claude.ai/admin-settings/groups)**. If you map an IdP group to the Custom role under JIT without doing this, those users have no permissions when they log in. Learn more about **[managing groups on Enterprise plans](https://support.claude.com/en/articles/13799932)**.
@@ -136,7 +136,7 @@ Learn more about **[setting up role-based permissions on Enterprise plans](https
4. Toggle **Enable group mappings** on (if it’s not already):
- 
+ 
5. In the **Enable group mappings** section, click “Add” next to each role and select the corresponding group from your IdP in the dropdown.
@@ -188,7 +188,7 @@ Verify you have enough seats purchased and available to add members to your org.
4. **For SCIM:** Click "Sync" to prompt an immediate sync, or wait for the automatic sync cycle:
- 
+ 
### Users mapped to the Custom role can't access anything after logging in
diff --git a/content/support/13163631-configuring-session-security-settings.md b/content/support/13163631-configuring-session-security-settings.md
index d68b2ecdd1..7e94698905 100644
--- a/content/support/13163631-configuring-session-security-settings.md
+++ b/content/support/13163631-configuring-session-security-settings.md
@@ -18,7 +18,7 @@ Session duration controls allow Enterprise and Console Admins to set a maximum s
5. Confirm your selection by clicking “Enable.”
-
+
### For Console Admins
@@ -32,7 +32,7 @@ Session duration controls allow Enterprise and Console Admins to set a maximum s
5. Confirm your selection by clicking “Enable.”
-
+
### What happens after enabling shortened session length?
@@ -50,7 +50,7 @@ You can change the session duration at any time by selecting a new value from th
- Sessions scheduled to expire beyond the new duration will have their expiration shortened accordingly.
-
+
## Disabling session length settings
diff --git a/content/support/13189465-log-in-to-your-claude-account.md b/content/support/13189465-log-in-to-your-claude-account.md
index b7bb46d75e..3db5ac3936 100644
--- a/content/support/13189465-log-in-to-your-claude-account.md
+++ b/content/support/13189465-log-in-to-your-claude-account.md
@@ -2,7 +2,7 @@
When you open Claude on a web browser ([claude.ai](https://claude.ai)), the desktop app, or a mobile app, you will see two different options for logging in to your Claude account.
-
+
## Continue with Google
diff --git a/content/support/13345190-get-started-with-claude-cowork.md b/content/support/13345190-get-started-with-claude-cowork.md
index 3fb1113f93..85777a6940 100644
--- a/content/support/13345190-get-started-with-claude-cowork.md
+++ b/content/support/13345190-get-started-with-claude-cowork.md
@@ -178,7 +178,7 @@ To set global instructions:
3. Type your instructions in the text box and click "Save":
-
+
### Folder instructions
diff --git a/content/support/13371040-log-in-to-your-console-account.md b/content/support/13371040-log-in-to-your-console-account.md
index 3413f77ef2..ea393b4fc0 100644
--- a/content/support/13371040-log-in-to-your-console-account.md
+++ b/content/support/13371040-log-in-to-your-console-account.md
@@ -2,7 +2,7 @@
When you navigate to the **[Claude Console](https://platform.claude.com)**, you will see two different options for logging in to your Console account.
-
+
## Continue with Google
diff --git a/content/support/13641943-visual-and-interactive-content.md b/content/support/13641943-visual-and-interactive-content.md
index d3521e25ba..cad1b86a2f 100644
--- a/content/support/13641943-visual-and-interactive-content.md
+++ b/content/support/13641943-visual-and-interactive-content.md
@@ -18,7 +18,7 @@ Claude can show current weather conditions and forecasts when you ask about the
Claude automatically displays temperatures in Fahrenheit for US locations and Celsius for everywhere else.
-
+
Weather is powered by Google Maps ().
@@ -28,7 +28,7 @@ When you ask about recipes, Claude can display formatted recipe cards that are e
**Note:** Visual recipe cards are available on web and desktop only. On mobile, Claude provides recipe information as text in the conversation.
-
+
### Custom visuals
@@ -76,7 +76,7 @@ For example, if you ask Claude to help you plan a trip, it might ask you to:
This content appears at the bottom of the chat. You can still type a response if you prefer.
-
+
---
diff --git a/content/support/13837440-use-plugins-in-claude.md b/content/support/13837440-use-plugins-in-claude.md
index fe3043ff0c..cc4ca80858 100644
--- a/content/support/13837440-use-plugins-in-claude.md
+++ b/content/support/13837440-use-plugins-in-claude.md
@@ -58,7 +58,7 @@ In Cowork, open the "Cowork" tab first, then open **Customize**.
You can also upload a custom plugin file if you built one yourself. On Team and Enterprise plans, a colleague can share a plugin with you directly instead of sending you the file. See **[Use a plugin shared with you](#h_ef985546b4)** below. Plugins you add in Claude on the web or in Claude Desktop are saved to your account, not to your computer, so they follow you to chat, Cowork, and Claude Code.
-
+
If you're on the Enterprise plan and your organization has skill scanning turned on, plugins are checked for malicious content when they're installed or updated. A plugin with malicious content is blocked, and one that may carry risk shows a caution banner. Learn more about **[skill and plugin scanning](https://support.claude.com/en/articles/15927065)**.
@@ -68,7 +68,7 @@ If you're on the Enterprise plan and your organization has skill scanning turned
Each plugin you add brings skills and commands you can use while working with Claude. Type "/" or click the "+" button to see the available skills from your plugins, in chat and in Cowork. In Cowork, you can also run a plugin's command by typing `/plugin-name:command`. Click any skill to see its details.
-
+
---
diff --git a/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md b/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md
index 83f390799e..6070962010 100644
--- a/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md
+++ b/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md
@@ -52,11 +52,11 @@ Follow these steps to get started:
5. You’ll land on a page describing the functionality. Click “Get started”:
-
+
6. On the next screen, you can give Claude access to your files and keep your computer awake by toggling those on:
-
+
7. Click “Finish setup.”
diff --git a/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md b/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md
index 63609810c6..c02fdb8a71 100644
--- a/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md
+++ b/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md
@@ -16,23 +16,23 @@ The new Claude experience, which combines chat and Cowork, is rolling out to Pro
Find **Projects** in the left navigation panel and click the “+” button to see the three different ways to create a project:
-
+
### Start from scratch
Selecting “Start from scratch” allows you to set up a new folder with instructions and files:
-
+
### Import from a Claude project
After selecting “Import from project,” you’ll see a “Search projects in Chat…” field:
-
+
Clicking into the field will display a drop-down showing your recent projects, but you can also use it to search all your projects. After you select a chat project (bulk upload is not supported), you can name the new Cowork project and choose where to save it on your computer:
-
+
Clicking “Create” will transfer the files and instructions from your existing Claude project and create a new Cowork project.
@@ -40,11 +40,11 @@ Clicking “Create” will transfer the files and instructions from your existin
If you select “Use an existing folder,” you’ll be prompted to pick a file to use as context for the new Cowork project:
-
+
After selecting a folder, you can name the new Cowork project, choose where to save it on your computer, add instructions, and attach any additional files. Click “Create” to start using your new project:
-
+
---
diff --git a/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md b/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md
index 84ab78f1cf..7f28612ef7 100644
--- a/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md
+++ b/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md
@@ -50,7 +50,7 @@ You can trigger a manual sync from two places in your admin settings.
2. Click "Check for updates" under **SCIM sync**:
-
+
3. Select whether to sync members, groups, or both.
@@ -62,7 +62,7 @@ You can trigger a manual sync from two places in your admin settings.
3. Select whether to sync members, groups, or both:
-
+
**Note:** If you trigger a manual sync while background changes are processing, your organization takes the most recent change for each member or group. If multiple changes are queued for the same member or group, you may need to resync again to make sure everything applies correctly.
diff --git a/content/support/14604842-cyber-verification-program.md b/content/support/14604842-cyber-verification-program.md
index e4c3e997b6..b62c06e3bc 100644
--- a/content/support/14604842-cyber-verification-program.md
+++ b/content/support/14604842-cyber-verification-program.md
@@ -12,7 +12,7 @@ Our generally available models can still be used by all users for secure code re
## Access tiers
-
+
## How to apply
diff --git a/content/support/15330088-set-a-default-model-for-your-organization.md b/content/support/15330088-set-a-default-model-for-your-organization.md
index 9c6b2dd0b7..c9b9448193 100644
--- a/content/support/15330088-set-a-default-model-for-your-organization.md
+++ b/content/support/15330088-set-a-default-model-for-your-organization.md
@@ -50,7 +50,7 @@ The organization default applies to every member. To set it:
4. Click “Save changes.”
-
+
---
diff --git a/content/support/15694740-manage-model-access-for-your-organization.md b/content/support/15694740-manage-model-access-for-your-organization.md
index 58308a3f4f..b869d53bad 100644
--- a/content/support/15694740-manage-model-access-for-your-organization.md
+++ b/content/support/15694740-manage-model-access-for-your-organization.md
@@ -42,9 +42,9 @@ The organization setting is the ceiling. A role can't grant access to a model th
If any custom role uses the model you’re disabling as its default, you’ll be prompted to change that role’s default before the change can be saved.
-
+
-
+
---
@@ -78,7 +78,7 @@ If any custom role has an effort cap higher than the new organization cap for th
Only models the role grants access to can be selected as that role’s default model.
-
+
---
@@ -96,7 +96,7 @@ Effort limits determine how much computation members on a role can apply per res
5. Click "Save" to save your changes.
-
+
Members on the role see only effort levels at or below the cap in their model menu. Note that available effort levels differ depending on the model, and some models don’t support effort level settings at all. For an explanation of each level, see **[Change the model, effort, and thinking settings](https://support.claude.com/en/articles/8664678)**.
diff --git a/content/support/15936181-get-started-with-1password-for-claude.md b/content/support/15936181-get-started-with-1password-for-claude.md
index b167bd824b..19ab1ff664 100644
--- a/content/support/15936181-get-started-with-1password-for-claude.md
+++ b/content/support/15936181-get-started-with-1password-for-claude.md
@@ -52,7 +52,7 @@ Once the requirements are in place, you can set up 1Password from a few places i
4. Toggle on **Password managers**:
-
+
Once enabled, eligible users will see the discovery options above. Users still need to install and set up the required apps and extensions themselves.
diff --git a/content/support/16607638-understanding-your-pro-or-max-plan-invoices.md b/content/support/16607638-understanding-your-pro-or-max-plan-invoices.md
index 968e64a2db..0307206043 100644
--- a/content/support/16607638-understanding-your-pro-or-max-plan-invoices.md
+++ b/content/support/16607638-understanding-your-pro-or-max-plan-invoices.md
@@ -40,7 +40,7 @@ You can also open any invoice from your account:
**Amount due.** The invoice total minus any applied balance. This is what your payment method was charged.
-
+
## Billing details on your invoice
diff --git a/content/support/16893491-get-started-with-smart-reports.md b/content/support/16893491-get-started-with-smart-reports.md
index f89122599a..2b15271c13 100644
--- a/content/support/16893491-get-started-with-smart-reports.md
+++ b/content/support/16893491-get-started-with-smart-reports.md
@@ -28,13 +28,13 @@ Each report includes the following sections:
Workstreams shows what the group used Claude for most, by sessions and by spend, side by side.
-
+
### Deliverables produced
Deliverables produced groups sessions by the type of output that was produced. For example, analysis, documentation, content drafts, and code.
-
+
### Cost per session by type of output
@@ -48,17 +48,17 @@ Task outcomes shows what each session produced.
Most common frictions shows what got in the way, by category. For example, a connector that wasn’t set up, output that didn’t match the ask, approval or sign-in gating, tool failures, or rework loops.
-
+
Click into a category to see more information:
-
+
### Inefficiencies
Inefficiencies counts sessions that produced nothing usable and sessions that were personal or off-topic, with their cost (shown only as an aggregate count and cost, with no summaries or drilldown).
-
+
### Reusable skills and workflows to build
@@ -68,13 +68,13 @@ Reusable skills and workflows to build identifies repeated patterns that could b
Most expensive sessions lists where spend concentrates.
-
+
### Complex, autonomous work
Complex, autonomous work shows sessions scoring highest on task complexity, time saved, how long Claude worked on its own, and the expertise required.
-
+
### Answers to custom questions
diff --git a/content/support/16951679-use-claude-in-google-docs-sheets-and-slides.md b/content/support/16951679-use-claude-in-google-docs-sheets-and-slides.md
index 24e0a01106..3dda6f918b 100644
--- a/content/support/16951679-use-claude-in-google-docs-sheets-and-slides.md
+++ b/content/support/16951679-use-claude-in-google-docs-sheets-and-slides.md
@@ -28,11 +28,11 @@ If your organization already allows Marketplace apps, this takes about two minut
2. Open a Google Docs, Sheets, or Slides file and go to Extensions > Claude > “Open Claude":
-
+
3. The first time, Google asks you to allow two permissions. Review them and click "Allow":
- 
+ 
4. Sign in with your Claude account in the sidebar, and optionally enable your connectors.
diff --git a/content/support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md b/content/support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md
index d0f50d57e4..fee0857229 100644
--- a/content/support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md
+++ b/content/support/17005973-manage-pooled-group-budgets-on-enterprise-plans.md
@@ -76,7 +76,7 @@ If a user belongs to more than one group with a pooled budget, the largest poole
With a custom order, the first pooled budget in your list with budget remaining pays.
-
+
**Note:** Budget priority only decides the order in which pooled budgets pay. To choose which group's member monthly limit applies to a user in more than one group, use the **Member limit from groups** setting under **Spending defaults**.
diff --git a/content/support/17203415-set-up-claude-for-intune.md b/content/support/17203415-set-up-claude-for-intune.md
index cf087fdf2d..59700afa32 100644
--- a/content/support/17203415-set-up-claude-for-intune.md
+++ b/content/support/17203415-set-up-claude-for-intune.md
@@ -70,25 +70,25 @@ To add Claude for Intune for enrolled company-owned devices:
1. In the Microsoft Intune admin center, select "Apps" from the left side navigation panel:
-
+
2. Under Platforms, select "iOS/iPadOS":
-
+
3. Click "+ Create." For the App type, select the "iOS store app," and click the "Select" button on the bottom:
-
+
4. Search "Claude for Intune" and click the "Select" button on the bottom.
5. In **App Information**, set **Minimum operating system** to iOS 18, then click the "Next" button:
-
+
6. For **Assignments**, add the groups that should get the app: under Required to install it automatically, or under Available for enrolled devices so employees can install it from Company Portal. You can use user groups or device groups.
-
+
7. Click "Next," review and create.
@@ -98,27 +98,27 @@ To add Claude for Intune for enrolled company-owned devices:
1. In the Microsoft Intune admin center, select "Apps" from the left side navigation panel:
-
+
2. Under **Manage apps**, select "Protection":
-
+
3. Click "+ Create" and then select "iOS/iPadOS":
-
+
4. Enter Name in the **Basics** tab, then click "Next" to **Apps**. Set **Target policy to** "Selected apps." Click "+ Select custom apps":
-
+
5. Type in the bundle ID `com.anthropic.claudeforintune`. Select it so it appears under **Selected Apps** before clicking "Select":
-
+
6. In Apps, confirm the bundle ID now appears under **Custom apps** before clicking "Next":
-
+
7. Configure the Data protection, Access requirements, and Conditional launch settings as needed.
diff --git a/content/support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md b/content/support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md
index 3e539ef727..2cb79d87f7 100644
--- a/content/support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md
+++ b/content/support/17444462-set-up-and-manage-the-new-unified-claude-experience-for-your-enterprise-organization.md
@@ -184,11 +184,11 @@ The new unified Claude experience gets its own line in your reports. When a memb
**A page of its own.** Admins who can view analytics will find a Chat and Cowork unified page under Apps. It shows daily active users.
-
+
**Across the dashboard.** You can pick "Chat and Cowork unified" in the Active users, Active members, Total spend, and Spend by model charts. The See all members table on the Overview page has a "Messages in Chat and Cowork unified" column. The Top connectors and Top skills cards don't include it yet.
-
+
**Who sees it.** The page appears for every organization that can turn on the new unified Claude experience, whether or not it is on yet.
diff --git a/content/support/8114491-get-started-with-claude.md b/content/support/8114491-get-started-with-claude.md
index f3793949ba..aa3f7a3f71 100644
--- a/content/support/8114491-get-started-with-claude.md
+++ b/content/support/8114491-get-started-with-claude.md
@@ -36,7 +36,7 @@ You use **prompts** to communicate with Claude. The best approach is to speak to
Type your prompt into the chat interface and click the submit button to start a conversation with Claude. You can click the "+" button in the lower left or type "/" to view additional options and commands:
-
+
---
diff --git a/content/support/8230524-delete-or-rename-a-conversation.md b/content/support/8230524-delete-or-rename-a-conversation.md
index d73e1044e0..8ccdce89fb 100644
--- a/content/support/8230524-delete-or-rename-a-conversation.md
+++ b/content/support/8230524-delete-or-rename-a-conversation.md
@@ -44,15 +44,15 @@ These steps apply to Claude for iOS, listed on the App Store as Claude by Anthro
4. If deleting, tap "Delete" again in the confirmation prompt.
-
+
-
+
You can also delete the conversation you have open: tap the "⋯" button in the top right corner, tap "Delete," then confirm.
-
+
-
+
## Delete or rename a conversation on Claude for Android
@@ -66,9 +66,9 @@ These steps apply to the Claude for Android, listed on Google Play as Claude by
3. If deleting, tap "Delete" again in the confirmation prompt.
-
+
-
+
**To delete multiple conversations at once:**
@@ -78,9 +78,9 @@ These steps apply to the Claude for Android, listed on Google Play as Claude by
3. Tap the trash icon, then tap "Delete" in the confirmation prompt.
-
+
-
+
## What happens when you delete a conversation
diff --git a/content/support/8325618-paid-plan-billing-faqs.md b/content/support/8325618-paid-plan-billing-faqs.md
index 8e16b74c3a..3ed4b1e50b 100644
--- a/content/support/8325618-paid-plan-billing-faqs.md
+++ b/content/support/8325618-paid-plan-billing-faqs.md
@@ -50,7 +50,7 @@ There's no separate option to remove a card, and updating to a new card replaces
If you want to use a name other than the one tied to your payment method, check the "Use a different name on invoices" box when adding or updating your payment method in **[Settings > Billing](https://claude.ai/settings/billing)**.
-
+
## How can I edit a paid invoice?
diff --git a/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md b/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md
index 30d3ed4829..d925f86f12 100644
--- a/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md
+++ b/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md
@@ -132,7 +132,7 @@ For the full walkthrough of your options, deadlines, and what happens to your su
You may have both a personal account and an organization account tied to the same email address. You can switch between them by clicking your initials or name in the lower left corner of the screen.
-
+
A blue checkmark shows which account you're currently using. Click the other account to switch to it and access its separate conversations and projects.
diff --git a/content/support/9519177-how-can-i-create-and-manage-projects.md b/content/support/9519177-how-can-i-create-and-manage-projects.md
index 9643a58efb..9014cf6afc 100644
--- a/content/support/9519177-how-can-i-create-and-manage-projects.md
+++ b/content/support/9519177-how-can-i-create-and-manage-projects.md
@@ -104,15 +104,15 @@ Starring a project allows for quick access from your projects and chats list, vi
You can move a standalone chat into a project by clicking on the dropdown arrow next to the chat name, then “Add to project”:
-
+
Browse or search for the correct project in the **Move chat** modal that appears, then click on it to move the chat.
-
+
You can also remove chats from projects, or move them between projects, using the same dropdown menu within the chat:
-
+
---
diff --git a/discovery.json b/discovery.json
index d04b8489f6..33bcdea2c0 100644
--- a/discovery.json
+++ b/discovery.json
@@ -1,7 +1,7 @@
{
"version": 1,
"note": "What the last full run could see outside sources.json. Written by the fetcher so a new source arrives as a diff a human reviews, not as a line in an Actions log nobody reads. Stable facts only: a change here is always news. `review` is the actionable list \u2014 domains we could archive today and do not.",
- "updated": "2026-10-24",
+ "updated": "2026-10-25",
"domains": {
"anthropic.com": {
"status": "frozen",
diff --git a/tombstones.json b/tombstones.json
index 6643c1692f..ae2f2a4628 100644
--- a/tombstones.json
+++ b/tombstones.json
@@ -1,7 +1,7 @@
{
"version": 1,
"note": "URLs confirmed gone upstream. Kept so a page that died once does not report as a fresh failure on every later run, which would bury the failure that is actually new. An entry clears itself if the URL answers again -- but only while something still probes it. Entries whose local file was removed are no longer fetched, so they stay as a record of the restructure rather than a live check.",
- "updated": "2026-10-24",
+ "updated": "2026-10-25",
"urls": {
"https://claude.com/docs/claude-science/annotations": {
"since": "2026-09-01",