Anthropic Code Execution
Anthropic Code Execution gives Claude the ability to execute JavaScript code for calculations, data analysis, and file processing.
Only in assistants, lessons and workflows
Code execution is always off in standard chats, even if the environment or your personal settings say otherwise. Switch the tool on in the tool settings of an assistant, lesson or workflow that needs calculations or file editing. Code execution can take longer and add costs.
Capabilities
- Calculations: Complex mathematical operations
- Data analysis: Process JSON and CSV data
- Text processing: Analyze and transform texts
- Validation: Check and validate data
Example Usage
"Calculate the totals and averages from this JSON data"
"Analyze this list of postal codes and group them by municipality"
"Validate whether this dataset is complete"
Government Applications
| Application | Example |
|---|---|
| Data validation | Check delivered data |
| Calculations | Financial calculations |
| Reporting | Merge and analyze data |
| Quality control | Check data consistency |
Difference from OpenAI Code Interpreter
| Aspect | Anthropic Code | OpenAI Code Interpreter |
|---|---|---|
| Language | JavaScript | Python |
| Visualizations | Limited | Extensive |
| File types | JSON, CSV, text | Wide range |
| Integration | In Claude | In GPT |
Availability
Available with:
- ✅ Claude Sonnet 4
- ✅ Suitable Claude models
- ✅ Claude Opus 4.5
Enable
- Go to Admin → Settings → Tools
- Find Anthropic Code Execution
- Enable the tool
tip
For extensive data analysis with visualizations, OpenAI Code Interpreter is often more suitable. Anthropic Code Execution is ideal for quick calculations and text processing.