Skip to content

fix(agent): pass --verbose to claude subprocess#17

Merged
rebelopsio merged 1 commit into
mainfrom
chore/vendor-sdk-add-verbose
May 13, 2026
Merged

fix(agent): pass --verbose to claude subprocess#17
rebelopsio merged 1 commit into
mainfrom
chore/vendor-sdk-add-verbose

Conversation

@rebelopsio
Copy link
Copy Markdown
Owner

Summary

Recent versions of the claude CLI reject the SDK's invocation with:

Error: When using --print, --output-format=stream-json requires --verbose

This caused every archy daily run to silently complete with turns=0, zero cost, zero tool calls, empty text — exactly the symptom the diagnostic infrastructure from PRs #15 and #16 surfaced.

Fix: The partio-io SDK already exposes claude.WithVerbose(v bool) Option. Hardcode it to true in buildOptions. archy always wants this and it has no user-visible effect — the SDK's drain goroutine consumes stderr via our WithStderrCallback, so --verbose's extra subprocess output doesn't bleed to the operator.

Deviation from the originating task

The task draft proposed vendoring the SDK in third_party/ and patching internal/process/args.go. I didn't vendor because the same effect is reachable from the consumer side via the SDK's existing WithVerbose option — one-line fix, no third-party maintenance burden, no replace directive to clean up later. The upstream issue (forcing --verbose when streaming inside BuildArgs) is still worth filing; that's a follow-up.

Test plan

  • go build ./...
  • go test -race ./... (14 packages green; option-count assertions updated 5→6, 6→7, 5→6)
  • go vet ./...
  • golangci-lint run (0 issues)
  • Manual: rebuild, ./archy daily --force — the agent run now produces actual output (file lands, or a new archy-side error surfaces — anything but the silent zero-turn exit)

Recent versions of the claude CLI reject the SDK's invocation with:

  Error: When using --print, --output-format=stream-json requires --verbose

The partio-io SDK already exposes the toggle via claude.WithVerbose;
no vendor or upstream patch needed. Hardcode it to true in
buildOptions — archy always wants this and it has no user-visible
effect since stdout/stderr aren't surfaced to the operator (the
SDK's drain goroutine consumes stderr via our WithStderrCallback).

Diagnosed via the SDK-invocation-summary + stderr-capture
infrastructure from the previous two PRs.
@rebelopsio rebelopsio merged commit b127f5c into main May 13, 2026
6 checks passed
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