mxc icon indicating copy to clipboard operation
mxc copied to clipboard

[IsolationSession] `wxc-exec` does not report a failed teardown that the SDKs report

Open adpa-ms opened this issue 2 weeks ago • 1 comments

Description of the task

When an IsolationSession create-and-run execution ends, MXC stops the session and removes its agent user. The SDKs and wxc-exec report a failure of either step differently:

  • The SDKs return it as a warning, or add it to the error when the launch failed.
  • wxc-exec writes it only to its log, which --debug prints and --log-file saves. Its exit code comes from the workload alone, it emits no warning for it, and a launch error leaves it out.

The agent user is an OS account, so a failed removal can leave the account on the host without a wxc-exec caller knowing.

Expected outcome: a wxc-exec caller learns when stopping the session or removing the agent user fails.

adpa-ms avatar Nov 17 '26 02:11 adpa-ms

[AgentAssisted] A possible fix: have one_shot.rs report teardown failures the way sandbox.rs in the same directory does: as warnings after the run, and added to the error when the launch failed (with_cleanup_failures). wxc-exec already prints the response's warnings as structured lines on stderr, and warnings never change the exit code, so callers get the same exit codes as today.

adpa-ms avatar Nov 17 '26 02:11 adpa-ms