Files
hx/docs/adr/0024-claude-cli-provider.md
johannesandClaude Sonnet 5.5 a94632ea3d chore: delete code comments, add ratchet lint and ADRs
Classify every comment as tautology, stale, excuse or decision record.
Tautology/stale/excuse comments are deleted (excuses filed as issues
#196-#236), decisions moved to docs/adr/0001-0034.

- scripts/lint-comments.sh + .comment-baseline: per-file comment count
  may only go down; wired into tests/all.sh
- .claude/skills/delete-comment: repeatable audit workflow
- cargo fmt applied to touched crates

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 13:37:32 +01:00

15 lines
801 B
Markdown

# Claude via the official claude CLI
Status: accepted
## Context
Anthropic bills OAuth traffic from third-party apps as extra usage, while the official binary keeps using the subscription. In plan mode, claude's `ExitPlanMode` is rejected unless it runs with `--permission-mode plan`. On newer models print mode defaults to omitted thinking (empty thinking text).
## Decision
Offer a provider that drives the real `claude -p --output-format stream-json`; claude runs its own agent loop and hx only displays the stream. When hx plan mode is on, pass `--permission-mode plan`. Pass the flag that restores thinking display.
## Consequences
Subscription billing is preserved. hx depends on claude's flags and stream format.
Code: crates/hx-ai/src/claude_cli.rs (module, plan-mode flag, command args)