11 Commits

Author SHA1 Message Date
Simone Margaritelli 7bb0a33c11 Merge pull request #3 from kjcsb1/fix/sdk-init-timeout-and-error-handling
fix: handle SDK client initialization timeout and improve error resilience
2026-05-29 16:16:51 +02:00
Simone Margaritelli 9f56565efa Merge pull request #4 from the-straw-hat-pirate/auth-macos-keychain-login
fix: auth support for macOS Keychain-backed Claude Code login
2026-05-29 16:16:14 +02:00
Anurag Mewar ce73ef8617 fix: auth support for macOS Keychain-backed Claude Code login 2026-05-29 18:58:23 +05:30
Cameron Beattie c82705481c fix: handle SDK client initialization timeout and improve error resilience
- Restructure ClaudeSDKClient async context to catch initialization
  timeouts as TransientAgentError instead of crashing the runner
- Add catch-all error handler in hunt stage so a single task failure
  doesn't abort the entire run
- Add repair_attempts: 2 to gapfill and feedback stages
- Fix priority field type in gapfill/feedback prompts (integer, not string)
2026-05-29 17:29:25 +12:00
Simone Margaritelli 215e44f78e Merge pull request #1 from MarkAtwood/allow-api-key
auth: add opt-in api_key mode via --allow-api-key
2026-05-23 13:29:28 +02:00
Mark Atwood 1d25b239d2 auth: add opt-in api_key mode via --allow-api-key
Adds a fourth auth mode (api_key) for users who want to bill against
their own Anthropic API account instead of through a Claude Code
subscription. The mode is opt-in to preserve the existing 'subscription
only' default — users who have ANTHROPIC_API_KEY set in their shell for
other tools won't accidentally be billed metered rates here.

Opt-in via either:
  --allow-api-key            (CLI flag on auth-check and run)
  AUDIT_ALLOW_API_KEY=1      (env var; useful for CI)

When opted in, the precedence matches the underlying SDK:
  gateway > api_key > oauth_token > keychain_login

ANTHROPIC_AUTH_TOKEN is scrubbed in api_key mode so a stale gateway
token can't outrank the API key (rung 2 > rung 3 in SDK precedence).

Default behavior is unchanged: with allow_api_key=False (or absent),
ANTHROPIC_API_KEY is scrubbed and one of the subscription modes wins,
exactly matching the original behavior.

Tests: 54/54 pass (4 new api_key-mode tests; existing tests updated to
explicitly assert the upstream default-scrub behavior they relied on).

Error message updated to mention --allow-api-key when the user has set
ANTHROPIC_API_KEY but no subscription auth, so the failure mode is
self-explanatory.
2026-05-21 09:19:03 -07:00
Simone Margaritelli 6dd18433d0 open auth 2026-05-19 14:01:51 +02:00
Simone Margaritelli 0f44307aee new: integrated stuff from my stuff 2026-05-19 13:32:01 +02:00
Simone Margaritelli 75d32c8ec7 fix: schema errors handling 2026-05-19 10:24:59 +02:00
Simone Margaritelli 80d746e4f7 things 2026-05-18 22:43:41 +02:00
Simone Margaritelli d03e6b0360 initial: 8-stage vulnerability discovery harness 2026-05-18 17:42:41 +02:00