Skip to content

[BUG] Zoo Code does not tell model when command Abort button was pressed #833

Description

@nh2

When the user clicks the Abort button to abort a running command, the model only sees a SIGKILL exit code and thus suspects e.g. the Linux OOM-killer, which leads it to wrong decisions.

Image

Expected behavior

Zoo Code should include in the message that communicates the command exit code to the model whether the user clicked Abort.

Screenshots

Image

What version of zoo are you running

3.66

Activity

  1. added
    bug
    on Jul 5, 2026
  2. added theissue type on Jul 5, 2026
  3. umi008 commented on Jul 11, 2026

    @umi008

    Claiming

  4. gh311 commented on Dec 4, 2026

    @gh311
    Contributor

    Fix up in PR #2853 (branch sdd/issue-833).

    Root cause: the Abort button (and the user command timeout) killed the process, but the user-abort fact never reached shell_execution_complete — ExecaTerminalProcess kept it in a private aborted field that no exit detail carried, and the VSCE path had no flag at all. formatExitStatus therefore printed only Process terminated by signal SIGKILL, and the model suspected the OOM killer or a crash — exactly this issue's failure: the command tool result did not surface a user-abort flag, so a user-initiated SIGKILL reads as an OOM kill or crash.

    Fix (tool-result framing): ExitCodeDetails.aborted is stamped from the process userAborted flag on every completion path (execa's three emissions plus the BaseTerminal re-emit that covers the VSCE shell-integration path), and formatExitStatus prefixes The user aborted this command before completion. while keeping every existing exit statement unchanged. External kills (no flag) frame exactly as before — a real OOM kill still reads as a signal.

    Evidence:

    • TLA+ CommandAbortSignal.tla models the framing (source shell_execution_complete, sink the tool result). Base cfg passes (11 states); sabotage cfgs NoMarker (pre-fix framing), SignalSuppresses, AlwaysMark all fail the named invariant — NoMarker's counterexample is this issue's aborted+SIGKILL shape. TLC run locally (tla2tools 1.7.4 / Temurin 21).
    • Tests red-verified: with the fix stashed, 23 tests fail / 68 pass — exactly the abort-surfacing assertions (flag undefined, abort marker absent); all pass with the fix (91/91 on the touched specs).
    • Full gates on the branch: test:core 226 files / 5335 tests, test:api 128 files / 6417 tests, tsc --noEmit, eslint --max-warnings=0, prettier --check — all green.

    Closes via #2853.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions