Skip to content

Bug: acpx exit 5 (PERMISSION_DENIED) fails the whole run even though the turn ended with valid JSON #112

Description

@jic-cc

Repro (backpass 0.1.18 · acpx 0.13.2 · claude-agent-acp ^0.60 · analysis pinned to claude/claude-sonnet-5):

  1. The distilled trace ends with the raw transcript path (as designed).
  2. The analysis agent runs grep -o ... <raw transcript>.jsonl through Bash instead of an ACP read.
  3. --approve-reads only approves ACP read/search kinds, so the request is denied. The agent continues, finishes the turn with stopReason: end_turn and a complete JSON answer (8,905 output tokens in our stream).
  4. acpx sets exitCode = PERMISSION_DENIED (5) because a request was denied; backpass treats non-zero as session prompt failed and aborts the whole pass:
error pinned analysis agent claude (claude-sonnet-5) failed unexpectedly (acpx claude session prompt failed (exit 5): [acpx] tokens: input=4 output=8905 cache_read=108206 cache_write=62154 total=179269)

Expected: a denied request with a completed turn is a warning (the answer is still evidence; the model just did not get to open the raw file), not a fatal error. Suggested: treat exit 5 as success when stdout parses as the expected JSON, and surface deniedRequests: N in the evidence file. A re-run passed only because the model did not grep the second time.

Minor, same area: the cross-surface report flagged five CLAUDE.md restates <skill> body · 1 tok · similarity 1.00 entries. A 1-token overlap at similarity 1.00 is a separator line, not a restatement; a minimum unit size would remove the noise.

Activity

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

    ready-for-prIssue is in scope and ready for a PR

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions