claudecode-omc 5.6.7 → 5.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/.local/skills/THIRD_PARTY_LICENSES/AvdLee-SwiftUI-Agent-Skill.LICENSE +21 -0
  2. package/.local/skills/THIRD_PARTY_LICENSES/Dimillian-Skills.LICENSE +21 -0
  3. package/.local/skills/THIRD_PARTY_LICENSES/README.md +36 -0
  4. package/.local/skills/THIRD_PARTY_LICENSES/twostraws-swiftui-agent-skill.LICENSE +21 -0
  5. package/.local/skills/ios-debugger-agent/SKILL.md +51 -0
  6. package/.local/skills/ios-debugger-agent/agents/openai.yaml +4 -0
  7. package/.local/skills/prompt-optimizer/SKILL.md +262 -19
  8. package/.local/skills/swift-concurrency-expert/SKILL.md +105 -0
  9. package/.local/skills/swift-concurrency-expert/agents/openai.yaml +4 -0
  10. package/.local/skills/swift-concurrency-expert/references/approachable-concurrency.md +63 -0
  11. package/.local/skills/swift-concurrency-expert/references/swift-6-2-concurrency.md +272 -0
  12. package/.local/skills/swift-concurrency-expert/references/swiftui-concurrency-tour-wwdc.md +33 -0
  13. package/.local/skills/swiftui-expert-skill/SKILL.md +162 -0
  14. package/.local/skills/swiftui-expert-skill/references/accessibility-patterns.md +215 -0
  15. package/.local/skills/swiftui-expert-skill/references/animation-advanced.md +403 -0
  16. package/.local/skills/swiftui-expert-skill/references/animation-basics.md +284 -0
  17. package/.local/skills/swiftui-expert-skill/references/animation-transitions.md +326 -0
  18. package/.local/skills/swiftui-expert-skill/references/charts-accessibility.md +135 -0
  19. package/.local/skills/swiftui-expert-skill/references/charts.md +602 -0
  20. package/.local/skills/swiftui-expert-skill/references/focus-patterns.md +299 -0
  21. package/.local/skills/swiftui-expert-skill/references/image-optimization.md +203 -0
  22. package/.local/skills/swiftui-expert-skill/references/latest-apis.md +488 -0
  23. package/.local/skills/swiftui-expert-skill/references/layout-best-practices.md +266 -0
  24. package/.local/skills/swiftui-expert-skill/references/liquid-glass.md +423 -0
  25. package/.local/skills/swiftui-expert-skill/references/list-patterns.md +446 -0
  26. package/.local/skills/swiftui-expert-skill/references/macos-scenes.md +318 -0
  27. package/.local/skills/swiftui-expert-skill/references/macos-views.md +357 -0
  28. package/.local/skills/swiftui-expert-skill/references/macos-window-styling.md +303 -0
  29. package/.local/skills/swiftui-expert-skill/references/performance-patterns.md +403 -0
  30. package/.local/skills/swiftui-expert-skill/references/scroll-patterns.md +293 -0
  31. package/.local/skills/swiftui-expert-skill/references/sheet-navigation-patterns.md +363 -0
  32. package/.local/skills/swiftui-expert-skill/references/state-management.md +388 -0
  33. package/.local/skills/swiftui-expert-skill/references/text-patterns.md +32 -0
  34. package/.local/skills/swiftui-expert-skill/references/trace-analysis.md +295 -0
  35. package/.local/skills/swiftui-expert-skill/references/trace-recording.md +134 -0
  36. package/.local/skills/swiftui-expert-skill/references/view-structure.md +780 -0
  37. package/.local/skills/swiftui-expert-skill/scripts/__pycache__/analyze_trace.cpython-313.pyc +0 -0
  38. package/.local/skills/swiftui-expert-skill/scripts/__pycache__/record_trace.cpython-313.pyc +0 -0
  39. package/.local/skills/swiftui-expert-skill/scripts/analyze_trace.py +301 -0
  40. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__init__.py +1 -0
  41. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/__init__.cpython-313.pyc +0 -0
  42. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/causes.cpython-313.pyc +0 -0
  43. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/correlate.cpython-313.pyc +0 -0
  44. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/events.cpython-313.pyc +0 -0
  45. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/hangs.cpython-313.pyc +0 -0
  46. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/hitches.cpython-313.pyc +0 -0
  47. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/summary.cpython-313.pyc +0 -0
  48. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/swiftui.cpython-313.pyc +0 -0
  49. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/time_profiler.cpython-313.pyc +0 -0
  50. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/xctrace.cpython-313.pyc +0 -0
  51. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/__pycache__/xml_utils.cpython-313.pyc +0 -0
  52. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/causes.py +187 -0
  53. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/correlate.py +179 -0
  54. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/events.py +291 -0
  55. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/hangs.py +108 -0
  56. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/hitches.py +145 -0
  57. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/summary.py +243 -0
  58. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/swiftui.py +195 -0
  59. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/time_profiler.py +135 -0
  60. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/xctrace.py +117 -0
  61. package/.local/skills/swiftui-expert-skill/scripts/instruments_parser/xml_utils.py +224 -0
  62. package/.local/skills/swiftui-expert-skill/scripts/record_trace.py +252 -0
  63. package/.local/skills/swiftui-liquid-glass/SKILL.md +90 -0
  64. package/.local/skills/swiftui-liquid-glass/agents/openai.yaml +4 -0
  65. package/.local/skills/swiftui-liquid-glass/references/liquid-glass.md +280 -0
  66. package/.local/skills/swiftui-performance-audit/SKILL.md +106 -0
  67. package/.local/skills/swiftui-performance-audit/agents/openai.yaml +4 -0
  68. package/.local/skills/swiftui-performance-audit/references/code-smells.md +150 -0
  69. package/.local/skills/swiftui-performance-audit/references/demystify-swiftui-performance-wwdc23.md +46 -0
  70. package/.local/skills/swiftui-performance-audit/references/optimizing-swiftui-performance-instruments.md +29 -0
  71. package/.local/skills/swiftui-performance-audit/references/profiling-intake.md +44 -0
  72. package/.local/skills/swiftui-performance-audit/references/report-template.md +47 -0
  73. package/.local/skills/swiftui-performance-audit/references/understanding-hangs-in-your-app.md +33 -0
  74. package/.local/skills/swiftui-performance-audit/references/understanding-improving-swiftui-performance.md +52 -0
  75. package/.local/skills/swiftui-pro/SKILL.md +108 -0
  76. package/.local/skills/swiftui-pro/agents/openai.yaml +10 -0
  77. package/.local/skills/swiftui-pro/assets/swiftui-pro-icon.png +0 -0
  78. package/.local/skills/swiftui-pro/assets/swiftui-pro-icon.svg +29 -0
  79. package/.local/skills/swiftui-pro/references/accessibility.md +13 -0
  80. package/.local/skills/swiftui-pro/references/api.md +39 -0
  81. package/.local/skills/swiftui-pro/references/data.md +43 -0
  82. package/.local/skills/swiftui-pro/references/design.md +32 -0
  83. package/.local/skills/swiftui-pro/references/hygiene.md +9 -0
  84. package/.local/skills/swiftui-pro/references/navigation.md +14 -0
  85. package/.local/skills/swiftui-pro/references/performance.md +46 -0
  86. package/.local/skills/swiftui-pro/references/swift.md +56 -0
  87. package/.local/skills/swiftui-pro/references/views.md +36 -0
  88. package/.local/skills/swiftui-ui-patterns/SKILL.md +95 -0
  89. package/.local/skills/swiftui-ui-patterns/agents/openai.yaml +4 -0
  90. package/.local/skills/swiftui-ui-patterns/references/app-wiring.md +201 -0
  91. package/.local/skills/swiftui-ui-patterns/references/async-state.md +96 -0
  92. package/.local/skills/swiftui-ui-patterns/references/components-index.md +50 -0
  93. package/.local/skills/swiftui-ui-patterns/references/controls.md +57 -0
  94. package/.local/skills/swiftui-ui-patterns/references/deeplinks.md +66 -0
  95. package/.local/skills/swiftui-ui-patterns/references/focus.md +90 -0
  96. package/.local/skills/swiftui-ui-patterns/references/form.md +97 -0
  97. package/.local/skills/swiftui-ui-patterns/references/grids.md +71 -0
  98. package/.local/skills/swiftui-ui-patterns/references/haptics.md +71 -0
  99. package/.local/skills/swiftui-ui-patterns/references/input-toolbar.md +51 -0
  100. package/.local/skills/swiftui-ui-patterns/references/lightweight-clients.md +93 -0
  101. package/.local/skills/swiftui-ui-patterns/references/list.md +86 -0
  102. package/.local/skills/swiftui-ui-patterns/references/loading-placeholders.md +38 -0
  103. package/.local/skills/swiftui-ui-patterns/references/macos-settings.md +71 -0
  104. package/.local/skills/swiftui-ui-patterns/references/matched-transitions.md +59 -0
  105. package/.local/skills/swiftui-ui-patterns/references/media.md +73 -0
  106. package/.local/skills/swiftui-ui-patterns/references/menu-bar.md +101 -0
  107. package/.local/skills/swiftui-ui-patterns/references/navigationstack.md +159 -0
  108. package/.local/skills/swiftui-ui-patterns/references/overlay.md +45 -0
  109. package/.local/skills/swiftui-ui-patterns/references/performance.md +62 -0
  110. package/.local/skills/swiftui-ui-patterns/references/previews.md +48 -0
  111. package/.local/skills/swiftui-ui-patterns/references/scroll-reveal.md +133 -0
  112. package/.local/skills/swiftui-ui-patterns/references/scrollview.md +87 -0
  113. package/.local/skills/swiftui-ui-patterns/references/searchable.md +71 -0
  114. package/.local/skills/swiftui-ui-patterns/references/sheets.md +155 -0
  115. package/.local/skills/swiftui-ui-patterns/references/split-views.md +72 -0
  116. package/.local/skills/swiftui-ui-patterns/references/tabview.md +114 -0
  117. package/.local/skills/swiftui-ui-patterns/references/theming.md +71 -0
  118. package/.local/skills/swiftui-ui-patterns/references/title-menus.md +93 -0
  119. package/.local/skills/swiftui-ui-patterns/references/top-bar.md +49 -0
  120. package/.local/skills/swiftui-view-refactor/SKILL.md +202 -0
  121. package/.local/skills/swiftui-view-refactor/agents/openai.yaml +4 -0
  122. package/.local/skills/swiftui-view-refactor/references/mv-patterns.md +161 -0
  123. package/.omc-curation/ecc-selection.json +80 -0
  124. package/.omc-curation/governance.json +113 -0
  125. package/.omc-curation/sources.lock.json +25 -0
  126. package/README.md +69 -4
  127. package/bundled/manifest.json +5 -5
  128. package/bundled/upstream/anthropic-skills/.omc-source/bundle.json +18 -0
  129. package/bundled/upstream/anthropic-skills/.omc-source/provenance.json +399 -0
  130. package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +18 -17
  131. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
  132. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +4 -4
  133. package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +2 -2
  134. package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
  135. package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +2 -2
  136. package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
  137. package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +2 -2
  138. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
  139. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
  140. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
  141. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
  142. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
  143. package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +3 -3
  144. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
  145. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +2 -2
  146. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +5 -5
  147. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +3 -1
  148. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +10 -4
  149. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +19 -1
  150. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +6 -2
  151. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +1 -1
  152. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +3 -3
  153. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +3 -2
  154. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +173 -0
  155. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +10 -4
  156. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +113 -13
  157. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +14 -11
  158. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +2 -2
  159. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +4 -4
  160. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
  161. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
  162. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
  163. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
  164. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
  165. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +3 -3
  166. package/bundled/upstream/ecc/.omc-source/bundle.json +2 -1
  167. package/bundled/upstream/ecc/.omc-source/last-plan-apply.json +108 -24
  168. package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +3 -3
  169. package/bundled/upstream/ecc/.omc-source/provenance.json +563 -0
  170. package/bundled/upstream/ecc/agents/marketing-agent.md +159 -0
  171. package/bundled/upstream/ecc/agents/react-build-resolver.md +215 -0
  172. package/bundled/upstream/ecc/agents/react-reviewer.md +167 -0
  173. package/bundled/upstream/ecc/agents/typescript-reviewer.md +3 -0
  174. package/bundled/upstream/ecc/commands/harness-audit.md +17 -10
  175. package/bundled/upstream/ecc/commands/marketing-campaign.md +129 -0
  176. package/bundled/upstream/ecc/commands/react-build.md +187 -0
  177. package/bundled/upstream/ecc/commands/react-review.md +170 -0
  178. package/bundled/upstream/ecc/commands/react-test.md +265 -0
  179. package/bundled/upstream/ecc/skills/benchmark-optimization-loop/SKILL.md +69 -0
  180. package/bundled/upstream/ecc/skills/blender-motion-state-inspection/SKILL.md +164 -0
  181. package/bundled/upstream/ecc/skills/canary-watch/SKILL.md +9 -1
  182. package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +31 -9
  183. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +38 -4
  184. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +319 -12
  185. package/bundled/upstream/ecc/skills/data-throughput-accelerator/SKILL.md +72 -0
  186. package/bundled/upstream/ecc/skills/dynamic-workflow-mode/SKILL.md +123 -0
  187. package/bundled/upstream/ecc/skills/frontend-a11y/SKILL.md +446 -0
  188. package/bundled/upstream/ecc/skills/ito-basket-compare/SKILL.md +63 -0
  189. package/bundled/upstream/ecc/skills/ito-data-atlas-agent/SKILL.md +63 -0
  190. package/bundled/upstream/ecc/skills/ito-market-intelligence/SKILL.md +60 -0
  191. package/bundled/upstream/ecc/skills/ito-trade-planner/SKILL.md +67 -0
  192. package/bundled/upstream/ecc/skills/latency-critical-systems/SKILL.md +73 -0
  193. package/bundled/upstream/ecc/skills/marketing-campaign/SKILL.md +113 -0
  194. package/bundled/upstream/ecc/skills/nextjs-turbopack/SKILL.md +13 -0
  195. package/bundled/upstream/ecc/skills/parallel-execution-optimizer/SKILL.md +72 -0
  196. package/bundled/upstream/ecc/skills/prediction-market-oracle-research/SKILL.md +63 -0
  197. package/bundled/upstream/ecc/skills/prediction-market-risk-review/SKILL.md +60 -0
  198. package/bundled/upstream/ecc/skills/react-patterns/SKILL.md +341 -0
  199. package/bundled/upstream/ecc/skills/react-performance/SKILL.md +574 -0
  200. package/bundled/upstream/ecc/skills/react-testing/SKILL.md +423 -0
  201. package/bundled/upstream/ecc/skills/recsys-pipeline-architect/SKILL.md +114 -0
  202. package/bundled/upstream/ecc/skills/recursive-decision-ledger/SKILL.md +79 -0
  203. package/bundled/upstream/ecc/skills/social-publisher/SKILL.md +115 -0
  204. package/bundled/upstream/ecc/skills/team-agent-orchestration/SKILL.md +110 -0
  205. package/bundled/upstream/ecc/skills/uncloud/SKILL.md +343 -0
  206. package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +99 -0
  207. package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +2 -1
  208. package/bundled/upstream/oh-my-claudecode/.omc-source/provenance.json +116 -0
  209. package/bundled/upstream/oh-my-claudecode/skills/autopilot/SKILL.md +7 -0
  210. package/bundled/upstream/oh-my-claudecode/skills/cancel/SKILL.md +1 -0
  211. package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +39 -5
  212. package/bundled/upstream/oh-my-claudecode/skills/hud/SKILL.md +1 -0
  213. package/bundled/upstream/oh-my-claudecode/skills/local-build-reminder/SKILL.md +78 -0
  214. package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +1 -1
  215. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/SKILL.md +26 -10
  216. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +3 -3
  217. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +6 -4
  218. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +1 -1
  219. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/04-welcome.md +2 -2
  220. package/bundled/upstream/oh-my-claudecode/skills/omc-teams/SKILL.md +6 -6
  221. package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +44 -32
  222. package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +45 -21
  223. package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +1 -1
  224. package/bundled/upstream/oh-my-claudecode/skills/self-improve/SKILL.md +7 -0
  225. package/bundled/upstream/oh-my-claudecode/skills/self-improve/scripts/resolve-paths.mjs +39 -15
  226. package/bundled/upstream/oh-my-claudecode/skills/team/SKILL.md +132 -90
  227. package/bundled/upstream/oh-my-claudecode/skills/ultragoal/SKILL.md +93 -0
  228. package/bundled/upstream/oh-my-claudecode/skills/ultraqa/SKILL.md +28 -13
  229. package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +7 -0
  230. package/bundled/upstream/superpowers/.omc-source/bundle.json +2 -1
  231. package/bundled/upstream/superpowers/.omc-source/provenance.json +63 -0
  232. package/package.json +2 -1
  233. package/src/catalog/source-catalog.js +10 -4
  234. package/src/cli/index.js +4 -0
  235. package/src/cli/plan.js +14 -2
  236. package/src/cli/setup.js +52 -13
  237. package/src/cli/skill.js +1 -1
  238. package/src/cli/source.js +265 -14
  239. package/src/config/sources.js +67 -1
  240. package/src/merge/content-patch.js +84 -0
  241. package/templates/merge-config.json +1 -8
  242. package/bundled/upstream/ecc/skills/strategic-compact/suggest-compact.sh +0 -54
