Skip to content

feat(agentic): fresh-interpreter + preinstalled-packages guidance for code agents#17

Merged
ethancjackson merged 1 commit into
mainfrom
code-exec-instruction-hardening
Jul 16, 2026
Merged

feat(agentic): fresh-interpreter + preinstalled-packages guidance for code agents#17
ethancjackson merged 1 commit into
mainfrom
code-exec-instruction-hardening

Conversation

@ethancjackson

Copy link
Copy Markdown
Collaborator

Instruction-level half of the sandbox findings (persistence itself is Phase-2): the code-exec workstyle supplement now states every run_code call is a brand-new interpreter (scripts must be self-contained) and renders the verified preinstalled-package list (enriched to include darts/lightgbm/statsforecast/scipy — all confirmed present in the E2B template; 'arch' correctly absent). Oil/bootcamp paths untouched. 684 passed; pre-commit clean.

🤖 Generated with Claude Code

…ckage guidance

The stateless code-analyst path renders `render_code_exec_supplement`, which
never told the model that each `run_code` call is a fresh E2B interpreter or
which packages are available. Traces showed the model losing variables between
calls (NameError on `df`) and importing unavailable packages (`arch`).

Extend the shared workstyle supplement with two principled additions:
- Fresh interpreter per execution: no state survives between `run_code` calls,
  so every script must be fully self-contained (reinforces batching guidance).
- Available packages: render `domain.code_exec_preinstalled` with an explicit
  "other packages are NOT installed" fence.

Enrich the preinstalled list to reflect the real E2B template
(`aieng-forecasting[agentic,numerical,llm]` on e2bdev/code-interpreter):
add scipy (base image), statsforecast/darts/lightgbm (numerical extra) so the
list steers the model toward genuinely-available tools. Applied to the default
field value and SP500/TSX domains; oil left untouched (it does not call the
supplement).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ethancjackson ethancjackson merged commit 009b917 into main Jul 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant