Summary
run_code() handles SystemExit, KeyboardInterrupt, and Exception, but not remaining BaseException subclasses. For example, raise GeneratorExit() terminates the daemon and leaves the client with a pending command.
Reproduction
test_wait_issues.sh T9 reproduces this behavior and reports the server died while the command was pending.
Expected
Unexpected user-code exceptions should become a normal command error; the persistent session should remain usable.
Suggested direction
Add a final except BaseException after the specialized handlers and serialize the traceback into the usual error result.
Priority context
This is a low-frequency robustness issue, but the fix should be small.
Summary
run_code()handlesSystemExit,KeyboardInterrupt, andException, but not remainingBaseExceptionsubclasses. For example,raise GeneratorExit()terminates the daemon and leaves the client with a pending command.Reproduction
test_wait_issues.shT9 reproduces this behavior and reports the server died while the command was pending.Expected
Unexpected user-code exceptions should become a normal command error; the persistent session should remain usable.
Suggested direction
Add a final
except BaseExceptionafter the specialized handlers and serialize the traceback into the usual error result.Priority context
This is a low-frequency robustness issue, but the fix should be small.