Skip to content

[Bug]: Failed manual Pi compact reports a completed turn #37525

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Start a Pi provider thread and submit /compact.
  2. Let manual compaction fail, for example because there is no configured model or the model request fails.
  3. Observe the adapter terminal event after Pi emits compaction_start, compaction_end with result: null, aborted: false and an error, then response for compact with success: false.

The deterministic adapter test extends the existing compact failure test with that native event sequence. Run pnpm exec vp test run packages/provider-pi/src/server/adapter.test.ts -t compact with the accompanying fix PR's test on main.

Expected behavior

The manual compact turn ends as failed with Pi's error, consistently with the failed compaction item.

Actual behavior

The item reports failure, but the turn reports completed without a failure. Clients, agents, and scheduled tasks receive a successful terminal status for failed manual compaction.

Impact

Minor bug or occasional failure. Every failed manual compact with the started event sequence is affected.

Version or commit

main @ c1b23e9

Environment

Pi 1.5.2 RPC; reproduced through the public provider adapter event stream.

Logs or stack traces

Pi: compaction_start (manual)
Pi: compaction_end (result=null, aborted=false, errorMessage=...)
Pi: response (command=compact, success=false, error=...)
T3: turn.terminal (status=completed)
Expected: turn.terminal (status=failed, failure.message=<Pi error>)

Screenshots, recordings, or supporting files

Found by the Pi and ACP Improvements hunt. Independently confirmed by Claude Opus 5.5 on main and against a native Pi 1.5.2 no-model RPC transcript. Fresh-main regression reproduced before the fix.

Workaround

Inspect the compaction worklog item instead of trusting the terminal turn status.

Activity

  1. added
    vouch:trusted
    on Nov 16, 2026
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

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions