Found in the last review of #1: a stale description, override log lines without a session, options not refused #8

Merged
city-root merged 2 commits from worker/claudeacp-04j into main 2026-11-12 13:20:47 +00:00
Contributor

Fixes the findings of claudeacp-04j that live in the code.

  • Item 2, log lines: a session's _meta override lines (model, permission mode, settings, an option not applied, CLAUDE_CONFIG_DIR left out) now carry the session's folder as cwd. TestClaudeArgsOverrideIsLogged checks it.
  • Item 3, options not refused: claudeagent.CheckArgs (and so claudeacp, exit 2) now refuses --bg/--background, --cloud, --environment, --desktop, --remote-control and --remote-control-session-name-prefix, which run the session elsewhere than as the agent's child. I took the list from claude --help (2.1.322). --verbose stays accepted: the package sets it itself, so a second one changes nothing. A subcommand after a flag (--verbose mcp list), --sdk-url, --teleport and --worktree are claudeacp-hlp's item 3 and are left to that pull request.
  • Changelog entries for both under Unreleased; rebase if the other pull request merges first.

Not done:

  • Item 1 (the description of merged #1 is stale): gc forgejo pr has no edit command and I did not look for a forge token. The description still needs editing by hand.
  • Item 4 (whether another gc start path appends --session-id or --resume on ACP): gc is not in this repository, and I did not trace it. claudeacp refuses both either way.

Checked: go vet, golangci-lint run, go test ./... all clean.

Bead: claudeacp-04j

Fixes the findings of claudeacp-04j that live in the code. - **Item 2, log lines:** a session's `_meta` override lines (model, permission mode, settings, an option not applied, `CLAUDE_CONFIG_DIR` left out) now carry the session's folder as `cwd`. `TestClaudeArgsOverrideIsLogged` checks it. - **Item 3, options not refused:** `claudeagent.CheckArgs` (and so `claudeacp`, exit 2) now refuses `--bg`/`--background`, `--cloud`, `--environment`, `--desktop`, `--remote-control` and `--remote-control-session-name-prefix`, which run the session elsewhere than as the agent's child. I took the list from `claude --help` (2.1.322). `--verbose` stays accepted: the package sets it itself, so a second one changes nothing. A subcommand after a flag (`--verbose mcp list`), `--sdk-url`, `--teleport` and `--worktree` are claudeacp-hlp's item 3 and are left to that pull request. - Changelog entries for both under Unreleased; rebase if the other pull request merges first. Not done: - **Item 1** (the description of merged #1 is stale): `gc forgejo pr` has no edit command and I did not look for a forge token. The description still needs editing by hand. - **Item 4** (whether another gc start path appends `--session-id` or `--resume` on ACP): gc is not in this repository, and I did not trace it. `claudeacp` refuses both either way. Checked: `go vet`, `golangci-lint run`, `go test ./...` all clean. Bead: claudeacp-04j
Name the session in override log lines, refuse the options that run claude elsewhere (claudeacp-04j)
All checks were successful
CI / Changelog (pull_request) Successful in 7s
CI / Lint (pull_request) Successful in 32s
CI / Test (pull_request) Successful in 36s
e79e3e39b1
Two findings of the last review of #1.

The log lines for a session's _meta options (model, permission mode and
settings replacing the command line's, an option the agent does not apply,
a CLAUDE_CONFIG_DIR left out) named no session, so an operator could not
tie one to a session. Each now carries the session's folder as cwd.

CheckArgs refused the options that change how the agent runs claude, but
not those that run the session somewhere other than as the agent's child:
--bg and --background, --cloud, --environment, --desktop, --remote-control
and its session-name prefix. They are refused now, with exit code 2 from
the program. --verbose, which the package sets itself, stays accepted: it
changes nothing. A subcommand after a flag ("--verbose mcp list"), --sdk-url,
--teleport and --worktree are claudeacp-hlp's, and are left to it.

Validation: go vet, golangci-lint, go test ./... ; tests for each new flag
in claudeagent.CheckArgs and claudeacp's parser, and for cwd in the log.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
city-root-review requested changes 2026-11-12 13:11:19 +00:00
Dismissed
city-root-review left a comment

Review of e79e3e39b1 for claudeacp-04j. Checks of the head: success (they ran before #7 merged).

Verdict

fail

Findings

  • [blocking] The branch does not merge into main: rebase it onto main at 1a8db38 (#7, which merged after this branch was cut from 0b021a3). Merging the head into origin/main conflicts in claudeagent/options.go (the refusedFlags map, where #7 added --sdk-url, --teleport, --worktree/-w and the new booleanFlags/oneValueFlags maps, and the CheckArgs doc comment, which #7 rewrote) and in claudeagent/options_test.go (the TestCheckArgs cases next to #7's). The forge also reports the pull request not_mergeable. When you resolve it, keep both sets of refused flags and merge the two doc comments into one. --bg, --background and --desktop are already in #7's booleanFlags, and --environment and --remote-control-session-name-prefix in its oneValueFlags. Those entries do no harm once the flags are refused, but say whether you keep them. CHANGELOG.md merges cleanly. Its two new lines stay under [Unreleased] / ### Changed.
  • [blocking] README.md, "Claude's options", the Refused list: it lists every option claudeacp refuses, with the reason for each, and #7 extended it for --sdk-url, --teleport and --worktree. This pull request refuses six more options (--bg/--background, --cloud, --environment, --desktop, --remote-control, --remote-control-session-name-prefix), but the README does not list them, so after the merge the list is incomplete. Add them with their reason: they run the session somewhere other than as the agent's child.
  • [minor] CHANGELOG.md:14: a blank line now separates the two new entries from the existing entries of ### Changed, which makes the section a loose list. Remove the blank line during the rebase.
  • [minor] claudeacp/cliargs_test.go:245-250: the new check only looks at lines that contain "replace", and only for the text cwd=. Two cases pass that should not: an empty cwd="", and the other two lines this change touched ("a session option the agent doesn't apply" and the CLAUDE_CONFIG_DIR warning). Checking for cwd= followed by the session's folder, and adding an unknown _meta option to the first case, would cover them.

Verified

  • Read the work bead claudeacp-04j (items 1-4 and the Operator's note), the pull request's description, and the full diff (6 files, +39/-7). Item 2 (log lines) and item 3 (refused options) are done in code. The description says why items 1 and 4 are not, and both of those are outside this repository. The --verbose mcp list case was left to claudeacp-hlp and was then fixed on main by #7.
  • o.Cwd is set from su.cwd and checked to be absolute in (*agent).options before applyOptions runs, so every new cwd attribute names the session's folder.
  • In CheckArgs, the name is cut at =, so --cloud=a task and --remote-control-session-name-prefix=box are refused. --background-x is still accepted.
  • Merged the head into origin/main (1a8db38) in a clean clone: conflicts in claudeagent/options.go and claudeagent/options_test.go.
  • On the head, with the city's variables removed: go build ./..., go vet ./..., go test -race -shuffle=on ./... (all packages ok), and golangci-lint v2.15.0 run ./... (0 issues). I could not run the tests on the merge result because it does not merge.
Review of e79e3e39b172af3e242cbee708af9a5caa788ef3 for claudeacp-04j. Checks of the head: success (they ran before #7 merged). ### Verdict fail ### Findings - [blocking] The branch does not merge into main: rebase it onto main at 1a8db38 (#7, which merged after this branch was cut from 0b021a3). Merging the head into origin/main conflicts in `claudeagent/options.go` (the `refusedFlags` map, where #7 added `--sdk-url`, `--teleport`, `--worktree`/`-w` and the new `booleanFlags`/`oneValueFlags` maps, and the `CheckArgs` doc comment, which #7 rewrote) and in `claudeagent/options_test.go` (the `TestCheckArgs` cases next to #7's). The forge also reports the pull request `not_mergeable`. When you resolve it, keep both sets of refused flags and merge the two doc comments into one. `--bg`, `--background` and `--desktop` are already in #7's `booleanFlags`, and `--environment` and `--remote-control-session-name-prefix` in its `oneValueFlags`. Those entries do no harm once the flags are refused, but say whether you keep them. `CHANGELOG.md` merges cleanly. Its two new lines stay under `[Unreleased]` / `### Changed`. - [blocking] README.md, "Claude's options", the **Refused** list: it lists every option `claudeacp` refuses, with the reason for each, and #7 extended it for `--sdk-url`, `--teleport` and `--worktree`. This pull request refuses six more options (`--bg`/`--background`, `--cloud`, `--environment`, `--desktop`, `--remote-control`, `--remote-control-session-name-prefix`), but the README does not list them, so after the merge the list is incomplete. Add them with their reason: they run the session somewhere other than as the agent's child. - [minor] CHANGELOG.md:14: a blank line now separates the two new entries from the existing entries of `### Changed`, which makes the section a loose list. Remove the blank line during the rebase. - [minor] claudeacp/cliargs_test.go:245-250: the new check only looks at lines that contain "replace", and only for the text `cwd=`. Two cases pass that should not: an empty `cwd=""`, and the other two lines this change touched ("a session option the agent doesn't apply" and the `CLAUDE_CONFIG_DIR` warning). Checking for `cwd=` followed by the session's folder, and adding an unknown `_meta` option to the first case, would cover them. ### Verified - Read the work bead claudeacp-04j (items 1-4 and the Operator's note), the pull request's description, and the full diff (6 files, +39/-7). Item 2 (log lines) and item 3 (refused options) are done in code. The description says why items 1 and 4 are not, and both of those are outside this repository. The `--verbose mcp list` case was left to claudeacp-hlp and was then fixed on main by #7. - `o.Cwd` is set from `su.cwd` and checked to be absolute in `(*agent).options` before `applyOptions` runs, so every new `cwd` attribute names the session's folder. - In `CheckArgs`, the name is cut at `=`, so `--cloud=a task` and `--remote-control-session-name-prefix=box` are refused. `--background-x` is still accepted. - Merged the head into origin/main (1a8db38) in a clean clone: conflicts in `claudeagent/options.go` and `claudeagent/options_test.go`. - On the head, with the city's variables removed: `go build ./...`, `go vet ./...`, `go test -race -shuffle=on ./...` (all packages ok), and `golangci-lint` v2.15.0 `run ./...` (0 issues). I could not run the tests on the merge result because it does not merge.
mikluko force-pushed worker/claudeacp-04j from e79e3e39b1
All checks were successful
CI / Changelog (pull_request) Successful in 7s
CI / Lint (pull_request) Successful in 32s
CI / Test (pull_request) Successful in 36s
to c09ec85b8e
All checks were successful
CI / Changelog (pull_request) Successful in 4s
CI / Lint (pull_request) Successful in 32s
CI / Test (pull_request) Successful in 35s
2026-11-12 13:14:27 +00:00
Compare
city-root-review left a comment

Review of c09ec85b8e for claudeacp-04j. Checks of the head: success.

Verdict

pass

Findings

  • [minor] The pull request's description is out of date after the rework. It says nothing of the README change. It still says --verbose mcp list, --sdk-url, --teleport and --worktree are "left to that pull request", but #7 has merged them. It does not answer round 1's question about the entries for --bg, --background, --desktop, --environment and --remote-control-session-name-prefix that stay in booleanFlags/oneValueFlags (claudeagent/options.go:276-297). They do no harm, because refusedFlags is checked first. Nothing of the description reaches main, so this does not block.
  • [minor] claudeacp/cliargs_test.go:257: strings.Contains(line, "cwd="+dir) would also accept a cwd that only begins with the session's folder (<dir>/sub). Matching "cwd="+dir+" " would close that gap. It is cosmetic, because o.Cwd comes straight from the session.
  • Not in this repository, as the description says: item 1 (edit the description of merged #1 on the forge) and item 4 (tracing gc's other start paths) are still open for the Operator.

Verified

  • Read the work bead claudeacp-04j with its round-1 note, the pull request's description, round 1's review (id 224, of e79e3e3), and the whole diff (7 files, +51/-14). There is no REVIEW.md, AGENTS.md or CLAUDE.md on main. The README was read from main.
  • Round 1's findings are all fixed:
    • The branch is rebased onto main at 1a8db38, and the head fast-forwards it. #7's refused flags and the six new ones are both kept in refusedFlags, and the two CheckArgs doc comments are merged into one.
    • The README's Refused list names --bg/--background, --cloud, --environment, --desktop, --remote-control and --remote-control-session-name-prefix, with their reason.
    • CHANGELOG.md has no stray blank line: the two entries open [Unreleased] / ### Changed as a tight list.
    • The log test now covers the unknown-option line and the CLAUDE_CONFIG_DIR warning, and checks for the session's own folder.
  • Mutation check in my clone: with cwd taken off the CLAUDE_CONFIG_DIR warning, TestClaudeArgsOverrideIsLogged fails. With cwd="" on the unknown-option line, it fails too.
  • On the merge result (a fast-forward of main to the head), with the city's variables removed:
    • go build ./..., go vet ./... and go test -race -shuffle=on -count=1 ./...: all packages ok.
    • golangci-lint v2.15.0 run ./...: 0 issues.
    • govulncheck v1.9.0: no vulnerabilities.
    • The changelog check (mikluko/changelog v1.6.0, built from its tagged source): valid=true.
Review of c09ec85b8e73560bfa8017480ad350ff55a270f4 for claudeacp-04j. Checks of the head: success. ### Verdict pass ### Findings - [minor] The pull request's description is out of date after the rework. It says nothing of the README change. It still says `--verbose mcp list`, `--sdk-url`, `--teleport` and `--worktree` are "left to that pull request", but #7 has merged them. It does not answer round 1's question about the entries for `--bg`, `--background`, `--desktop`, `--environment` and `--remote-control-session-name-prefix` that stay in `booleanFlags`/`oneValueFlags` (claudeagent/options.go:276-297). They do no harm, because `refusedFlags` is checked first. Nothing of the description reaches main, so this does not block. - [minor] claudeacp/cliargs_test.go:257: `strings.Contains(line, "cwd="+dir)` would also accept a `cwd` that only begins with the session's folder (`<dir>/sub`). Matching `"cwd="+dir+" "` would close that gap. It is cosmetic, because `o.Cwd` comes straight from the session. - Not in this repository, as the description says: item 1 (edit the description of merged #1 on the forge) and item 4 (tracing gc's other start paths) are still open for the Operator. ### Verified - Read the work bead claudeacp-04j with its round-1 note, the pull request's description, round 1's review (id 224, of e79e3e3), and the whole diff (7 files, +51/-14). There is no REVIEW.md, AGENTS.md or CLAUDE.md on main. The README was read from main. - Round 1's findings are all fixed: - The branch is rebased onto main at 1a8db38, and the head fast-forwards it. #7's refused flags and the six new ones are both kept in `refusedFlags`, and the two `CheckArgs` doc comments are merged into one. - The README's **Refused** list names `--bg`/`--background`, `--cloud`, `--environment`, `--desktop`, `--remote-control` and `--remote-control-session-name-prefix`, with their reason. - CHANGELOG.md has no stray blank line: the two entries open `[Unreleased]` / `### Changed` as a tight list. - The log test now covers the unknown-option line and the `CLAUDE_CONFIG_DIR` warning, and checks for the session's own folder. - Mutation check in my clone: with `cwd` taken off the `CLAUDE_CONFIG_DIR` warning, `TestClaudeArgsOverrideIsLogged` fails. With `cwd=""` on the unknown-option line, it fails too. - On the merge result (a fast-forward of main to the head), with the city's variables removed: - `go build ./...`, `go vet ./...` and `go test -race -shuffle=on -count=1 ./...`: all packages ok. - golangci-lint v2.15.0 `run ./...`: 0 issues. - govulncheck v1.9.0: no vulnerabilities. - The changelog check (mikluko/changelog v1.6.0, built from its tagged source): valid=true.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/claudeacp!8
No description provided.