Skip to content

chore(agents): bump built-in Claude and Pi adapter ranges - #513

Open
lucasyarza wants to merge 4 commits into
openclaw:mainfrom
lucasyarza:chore/bump-claude-and-pi-adapter-ranges
Open

chore(agents): bump built-in Claude and Pi adapter ranges#513
lucasyarza wants to merge 4 commits into
openclaw:mainfrom
lucasyarza:chore/bump-claude-and-pi-adapter-ranges

Conversation

@lucasyarza

@lucasyarza lucasyarza commented Aug 21, 2026

Copy link
Copy Markdown

AI-assisted PR (Claude Code, claude-opus-5). Fully tested: pnpm run check passes locally, plus real launch runs for both adapters (below). I understand what the change does.

What Problem This Solves

Fresh ACPX built-in launches of the Claude and Pi agents resolve to adapter releases that are no longer current. The repository-owned range for @agentclientprotocol/claude-agent-acp sits ten minor lines behind the published release. The Pi range pins exactly, because a caret on a 0.0.x version cannot float, so it can never reach the published patch.

Users on the built-in claude and pi agents therefore stay on older adapter behavior unless they override the built-in command themselves.

Why This Change Was Made

Advance the two stale source-owned ranges in ACP_ADAPTER_PACKAGE_RANGES to the current npm releases. The Codex and Mux ranges already float to their latest published releases, so they are deliberately left untouched.

Advancing a range retires a launch command, so this PR also keeps the upgrade path intact:

  • The two superseded Claude forms are registered in the Claude spec's legacyFallbackCommands, and the superseded Pi form in LEGACY_AGENT_COMMANDS. Persisted session records without usable agent_argv resolve through those exact-command lookups, so without the entries an older record would keep reconstructing the retired launcher instead of the current built-in argv.
  • Argv backfill alone was not enough for Claude. resolveBuiltInAgentLaunch reads the unchanged persisted agent_command, and findBuiltInAgentPackage matches only fallbackCommand and legacyFallbackCommands. Putting the retired forms there is what keeps those saved sessions on the installed-package-first and package-exec paths instead of a raw npx launcher.
  • The historical built-in command table in test/session-persistence.test.ts covers all three forms. A further test asserts the documented precedence, that a usable stored agent_argv beats the historical-command map.
  • test/agent-registry.test.ts covers the launch path: package-exec resolution must recognize both retired Claude commands and bridge them at the current package range.

Harness documentation is synchronized per the repository policy: the Pi built-in is now marked as ACPX-range-owned in skills/acpx/SKILL.md, the persisted-command mapping is documented there and in agents/Claude.md, the missing agents/Pi.md is added, and it is linked first in agents/README.md to respect the mandatory example ordering. No documentation surface publishes a version specifier or semver range, and the changelog entry is generic for the same reason.

Both bumps are non-breaking. Every intervening release on the Claude line and the Pi line publishes features and fixes only, with no BREAKING CHANGE section. Notable additions picked up on the Claude line include the provider-neutral ACP goal extension, typed session failures, the model-fallback warning advisory, Skill tool call metadata, and provider switching for loaded sessions. On the Pi line, session/delete support and Pi session-settlement handling.

Boundaries: built-in names, command routing, installed-package-first resolution, package-exec fallback, queueing, persistence, cancellation, and reconnect behavior are unchanged. No adapters are added as ACPX dependencies, and the package manifest and lockfile are untouched.

User Impact

Users running acpx claude and acpx pi without an override now get the current adapter releases on a fresh launch. A session already persisted under a superseded launch command resolves to the current built-in argv instead of relaunching the retired adapter line, as long as its record carries no usable stored agent_argv. A record with usable stored argv intentionally keeps that launcher, and the docs now say so.

Evidence

Real Claude launch, end to end

acpx claude exec against this branch's build, in a scratch cwd, with --deny-all. Redacted transcript, adapter version and turn result verbatim:

$ node dist/cli.js --deny-all --timeout 180 --format json claude exec 'Reply with exactly: ACPX-PROOF-OK'

{"jsonrpc":"2.0","id":0,"result":{"protocolVersion":1,
  "agentInfo":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"0.70.0"},
  ...}}
{"jsonrpc":"2.0","method":"session/update","params":{"sessionId":"<redacted>","update":
  {"sessionUpdate":"agent_message_chunk","content":{"type":"text","text":"ACP"},...}}}
{"jsonrpc":"2.0","method":"session/update","params":{"sessionId":"<redacted>","update":
  {"sessionUpdate":"agent_message_chunk","content":{"type":"text","text":"X-PROOF-OK"},...}}}
{"jsonrpc":"2.0","id":2,"result":{"stopReason":"end_turn","usage":{"inputTokens":2,"outputTokens":14,
  "cachedReadTokens":0,"cachedWriteTokens":27550,"totalTokens":27566}}}

The launched adapter reports the newly selected release, the turn streams real model output, and it settles on end_turn.

Real legacy-session upgrade path, end to end

The path the migration exists for. A real persisted record was rewritten to its pre-upgrade shape, agent_command set to the retired npx -y @agentclientprotocol/claude-agent-acp@^0.60.0 and agent_argv removed, then reused:

$ node dist/cli.js --deny-all --timeout 240 --format json claude -s <session> 'Reply with exactly: LEGACY-RESUME-OK'

{"jsonrpc":"2.0","id":0,"result":{"protocolVersion":1,
  "agentInfo":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"0.70.0"},
  ...}}
... {"sessionUpdate":"agent_message_chunk","content":{"type":"text","text":"L"},...}
... {"sessionUpdate":"agent_message_chunk","content":{"type":"text","text":"EGACY-RESUME-OK"},...}
{"jsonrpc":"2.0","id":3,"result":{"stopReason":"end_turn",...}}
exit: 0

The retired command resolved to the current built-in argv, the newly selected adapter launched, and the turn completed. The record afterwards:

agent_command: npx -y @agentclientprotocol/claude-agent-acp@^0.60.0
agent_argv:    ["npx","-y","@agentclientprotocol/claude-agent-acp@^0.70.0"]

The resolved argv is persisted, so the upgrade is durable rather than re-derived on every reuse.

After registering the retired forms for built-in recognition, the adapter the legacy record spawns is the package-exec bridge rather than a raw npx launcher:

$ ps -o pid,ppid,command -ax | grep claude-agent-acp
74856 74847 npm exec claude-agent-acp
74892 74856 node ~/.npm/_npx/<hash>/node_modules/.bin/claude-agent-acp

# parent 74847 is the acpx queue owner:
node .../dist/cli.js __queue-owner

Before the fix the same legacy record spawned npm exec @agentclientprotocol/claude-agent-acp@^0.70.0, the raw npx form taken straight from the backfilled argv.

Real Pi launch, handshake only

Same build, Pi CLI 0.84.2 installed into a scratch prefix and put on PATH:

$ node dist/cli.js --deny-all --timeout 240 --format json pi exec 'Reply with exactly: ACPX-PROOF-OK'

{"jsonrpc":"2.0","id":0,"result":{"protocolVersion":1,
  "agentInfo":{"name":"pi-acp","title":"pi ACP adapter","version":"0.0.33"},
  "authMethods":[{"id":"pi_terminal_login",...}],...}}
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,
  "message":"Authentication required: Configure an API key or log in with an OAuth provider."}}

Stated plainly: the newly selected Pi adapter launches and completes the ACP initialize handshake at the expected release, but session/new stops at Pi provider authentication on this machine, so I cannot show a completed Pi model turn. The launch and version resolution are proven; the model turn is not.

Checks

$ pnpm run check
ℹ tests 938     ℹ tests 130
ℹ pass  938     ℹ pass  130
ℹ fail    0     ℹ fail    0
check exit: 0

