Skip to content

fix(agent-adapters): robustness fixes to pi + claude ACP adapters#136

Merged
NathanFlurry merged 1 commit into
mainfrom
stack/fix-agent-adapters-robustness-fixes-to-pi-claude-acp-adapters-spxuxyuy
Jun 26, 2026
Merged

fix(agent-adapters): robustness fixes to pi + claude ACP adapters#136
NathanFlurry merged 1 commit into
mainfrom
stack/fix-agent-adapters-robustness-fixes-to-pi-claude-acp-adapters-spxuxyuy

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Five verified fixes to the Pi and Claude ACP agent adapters (each with a unit
test), found via a multi-agent review:

  • claude: tool-permission handler no longer auto-resolves on a 2s timer (was
    fail-open: ran the guest's tool without host consent); host is authoritative.
  • claude: partial tool input attributed by streaming content-block index, not
    Map insertion order.
  • claude: a dead query reader marks the session closed so the next prompt()
    fails fast instead of hanging to the ACP timeout.
  • pi: live session subscription is torn down on replace + conn.closed;
    editSnapshots cleared per turn + on cancel.
  • pi + claude: failed session/update writes are logged to stderr instead of
    silently swallowed (emit chain kept alive).

Tests: registry/agent/{claude,pi}/tests/adapter.test.mjs. No auto-resolve on
timeout remains in any adapter.

Five verified fixes to the Pi and Claude ACP agent adapters (each with a unit
test), found via a multi-agent review:
- claude: tool-permission handler no longer auto-resolves on a 2s timer (was
  fail-open: ran the guest's tool without host consent); host is authoritative.
- claude: partial tool input attributed by streaming content-block index, not
  Map insertion order.
- claude: a dead query reader marks the session closed so the next prompt()
  fails fast instead of hanging to the ACP timeout.
- pi: live session subscription is torn down on replace + conn.closed;
  editSnapshots cleared per turn + on cancel.
- pi + claude: failed session/update writes are logged to stderr instead of
  silently swallowed (emit chain kept alive).

Tests: registry/agent/{claude,pi}/tests/adapter.test.mjs. No auto-resolve on
timeout remains in any adapter.
@NathanFlurry

Copy link
Copy Markdown
Member Author

Stack for rivet-dev/secure-exec

Get stack: forklift get 136
Push local edits: forklift submit
Merge when ready: forklift merge 136

@railway-app railway-app Bot temporarily deployed to secure-exec / secure-exec-pr-136 June 26, 2026 23:46 Destroyed
@railway-app railway-app Bot temporarily deployed to rivet-frontend / secure-exec-pr-136 June 26, 2026 23:47 Destroyed
@NathanFlurry NathanFlurry merged commit ee95479 into main Jun 26, 2026
2 of 4 checks passed
@NathanFlurry NathanFlurry deleted the stack/fix-agent-adapters-robustness-fixes-to-pi-claude-acp-adapters-spxuxyuy branch June 26, 2026 23:47
@railway-app railway-app Bot temporarily deployed to secure-exec / preview June 26, 2026 23:47 Inactive
@railway-app railway-app Bot temporarily deployed to rivet-frontend / preview June 26, 2026 23:47 Inactive
@railway-app railway-app Bot temporarily deployed to secure-exec / production June 26, 2026 23:47 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant