Back to catalog / Agent workflows
Migrate legacy code in an isolated sandbox
Apply explicit migrations to small repositories: test baselines, edit and verify in isolation, then return reviewable patches and an audit summary.
Goal
Apply explicit migrations to small repositories: test baselines, edit and verify in isolation, then return reviewable patches and an audit summary.
Steps
- Prepare a repository and
MIGRATION.mdfor each task; run baseline tests first. [src-openai-migrate-legacy-code-in-isolated-sandbox] - Stage only that repository and brief into a fresh sandbox for agent edits and checks. [src-openai-migrate-legacy-code-in-isolated-sandbox]
- Collect typed results, patches, and audit logs on the host, validate them, then delete the sandbox. [src-openai-migrate-legacy-code-in-isolated-sandbox]
How to verify
Confirm baseline ran before edits, each task has a result/patch/audit log, and post-migration checks pass.
Troubleshooting
If a patch or log is missing, inspect host artifact collection and sandbox teardown; do not use final prose as success evidence.
Permissions
Prerequisites
- Python 3.10+, Docker or sandbox provider, OpenAI API key, isolated repository fixtures, and migration instructions.
Permissions
- Model keys stay on the host; the sandbox runs commands and edits staged files, while the host writes patch bundles; nothing is auto-applied to a real repo.
Limitations
The sample uses small fixtures and does not prove a large migration safe; review every patch and build result.
Pinned upstream source
- Repository
- openai/openai-cookbook
- File path
- examples/agents_sdk/sandboxed-code-migration/sandboxed_code_migration_agent.ipynb
- Pinned commit
5bd6cb40b6b84b69b2032d810610aa85064102df- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Main topic
Take a coding Agent change from context to verification