Added supervisord to survive process restart#219
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c36ff2959f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
|
|
||
| # Jupyter exited — kill code-interpreter so supervisord restarts both | ||
| echo "Jupyter exited, killing code-interpreter..." | ||
| kill "$(cat /var/run/code-interpreter.pid)" 2>/dev/null |
There was a problem hiding this comment.
Unguarded PID file read may produce spurious errors
Low Severity
The kill "$(cat /var/run/code-interpreter.pid)" 2>/dev/null command doesn't check if the PID file exists before reading it. The 2>/dev/null only suppresses kill's stderr, not cat's. If Jupyter exits before code-interpreter has written its PID file (e.g., very early crash on first startup), cat emits an unhandled error to stderr (visible in supervisord logs), and kill receives an empty-string argument. Adding a file-existence guard (e.g., wrapping in [ -f ... ] &&) would make this robust.
|
As we already have systemd inside of the sandbox, don't we want to use that for this too? |
|
@ValentaTomas but then it's impossible to test code interpreter locally |


Note
Medium Risk
Changes the container/service startup and supervision model, which can affect sandbox availability and restart behavior if misconfigured. Added end-to-end tests mitigate risk but failures could still impact runtime stability.
Overview
Replaces the previous
start-up.shflow withsupervisord, introducingsupervisord.confplus dedicatedstart-jupyter.sh/start-code-interpreter.shwrappers (including a PID file and a “wait for Jupyter ready” gate) so both services are automatically restarted together.Updates the template build to install
supervisorand ship the new scripts/config, and adds JS + Python (sync/async) integration tests that forciblykill -9Jupyter or the code-interpreter process and assert/healthand code execution recover.Written by Cursor Bugbot for commit 35f17c9. This will update automatically on new commits. Configure here.