Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Nov 25, 2025

Summary

Updates Code Interpreter documentation to reflect the bug fix for context isolation in cloudflare/sandbox-sdk#249.

Bug fixed: Code contexts previously leaked state after 10 executions due to executor process reuse. Each context now gets dedicated executor resources from creation to deletion, ensuring complete isolation.

Changes

  • Add context isolation note explaining dedicated resource allocation
  • Emphasize isolation guarantees in createCodeContext() documentation
  • Add cleanup best practice for deleteCodeContext()
  • Remove implied pool size limitations (organic scaling now supported)

Related

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/sandbox/ @whoiskatrin, @ghostwriternr, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

@agents-git-bot
Copy link
Contributor Author

Documentation Updates

Updated Code Interpreter API documentation to reflect the isolation improvements from cloudflare/sandbox-sdk#249:

Changes Made

  1. Added isolation guarantee in createCodeContext() documentation:

    • Each context now gets a dedicated executor process (1:1 binding)
    • Complete state isolation between contexts is guaranteed
    • Variables, imports, and functions never leak between contexts
  2. Added concurrency behavior in deleteCodeContext() section:

    • Documented that contexts prevent concurrent execution
    • Added example showing how to run code concurrently using multiple contexts
    • Clear guidance on when users need separate contexts

Files Modified

  • src/content/docs/sandbox/api/interpreter.mdx

These changes help users understand the improved reliability and isolation guarantees of the code interpreter feature.

🤖 Generated with Claude Code

Documents the fix for code context isolation bug where contexts leaked
state after 10 executions. Each context now has dedicated executor
resources throughout its lifetime, ensuring complete isolation.

Changes:
- Add context isolation note explaining dedicated resources
- Emphasize isolation guarantees in createCodeContext()
- Add cleanup best practice for deleteCodeContext()
- Remove implied pool size limitations

Related to cloudflare/sandbox-sdk#249

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@agents-git-bot agents-git-bot bot changed the title Sync docs: Fix code context state isolation Docs: Fix code context state isolation Nov 26, 2025
@ghostwriternr ghostwriternr deleted the sync-docs-pr-249 branch November 26, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants