Can Your Sandbox Report Survive Session Expiry?
Pilot OpenAI Code Interpreter or Amazon Bedrock AgentCore with the same synthetic report. Require an exact content check and a verified durable copy before delivery, then exercise the expiry path.
Check each report key before delivery
OpenAI Code Interpreter can generate files through sandboxed Python. Give it a synthetic transaction fixture with north entries of 120 and −30 cents and a south entry of 40 cents. Request a two-column report grouped by region, then validate the returned bytes in your application. Require one row per expected region, integer totals, and an exact match per region. A report with north at 80 cents and south at 50 cents still sums to 130 cents, so a grand-total check alone would accept a wrong allocation. Repeat with a duplicated region and with a missing region whose expected total is zero. Record the first rejection reason and the job identifier in the delivery log. Use a maximum size and a constrained parser for the report format you actually support.
Code Interpreter | OpenAI APITime the handoff through durable readback
AgentCore documents a default session timeout of 900 seconds and says termination cleans up session data. Measure elapsed time from session start through report retrieval, content validation, and a successful readback from your application’s durable store. Use an application cutoff shorter than the configured timeout to leave time for cleanup or replay. For an illustrative 900-second session, measured work of 880 seconds leaves a 20-second margin. A 30-second export delay would overrun it by 10 seconds. Simulate that delay in a disposable fixture job and record whether the application withheld delivery. Replay using the same job identifier and confirm that the consumer sees one accepted result. For cost comparisons, divide interpreter, model, transfer, and storage charges from the entire test batch by the count of accepted durable reports, including spend on attempts that expired.
Session management - Amazon Bedrock AgentCoreChoose who submits the code
OpenAI Code Interpreter lets a model write and run Python in the execution environment. Test that integration when the model should revise its own program during a task. Give it the expected input schema and output shape, then have your application check whether it can retrieve and validate the resulting file. Record a completed model response with a missing file as a failed job.
For a workflow that requires application approval of the program before execution, use an integration with an explicit code submission step. Run the same fixture through both candidates. In the first, observe whether the model produces a usable file after encountering a data error. In the second, verify that execution happens only after the application submits the approved program.
Code Interpreter | OpenAI APITest the report against known rows
E2B’s Code Interpreter SDK exposes a Python run_code() method, and its sandbox also supports file operations. Use it to test a handoff where your application supplies both the program and the approved input. Use a fresh sandbox for the test, write the result to a job-specific output path, and retrieve that path through the application.
For an illustrative job, supply January entries for USD 40 and a USD 10 refund, plus one February entry for USD 20. Require a CSV containing January USD 30 and February USD 20, with one row per month. Parse the retrieved file independently and compare it with those expected rows. If January comes back as USD 50, reject the result and inspect how the program interprets refunds before retrying.
Running your first Sandbox - E2B DocsTest the gap between export and delivery
Amazon Bedrock AgentCore Code Interpreter keeps generated files available for the lifetime of the session and cleans up the session data on termination. Make export part of job completion. Retrieve the candidate file while the session is available, validate it, and write the accepted bytes to application-controlled storage before marking the job ready. Serve the download from that durable copy.
Test the order by ending a test session immediately after the program writes its output but before your application copies it. The job should show an export failure and offer a fresh attempt from the original input. In a second run, end the session after the application verifies the stored copy. A user opening that download should receive the validated file even after the worker is gone.
Session management - Amazon Bedrock AgentCoreMeasure cost per accepted file
AgentCore supports inline uploads up to 100 MB and documents a separate path through Amazon S3. If your input sizes approach the inline limit, run separate pilots for the two paths. Record transfer, execution, export, and validation failures alongside the billable usage. A larger-file path can add setup and storage work even when the program stays the same.
For illustrative arithmetic, suppose 100 attempts consume 300 billable minutes at an assumed $0.02 per minute and yield 90 accepted files. Execution alone is $6, or about $0.067 per accepted file. Those are hypothetical inputs. For an actual estimate, verify the provider’s billing unit, rounding, and plan or region rates, then add any separately billed model calls, storage, and transfer.
Execute code and analyze data using Amazon Bedrock AgentCore Code Interpreter - Amazon Bedrock AgentCore