Vectrum
Sign In

README: document borrowing the Claude Code login

Leads with the no-setup case, and says plainly why the credential is
never sent to a non-default endpoint and what its terms are.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Jjonicommitted 1 parent 69c3027commitc7c2c1f

Showing 1 changed file with 22 additions and 2 deletions.

+22−2README.mdView File
@@ -9,13 +9,20 @@ The code is the byproduct. The deliverable is [METRICS.md](METRICS.md).
99 ## Quick start
1010
1111 ```bash
12- export ANTHROPIC_API_KEY=sk-ant-...
1312 go build -o harness ./cmd/harness
1413
1514 ./harness -C /path/to/a/throwaway/clone # full-screen TUI
1615 ./harness -C /path/to/repo -p "why does TestFoo fail?" # one prompt
1716 ```
1817
18+ If you are logged into Claude Code, that is all the setup there is: the harness
19+ borrows the OAuth credential from `~/.claude/.credentials.json` when nothing
20+ else supplied one. Otherwise, or to use a different account:
21+
22+ ```bash
23+ export ANTHROPIC_API_KEY=sk-ant-...
24+ ```
25+
1926 A different endpoint — a gateway, a proxy, a local server speaking the Messages
2027 API:
2128
@@ -29,8 +36,21 @@ which is what OAuth tokens and most gateways want; `-api-key` sends
2936 `x-api-key`. A non-default endpoint announces itself on stderr, because your
3037 prompt and every file the agent reads go wherever that URL points.
3138
39+ The Claude Code login is the last resort, tried only when no flag and no
40+ environment variable supplied a credential, and only against Anthropic's own
41+ endpoint — a credential found on disk is not one you chose to send, so it is
42+ never forwarded to a `-base-url` you pointed the harness at. `-no-claude-code-auth`
43+ skips it entirely. Note that the credential is issued to Claude Code; using it
44+ from another client is outside Anthropic's terms for it, which API keys and
45+ gateway tokens do not carry.
46+
47+ On macOS Claude Code keeps this in the Keychain rather than a file, so there is
48+ nothing to borrow there. An expired access token is not refreshed — run `claude`
49+ and the harness picks up the new one.
50+
3251 Useful flags: `-model`, `-effort low|medium|high|xhigh|max`, `-max-turns`,
33- `-resume latest`, `-no-stream`, `-no-cache`, `-v`, `-yolo`, `-no-tui`, `-no-skills`.
52+ `-resume latest`, `-no-stream`, `-no-cache`, `-v`, `-yolo`, `-no-tui`, `-no-skills`,
53+ `-no-claude-code-auth`.
3454
3555 ## The TUI
3656