Skip to content

Action Fusion reports success for failed then_run commands on Pi 0.99.2/1.0.0 #94

Closed

Description

@huahuadeliaoliao

Environment

  • SoL-Pi: e1a586af0ad8956f42ae5b26bba20e48fbf30e00
  • Reproduced on Pi 0.99.2 and 1.0.0
  • Passes on Pi 0.85.1, the version pinned by this repository
  • macOS arm64, Node.js 24.14.1, npm 11.11.0

Reproduction

In a temporary checkout at the commit above, install the locked dependencies, then install Pi 1.0.0 without changing the manifests or lockfile:

npm ci --ignore-scripts
npm install --no-save --package-lock=false --ignore-scripts --no-audit --no-fund \
  @earendil-works/pi-coding-agent@1.0.0 \
  @earendil-works/pi-ai@1.0.0 \
  @earendil-works/pi-agent-core@1.0.0 \
  @earendil-works/pi-tui@1.0.0

PI_OFFLINE=1 ./node_modules/.bin/vitest run tests/action-fusion.test.ts \
  -t 'preserves a successful mutation when then_run fails'

The test fails because the fused tool call resolves instead of rejecting. Its result contains:

[then_run:succeeded]
validation failed

Command exited with code 7

The same test fails on Pi 0.99.2 and passes on Pi 0.85.1. I also reproduced this for both edit and write using Pi's extension loader and AgentSession, real local commands, and a deterministic faux provider. No remote model is needed.

Expected behavior

When the follow-up command fails, the fused tool call should report an error while keeping the completed file changes and diagnostic output. Successful commands and calls without then_run should remain unchanged.

Cause

executeMutationThenRun() catches errors thrown by bash, but does not check the isError flag when bash returns a result. Pi 0.85.1 throws for a nonzero command exit; Pi 0.99.2 and 1.0.0 return isError: true. SoL-Pi still appends the success marker and reports the fused tool call as successful.

The command runs and fails; SoL-Pi reports the wrong status. This is separate from #60's savings rendering, #73/#77/#82's shell-path handling, and #67/#80's argument validation.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions