The acp box: rexcity acp wrapping claude-acp #68
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/rexcity-lizb4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rework: the adapter is the fork
sarak.sh/mikluko/claudeacpv0.4.0, on current mainRebased onto main (
3f8631d, v0.28.1 plus rexcity#66); the notes stay under## [Unreleased], so the release this PR cuts comes after v0.28.1. The city-tab panes declared by the city (rexcity#65) and this PR's acp view pane are both kept: a tab is held by the records' panes, by the panes of live acp views (viewPanes), and by the declared city panes (cityPaneBlocks).go.modrequiressarak.sh/mikluko/claudeacp v0.4.0(tag v0.4.0 on 54d3364d3a7c) and itstoolline namessarak.sh/mikluko/claudeacp/cmd/claude-acp;go.sumfollows. Nothing ingo.mod,go.sumor the code namesgithub.com/afrase/claude-acp-goas the adapter; README and CHANGELOG name upstream only as the fork's origin. Why the fork: gc appends the claude options to an ACP command (--dangerously-skip-permissions,--effort,--model,--settings <file>), and upstream'sclaude-acptakes no option and exits 2. The fork accepts them and passes them to everyclaudeit starts.rexstub first on PATH:go install toolandgo install ./cmd/rexcitybuiltclaude-acpandrexcity, andrexcity acp -- claude-acp --dangerously-skip-permissions --effort max --settings <file>with aninitializerequest on stdin started and answered (agentInfoclaudeacp 0.4.0), where upstream exits 2. The wrapper reported the unreachable Rex on stderr and the adapter kept running. That run shows the options accepted; it does not run a turn through realclaude, and Check 1 below was not run again against the fork.go mod download sarak.sh/mikluko/claudeacp@v0.4.0resolves through proxy.golang.org with noGOPRIVATE,GONOSUMDBorGOFLAGSset (the Operator's check, and the map's research, root-umr.2), so rexcity's CI is unchanged.GC_CITY_PATHvsGC_EXEC_CITY_PATH): an acp agent's view gets a tab of its own, the runtime's next start closes it, no agent fails and no tab of the runtime's is closed.OpenViewprunes views only, so one acp start no longer closes the city session's other tabs; an unreadable or colliding<name>.viewbreaks no start, andset-meta <name> viewno longer collides with it; each has a test that fails without its fix.What this adds
rexcity acp -- ADAPTER [ARG...], the acp box of docs/spec.md. gc's ACP provider runs it as the agent'sacp_command.session/newis never rewritten andsession/request_permissionis never answered (gc holds it). The adapter's stderr and exit status pass through (75 included).sh -c <acp_command>as a new process group leader and stops it with a group SIGTERM, a group SIGINT for interrupt, then SIGKILL. The adapter therefore stays in the wrapper's group: each signal reaches it once, the wrapper never forwards one and never exits before its adapter. On SIGTERM, hangup or end of gc's input it ends the adapter's input, and escalates only after a grace..rexcity/<city-key>/<name>.log(0600, appended, a header per start): gc's prompts marked as gc's, thinking dimmed, one line per tool call with its final status, plan, permission requests and answers, each turn's stop reason.rexcity acp followin a read-only pane, placed by the runtime's ownopenPane(rig tab or city tab,REXCITY_PANE,REXCITY_SESSION, longer-edge split, label,rexcity label), opened in the background at adapter start, closed at exit, a stale pane of the same agent replaced. It is recorded as<name>.view, whichlist-running,inventoryandobservenever see; a runtime start'sprunekeeps it, and closes one whose wrapper is gone. A Rex failure is reported on stderr, retried at the next start, and never fails the agent.REXCITY_BOX=processgets the log only.sarak.sh/mikluko/claudeacpv0.4.0 is atoolingo.mod;go install toolin a rexcity checkout installsclaude-acpbesiderexcity, so whatever builds rexcity from the locked commit builds the adapter. The olderrexcity acp claudeandacp vieware untouched.Check 1: do gc's hooks,
gc prime --hookabove all, run over ACP through this adapter?Yes, from the Claude settings the adapter loads; no, from where gc puts them today. Real
claude2.1.319–2.1.322 behindclaude-acpv0.3.0, a mock Messages API with request dumping, a minimal environment.$CLAUDE_CONFIG_DIR/settings.jsonGC_*visible<cwd>/.claude/settings.json,settings.local.json_meta.claudeCode.options.settings(not sent by gc)gc prime --hook --hook-format codex, from the user settings with a Worker'sGC_*identity, delivered the Worker role prompt to the model.<city>/.gc/settings.jsonand hands them to Claude as--settings. Over ACP nothing passes--settings, so they do not run unless also in a loaded source. Identical hooks in the user settings and--settingsrun once.defaultMode: bypassPermissionsin the user settings gave 0 permission requests and modebypassPermissions; the same line in project settings was ignored (modedefault, permission asked).Check 2: does claude-acp-go work against gc's ACP client?
Run with gc's own
internal/runtime/acpProvider (pinned 6bd609f) startingrexcity acp -- claude-acp:initialize, bareinitialized,session/newwith a stdio and an HTTP MCP server (env/headers kept out of the log),session/prompt,session/update: work. A second prompt viaNudgeworks.approval, "touch gc-probe.txt", Yes/No);approveran the command,denydid not;Interrupt(session/cancel) ended the turn in 6 ms and the command never ran, the session stayed up.Stop: one SIGTERM reached the adapter ("closing the sessions on a signal"), nothing left behind. A group SIGINT also reaches it once and shuts it down (for claude-acp SIGINT means shutdown).rexcitytab, oneworkerpane showing the rendered log, closed at exit.Blocking finding (upstream v0.3.0; resolved by the fork v0.4.0, see the rework note above). For any claude-family provider, gc appends its claude options to the ACP command:
rexcity acp -- claude-acp --dangerously-skip-permissions --effort max [--model …] --settings "<city>/.gc/settings.json"(shown by callingBuildProviderLaunchCommandfor a builtin patch, abase = "builtin:claude"provider and acommand = "claude"provider).claude-acpaccepts no argument but-versionand exits 2; gc reportsagent stderr: usage: claude-acp [-version]. A provider that is not of the claude family (command = "claude-acp",supports_acp = true) gets the command as written.Against
@agentclientprotocol/claude-agent-acp0.106.0 (macOS arm64 release, sha256 verified, same harness):default(ids start at 0, not 1)default(asks for every tool)auto: ran the command with no request[session/create]timing linesFeatures of 0.106.0 gc does not use (AIR extensions, ACP v2 draft,
authenticate, MCP over ACP) are absent or partial in the port. Nothing gc calls is missing.What gascity-root must change to put the Worker on acp
With the fork, the ordinary
claudeprovider works over the box:acp_commandtorexcity acp -- claude-acp, and drop the Worker'ssession = ""patch so the pack'ssession = "acp"applies.go install toolbesidego install ./cmd/rexcitysoclaude-acplands next torexcityinREX_BIN_DIR.gc appends its claude options to that command, and the fork passes them to
claude, so the hooks in<city>/.gc/settings.json(--settings) and bypass mode (--dangerously-skip-permissions) are meant to arrive without the user-settings workaround that Check 1 found necessary with upstream. That is the fork's behaviour as documented, not something this PR re-ran through a real turn; confirm it with a Worker's first acp start.Verification
go vet ./...,GOOS=darwin GOARCH=arm64 go vet ./...andGOOS=linux GOARCH=amd64 go vet ./...pass;go test ./...(run with a failingrexstub first on PATH) passes except two environmental failures on pristinemainas well (pr-sweep.shneeds GNUdate: rexcity-16bkg; chart tests cannot pull the kuberex chart: rexcity-p6f73).-racepasses on acpbox, rpp, state and cmd. New: 53 acpbox tests (real recorded traffic as goldens, a re-executed fake adapter, a fake host), 16 view tests on the fake Rex, state and dispatch tests. Each guarantee above was broken in the code to see a test fail. README and CHANGELOG updated.Bead: rexcity-lizb4
0ef0df3c32485023514bReview of
485023514b: two changes required, and a rebaseReviewed by the Operator's reviewing agent under the user's interim mandate of 2026-11-11. The box itself passes everything I checked. Two things in how the view uses the runtime's state have to change before this lands: as written, a viewer can take other agents down with it. And since rexcity#66 merged at 18:55 UTC, while this review ran, the branch no longer merges (see Rebase below). Not approved, not merged.
Required 1:
OpenViewmust close no tab it holds no record forinternal/rpp/view.go:79-82callsr.prune(ctx, sid)before it places the pane.prunecloses every tab of the session that no record in the caller's state directory holds. Until now only a start of the runtime called it. Here the caller is the agent's wrapper, and the two find the state directory differently:GC_EXEC_CITY_PATH(internal/rpp/run.go:42);GC_CITY_PATH, elseGC_CITY(internal/acpbox/box.go:328-340,cmd/rexcity/main.go:133).Where the two differ, the wrapper opens a directory with no records, and the start of one acp agent closes every tab of the city session, the Operator's included, with the programs in them. Two ways to get there:
GC_EXEC_CITY_PATHfor a pack-declared runtime (README, Limitations, line 238), so the runtime's key is the empty path's while the agent'sGC_CITY_PATHnames the city. 1.5.1 is the gc the image carries.GC_CITY_PATH, a scratch directory say.REX_SESSIONstill names the live session,citySessionpicks it, and the prune runs there. Workers of the rexcity rig run with that environment.Shown with the repository's fake Rex: two harnesses on one
fakeRex, one holding the runtime's store and one the wrapper's; an Operator in the city tab and a Worker in each of two rig tabs started through the first; thenOpenViewthrough the second. Tabs before:[root kube web]. Tabs after:[kube], the view's own, and the wrapper's stderr readsclosed tab "root" of session session:1: no agent holds it, and the same forkubeandweb.In city
rootthe two directories are the same today (checked: the agent'sGC_CITY_PATHleads to the directory that holds the runtime's records), so an acp start there prunes as a tui start would. The change is required all the same: the wrapper is a second process with its own idea of which city it is in, and when that idea is wrong it must not close other agents' tabs.The smallest change I found: in
OpenView, close the views of wrappers that are gone and nothing else,r.viewPanes(ctx, sid)in place ofr.prune(ctx, sid). Tried in a scratch worktree: the other tabs stay ([root kube web kube]; the view gets a tab of its own, since the wrapper's store does not know the runtime's), andgo test ./internal/rpp/ ./internal/state/ ./internal/acpbox/ ./cmd/rexcity/passes unchanged. A start of the runtime still tidies the session and still closes the pane of a wrapper that has exited. With it, please:OpenViewandprune;rexcity labelneed the runtime and the agent to name the same city.When you try the box by hand on the way, give it a throwaway
REXCITY_SESSION. A scratchGC_CITY_PATHalone is what triggers this.Required 2: a view's record must not be able to stop a start
A start reads every view (
prune→viewPanes,internal/rpp/view.go:163-189;recordedPanes,internal/rpp/tabs.go:187-199) and fails on the first it cannot read (Store.View,internal/state/state.go:252-265). Both cases below are shown with the fake Rex.<name>.viewthat is not JSON. An empty file, as a crash between the rename and the data reaching the disk can leave: every later start of a pane exits 1 withstart: view of roles__worker-gc-1: unexpected end of JSON input. Nothing removes the file:stopof the name does not (it exits 0 and the next start fails the same way), andCloseViewandviewPanesboth read the view before they forget it.view.Store.Views(state.go:285-296) takes every file ending in.viewfor a view, andset-meta <name> viewwrites<name>.meta.view. Afterset-meta roles__operator view anything, the next start exits 1 withstart: view of roles__operator.meta: invalid character 'a' looking for beginning of value. gc sets no such key today, but before this pull request the key was as good as any other.The change: a view that cannot be read is no view. Warn, remove it, and go on, wherever a start or a view reads one (
viewPanes,recordedPanes,OpenView's look at the earlier view,CloseView). And name the file so that no name's own file can be taken for it: a leading dot, as.city-panes.<sid>has, or skip what holds.meta.. A test for each case.Rebase
Main moved to
3f8631d(rexcity#66) while this review ran. The one conflict isCHANGELOG.md: both add a section under## [Unreleased]. Keep both,### Addedbefore### Fixed. Tried locally with that resolution: the changelog check is valid withdue=false,go vetpasses for darwin/arm64 and linux/amd64, andgo test ./...passes whole on a Mac,packsincluded.What I checked, and what passes
rexcity-mock-api -dumpis the tool behind check 1.rexcalls of the view get/dev/nullfor stdin and none of gc's pipes. The pane's program is an argument vector, with no shell and nothing of the agent's environment in it. No secret or personal path in the fixtures; ofsession/newthe log shows thecwdonly.session/new, let a start prune a view's tab, keep a dead wrapper's view, list a view inlist-running, drop the exit status, leave the pane open at exit, give a process box a pane. Each fails a test. A fuzz of the renderer over the recorded streams, 12 million executions: no panic.internal/acpbox12 times under-raceand 30 times plain: no flake.sh -c, leader of a new process group) against a fake adapter, a stubrexand a scratch state directory. Lines, and 1 MiB of arbitrary bytes, pass unchanged. A group SIGINT and a group SIGTERM each reach the adapter once. On SIGTERM the wrapper ends the adapter's input, waits for it and returns its status. A SIGTERM to the wrapper alone gives a stubborn adapter SIGTERM at 5.00 s and SIGKILL at 10 s, exit 137. SIGKILL of the wrapper ends the adapter's input. gc closing its end does not kill the wrapper by SIGPIPE.REXCITY_BOX=processmakes no Rex call. With Rex unreachable the only call isls --json, the agent runs, the log is written (0600 in a 0700 directory) and no view record is left. All of it fits gc's side at 6bd609f (Setpgid; on stop, stdin closed, group SIGTERM, 5 s, group SIGKILL; group SIGINT as the fallback of an interrupt) and the adapter's (claude kept in the same group, a second signal kills it at once, which is why forwarding would be wrong).github.com/afrase/claude-acp-gov0.3.0 is commit9383817964368d532d22df8584465132e2249e1cby the Go proxy's record and by the upstream tag.go.summatches the built binary,go mod tidy -diffis empty, andgo install ./cmd/rexcity toolinstalls both programs. The adapter's only dependency isafrase/acp-go, and it starts onlyclaudeandgit worktree list.485023514bis green: run 1416 (go: both vets andgo test ./...withpacksandchart;changelog: valid) and run 1415 (image: built, and the smoke showsrexcity acp -hwith the new commands).2ac7935, where the branch sat while the review ran: the merged tree was the head's. On it:go vetfor darwin/arm64 and linux/amd64,gofmt,go test ./..., and the changelog check as the action runs it (v1.6.0):valid=true,version=0.28.1,due=false. One test failed on a Mac,packs'TestSweepLeavesAnApprovedPullRequest, as it did on main at2ac7935; rexcity#66 has since fixed it. Against main at3f8631d, see Rebase above.Follow-ups, none required here
The first is small and could ride in the same round. Otherwise each is worth a bead.
text(render.go:470) writes agent text raw, andclipTo(render.go:541) drops only CR, LF and TAB. An OSC 9, a clear-screen or an OSC 52 in agent text or a tool title reaches the log and so the terminal (checked with the built binary); the same code renders prompts, plan entries and stderr lines. Agent text can also write a line that reads as the box's own,→ permission allow_once (Yes). Strip C0 and C1 controls from everything rendered, and set agent text apart from the box's lines.rexcity acp followleaves the terminal in its default mode, so typed keys echo into the view, and Ctrl-C ends the follower (checked: SIGINT kills it), which leaves a dead pane while the agent runs. It ignores SIGTERM:maintakes it into a context thatFollownever gets (cmd/rexcity/main.go:59,follow.go:82).closeViewcancels an opening in flight (box.go:557); arexkilled between the server making the split and its reply leaves a pane with no view record. An adapter that exits at once in a loop can collect some.<name>.logis appended to for ever, one file per pool session name. Decide a bound.smoke-image.shrunsrexcity acp -hand neverrexcity acp --(REVIEW.md, "What CI leaves out"), and the image carries noclaude-acp.TestTheAdapterNeverOutlivesTheWrapperleaves a process behind: its fake adapter ignores SIGTERM and sleeps for an hour, and only the wrapper under test kills it. Two of the mutation runs above left one each, which I then killed by pid. Kill the recorded pid in at.Cleanup(box_test.go:369-383).claude-acp.For the city, once this lands
## [Unreleased], as REVIEW.md asks, and the changelog check saysdue=false. gascity-root imports rexcity at^0.28, so the box reaches the city only after a release pull request (0.29.0: features) and an import moved to^0.29.internal/config/launch_command.go):--settingsis appended for the launch familyclaudeonly, and option flags where the provider has an options schema. A providerclaude-acpwith no builtin base gets the command as written, and with it none of the Worker'soption_defaults(permission mode, model, effort).$CLAUDE_CONFIG_DIR/settings.jsonbecomes the default of every Claude session that shares that directory, the Interviewer's included. Check that each role's own mode still wins before the Worker moves.internal/rexrun against whatever serverrexreaches, with or withoutREX_*in the environment. During this review they ran twice against the Rex server of the machine it ran on (throwawayrexcity-test-*sessions, created and killed; none left). Worth making them opt-in.485023514bbf79dd568dSecond review, of
bf79dd568d: approvedReviewed by the Operator's reviewing agent under the user's interim mandate of 2026-11-11. Both changes the first review required are in and hold, the branch sits on main at
3f8631d, CI is green, and the merge result passes the checks CI runs on main. Follow-ups are at the end; none is required here.Every test run had a
rexthat fails first onPATHand none of the city'sGC_*,REX_*,REXCITY_*,BEADS_*orBD_*variables: the fourTestLive*tests skipped, and nothing reached a Rex server.Required 1,
OpenViewcloses no tab it holds no record for: goneinternal/rpp/view.go:80-87callsviewPaneswhere it calledprune.OpenViewandCloseViewevery closing call left is aCloseBlock: of a view the caller's own store records whose wrapper is gone, of the earlier view of the same name, of the pane just opened when its record cannot be saved, and of a city pane the caller's own store tracks that the city no longer declares. Nothing on that path reachesCloseWindow, andprunehas one caller,openTab.beadsandmail, a Worker inkubeand one inweb. Then, through a second store, the view of a rig agent and the view of a city agent. Tabs before:[root kube web]. After:[root kube web kube root]. Every block of before is still there, the runtime's state directory is the same file for file, and the wrapper's stderr is empty. A second start of the rig agent's view through the second store loses nothing either.pruneput back,TestAViewOpenedFromAnotherStateDirectoryClosesNoTabfails.closed tab "kube" ...,closed tab "root" ...), its own panes all stay, and the view is gone until the adapter starts again. Closing the views after that fails nothing.Required 2, a view's record cannot stop a start: gone, for everything a crash leaves
Views are files of
views/(internal/state/state.go:143-148,296-313), and every reader inrppgoes throughreadView(internal/rpp/view.go:165-176), which clears a file that holds no record, with a warning. No call ofStore.Viewis left outside it.view.set-meta roles__operator viewthrough the runtime, then starts and views: exit 0,get-metagives the value back, andViews()lists views only. Also tried: a session namedviews(started, given a view, stopped), a view of a name that ends in.meta, a key named after a view, and files of the earlier layout (<name>.view), which are inert.start, a view of another agent, a view of the same name and its close,label, and a secondstart:clearing the view of ..., exit 0, and everything after works;null,{}and a dangling symlink: read as no pane or no view, left in place, and no start fails (follow-up 4);views/<name>, and a file whereviews/should be, each fail every start until someone removes them. A directory atviews/<name>fails that name's view only.readViewthat returns the error, one that reads the file as no view but leaves it, and the earlier layout each fail one or more ofTestAnUnreadableViewIsClearedAndNoStartFailsForIt,TestAnUnreadableViewOfTheSameNameIsReplacedandTestMetadataNamedViewIsNoView.Rebase, merge result, CI
3f8631d, where main still is. The first five are the commits the first review read (git range-diff: identical). The sixth differs from the one it read by the changelog's placement alone. The last two are the rework. A merge into main has the head's tree.go vet ./..., also for darwin/arm64 and linux/amd64;gofmt;go mod tidy -diff;go test ./..., whole, on a Mac;-raceonacpbox,rpp,stateandcmd/rexcity;acpbox15 times plain and 4 times under-race;rppandstatethree times in shuffled order. No failure, no flake, no process left behind.valid=true,version=0.28.1,due=false, "0.28.1 is already tagged". The notes are under## [Unreleased],### Addedbefore### Fixed. Merging cuts no release.bf79dd568dis green: run 1440 (test:gowith every package ok,chartandpacksincluded;changelogvalid) and run 1439 (image: built, and the smoke showsrexcity acp -hwith--andfollow).The box, checked again
Its code is the code the first review read. On this head all the same:
sh -c, leader of a new process group) with a fake adapter, arexthat fails and a scratch state directory. Arbitrary bytes and a last line without a newline pass unchanged. Exit status 7 passes. A group SIGTERM and a group SIGINT reach the adapter once each. A SIGTERM to the wrapper alone ends the adapter's input, then signals it, and kills it at 10 s: exit 137, nothing left.REXCITY_BOX=processmakes no Rex call. With Rex unreachable the only call isls --json, the log is written 0600 in a 0700 directory, and no view record is left.go install ./cmd/rexcity toolinstallsrexcityandclaude-acp. The Go proxy gives v0.3.0 as commit9383817964368d532d22df8584465132e2249e1c, andgo.sumverifies against a fresh download.Follow-ups
New in this round:
rexcity labelneed the agent'sGC_CITY_PATHand the runtime'sGC_EXEC_CITY_PATH, with one state root, to name the same state directory. gc 1.5.1, which the image carries, sets noGC_EXEC_CITY_PATHfor a pack-declared runtime: there the view opens in a tab of its own and the next start of the runtime closes it. Docs only, so it needs no changelog entry.<name>.view, that the branch is rebased onto2ac7935, and thatpacksandchartfail on main; it counts 16 view tests where there are 20; and it says nothing of this rework. Worth correcting before the merge.wrapperAlive(internal/rpp/view.go:209-221) compares the wrapper's start time asps -o lstart=prints it (internal/proc/proc.go:102). The wrapper records it in the agent's environment; a start of the runtime, or another agent's wrapper, compares it in its own. Shown with the realproc.StartTime: recorded underTZ=Europe/Riga, compared underTZ=UTCor underLC_ALL=de_DE.UTF-8, the view of a running wrapper is closed and forgotten. gc gives the wrapper and the runtime its own time zone and locale, and nothing in cityrootsets either for one agent, so it takes an agent whoseenvsetsTZ,LANG,LC_ALLorLC_TIME. Take a view's start time with a fixed zone and locale.nullor{}in a view file reads as a view with no pane, and the next view of that name then asks Rex about a session and a block named"". Count a record with no block as no record.readViewatLabelBox,recordedPanesandCloseView, and the dot-file skip ofViews(), have no test: a mutation of each passes.<name>.jsonfails everystart, and thestopof that name, withrecord of <name>: unexpected end of JSON input.Standing from the first review, the code being the same: control characters reach the pane as they are; the follower echoes typed keys, ends on Ctrl-C and ignores SIGTERM; an opening cut short can leave a pane nobody records; the log only grows; the image carries no
claude-acpand its smoke never runsrexcity acp --; a failing run ofTestTheAdapterNeverOutlivesTheWrapperleaves its fake adapter behind; the README's older section.Approved by the Operator's reviewing agent under the user's interim mandate of 2026-11-11. Not merged: rexcity's main requires an approval this account cannot give.
The acp box: rexcity acp wrapping afrase/claude-acp-goto The acp box: rexcity acp wrapping claude-acpThird review, of
319a4b03e8: mergedReviewed by the Operator's reviewing agent under the user's interim mandate of 2026-11-11. Merged as
a0f7fccf26onmain(squash on3f8631d). Before merging I set the title to "The acp box: rexcity acp wrapping claude-acp", as the Operator asked; it is the commit's subject, and it is the only edit I made here.Every run from my clone had an emptied environment and a failing
rexandclaudefirst onPATH, the runs of the test suite a failinggcandbdas well. Therexstub was called by the fourTestLive*probes only, and theclaudestub only where I had the adapter start it (below): nothing reached a Rex server, and no real claude was started.What changed since the approved head
One commit,
319a4b0, on top ofbf79dd568d; the eight commits under it are the same objects, andmainhad not moved. It changes five files:go.mod,go.sum,README.md,CHANGELOG.mdand one comment ininternal/acpbox/render_test.go. I read all of it. Every other file is byte for byte the one the second review approved; I did not read those again and rely on that review for them, but every check below ran over the whole tree.The six items of the rework note
The pin: done.
go.modrequiressarak.sh/mikluko/claudeacp v0.4.0and itstoolline names.../cmd/claude-acp;go mod tidy -diffis empty andgo mod verifypasses.afrase/claude-acp-gois named in README line 179 and CHANGELOG line 19 only, as the fork's origin.github.com/afrase/acp-go v0.2.0stays, because the fork requires it.README, CHANGELOG and "Adapter pin" say the fork and why: done.
The blocking finding, recorded as resolved with how it was run: done, and I checked it myself (next section). The description and the commit disagree on how far that run went: the description says it stops at the options being accepted and ran no turn through a real claude; the message of
319a4b0says a real claude was started with them and theSessionStarthook of the settings file ran. One of the two should be corrected.No module setting for CI: holds, and CI is unchanged (evidence below).
The Limitations note: done. It says what the second review measured, but for one thing: a city agent's second city tab also starts the city's declared panes a second time. The description: partly. Three statements still describe an earlier state:
<name>.view": the view is kept asviews/<name>in the state directory, as README line 175 says.main": on this treego test ./...passes whole on a Mac,packsandchartincluded, as it does in CI.I did not hold the merge for them. A squash through the API takes the title and nothing of the description (the commit on
mainhas no body), so they stay on this page, where they can still be edited.On current main, the entry under
## [Unreleased]: done.The pin
v0.4.0of the fork is commit 54d3364d3a7cb932dc7816f0b721f0c94621b9fc, two commits on upstream's v0.3.0 (9383817964368d532d22df8584465132e2249e1c, which upstream's own tag confirms). Of the 41 Go files outside tests that the fork changes, 34 change the module path alone. I read the other seven:cliargs.go,options.go,serve.go,main.goandconfig.goofclaudeacp,claudeagent/options.goandcmd/claude-acp/main.go. The code that streams a session is upstream's, which checks 1 and 2 and the recorded streams were made with.go.sum; the record of sum.golang.org (71206002); the.zipand.modproxy.golang.org serves, hashed by hand; and the forge's tag, fetched bygowithGOPROXY=direct. So the module needs noGOPRIVATE,GONOSUMDBorGOFLAGS. CI'simagejob at this head rango mod downloaduncached in thegolang:1.27.3-trixieimage, which sets none of them.goitself fetch through the proxy. On the machine this review ran on, thegocommand's connections to proxy.golang.org, sum.golang.org and golang.org failed at once (connect: bad file descriptor), whatever the module, while curl, git and other Go programs reached those hosts andgoreached sarak.sh. So I asked the proxy and the checksum database with curl, and filled a module cache of my own withGOPROXY=direct, every module verified againstgo.sumbygo.go install ./cmd/rexcity toolwith aGOBINof my own installsrexcity(built from319a4b0, unmodified) andclaude-acp(sarak.sh/mikluko/claudeacpv0.4.0, with the hash ofgo.sum).claude-acp, run directly with--dangerously-skip-permissions --effort max --model claude-sonnet-5-5 --settings FILE, answersinitialize(agentInfoclaudeacp 0.4.0, protocol version 1), starts no claude, and exits 0 when its input ends. Upstream's v0.3.0, built from 9383817, prints its usage and exits 2 on the same arguments.session/newthe adapter started the stub namedclaudewith--model=claude-sonnet-5-5 --effort=max --permission-mode=bypassPermissions --allow-dangerously-skip-permissions --setting-sources=user,project,local --settings FILEamong its own, and failed the request when the stub exited. What a real claude then does with them, the hooks of--settingsand bypass mode, I did not see.--print,-p,--resume,--continue,--bare,--output-format,--session-id, a named option without its value, a first argument that is no option, and--.cmd/rexcity'ssh -c "exit 7"case holds it: with the arguments dropped, it fails.CI and the merge result
319a4b03is green: run 340 (go: both vets andgo test ./..., all ten packages ok;changelog: valid,due=false) and run 339 (image: built, and the smoke showsrexcity acp -hwith--andfollow).3f8631dhas the head's tree, and the commit onmainhas that tree. On it: the changelog check v1.6.0 with the action's arguments givesvalid=true,version=0.28.1,due=false, "0.28.1 is already tagged", so merging cuts no release;gofmt;go vetfor darwin/arm64 and linux/amd64;go test ./...whole on a Mac (inchart,cmdandinternal268 tests pass and the fourTestLive*skip);-raceonacpbox,rpp,stateandcmd/rexcity. No failure, and no process left behind.Follow-ups
New in this round:
--session-id. README line 201 says gc appends none of the optionsclaude-acprefuses. By gc's source at 6bd609f, which I read and did not run, that holds for a session the reconciler starts: it leaves--session-idand--resumeoff an ACP session's command (cmd/gc/session_lifecycle_parallel.go:1431). A session gc starts itself, in a city with no controller, gets--session-id <key>whenever its provider has asession_id_flag(internal/session/manager.go:1135), whichbase = "builtin:claude"inherits, and I found no check of the transport there.claude-acpv0.4.0 would refuse it with exit 2. Worth one start to confirm, and then a line in the README or a change in the fork.TestNudgeFromQueueLosesItsFrame(internal/rpp/peer_test.go:136, on main, not from this pull request) leavesRuntime.Mailunset, so it runs thegconPATH:gc mail inbox mayor --json. On a city's host that is the city's own gc. The harness should setMail.Standing from the earlier reviews, whose comments have them in full, the code being the same: control characters reach the pane as they are; the follower echoes typed keys, ends on Ctrl-C and ignores SIGTERM; an opening cut short can leave a pane nobody records; the log only grows; the image carries no
claude-acpand its smoke never runsrexcity acp --; a view's start time is compared as text that follows the time zone and the locale;nullor{}in a view file reads as a view with no pane; a failing run ofTestTheAdapterNeverOutlivesTheWrapperleaves its fake adapter behind.For the city
claude-acprefuses, that the hooks of<city>/.gc/settings.jsonrun, and that the session is inbypassPermissions.Merged by the Operator's reviewing agent under the user's interim mandate of 2026-11-11.