The repo-local autoreview helper is clean on the branch:

$ .agents/skills/autoreview/scripts/autoreview --mode branch --base main --engine claude
autoreview clean: no accepted/actionable findings reported
overall: patch is correct (0.85)

The range and migration assertions were written first and confirmed failing against the old values before each fix:

+ actual - expected
+ '^0.60.0'
- '^0.70.0'

+ actual - expected
+ 'npx pi-acp@^0.0.31'   ->  no argv resolved
- 'npx pi-acp@^0.0.31'   ->  AGENT_ARGV_REGISTRY.pi

Published versions confirmed against the registry at the time of writing, including the two ranges left untouched:

$ npm view @agentclientprotocol/claude-agent-acp version   # 0.70.0
$ npm view pi-acp version                                  # 0.0.33
$ npm view @agentclientprotocol/codex-acp version          # 1.7.0  (already covered)
$ npm view mux version                                     # 0.28.2 (already covered)

Note for CI: the CI workflow run on this PR is parked in action_required, the first-time fork-contributor approval gate. It needs a maintainer to release it.

Generated with Claude Code

@lucasyarza
lucasyarza requested a review from a team as a code owner August 21, 2026 18:44
@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 21, 2026
@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 7:29 PM ET / 23:29 UTC.

ClawSweeper review

What this changes

Updates the built-in Claude and Pi ACP adapter ranges and maps their immediately superseded saved-session commands to the current launch arguments when no stored argv exists.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This PR remains necessary: current main and v0.13.2 still select the older adapter ranges. The compatibility mapping and focused coverage are sound; rebase the currently dirty head and rerun required CI before merge.

Priority: P2
Reviewed head: 19055a1ead6efdd72fd029d7c7a75a65be2e096f

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong production-path evidence and focused compatibility coverage support the patch; the remaining blocker is rebase/CI validation of the exact merge head.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The changed registry selects newer Claude and Pi adapters, while the legacy mapping feeds saved no-argv records into the existing launch resolver. Submitted terminal evidence shows a real Claude turn and a real legacy-session resume at the selected Claude adapter, plus Pi ACP initialization at the selected Pi adapter; tests supplement the stored-argv and package-exec paths.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed registry selects newer Claude and Pi adapters, while the legacy mapping feeds saved no-argv records into the existing launch resolver. Submitted terminal evidence shows a real Claude turn and a real legacy-session resume at the selected Claude adapter, plus Pi ACP initialization at the selected Pi adapter; tests supplement the stored-argv and package-exec paths.
Evidence reviewed 8 items Current main still needs the change: The fetched current-main revision retains Pi ^0.0.31 and Claude ^0.60.0 in the built-in registry, so it does not already provide this PR's central upgrade.
Latest release also retains old ranges: The v0.13.2 release revision likewise still uses the previous Pi and Claude ranges; this is not an already-released implementation.
Legacy session path is correctly connected: The parser prefers usable persisted agent_argv, otherwise maps the old command to current argv; the client then resolves the unchanged command through the built-in installed/package-exec path.
Findings None None.
Security None None.

How this fits together

ACPX resolves friendly agent names into ACP adapter processes and retains launch metadata with persistent sessions. On later reuse, saved command metadata is parsed into argv and the client selects an installed adapter or npm package-exec launch.

flowchart LR
  A[CLI agent name] --> B[Built-in command registry]
  B --> C[Adapter launch selection]
  D[Saved session record] --> E[Historical command mapping]
  E --> C
  C --> F[ACP adapter process]
  F --> G[Persistent ACP session]
Loading

Before merge

  • Resolve merge risk (P1) - The head is currently reported dirty against main, so its changelog conflict must be resolved and the exact rebased merge result revalidated.
  • Resolve merge risk (P1) - Default launches will obtain newer third-party adapters; preserve the tested no-argv migration and stored-argv precedence when rebasing to avoid breaking existing persistent sessions.
  • Complete next step (P2) - Resolve the dirty merge state and validate the exact rebased head; no additional mechanical defect is supported by the reviewed diff.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Review surface 9 files; +80, -7 lines The change is focused on two runtime registries, two targeted test files, and required harness/session documentation.