@@ -51,7 +51,7 @@ puts "Environment ID: #{environment.id}" # env_...
51
51
  # 1. Create the agent (reusable, versioned)
52
52
  agent = client.beta.agents.create(
53
53
  name: "Coding Assistant",
54
- model: :"claude-opus-4-7",
54
+ model: :"claude-opus-4-8",
55
55
  system_: "You are a helpful coding assistant.",
56
56
  tools: [{type: "agent_toolset_20260401"}]
57
57
  )
@@ -260,7 +260,7 @@ client.beta.sessions.delete(session.id)
260
260
  # Agent declares MCP server (no auth here — auth goes in a vault)
261
261
  agent = client.beta.agents.create(
262
262
  name: "GitHub Assistant",
263
- model: :"claude-opus-4-7",
263
+ model: :"claude-opus-4-8",
264
264
  mcp_servers: [
265
265
  {
266
266
  type: "url",
@@ -80,7 +80,7 @@ This file documents HTTP error codes returned by the Claude API, their common ca
80
80
  - Using deprecated model ID
81
81
  - Invalid API endpoint
82
82
 
83
- **Fix:** Use exact model IDs from the models documentation. You can use aliases (e.g., `claude-opus-4-7`).
83
+ **Fix:** Use exact model IDs from the models documentation. You can use aliases (e.g., `claude-opus-4-8`).
84
84
 
85
85
  ---
86
86
 
@@ -105,7 +105,7 @@ Some 400 errors are specifically related to parameter validation:
105
105
  - `budget_tokens` >= `max_tokens` in extended thinking
106
106
  - Invalid tool definition schema
107
107
 
108
- **Model-specific 400s on Opus 4.7:**
108
+ **Model-specific 400s on Opus 4.8 / 4.7:**
109
109
 
110
110
  - `temperature`, `top_p`, `top_k` are removed — sending any of them returns 400. Delete the parameter; see `shared/model-migration.md` → Per-SDK Syntax Reference.
111
111
  - `thinking: {type: "enabled", budget_tokens: N}` is removed — sending it returns 400. Use `thinking: {type: "adaptive"}` instead.
@@ -166,10 +166,10 @@ thinking: budget_tokens=10000, max_tokens=16000
166
166
 
167
167
  | Mistake | Error | Fix |
168
168
  | ------------------------------- | ---------------- | ------------------------------------------------------- |
169
- | `temperature`/`top_p`/`top_k` on Opus 4.7 | 400 | Remove the parameter (see `shared/model-migration.md`) |
170
- | `budget_tokens` on Opus 4.7 | 400 | Use `thinking: {type: "adaptive"}` |
169
+ | `temperature`/`top_p`/`top_k` on Opus 4.8 / 4.7 | 400 | Remove the parameter (see `shared/model-migration.md`) |
170
+ | `budget_tokens` on Opus 4.8 / 4.7 | 400 | Use `thinking: {type: "adaptive"}` |
171
171
  | `budget_tokens` >= `max_tokens` (older models) | 400 | Ensure `budget_tokens` < `max_tokens` |
172
- | Typo in model ID | 404 | Use valid model ID like `claude-opus-4-7` |
172
+ | Typo in model ID | 404 | Use valid model ID like `claude-opus-4-8` |
173
173
  | First message is `assistant` | 400 | First message must be `user` |
174
174
  | Consecutive same-role messages | 400 | Alternate `user` and `assistant` |
175
175
  | API key in code | 401 (leaked key) | Use environment variable |
@@ -24,7 +24,7 @@ This file contains WebFetch URLs for fetching current information from platform.
24
24
  | Topic | URL | Extraction Prompt |
25
25
  | ----------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
26
26
  | Extended Thinking | `https://platform.claude.com/docs/en/build-with-claude/extended-thinking.md` | "Extract extended thinking parameters, budget_tokens requirements, and usage examples" |
27
- | Adaptive Thinking | `https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking.md` | "Extract adaptive thinking setup, effort levels, and Claude Opus 4.7 usage examples" |
27
+ | Adaptive Thinking | `https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking.md` | "Extract adaptive thinking setup, effort levels, and Claude Opus 4.8 usage examples" |
28
28
  | Effort Parameter | `https://platform.claude.com/docs/en/build-with-claude/effort.md` | "Extract effort levels, cost-quality tradeoffs, and interaction with thinking" |
29
29
  | Tool Use | `https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview.md` | "Extract tool definition schema, tool_choice options, and handling tool results" |
30
30
  | Streaming | `https://platform.claude.com/docs/en/build-with-claude/streaming.md` | "Extract streaming event types, SDK examples, and best practices" |
@@ -82,6 +82,8 @@ Use these when a managed-agents binding, behavior, or wire-level detail isn't co
82
82
  | Define Outcomes | `https://platform.claude.com/docs/en/managed-agents/define-outcomes.md` | "Extract outcome definitions, evaluation hooks, and success criteria configuration" |
83
83
  | Sessions | `https://platform.claude.com/docs/en/managed-agents/sessions.md` | "Extract session lifecycle, status transitions, idle/terminated semantics, and resume rules" |
84
84
  | Environments | `https://platform.claude.com/docs/en/managed-agents/environments.md` | "Extract environment config (cloud/networking), management endpoints, and reuse model" |
85
+ | Self-Hosted Sandboxes | `https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes.md` | "Extract config:{type:self_hosted}, ANTHROPIC_ENVIRONMENT_KEY, EnvironmentWorker.run/run_one, beta_agent_toolset, ant beta:worker poll/run, webhook-driven wake" |
86
+ | Self-Hosted Sandboxes — Security | `https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-security.md` | "Extract what the customer owns (hardening, egress, key custody, trust boundaries) vs what Anthropic cannot do" |
85
87
  | Events and Streaming | `https://platform.claude.com/docs/en/managed-agents/events-and-streaming.md` | "Extract event stream types, stream-first ordering, reconnect/dedupe, and steering patterns" |
86
88
  | Tools | `https://platform.claude.com/docs/en/managed-agents/tools.md` | "Extract built-in toolset, custom tool definitions, and tool result wire format" |
87
89
  | Files | `https://platform.claude.com/docs/en/managed-agents/files.md` | "Extract file upload, mount paths, session resources, and listing/downloading session outputs" |
@@ -21,6 +21,7 @@ All resources are under the `beta` namespace. Python and TypeScript share identi
21
21
  | Agents | `agents.create` / `retrieve` / `update` / `list` / `archive` | `Agents.New` / `Get` / `Update` / `List` / `Archive` |
22
22
  | Agent Versions | `agents.versions.list` | `Agents.Versions.List` |
23
23
  | Environments | `environments.create` / `retrieve` / `update` / `list` / `delete` / `archive` | `Environments.New` / `Get` / `Update` / `List` / `Delete` / `Archive` |
24
+ | Environment Work (self-hosted) | `environments.work.poller` / `stats` / `stop` | See `shared/managed-agents-self-hosted-sandboxes.md` |
24
25
  | Sessions | `sessions.create` / `retrieve` / `update` / `list` / `delete` / `archive` | `Sessions.New` / `Get` / `Update` / `List` / `Delete` / `Archive` |
25
26
  | Session Events | `sessions.events.list` / `send` / `stream` | `Sessions.Events.List` / `Send` / `StreamEvents` |
26
27
  | Session Threads | `sessions.threads.list` / `retrieve` / `archive`; `sessions.threads.events.list` / `stream` | `Sessions.Threads.List` / `Get` / `Archive`; `Sessions.Threads.Events.List` / `StreamEvents` |
@@ -35,10 +36,11 @@ All resources are under the `beta` namespace. Python and TypeScript share identi
35
36
  - Agents and Session Threads have **no delete** — only `archive`. Archive is **permanent**: the agent becomes read-only, new sessions cannot reference it, and there is no unarchive. Confirm with the user before archiving a production agent. Environments, Sessions, Vaults, Credentials, and Memory Stores have both `delete` and `archive`; Session Resources, Files, Skills, and Memories are `delete`-only; Memory Versions have neither — only `redact`.
36
37
  - Session resources use `add` (not `create`).
37
38
  - Go's event stream is `StreamEvents` (not `Stream`).
39
+ - The self-hosted worker is **not** under `client.beta.*` — it's `EnvironmentWorker` from `anthropic.lib.environments` / `@anthropic-ai/sdk/helpers/beta/environments`; only `environments.work.poller/stats/stop` are client methods.
38
40
 
39
41
  **Agent shorthand:** `agent` on session create accepts either a bare string (`agent="agent_abc123"` — uses latest version) or the full reference object (`{type: "agent", id: "agent_abc123", version: 123}`).
40
42
 
41
- **Model shorthand:** `model` on agent create accepts either a bare string (`model="claude-opus-4-7"` — uses `standard` speed) or the full config object (`{type: "model_config", id: "claude-opus-4-6", speed: "fast"}`). Note: `speed: "fast"` is only supported on Opus 4.6.
43
+ **Model shorthand:** `model` on agent create accepts either a bare string (`model="claude-opus-4-8"` — uses `standard` speed) or the full config object (`{id: "claude-opus-4-6", speed: "fast"}`). Note: `speed: "fast"` is only supported on Opus 4.6.
42
44
 
43
45
  ---
44
46
 
@@ -62,7 +64,7 @@ All resources are under the `beta` namespace. Python and TypeScript share identi
62
64
  | `GET` | `/v1/sessions` | ListSessions | List sessions (paginated) |
63
65
  | `POST` | `/v1/sessions` | CreateSession | Create a new session |
64
66
  | `GET` | `/v1/sessions/{session_id}` | GetSession | Get session details |
65
- | `POST` | `/v1/sessions/{session_id}` | UpdateSession | Update session metadata/title |
67
+ | `POST` | `/v1/sessions/{session_id}` | UpdateSession | Update session `metadata`/`title`, or `agent.tools`/`agent.mcp_servers`/`vault_ids` (session-local override; session must be `idle`). See `shared/managed-agents-core.md` → Updating the agent configuration mid-session. |
66
68
  | `DELETE` | `/v1/sessions/{session_id}` | DeleteSession | Delete a session |
67
69
  | `POST` | `/v1/sessions/{session_id}/archive` | ArchiveSession | Archive a session |
68
70
 
@@ -106,6 +108,10 @@ Per-subagent event streams in multiagent sessions. See `shared/managed-agents-mu
106
108
  | `POST` | `/v1/environments/{environment_id}` | UpdateEnvironment | Update environment |
107
109
  | `DELETE` | `/v1/environments/{environment_id}` | DeleteEnvironment | Delete environment. Returns 204. |
108
110
  | `POST` | `/v1/environments/{environment_id}/archive` | ArchiveEnvironment | Archive environment. Makes it **read-only**; existing sessions continue, new sessions cannot reference it. No unarchive — this is the terminal state. |
111
+ | `GET` | `/v1/environments/{environment_id}/work/stats` | WorkQueueStats | Self-hosted work-queue depth/pending/workers. `x-api-key` auth. See `shared/managed-agents-self-hosted-sandboxes.md`. |
112
+ | `POST` | `/v1/environments/{environment_id}/work/{work_id}/stop` | StopWork | Self-hosted: stop a claimed work item. `x-api-key` auth. |
113
+
114
+ For `type: "self_hosted"`, `config` is the bare `{"type": "self_hosted"}` — `networking` and `packages` do not apply.
109
115
 
110
116
  ## Vaults
111
117
 
@@ -203,7 +209,7 @@ Immutable per-mutation snapshots (`memver_...`) — the audit and rollback surfa
203
209
  ```json
204
210
  {
205
211
  "name": "string (required, 1-256 chars)",
206
- "model": "claude-opus-4-7 (required — bare string, or {id, speed} object)",
212
+ "model": "claude-opus-4-8 (required — bare string, or {id, speed} object)",
207
213
  "description": "string (optional, up to 2048 chars)",
208
214
  "system": "string (optional, up to 100,000 chars)",
209
215
  "tools": [
@@ -270,7 +276,7 @@ Immutable per-mutation snapshots (`memver_...`) — the audit and rollback surfa
270
276
  "name": "string (required)",
271
277
  "description": "string (optional)",
272
278
  "config": {
273
- "type": "cloud",
279
+ "type": "cloud | self_hosted",
274
280
  "networking": {
275
281
  "type": "unrestricted | limited (union — see SDK types)"
276
282
  },
@@ -96,7 +96,7 @@ Key fields returned by the API:
96
96
  const agent = await client.beta.agents.create(
97
97
  {
98
98
  name: "Coding Assistant",
99
- model: "claude-opus-4-7",
99
+ model: "claude-opus-4-8",
100
100
  system: "You are a helpful coding agent.",
101
101
  tools: [{ type: "agent_toolset_20260401"}],
102
102
  },
@@ -218,3 +218,21 @@ session = client.beta.sessions.create(
218
218
  )
219
219
  ```
220
220
 
221
+ ### Updating the agent configuration mid-session
222
+
223
+ `sessions.update()` can change `agent.tools`, `agent.mcp_servers` (including permission policies), and `vault_ids` on an **existing** session. This is a **session-local override** — it does not create a new agent version and does not propagate back to the agent object. The provided arrays are **full replacements**; to append one tool, `GET` the session, modify, and `POST` back. The session must be `idle` — interrupt first if running.
224
+
225
+ ```python
226
+ client.beta.sessions.update(
227
+ session.id,
228
+ agent={
229
+ "tools": [
230
+ {"type": "agent_toolset_20260401"},
231
+ {"type": "mcp_toolset", "mcp_server_name": "linear"},
232
+ ],
233
+ "mcp_servers": [{"type": "url", "name": "linear", "url": "https://mcp.linear.app/sse"}],
234
+ },
235
+ vault_ids=["vlt_..."],
236
+ )
237
+ ```
238
+
@@ -38,6 +38,10 @@ const env = await client.beta.environments.create({
38
38
  });
39
39
  ```
40
40
 
41
+ ### Self-hosted sandboxes
42
+
43
+ To run tool execution in **your own infrastructure** instead of Anthropic's, set `config: {type: "self_hosted"}` — the agent loop stays on Anthropic's side, but `bash` / file ops / code execute in a container you control via an outbound-polling worker. The `networking` block does not apply (you control egress). Resource mounting (`file`, `github_repository`) and memory stores behave differently — see `shared/managed-agents-self-hosted-sandboxes.md` for the worker, credentials, and cloud-vs-self-hosted comparison.
44
+
41
45
  ### Environment CRUD
42
46
 
43
47
  | Operation | Method | Path | Notes |
@@ -135,7 +139,7 @@ Repositories are attached for the lifetime of the session — to change which re
135
139
  const agent = await client.beta.agents.create(
136
140
  {
137
141
  name: 'GitHub Agent',
138
- model: 'claude-opus-4-7',
142
+ model: 'claude-opus-4-8',
139
143
  mcp_servers: [
140
144
  { type: 'url', name: 'github', url: 'https://api.githubcopilot.com/mcp/' },
141
145
  ],
@@ -169,7 +173,7 @@ import os
169
173
 
170
174
  agent = client.beta.agents.create(
171
175
  name="GitHub Agent",
172
- model="claude-opus-4-7",
176
+ model="claude-opus-4-8",
173
177
  mcp_servers=[{
174
178
  "type": "url",
175
179
  "name": "github",
@@ -13,7 +13,7 @@ The SDK sets the `managed-agents-2026-04-01` beta header automatically on all `c
13
13
  ```python
14
14
  orchestrator = client.beta.agents.create(
15
15
  name="Engineering Lead",
16
- model="{{OPUS_ID}}",
16
+ model="claude-opus-4-8",
17
17
  system="You coordinate engineering work. Delegate code review to the reviewer and test writing to the test agent.",
18
18
  tools=[{"type": "agent_toolset_20260401"}],
19
19
  multiagent={
@@ -8,11 +8,11 @@ Use this when a user wants to set up a Managed Agent from scratch. Three steps:
8
8
 
9
9
  ---
10
10
 
11
- Claude Managed Agents is a hosted agent: Anthropic runs the agent loop on its orchestration layer and provisions a sandboxed container per session where the agent's tools execute. You supply the agent config and the environment config; the harness — event stream, sandbox orchestration, prompt caching, context compaction, and extended thinking — is handled for you.
11
+ Claude Managed Agents is a hosted agent: Anthropic runs the agent loop on its orchestration layer and provisions a sandboxed container per session where the agent's tools execute (or, with a `self_hosted` environment, your own worker runs the tools — see `shared/managed-agents-self-hosted-sandboxes.md`). You supply the agent config and the environment config; the harness — event stream, sandbox orchestration, prompt caching, context compaction, and extended thinking — is handled for you.
12
12
 
13
13
  **What you supply:**
14
14
  - **An agent config** — tools, skills, model, system prompt. Reusable and versioned.
15
- - **An environment config** — the sandbox your agent's tools execute in (networking, packages). Reusable across agents.
15
+ - **An environment config** — the sandbox your agent's tools execute in (`cloud`: networking, packages; or `self_hosted`: your own infra). Reusable across agents.
16
16
 
17
17
  Each run of the agent is a **session**.
18
18
 
@@ -74,7 +74,7 @@ Emit as `resources: [{type: "file", file_id, mount_path}]`. Max 999 file resourc
74
74
  - [ ] Networking: unrestricted internet from the container, or lock egress to specific hosts? (If locked, MCP server domains must be in `allowed_hosts` or tools silently fail.)
75
75
  - [ ] Name?
76
76
  - [ ] Job (one or two sentences — becomes the system prompt)?
77
- - [ ] Model? (default `claude-opus-4-7`)
77
+ - [ ] Model? (default `claude-opus-4-8`)
78
78
 
79
79
  ---
80
80
 
@@ -17,7 +17,7 @@ If you're about to write `sessions.create()` with `model`, `system`, or `tools`
17
17
 
18
18
  **When generating code, separate setup from runtime.** `agents.create()` belongs in a setup script (or a guarded `if agent_id is None:` block), not at the top of the hot path. If the user's code calls `agents.create()` on every invocation, they're accumulating orphaned agents and paying the create latency for nothing. The correct shape is: create once → persist the ID (config file, env var, secrets manager) → every run loads the ID and calls `sessions.create()`.
19
19
 
20
- **To change the agent's behavior, use `POST /v1/agents/{id}` — don't create a new one.** Each update bumps the version; running sessions keep their pinned version, new sessions get the latest (or pin explicitly via `{type: "agent", id, version}`). See `shared/managed-agents-core.md` → Agents → Versioning.
20
+ **To change the agent's behavior, use `POST /v1/agents/{id}` — don't create a new one.** Each update bumps the version; running sessions keep their pinned version, new sessions get the latest (or pin explicitly via `{type: "agent", id, version}`). See `shared/managed-agents-core.md` → Agents → Versioning. To change `tools`/`mcp_servers`/`vault_ids` on **one running session** without touching the agent object, use `sessions.update()` — see `shared/managed-agents-core.md` → Updating the agent configuration mid-session.
21
21
 
22
22
  ## Beta Headers
23
23
 
@@ -49,6 +49,7 @@ Managed Agents is in beta. The SDK sets required beta headers automatically:
49
49
  | Define an outcome / rubric-graded iterate loop | `shared/managed-agents-outcomes.md` — `user.define_outcome` event, grader, `span.outcome_evaluation_*` events |
50
50
  | Coordinate multiple agents / subagents / threads | `shared/managed-agents-multiagent.md` — `multiagent: {type: "coordinator", agents: [...]}` on the agent, session threads, cross-posted tool confirmations |
51
51
  | Set up environments | `shared/managed-agents-environments.md` + language file |
52
+ | Run tool execution in your own infra / VPC (self-hosted sandbox) | `shared/managed-agents-self-hosted-sandboxes.md` — `config:{type:"self_hosted"}`, `ANTHROPIC_ENVIRONMENT_KEY`, `EnvironmentWorker.run()` / `ant beta:worker poll` |
52
53
  | Upload files / attach repos | `shared/managed-agents-environments.md` (Resources) |
53
54
  | Give agents persistent memory across sessions | `shared/managed-agents-memory.md` — memory stores, `memory_store` session resource, preconditions, versions/redact |
54
55
  | Store MCP credentials | `shared/managed-agents-tools.md` (Vaults section) |
@@ -63,5 +64,5 @@ Managed Agents is in beta. The SDK sets required beta headers automatically:
63
64
  - **SSE stream has no replay — reconnect with consolidation** — if the stream drops while a `agent.tool_use`, `agent.mcp_tool_use`, or `agent.custom_tool_use` is pending resolution (`user.tool_confirmation` for the first two, `user.custom_tool_result` for the last one), the session deadlocks (client disconnects → session idles → reconnect happens → no client resolution happens). On every (re)connect: open stream with `GET /v1/sessions/{id}/events/stream` , fetch `GET /v1/sessions/{id}/events`, dedupe by event ID, then proceed. See `shared/managed-agents-events.md` → Reconnecting after a dropped stream.
64
65
  - **Don't trust HTTP-library timeouts as wall-clock caps** — `requests` `timeout=(c, r)` and `httpx.Timeout(n)` are *per-chunk* read timeouts; they reset every byte, so a trickling connection can block indefinitely. For a hard deadline on raw-HTTP polling, track `time.monotonic()` at the loop level and bail explicitly. Prefer the SDK's `sessions.events.stream()` / `session.events.list()` over hand-rolled HTTP. See `shared/managed-agents-events.md` → Receiving Events.
65
66
  - **Messages queue** — you can send events while the session is `running` or `idle`; they're processed in order. No need to wait for a response before sending the next message.
66
- - **Cloud environments only** — `config.type: "cloud"` is the only supported environment type.
67
+ - **Environment `config.type` is `"cloud"` or `"self_hosted"`** — `cloud` runs the container on Anthropic's infrastructure; `self_hosted` moves tool execution to your own (see `shared/managed-agents-self-hosted-sandboxes.md`).
67
68
  - **Archive is permanent on every resource** — archiving an agent, environment, session, vault, credential, or memory store makes it read-only with no unarchive. For agents, environments, and memory stores specifically, archived resources cannot be referenced by new sessions (existing sessions continue). Do not call `.archive()` on a production agent, environment, or memory store as cleanup — **always confirm with the user before archiving**.
@@ -0,0 +1,173 @@
1
+ # Managed Agents — Self-Hosted Sandboxes
2
+
3
+ With `config.type: "self_hosted"`, the **agent loop stays on Anthropic's orchestration layer** but **tool execution moves to infrastructure you control** — bash, file ops, and code run inside your container, so filesystem contents and network egress never leave your environment. Contrast with `config.type: "cloud"`, where Anthropic runs the container. Connectivity is **outbound-only**: your worker long-polls Anthropic's work queue; Anthropic never dials into your network.
4
+
5
+ ## Flow
6
+
7
+ ```
8
+ 1. Create environment: config: {type: "self_hosted"} → env_...
9
+ 2. Generate environment key (Console, on the environment page) → sk-ant-oat01-... as ANTHROPIC_ENVIRONMENT_KEY
10
+ 3. Run a worker: EnvironmentWorker.run() or ant beta:worker poll
11
+ 4. Sessions reference environment_id=env_... exactly as for cloud
12
+ ```
13
+
14
+ ## Create the environment
15
+
16
+ ```python
17
+ client = anthropic.Anthropic()
18
+
19
+ environment = client.beta.environments.create(
20
+ name="self-hosted", config={"type": "self_hosted"}
21
+ )
22
+ ```
23
+
24
+ `{"type": "self_hosted"}` is the entire config — there are no pool, capacity, or networking sub-fields; you control those on your side.
25
+
26
+ ## Run a worker — SDK (primary path)
27
+
28
+ `EnvironmentWorker` wraps the poll → dispatch → tool-execute loop. `.run()` is the always-on loop; `.run_one()` / `.runOne()` handles one work item (for webhook-driven wake).
29
+
30
+ **Python — always-on:**
31
+
32
+ ```python
33
+ import asyncio
34
+ import os
35
+ from anthropic import AsyncAnthropic
36
+ from anthropic.lib.environments import EnvironmentWorker
37
+
38
+
39
+ async def main() -> None:
40
+ environment_key = os.environ["ANTHROPIC_ENVIRONMENT_KEY"]
41
+ environment_id = os.environ["ANTHROPIC_ENVIRONMENT_ID"]
42
+ async with AsyncAnthropic(auth_token=environment_key) as client:
43
+ await EnvironmentWorker(
44
+ client,
45
+ environment_id=environment_id,
46
+ environment_key=environment_key,
47
+ workdir="/workspace",
48
+ ).run()
49
+
50
+
51
+ asyncio.run(main())
52
+ ```
53
+
54
+ **TypeScript — always-on:**
55
+
56
+ ```typescript
57
+ import Anthropic from "@anthropic-ai/sdk";
58
+ import { EnvironmentWorker } from "@anthropic-ai/sdk/helpers/beta/environments";
59
+
60
+ const environmentKey = process.env.ANTHROPIC_ENVIRONMENT_KEY!;
61
+ const environmentId = process.env.ANTHROPIC_ENVIRONMENT_ID!;
62
+ const client = new Anthropic({ authToken: environmentKey });
63
+ const ctrl = new AbortController();
64
+ process.once("SIGTERM", () => ctrl.abort());
65
+
66
+ await new EnvironmentWorker({
67
+ client,
68
+ environmentId,
69
+ environmentKey,
70
+ workdir: "/workspace",
71
+ signal: ctrl.signal
72
+ }).run();
73
+ ```
74
+
75
+ **Customizing tools.** `EnvironmentWorker` runs the built-in toolset by default. To add or replace tools, use `AgentToolContext(workdir=, client=, session_id=)` with `beta_agent_toolset(env)` / `betaAgentToolset(env)` and pass the resulting tools to the lower-level `tool_runner()`. Skills attached to the agent are downloaded into `{workdir}/skills/<name>/` before tool calls begin (`AgentToolContext` handles this when given `client` and `session_id`). Downloaded skill files are marked executable automatically by the CLI and SDK; if you implement skills download yourself, you set permissions.
76
+
77
+ > **Runtime deps:** the SDK helpers require `/bin/bash` at that exact path. The TypeScript SDK additionally requires `unzip`, `tar`, and Node.js 22+. These are resolved at fixed paths and do **not** respect `PATH` overrides.
78
+
79
+ ## Run a worker — `ant` CLI (fixed tools)
80
+
81
+ The `ant` CLI ships a worker with the fixed built-in toolset (`bash`, `read`, `write`, `edit`, `glob`, `grep`). Install per the Anthropic CLI docs (see `shared/live-sources.md` → Anthropic CLI), then:
82
+
83
+ ```sh
84
+ export ANTHROPIC_ENVIRONMENT_KEY=sk-ant-oat01-...
85
+ ant beta:worker poll --environment-id env_... --workdir /workspace
86
+ ```
87
+
88
+ - `--workdir` is the directory tools operate in (default `.`); tool calls are sandboxed to it.
89
+ - `--environment-key` overrides the env var.
90
+ - `--on-work <script>` runs your script per work item (e.g. to spin a fresh container per session — see Container orchestration below).
91
+ - `--unrestricted-paths`, `--max-idle` (default `60s`), `--log-format` — see `ant beta:worker poll --help`.
92
+ - Flags fall back to env vars (`ANTHROPIC_ENVIRONMENT_ID`, `ANTHROPIC_ENVIRONMENT_KEY`).
93
+ - Exits cleanly on SIGTERM/SIGINT after draining in-flight work.
94
+ - **Fixed toolset** — for custom tools, use the SDK worker above.
95
+
96
+ Inside an `--on-work` container, run `ant beta:worker run --workdir <dir>` as the entrypoint.
97
+
98
+ ## Webhook-driven wake (instead of always-on)
99
+
100
+ Register a webhook for `session.status_run_started` (see `shared/managed-agents-webhooks.md`), verify the delivery, then drain one work item with `.run_one()`:
101
+
102
+ ```python
103
+ import os
104
+ import anthropic
105
+ from anthropic.lib.environments import EnvironmentWorker
106
+
107
+ environment_key = os.environ["ANTHROPIC_ENVIRONMENT_KEY"]
108
+ environment_id = os.environ["ANTHROPIC_ENVIRONMENT_ID"]
109
+ client = anthropic.AsyncAnthropic(
110
+ auth_token=environment_key,
111
+ ) # reads ANTHROPIC_WEBHOOK_SIGNING_KEY from env for webhooks.unwrap()
112
+
113
+
114
+ async def handle(raw: bytes, headers: dict[str, str]) -> dict:
115
+ event = client.beta.webhooks.unwrap(raw.decode(), headers=headers)
116
+ if event.data.type != "session.status_run_started":
117
+ return {"status": "ignored"}
118
+ await EnvironmentWorker(
119
+ client,
120
+ environment_id=environment_id,
121
+ environment_key=environment_key,
122
+ workdir="/workspace",
123
+ ).run_one()
124
+ return {"status": "ok"}
125
+ ```
126
+
127
+ TypeScript: same shape with `client.beta.webhooks.unwrap(body, {headers})` and `new EnvironmentWorker({...}).runOne()`.
128
+
129
+ ## Container orchestration (mid-level)
130
+
131
+ `EnvironmentWorker.run()` polls and executes tools in the same process. To run each session in its **own** container, use the mid-level poller in a thin orchestrator — Python `client.beta.environments.work.poller(environment_id=, environment_key=, drain=, block_ms=, reclaim_older_than_ms=, auto_stop=)`; TypeScript `new WorkPoller({client, environmentId, environmentKey, autoStop})` from `@anthropic-ai/sdk/helpers/beta/environments` — and, for each yielded `work` item, start a fresh container with these env vars injected, whose entrypoint runs `ant beta:worker run` or an `EnvironmentWorker(...).run_one()`. `block_ms` is 1–999 (or `None` for non-blocking); `reclaim_older_than_ms` re-claims items leased to a dead worker; `drain` stops once the queue is empty; `auto_stop` posts a stop signal after the iterator exits (set `False` when the launched container owns the stop call). **Go's poller has no `auto_stop` opt-out** — it calls `work.Stop` when the handler returns, so block in the handler until the session completes rather than detaching.
132
+
133
+ | Env var | Value |
134
+ |---|---|
135
+ | `ANTHROPIC_SESSION_ID` | `work.data.id` |
136
+ | `ANTHROPIC_WORK_ID` | `work.id` |
137
+ | `ANTHROPIC_ENVIRONMENT_ID` | `work.environment_id` |
138
+ | `ANTHROPIC_ENVIRONMENT_KEY` | pass through |
139
+ | `ANTHROPIC_BASE_URL` | pass through |
140
+
141
+ Skip items where `work.data.type != "session"`.
142
+
143
+ ## Monitoring & control
144
+
145
+ These are **control-plane** calls — authenticate with `x-api-key` (not the environment key); `managed-agents-2026-04-01` beta header. **Call them from outside the worker host** — setting `ANTHROPIC_API_KEY` on the worker host exposes an organization-scoped credential to agent tool calls.
146
+
147
+ | SDK (`client.beta.environments.work.*`) | REST | CLI | Returns |
148
+ |---|---|---|---|
149
+ | `stats(environment_id)` | `GET /v1/environments/{id}/work/stats` | `ant beta:environments:work stats` | `{type:"work_queue_stats", depth, pending, oldest_queued_at, workers_polling}` |
150
+ | `stop(work_id, environment_id=)` | `POST /v1/environments/{id}/work/{work_id}/stop` | `ant beta:environments:work stop` | `work.state` |
151
+
152
+ ## What changes vs `cloud`
153
+
154
+ | Concern | `cloud` | `self_hosted` |
155
+ |---|---|---|
156
+ | Container lifecycle, hardening, networking | Anthropic | **You** — run non-root, read-only rootfs, drop caps; egress is whatever your VPC/firewall allows |
157
+ | `file` / `github_repository` resource mounting | Anthropic mounts into the container | **You** — pass pointers via `sessions.create(metadata={...})` and have your orchestrator fetch/clone before dispatch |
158
+ | `memory_store` resources | Supported | **Not yet supported** |
159
+ | Built-in tools | Via `agent_toolset_20260401` | Supplied by your worker (`EnvironmentWorker` default / `beta_agent_toolset(env)` / `ant` CLI fixed set) |
160
+ | Skills download | Automatic | `EnvironmentWorker` / `AgentToolContext` fetch into `{workdir}/skills/` (needs `client` + `session_id`) |
161
+ | Claude Platform on AWS | Supported | **Not available** |
162
+ | SDK worker helpers | All SDKs | **Python, TypeScript, Go only** (`EnvironmentWorker` / poller not in Java, Ruby, PHP, or C#) — use one of those three or the `ant` CLI |
163
+
164
+ ## Credentials
165
+
166
+ | Credential | Format | Scope |
167
+ |---|---|---|
168
+ | `ANTHROPIC_ENVIRONMENT_KEY` | `sk-ant-oat01-...` | One environment's work queue. Generate in Console ("Generate environment key"). Pass as `auth_token=` / `authToken` on the client **and** as `environment_key=` / `environmentKey` on `EnvironmentWorker`. Store in a secrets manager; rotate on exposure. |
169
+ | `ANTHROPIC_WEBHOOK_SIGNING_KEY` | `whsec_...` | Webhook signature verification (if using webhook-driven wake). The SDK reads this env var automatically for `client.beta.webhooks.unwrap()`. |
170
+
171
+ ## Security — what you own
172
+
173
+ Container hardening; egress restriction (there is no default); `ANTHROPIC_ENVIRONMENT_KEY` custody and rotation; one workspace + environment per trust boundary when running untrusted code; least-privilege for the tool process; log retention and redaction. **Anthropic cannot**: fast-revoke a leaked environment key, verify your image or supply chain, sandbox tool execution inside your container, or enforce retention after tool output reaches your infrastructure. See the Self-Hosted Sandboxes Security page in `shared/live-sources.md` for the full checklist.
@@ -6,8 +6,8 @@
6
6
 
7
7
  | Type | Who runs it | How it works |
8
8
  |---|---|---|
9
- | **Prebuilt Claude Agent tools** (`agent_toolset_20260401`) | Anthropic, on the session's container | File ops, bash, web search, etc. Enable all at once or configure individually with `enabled: true/false`. |
10
- | **MCP tools** (`mcp_toolset`) | Anthropic, on the session's container | Capabilities exposed by connected MCP servers. Grant access per-server via the toolset. |
9
+ | **Prebuilt Claude Agent tools** (`agent_toolset_20260401`) | Anthropic, on the session's container (for `cloud` envs; for `self_hosted`, **your** worker supplies and runs them — see `shared/managed-agents-self-hosted-sandboxes.md`) | File ops, bash, web search, etc. Enable all at once or configure individually with `enabled: true/false`. |
10
+ | **MCP tools** (`mcp_toolset`) | Anthropic's orchestration layer | Capabilities exposed by connected MCP servers. Grant access per-server via the toolset. |
11
11
  | **Custom tools** | **You** — your application handles the call and returns results | Agent emits a `agent.custom_tool_use` event, session goes `idle`, you send back a `user.custom_tool_result` event. |
12
12
 
13
13
  **Recommendation:** Enable all prebuilt tools via `agent_toolset_20260401`, then disable individually as needed.
@@ -182,6 +182,12 @@ This keeps secrets out of reusable agent definitions. Each vault credential is t
182
182
 
183
183
  > 💡 **Per-tool enablement (empirical):** `mcp_toolset` has been observed accepting `default_config: {enabled: false}` + `configs: [{name, enabled: true}]` for an allowlist pattern. The API ref shows only the minimal `{type, mcp_server_name}` form.
184
184
 
185
+ > 💡 **Changing tools/MCP servers on a running session:** `sessions.update()` can replace `agent.tools`, `agent.mcp_servers`, and `vault_ids` while the session is `idle` — a session-local override that doesn't touch the agent object. See `shared/managed-agents-core.md` → Updating the agent configuration mid-session.
186
+
187
+ **Large MCP tool outputs.** If an MCP tool returns more than **100K tokens**, the output is automatically offloaded to a file in the sandbox — the agent receives a truncated preview plus the file path and can `read` the full content. No configuration required.
188
+
189
+ **Invalid vault credentials don't block session creation.** If a vault credential is invalid for a declared MCP server, the session still creates successfully; a `session.error` event describes the MCP auth failure, and auth retries on the next `session.status_idle` → `session.status_running` transition.
190
+
185
191
  > ⚠️ **MCP auth tokens ≠ REST API tokens.** Hosted MCP servers (`mcp.notion.com`, `mcp.linear.app`, etc.) typically require **OAuth bearer tokens**, not the service's native API keys. A Notion `ntn_` integration token authenticates against Notion's REST API but will **not** work as a vault credential for the Notion MCP server. These are different auth systems.
186
192
 
187
193
  ### Vaults — the MCP credential store
@@ -268,7 +274,7 @@ Skills are attached to the **agent** definition via `agents.create()`:
268
274
  const agent = await client.beta.agents.create(
269
275
  {
270
276
  name: "Financial Agent",
271
- model: "claude-opus-4-7",
277
+ model: "claude-opus-4-8",
272
278
  system: "You are a financial analysis agent.",
273
279
  skills: [
274
280
  { type: "anthropic", skill_id: "xlsx" },
@@ -283,7 +289,7 @@ Python:
283
289
  ```python
284
290
  agent = client.beta.agents.create(
285
291
  name="Financial Agent",
286
- model="claude-opus-4-7",
292
+ model="claude-opus-4-8",
287
293
  system="You are a financial analysis agent.",
288
294
  skills=[
289
295
  {"type": "anthropic", "skill_id": "xlsx"},