diff --git a/docs/turn-loop/claude-invocation.md b/docs/turn-loop/claude-invocation.md index e37c24e3..681050d5 100644 --- a/docs/turn-loop/claude-invocation.md +++ b/docs/turn-loop/claude-invocation.md @@ -51,7 +51,7 @@ survives restart; override path: `HYPERHIVE_MODEL_FILE` env var for tests. Context-window size is looked up per-model via -`events::context_window_tokens(model)`. Resolution order (first +`harness_state::context_window_tokens(model)`. Resolution order (first match wins): 1. `HIVE_CONTEXT_WINDOW_TOKENS_` env var, where `KEY` @@ -129,7 +129,7 @@ window with two triggers baked into its `run`: The **when** is a `hive_claude::CompactionPolicy` injected by the harness: `turn::make_session` builds a `PercentPolicy` that compacts once the model-reported context fill reaches `HIVE_COMPACT_WATERMARK_PERCENT` -(default **75%**), falling back to `events::context_window_tokens(model)` +(default **75%**), falling back to `harness_state::context_window_tokens(model)` for the window on turns the model didn't report one. `0` disables proactive compaction (the reactive path always applies). The proactive path is best-effort — a failed checkpoint or `/compact` never fails the turn that @@ -195,8 +195,11 @@ next turn picks it up like any other inbox message. ## On-boot files -`hive-agent`'s `turn` module writes two files next to the per-agent -socket at `/run/hive/` once at startup: +`hive-agent`'s `turn` module writes two files into its own per-service +runtime dir, `/run/hive-config/` (`RuntimeDirectory = "hive-config"`, +deliberately separate from `/run/hive/`, the host-owned dir holding the +per-agent socket — so the harness owns this write surface and nothing +needs to `chown` a bind mount), once at startup: - `claude-mcp-config.json` — points claude at the persistent `hive-mcp-http` daemon (`http://127.0.0.1:{port}/mcp`, port from