Access Code Interpreter's container logs #431
Replies: 1 comment
|
Two parts to this: 1. Seeing what the Code Interpreter ran. In Foundry, tool executions show up in agent tracing — the Trace/observability view (or your OpenTelemetry exporter if configured) records each Code Interpreter invocation, including the code that ran and what the tool returned. If you're not seeing files, the first thing to check is what the tool call's output actually contained, not what you'd expect on disk. 2. Why files "disappear". The Code Interpreter runs in a managed, transient sandbox — it's not a persistent container you can shell into. Files written during a run live only for that session; unless the tool returns them as output artifacts, they're gone when the run ends. So "the same code creates files locally but the sandbox shows none" is expected behavior unless the agent explicitly captured/returned them. Practical debugging:
On container runtime logs (stdout/stderr of the sandbox): the supported way to see execution is the trace view; there isn't a general "SSH into the interpreter container" path in Foundry. If you've verified the output field is empty and the code genuinely should have produced artifacts, that's worth filing with the trace as evidence — could be a bug. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey everyone!
Is it possible to see logs from the container used as the sandbox for the Code Interpreter tool (using a gpt model from Foundry)?
Looking at the code that the agent executed using the Code Interpreter tool, I cannot understand why in the end there are no generated files when I am listing the container (when in reality running that code locally actually creates those files) and I would like to debug this.
Any other suggestions are welcome as well.
Thanks!
All reactions