Merge-risk options

Maintainer options:

  1. Rebase and validate the exact head (recommended)
    Resolve the current main conflict, preserve the tested migration behavior, and rerun required CI before merging.

Technical review

Best possible solution:

Rebase onto current main, retain the narrow legacy-command mappings and precedence behavior, then merge after the required checks validate the exact rebased head.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a bug report. The submitted terminal traces do provide high-confidence after-fix evidence for the changed launch selection and Claude legacy-session path.

Is this the best way to solve the issue?

Yes. Updating the registry at its existing ownership boundary and adding exact historical-command mappings is the narrow maintainable path; it preserves usable stored argv rather than silently rewriting user-selected launchers.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ef6b81e71756.

Labels

Label justifications:

  • P2: This is a bounded built-in adapter and persistent-session compatibility maintenance change.
  • merge-risk: 🚨 compatibility: Changing default adapter ranges changes the third-party code reached by fresh built-in launches.
  • merge-risk: 🚨 session-state: The PR deliberately changes how selected legacy saved-session commands reconstruct their launch arguments.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed registry selects newer Claude and Pi adapters, while the legacy mapping feeds saved no-argv records into the existing launch resolver. Submitted terminal evidence shows a real Claude turn and a real legacy-session resume at the selected Claude adapter, plus Pi ACP initialization at the selected Pi adapter; tests supplement the stored-argv and package-exec paths.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed registry selects newer Claude and Pi adapters, while the legacy mapping feeds saved no-argv records into the existing launch resolver. Submitted terminal evidence shows a real Claude turn and a real legacy-session resume at the selected Claude adapter, plus Pi ACP initialization at the selected Pi adapter; tests supplement the stored-argv and package-exec paths.

Evidence

What I checked:

  • Current main still needs the change: The fetched current-main revision retains Pi ^0.0.31 and Claude ^0.60.0 in the built-in registry, so it does not already provide this PR's central upgrade. (src/agent-registry.ts:6, ef6b81e71756)
  • Latest release also retains old ranges: The v0.13.2 release revision likewise still uses the previous Pi and Claude ranges; this is not an already-released implementation. (src/agent-registry.ts:6, fd173f04aa1b)
  • Legacy session path is correctly connected: The parser prefers usable persisted agent_argv, otherwise maps the old command to current argv; the client then resolves the unchanged command through the built-in installed/package-exec path. (src/session/persistence/parse.ts:31, 19055a1ead6e)
  • Introduced migration entries cover the outgoing commands: The PR adds the outgoing Pi command to the historical map and the two outgoing Claude forms to built-in legacy recognition, allowing argv backfill and current package-exec resolution without changing records that retain usable argv. (src/agent-registry.ts:104, 19055a1ead6e)
  • Targeted regression coverage: Tests cover both retired Claude command forms through package-exec resolution, all three superseded command forms through persisted-record parsing, and precedence for a usable stored argv. (test/session-persistence.test.ts:71, 19055a1ead6e)
  • Real behavior proof: The supplied PR-body terminal transcripts show the selected Claude adapter completing a real turn and a no-argv legacy Claude session resuming through the current adapter; the Pi trace proves ACP initialization at the selected adapter version, which is the changed Pi behavior. (src/agent-registry.ts:39, 19055a1ead6e)

Likely related people:

  • Vitor Cepeda Lopes: Authored the prior built-in adapter-range refresh visible in the current agent-registry history. (role: previous adapter-range contributor; confidence: high; commits: c5a97232e1da; files: src/agent-registry.ts)
  • Peter Steinberger: Authored the structured-agent-argv change and recent release work; both are directly adjacent to saved launch metadata. (role: recent adjacent session-launch contributor; confidence: medium; commits: f64e2ca4e4cc, fd173f04aa1b; files: src/agent-registry.ts, src/session/persistence/parse.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-08-21T18:47:22.323Z sha 1bf72f2 :: needs real behavior proof before merge. :: [P1] Migrate the superseded adapter commands | [P2] Synchronize the required harness documentation | [P2] Remove adapter ranges from the changelog
  • reviewed 2026-08-21T19:25:49.838Z sha 2e30c45 :: needs real behavior proof before merge. :: [P2] Qualify the legacy-session migration guarantee
  • reviewed 2026-08-21T19:37:16.999Z sha 8a69d0f :: needs changes before merge. :: [P1] Preserve built-in resolution for legacy Claude commands
  • reviewed 2026-08-21T19:47:47.196Z sha c280ac2 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-21T22:22:03.193Z sha c280ac2 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T11:38:23.044Z sha 19055a1 :: needs maintainer review before merge. :: none

@lucasyarza

Copy link
Copy Markdown
Author

Thanks — all four review items are addressed in 2e30c45, and the PR body is updated with the proof.

[P1] Migrate the superseded adapter commands. Confirmed and fixed. LEGACY_AGENT_COMMANDS now carries the three retired forms: npx pi-acp@^0.0.31, npx -y @agentclientprotocol/claude-agent-acp@^0.60.0, and the matching npm exec form. The Claude npm exec variant needed registering too, because legacyFallbackCommands in the registry is templated off the current range and so stops covering the outgoing one the moment it moves. All three are now rows in the historical built-in command table in test/session-persistence.test.ts, which I confirmed failing before the fix.

[P1] Resolve merge risk. Same fix. Persisted records that reconstruct argv through the exact-command map now land on the current built-in argv rather than the retired launcher.

[P2] Synchronize the required harness documentation. Done. skills/acpx/SKILL.md now marks the Pi built-in as ACPX-range-owned and documents the persisted-command mapping, agents/Claude.md documents the same, and agents/Pi.md is created and linked first in agents/README.md per the mandatory example ordering. No range or version specifier appears in any of it.

[P2] Remove adapter ranges from the changelog. Done. The Unreleased entry is now generic.

Real behavior proof. Two runs against this branch's build, both in the PR body:

  • Claude, end to end: the launched adapter reports "version":"0.70.0", the turn streams real model output, and it settles on stopReason":"end_turn".
  • Pi, handshake only: the adapter launches and completes ACP initialize at "version":"0.0.33", then session/new stops at Pi provider authentication on this machine. I am flagging that rather than dressing it up — the launch and version resolution are proven, a completed Pi model turn is not. If a completed Pi turn is required before merge, say so and I will find a machine with Pi provider credentials.

pnpm run check passes on the branch: 935 + 130 tests, 0 failures.

One thing outside my reach: the CI run on this PR is parked in action_required, the first-time fork-contributor approval gate, so no CI signal exists yet. A maintainer needs to release it.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 21, 2026
@lucasyarza

Copy link
Copy Markdown
Author

Both remaining items are addressed in 8a69d0f.

[P2] Qualify the legacy-session migration guarantee. Correct finding, and my wording was wrong. parsePersistedAgentArgv resolves parseOptionalAgentArgv(record.agent_argv) first and only falls through to resolveAgentArgvForCommand when that yields nothing, so a record with usable stored argv keeps its stored launcher by design. The claim is now qualified in agents/Claude.md, agents/Pi.md, skills/acpx/SKILL.md, and the changelog entry. I also locked the precedence with a regression test: a retired command plus usable stored argv must keep the stored argv and must not fall back to the registry.

[P1] Real proof of the legacy no-argv upgrade path. Added, and it is the run you asked for rather than another fresh launch. A real persisted record was rewritten to its pre-upgrade shape, agent_command set to npx -y @agentclientprotocol/claude-agent-acp@^0.60.0 with agent_argv removed, then reused:

$ node dist/cli.js --deny-all --timeout 240 --format json claude -s <session> 'Reply with exactly: LEGACY-RESUME-OK'

"agentInfo":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"0.70.0"}
... "agent_message_chunk" ... "L" / "EGACY-RESUME-OK"
"stopReason":"end_turn"
exit: 0

