refuse allow with claude_cli instead of forcing the direct provider
This commit is contained in:
1 parent
2ff8abe7a3
commit
2751bcf27b
7 files changed
+60
-34
No files matched your search
+7
-5
@@ -39,12 +39,14 @@ hx has two ways to reach Claude. They differ in what orch can enforce:
|
||||
| mode | who runs the tools | `allow` | `max_turns` |
|
||||
|---|---|---|---|
|
||||
| `direct` (API provider) | hx | enforced (guard + stream check) | counts model turns |
|
||||
| `claude_cli` (hx starts the `claude` binary; auto-on when `claude` is in PATH and `HX_BASE_URL` is unset) | the `claude` binary; hx emits no `tool_call` events | cannot be enforced | meaningless: 1 hx request per run |
|
||||
| `claude_cli` (hx starts the `claude` binary; auto-on when `claude` is in PATH and `HX_BASE_URL` is unset) | the `claude` binary; hx emits no `tool_call` events and its permission bridge skips reads | cannot be enforced | meaningless: 1 hx request per run |
|
||||
|
||||
With `allow` set, orch writes `claude_cli = false` into the generated worktree `.hx/config.toml` (project config
|
||||
beats `~/.hx/config.toml`), so the run uses the direct provider and the allowlist holds. The direct Claude provider
|
||||
bills OAuth calls as extra usage; if that is not acceptable, profiles for `claude_cli` must go without `allow` and
|
||||
rely on `home`, the cleared environment and `sandbox = true`. orch warns for those (no allowlist).
|
||||
A profile with `allow` in `claude_cli` mode is **refused** before hx starts: the run ends `needs-human` with
|
||||
`policy: allow cannot be enforced ...`. orch never runs "guarded" without a guard and never switches providers
|
||||
silently (the direct Claude provider is not usable on every subscription). Options for such a profile:
|
||||
no `allow` plus `sandbox = true`, `home`, the cleared environment; or `claude_cli = false` in the profile's hx config
|
||||
if the direct provider works for you. Planned: make the claude_cli provider guardable in hx (permission bridge on
|
||||
the event bus, tool events), see the linked hx issue.
|
||||
|
||||
Telemetry records the mode (`provider_mode`: `claude_cli`, `direct`, `codex`; old lines `unknown`). `orch report`
|
||||
shows it as a column and `orch eval` refuses to compare files with different (or mixed) modes ("NOT COMPARABLE",
|
||||
|
||||
Reference in new issue
Block a user