Subagents: task tool (explore on cheap model, general), child sessions, usage roll-up, stats
This commit is contained in:
1 parent
6b980591ed
commit
359a5058d7
14 files changed
+525
-2
No files matched your search
@@ -45,6 +45,7 @@ provider = "claude" # or "codex"
|
||||
# codex_model = "gpt-5.6-sol" # default: Codex's top-listed model
|
||||
# compact_at = 900000 # default: 90% of the model's context window
|
||||
max_tokens = 16384
|
||||
# explore_model = "claude-haiku-4-5" # model for read-only `task` subagents; default: cheapest tier of the provider
|
||||
# system_prompt = "..." # replaces built-in prompt; AGENTS.md still appended
|
||||
|
||||
[lsp]
|
||||
@@ -62,6 +63,10 @@ tests = "turn_end" # affected tests: turn_end | agent_end | off
|
||||
# install = ["brew", "install", "zls"] # offered by the lsp tool when `zls` is missing
|
||||
```
|
||||
|
||||
## Subagents
|
||||
|
||||
The model can call `task(prompt, kind)` to run a subagent with a fresh context and get back only its final answer (cut at 8 KB), so big searches don't fill the main context. `explore` (default) is read-only (`read`, `lsp`, `bash`) on the provider's cheapest model (`explore_model` in config); `general` has the parent's tools and model, and the lens runs on its edits. Up to 3 run in parallel, none can start another, a parent abort stops them. Their sessions are written to `<session>.sub/`; `hx stats` lists them and the footer token counts include them. A child starts with a cold prompt cache and costs tokens of its own: it saves *main-context* size, not total tokens.
|
||||
|
||||
## Skills
|
||||
|
||||
Skills are `<dir>/<name>/SKILL.md` files with `name:` / `description:` frontmatter. Only the name and
|
||||
@@ -159,6 +164,7 @@ One JSON object per line on stdout. `type` is one of:
|
||||
| `tool_call` | `id`, `name`, `args` |
|
||||
| `tool_result` | `id`, `name`, `args`, `content`, `is_error` (blocked calls: `is_error: true`, content `blocked: <reason>`) |
|
||||
| `info` | `text` |
|
||||
| `sub_usage` | `usage`: tokens spent by `task` subagents in the tools just run (already in the session total) |
|
||||
| `injected` | `texts`: hook reports added to the conversation at turn end (lens diagnostics, affected tests) |
|
||||
| `done` (last line) | `error` (null on success), `usage`, `session` |
|
||||
|
||||
|
||||
Reference in new issue
Block a user