The retired command resolved to the current built-in argv, the newly selected adapter launched, and the turn completed. The record afterwards holds agent_command at the old string and agent_argv at ["npx","-y","@agentclientprotocol/claude-agent-acp@^0.70.0"], so the upgrade persists instead of being re-derived on every reuse. The scratch session was removed and the session index restored after the run.

Still not proven, same as before. A completed Pi model turn. ~/.pi/agent/auth.json on this machine is empty, so Pi has no provider credentials and session/new cannot get past authentication. Pi launch and version resolution are proven at 0.0.33; the model turn is not. If that blocks merge, say so and I will get a machine with Pi credentials.

pnpm run check passes: 936 + 130 tests, 0 failures. The repo-local autoreview helper reports autoreview clean: no accepted/actionable findings reported.

The CI run is still parked in action_required on the fork-contributor approval gate and needs a maintainer to release it.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 21, 2026
@lucasyarza

Copy link
Copy Markdown
Author

Fixed in c280ac2. The finding was right and my previous fix was incomplete.

[P1] Preserve built-in resolution for legacy Claude commands. Confirmed against the source: AcpClient.resolveAgentLaunchPlan calls resolveBuiltInAgentLaunch(this.options.agentCommand), and findBuiltInAgentPackage matches only spec.fallbackCommand and spec.legacyFallbackCommands. Claude's legacyFallbackCommands was templated off the current range alone, so neither retired ^0.60.0 form was recognized and a saved session without stored argv fell through to configuredCommand, the backfilled raw npx launcher.

Both retired forms are now in the Claude spec's legacyFallbackCommands. That list is also the second lookup inside resolveAgentArgvForCommand, so argv backfill keeps working from a single home, and I dropped the two now-duplicate entries from LEGACY_AGENT_COMMANDS.

Covered by a new test in test/agent-registry.test.ts: package-exec resolution must recognize both retired commands and bridge them at the current package range. Confirmed failing before the fix.

Live confirmation on a legacy no-argv record, same setup as the previous resume proof:

$ ps -o pid,ppid,command -ax | grep claude-agent-acp
74856 74847 npm exec claude-agent-acp
74892 74856 node ~/.npm/_npx/<hash>/node_modules/.bin/claude-agent-acp

That is the package-exec bridge. Before the fix the same record spawned npm exec @agentclientprotocol/claude-agent-acp@^0.70.0, the raw npx form straight from the backfilled argv. The turn completed at end_turn in both cases, so only the launch path changed.

One thing I deliberately did not touch. The older Claude forms already in LEGACY_AGENT_COMMANDS, the @zed-industries commands and ^0.36.1 / ^0.37.0, have the same gap: they get argv backfill but no built-in launch recognition. That predates this PR and moving them would change launch behavior for sessions this bump does not touch, so I left it for a maintainer call rather than widening a range bump. Happy to fix it here if you would rather have it in one place.

pnpm run check: 937 + 130 tests, 0 failures. Repo autoreview: autoreview clean: no accepted/actionable findings reported.

Scratch sessions used for the proofs were deleted and the session index restored. CI is still parked in action_required on the fork-contributor gate.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 21, 2026
lucasyarza and others added 4 commits August 28, 2026 13:31
Advance the source-owned npm ranges for the Claude and Pi built-in adapters
to their current npm releases:

- `@agentclientprotocol/claude-agent-acp` `^0.60.0` -> `^0.70.0`
- `pi-acp` `^0.0.31` -> `^0.0.33`

The Codex (`^1.1.5`) and Mux (`^0.28.0`) ranges already float to the latest
published releases (1.6.2 and 0.28.2), so they are left unchanged.

Claude 0.61.0 through 0.70.0 and Pi 0.0.32 through 0.0.33 publish no breaking
changes; the release notes contain features and fixes only.

Built-in names, command routing, installed-package-first resolution,
package-exec fallback, queueing, persistence, cancellation, and reconnect
behavior are unchanged. No ACPX dependency, manifest, or lockfile changes.

Co-Authored-By: Claude <noreply@anthropic.com>
Registering the new ranges alone left the outgoing launch commands unmapped, so
persisted sessions recorded under them reconstructed no argv and kept launching
the retired adapter line.

Add the superseded forms to `LEGACY_AGENT_COMMANDS`:

- `npx pi-acp@^0.0.31`
- `npx -y @agentclientprotocol/claude-agent-acp@^0.60.0`
- `npm exec @agentclientprotocol/claude-agent-acp@^0.60.0`

Cover all three in the historical built-in command table in
`test/session-persistence.test.ts`.

Synchronize the harness documentation the range change requires: mark the Pi
built-in as ACPX-range-owned in `skills/acpx/SKILL.md`, document the persisted
command mapping there and in `agents/Claude.md`, add the missing `agents/Pi.md`,
and link it first in `agents/README.md` per the mandatory example ordering.

Drop the adapter version specifiers from the changelog entry, which the
documentation policy forbids.

Co-Authored-By: Claude <noreply@anthropic.com>
A usable stored `agent_argv` is resolved before the historical-command map, so a
record saved under a retired command only picks up the current argv when it has
no usable stored argv. The previous wording promised the migration for every
such record.

Qualify the claim in `agents/Claude.md`, `agents/Pi.md`, `skills/acpx/SKILL.md`,
and the changelog entry, and lock the precedence with a regression test that a
retired command plus usable stored argv keeps the stored launcher.

Co-Authored-By: Claude <noreply@anthropic.com>
Backfilling argv was not enough. The client resolves built-in launch behavior
from the unchanged persisted `agent_command`, and `findBuiltInAgentPackage`
matches only `fallbackCommand` and `legacyFallbackCommands`. Neither retired
`^0.60.0` form appeared there, so a saved Claude session without stored argv
took a raw npx launcher and bypassed the installed-package-first and
package-exec paths that recognized Claude commands use.

Register both retired forms in the Claude spec's `legacyFallbackCommands`, which
`resolveAgentArgvForCommand` already consults before `LEGACY_AGENT_COMMANDS`, and
drop the now-duplicate entries from that map so each retired form has one home.

Cover the launch path: package-exec resolution must recognize both retired
commands and bridge them at the current package range.

Co-Authored-By: Claude <noreply@anthropic.com>
@lucasyarza
lucasyarza force-pushed the chore/bump-claude-and-pi-adapter-ranges branch from c280ac2 to 19055a1 Compare August 28, 2026 11:34
@lucasyarza

Copy link
Copy Markdown
Author

Rebased onto current main at 19055a1. The branch was conflicting after #515, #524, and #525 landed.

The only conflict was CHANGELOG.md, three times, once per commit of this branch, all in the same Unreleased / Changes block. Resolved by keeping the dependency-refresh entry from main and this branch's adapter entry side by side. No adapter, migration, test, or documentation change was altered by the rebase.

The skills/acpx/SKILL.md edits from #524 and this branch merged cleanly and both survive.

Re-verified on the rebased head after pnpm install --frozen-lockfile against the refreshed lockfile:

$ pnpm run check
ℹ tests 938     ℹ tests 130
ℹ pass  938     ℹ pass  130
ℹ fail    0     ℹ fail    0
check exit: 0

Registry state is unchanged since the review: @agentclientprotocol/claude-agent-acp is still 0.70.0 and pi-acp is still 0.0.33, so the live transcripts in the PR body still describe the releases this branch selects. Codex has since published 1.7.0, still inside the untouched ^1.1.5 range, and I updated that line in the body.

CI on the new head is parked in action_required again, same fork-contributor gate.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant