@markusylisiurunen/tau 0.3.102 → 0.3.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +18 -23
  2. package/dist/core/history/migrations.js +40 -0
  3. package/dist/core/history/migrations.js.map +1 -1
  4. package/dist/core/history/setup.js +24 -7
  5. package/dist/core/history/setup.js.map +1 -1
  6. package/dist/core/mcp/cli.js +1 -1
  7. package/dist/core/mcp/cli.js.map +1 -1
  8. package/dist/core/static/tau_docs/client-tools.md +46 -385
  9. package/dist/core/static/tau_docs/code-mode.md +104 -43
  10. package/dist/core/static/tau_docs/configuration.md +77 -171
  11. package/dist/core/static/tau_docs/getting-started.md +25 -96
  12. package/dist/core/static/tau_docs/history.md +30 -228
  13. package/dist/core/static/tau_docs/how-tau-works.md +53 -0
  14. package/dist/core/static/tau_docs/image-generation.md +15 -107
  15. package/dist/core/static/tau_docs/index.md +46 -46
  16. package/dist/core/static/tau_docs/instructions-and-skills.md +81 -0
  17. package/dist/core/static/tau_docs/manifest.json +15 -21
  18. package/dist/core/static/tau_docs/mcp.md +77 -0
  19. package/dist/core/static/tau_docs/models-and-credentials.md +67 -0
  20. package/dist/core/static/tau_docs/openrouter.md +31 -129
  21. package/dist/core/static/tau_docs/pdf-unpacking.md +8 -21
  22. package/dist/core/static/tau_docs/personas.md +48 -144
  23. package/dist/core/static/tau_docs/remote-sessions.md +33 -170
  24. package/dist/core/static/tau_docs/sdk.md +150 -0
  25. package/dist/core/static/tau_docs/security.md +6 -193
  26. package/dist/core/static/tau_docs/session-protocol.md +84 -246
  27. package/dist/core/static/tau_docs/sessions.md +41 -205
  28. package/dist/core/static/tau_docs/speech-generation.md +16 -129
  29. package/dist/core/static/tau_docs/subagents.md +57 -229
  30. package/dist/core/static/tau_docs/telegram.md +152 -192
  31. package/dist/core/static/tau_docs/tools.md +44 -167
  32. package/dist/core/static/tau_docs/troubleshooting.md +23 -217
  33. package/dist/core/static/tau_docs/tui.md +42 -282
  34. package/dist/core/version.js +1 -1
  35. package/dist/history/worker/index.js +16 -22
  36. package/dist/history/worker/index.js.map +1 -1
  37. package/dist/history/worker/migrations/0005_external_content.sql +58 -0
  38. package/dist/history/worker/migrations/0006_external_content_cutover.sql +44 -0
  39. package/package.json +2 -2
  40. package/dist/core/static/tau_docs/config-reference.md +0 -367
  41. package/dist/core/static/tau_docs/credentials.md +0 -165
  42. package/dist/core/static/tau_docs/models.md +0 -57
  43. package/dist/core/static/tau_docs/node-sdk.md +0 -430
  44. package/dist/core/static/tau_docs/ownership-and-scope.md +0 -107
  45. package/dist/core/static/tau_docs/prompts-and-project-context.md +0 -147
  46. package/dist/core/static/tau_docs/sdk-diff-review.md +0 -92
  47. package/dist/core/static/tau_docs/session-protocol-methods.md +0 -655
  48. package/dist/core/static/tau_docs/skills.md +0 -135
  49. package/dist/core/static/tau_docs/telegram-commands.md +0 -55
  50. package/dist/core/static/tau_docs/telegram-projects.md +0 -197
@@ -1,18 +1,20 @@
1
1
  # Subagents
2
2
 
3
- Subagents are background agents that the host supervises. The main agent can start them, and a native Tau subagent can start its own. They help when part of the work can run independently or benefits from a separate context. A subagent belongs to the session it runs in. It has no saved session of its own and no persona file.
3
+ Subagents are background workers that the host supervises. Each has its own task and conversation, and several can run at once. There are no named worker types.
4
4
 
5
- ## Background workers
5
+ An agent starts subagents only when you or active instructions ask for delegation, in ordinary language. Tau checks that a launch is valid, but the agent itself decides whether delegation was requested.
6
6
 
7
- Subagents are general-purpose workers. There are no named types. Several can run at once, each with its own task and conversation.
7
+ ## Turning them on and off
8
8
 
9
- A native Tau subagent works like a main agent of the active persona in the subagent's working directory. Its system prompt is the one a main agent would get there, with the same persona prompt, skills, project instructions, and environment context. Tau adds a short section in front that explains the subagent's role: work headless on its assignment, wait for work its answer depends on, delegate only when it can and is asked to, leave contact with the user to its parent, and return a self-contained result. The section also lists the session IDs from the main agent down to the subagent. This section cannot be configured. Put task-specific instructions in the launch prompt.
9
+ The `agents` tool enables subagents, and built-in personas have it. A persona with a `tools` list that lacks `agents` cannot start or manage them, and there is no other switch. See [personas](personas.md).
10
10
 
11
- Whether the agents in a session can start subagents depends on the main persona's tool list. The `agents` tool name enables `tau.agents` in the `code` tool and the `wait_for_agents` tool. Built-in personas, and custom personas that omit `tools`, include it. A custom persona with a `tools` list that lacks `agents` cannot start or manage subagents, and neither can anything below it. There is no other setting to turn subagents on or off. See [personas](personas.md).
11
+ ## What a subagent gets
12
12
 
13
- ## Levels and access
13
+ A native subagent works like a main agent of the same persona in its working directory, with the same prompt, skills, and project instructions. It sees none of the parent's conversation, so the launch prompt must contain what it needs.
14
14
 
15
- Each subagent records its parent and its depth below the main agent, which has depth 0. Depth 2 is the deepest level:
15
+ It inherits its parent's model, settings, and tools, and it has `tau_docs`. It never gets client tools. With another `workingDirectory`, it uses the `AGENTS.md` files and skills of that directory.
16
+
17
+ ## Levels and limits
16
18
 
17
19
  ```text
18
20
  main
@@ -22,260 +24,86 @@ main
22
24
  └── D (depth 1)
23
25
  ```
24
26
 
25
- The main agent and native Tau subagents at depth 1 can start subagents of either kind. Depth 2 subagents and [Claude Code subagents](#claude-code-subagents) cannot.
26
-
27
- An agent can reach only its descendants. In the example, the main agent manages all four subagents, A manages B and C, and D manages none. This applies to every `tau.agents` method and to `wait_for_agents`, and any other ID fails with `unknown_agent`. `spawn` always makes the caller the parent.
28
-
29
- ## Trigger sensitivity
30
-
31
- An agent starts subagents only when the user or active instructions explicitly ask for delegation. For a subagent, this includes its assignment. Having `agents` does not by itself give it permission. Ask in ordinary language; no special tag is needed.
32
-
33
- The agent follows this rule itself. Tau checks that a launch is valid, but it does not judge whether the request asked for delegation.
34
-
35
- ## Tools
36
-
37
- A native Tau subagent can receive these tools. [Claude Code subagents](#claude-code-subagents) use the corresponding Claude Code tools instead:
27
+ The main agent and depth 1 native subagents can start subagents. An agent can manage only its own descendants, so here A manages B and C, and D manages none.
38
28
 
39
- - `bash`
40
- - `write`
41
- - `edit`
42
- - `view_image`
43
- - `web`
44
- - `history`
45
- - `mcp`, when the session has enabled MCP servers
46
- - `models`
47
- - `agents`, at depth 1 only
29
+ At most 16 subagents can work at once in a session. A launch beyond that fails right away. A parent waiting for its children counts as working.
48
30
 
49
- A subagent gets each of these that its parent also has. For example, a main persona with `bash`, `edit`, `history`, and `agents` gives depth 1 subagents all four, and gives depth 2 subagents `bash`, `edit`, and `history`. Names such as `web` and `history` enable the matching capability in the subagent's `code` tool. MCP uses the parent session's servers and connections, whatever the subagent's working directory. There is no separate tool list for subagents.
31
+ ## Choosing a model
50
32
 
51
- Every native Tau subagent also gets the built-in `tau_docs` tool, and a persona's `tools` list cannot remove it.
52
-
53
- Subagents also never get [client tools](client-tools.md), such as the TUI's tools or a Telegram runner's file delivery tools. Only the main agent uses tools that attached clients offer. See [tools](tools.md) for how tool availability works in general.
54
-
55
- ## Models and settings
56
-
57
- By default, a new subagent uses its parent's model and all of its parent's settings, including reasoning and service tier. For a subagent of the main agent, these come from the active persona. A child of a subagent launched with a model override inherits that override. These are fixed when the subagent starts. Later persona or reasoning changes do not affect it.
58
-
59
- A model override uses this exact form:
60
-
61
- ```text
62
- <provider>/<model>:<effort>
63
- ```
64
-
65
- The provider is lowercased. The model ID is kept exactly as written and is case-sensitive. Effort is one of `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`.
66
-
67
- The configured list of launch models is an allowlist. It does not choose a default. An agent should normally omit the `model` option of `tau.agents.spawn`, and the subagent then uses its parent's model and reasoning. When `model` is given, it must exactly match an allowlist entry after normalization. For native Tau subagents, the override changes the provider, model, and reasoning, and keeps the other settings.
68
-
69
- A model ID may be missing from the catalog if its provider is known (see [models](models.md)). An entry with an invalid provider, model, effort, or format makes the configuration field invalid. Duplicate entries are removed.
70
-
71
- ### Automatic compaction
72
-
73
- These rules apply to native Tau subagents. [Claude Code subagents](#claude-code-subagents) manage their own compaction.
74
-
75
- When `model` is omitted, a subagent inherits the effective threshold of the parent's launching turn, including any session `/auto-compact` override. A setting change during that turn affects only later turns and their launches.
76
-
77
- When `model` is specified, the threshold comes from the persona's `subagentAutoCompactThresholdTokens` entry for that `<provider>/<model>`, without reasoning effort. The provider matches in any case, and the model ID must match exactly. If there is no entry, it uses the selected model's context window minus 16,384 tokens. This applies even when the explicit model matches the parent.
78
-
79
- All thresholds are capped at the selected model's context window minus 16,384 tokens. Each child measures its own usage and keeps its launch threshold for follow-ups. See [personas](personas.md) for a configuration example.
80
-
81
- ### Allowing model overrides
82
-
83
- Configure the allowlist with `subagents.launchModels` in `config.json`:
33
+ By default, a subagent uses its parent's model and reasoning. An agent can choose another model only from an allowlist, which you set in `config.json`:
84
34
 
85
35
  ```json
86
36
  {
87
37
  "subagents": {
88
38
  "launchModels": [
89
- "anthropic/claude-haiku-4-5:low",
90
- "openai/gpt-6.1-sol:high"
39
+ "openai/gpt-6-luna:medium",
40
+ "anthropic/claude-haiku-4-5:low"
91
41
  ]
92
42
  }
93
43
  }
94
44
  ```
95
45
 
96
- The nearest `launchModels` list replaces broader ones; lists are not combined. The resulting list applies to every persona that has `agents`.
97
-
98
- ## Claude Code subagents
46
+ The nearest list replaces broader ones. Each entry is an exact `<provider>/<model>:<effort>` combination. Agents omit the model unless you or active instructions ask for one.
99
47
 
100
- The `claude-code` launch provider runs Claude Code through Anthropic's Agent SDK. Agents manage these workers with the same `tau.agents` methods and `wait_for_agents` tool as native Tau subagents. Claude Code models are available only as explicit subagent launch overrides.
48
+ A subagent without an override uses its parent's compaction threshold. With an override, it uses the persona's `subagentAutoCompactThresholdTokens` entry for that model, or the model's default.
101
49
 
102
- Install Claude Code on the session's execution environment, put `claude` on its login-shell `PATH`, and sign in there with a Claude subscription. A login on the host or attached laptop does not reach a separate execution environment. Tau includes Agent SDK 0.3.312, so no separate SDK installation is needed.
50
+ ## Managing subagents
103
51
 
104
- Add the desired model/effort combinations to the launch allowlist:
52
+ Agents use `tau.agents` inside [`code`](code-mode.md), and the `wait_for_agents` tool. They read the full reference with `await tau.docs("agents")`.
105
53
 
106
- ```json
107
- {
108
- "subagents": {
109
- "launchModels": [
110
- "claude-code/claude-opus-5-5:medium",
111
- "claude-code/claude-sonnet-5-5:medium",
112
- "claude-code/claude-haiku-5-5:low"
113
- ]
114
- }
115
- }
54
+ ```js
55
+ const { id } = await tau.agents.spawn({
56
+ title: "review authentication",
57
+ prompt:
58
+ "Review the session expiry checks in src/auth and report any problems.",
59
+ });
116
60
  ```
117
61
 
118
- These are the three supported model IDs. Effort may be `low`, `medium`, `high`, `xhigh`, or `max`. Each permitted combination needs its own allowlist entry. Model availability also depends on the Claude account and installed Claude Code version. If Claude Code rejects a model, Tau reports the failure.
119
-
120
- Claude Code manages its conversation, retries, and compaction. Each run allows up to 1,024 agentic turns. Tau passes the selected model, effort, working directory, and task. Other Tau model settings, such as service tier, do not apply. Follow-ups resume the same Claude session.
121
-
122
- The worker uses Claude Code's native system prompt with a short addition: complete the task autonomously, treat later messages as coming from the parent agent, preserve other agents' work, and return a self-contained result. It cannot ask the parent or user for clarification. Tau does not copy the parent conversation, persona prompt, project instructions, or skill descriptions. The worker is instructed to follow applicable project instructions itself.
123
-
124
- Claude Code loads its user, project, and local settings and discovers its own instructions and skills. The `Skill` tool is always available. Other native tools follow the parent persona's selection:
125
-
126
- | Inherited Tau tool | Claude Code tools |
127
- | ------------------ | ---------------------- |
128
- | `bash` | Bash, Read, Glob, Grep |
129
- | `view_image` | Read, Glob, Grep |
130
- | `write` | Write |
131
- | `edit` | Edit |
132
- | `web` | WebSearch, WebFetch |
133
-
134
- Workers receive no Tau `code` capabilities, Tau MCP connections, `tau_docs`, or client tools, so they cannot start Tau subagents. Claude Code's own nested agents and interactive questions are disabled. Hooks and automatic memory are disabled too. Claude Code discovers its own MCP servers from its normal configuration sources, including project and user configuration on the execution environment. These connections are independent of the parent persona's `mcp` tool selection and of Tau's `mcpServers` setting. They run on the execution environment, so workers can use them even in a session on a remote execution environment, where Tau's own MCP is unavailable. Managed Claude Code policies still apply.
135
-
136
- Selected tools use `bypassPermissions`, with Claude Code's sandbox disabled. They run with the execution environment's operating-system authority, like Tau's tools. Review the local Claude settings, skills, and MCP configuration before enabling these workers.
137
-
138
- Tau displays short assistant updates and tool completion summaries. It also records the worker's assistant text, tool calls, and tool results in the worker's [trace](#conversation-traces), using Claude Code's own tool names, such as `Bash` and `Read`. Tau records SDK-reported token usage as it arrives, so interruption preserves counts already received. Final SDK totals supply cost estimates, so cost from an interrupted run remains unavailable until the SDK reports it.
139
-
140
- Before sending the task, Tau checks that the SDK reports a subscription login without API-key authentication. Claude Code keeps its own credentials. Tau removes API and cloud-provider routing overrides from the child environment and provides no API fallback. Fast mode is disabled. Account-level extra usage can still incur charges; disable it in Claude to use only the included subscription allowance. The SDK's dollar estimates do not report subscription charges.
141
-
142
- Steering messages go to Claude Code through the Agent SDK's streaming input while the worker is busy. Claude Code decides when to read them, typically between tool rounds, and a tool that is already running may continue. A steering message that Claude Code has not read when its turn ends is handled in another turn. Queued messages wait until Claude Code reports that its turn is finished.
143
-
144
- Claude workers share the [session-wide limit](#spawn) and the usual subagent lifetime. Interrupting a worker terminates its process group. A follow-up can resume its Claude session while the parent session remains alive. Host restart, session disposal, and rewind remove workers under the same rules as native Tau subagents. Claude's transcript files remain on disk, but Tau does not use them to restore workers after a restart.
145
-
146
- ## Working directory
147
-
148
- `tau.agents.spawn` normally runs the subagent in its parent's working directory. The optional `workingDirectory` may be absolute or relative to that directory. Tau resolves it to an absolute path on the execution environment, and the host and attached clients never resolve it against their own filesystems.
149
-
150
- For native Tau subagents, when that path differs from the parent's working directory, Tau rebuilds the subagent's context for the new directory. It detects the platform and repository there, reads the applicable `AGENTS.md` files, and discovers that directory's skills. The persona, model catalog, runtime configuration, credentials, and tool policy still come from the parent.
151
-
152
- A native Tau launch fails if Tau cannot build context for the directory. A path that resolves to the parent's working directory, such as `.`, reuses the parent's context. Claude Code workers load context themselves in the selected directory; an invalid directory fails when the worker starts.
153
-
154
- ## Managing subagents
155
-
156
- An agent manages its descendants with `tau.agents` inside the [`code` tool](code-mode.md), and waits for them with the `wait_for_agents` tool. Each subagent has an ID that the host generates, and one conversation that grows with each input.
157
-
158
62
  | Method | Purpose |
159
63
  | --- | --- |
160
64
  | `spawn({ title, prompt, model?, workingDirectory? })` | Start a subagent. |
161
- | `list()` | State of every descendant as a flat list, plus the number running in the session and the limit. |
162
- | `read({ id })` | State of one subagent. |
163
- | `sendInput({ id, message, mode })` | Queue or steer more input. |
164
- | `interrupt({ id, wait?, scope? })` | Stop the current turn and discard pending input, for one subagent or its whole branch. |
165
- | `waitUntilIdle({ id })` | Wait inside a program until the subagent is idle. |
166
- | `trace({ id, kinds?, toolName?, limit?, cursor? })` | Read a page of the subagent's conversation. |
167
- | `readText({ id, seq, maxChars? })` | Read the text of one assistant message or tool result. |
168
- | `readContent({ id, ref, cursor? })` | Page through large or non-text content. |
169
-
170
- The agent reads the complete reference, with types and examples, by printing `await tau.docs("agents")` in `code`. Only what a program prints reaches the calling agent's conversation, so the agent can select the part of a long trace it needs.
171
-
172
- ### Spawn
65
+ | `list()`, `read({ id })` | See state and usage. |
66
+ | `sendInput({ id, message, mode })` | Add input, with `mode` set to `queue` or `steer`. |
67
+ | `interrupt({ id, wait?, scope? })` | Stop a turn and drop pending input. `scope: "subtree"` includes descendants. |
68
+ | `waitUntilIdle({ id })` | Wait inside a program. |
69
+ | `trace({ id, ... })`, `readText(...)`, `readContent(...)` | Read what the subagent said and did. |
173
70
 
174
- `spawn` takes a single-line title of at most 512 characters, a prompt of at most 262,144 characters, an optional model, and an optional working directory. The prompt is the subagent's first message, and the subagent does not see the parent conversation, so the prompt should be self-contained. The call returns right away with the subagent's state, and the subagent keeps working in the background.
71
+ `wait_for_agents` returns as soon as one requested subagent is idle, with its last response. A `completed` status means the turn ended normally, so the parent still has to read the answer to know whether the task succeeded.
175
72
 
176
- When a native Tau subagent has `history`, it follows the same history rules as the main agent, and an assignment that asks about past conversations counts as an explicit request. It may also read its ancestors' transcripts, including the main agent's, which holds what the user said. Without being asked, it reads them only when missing context would stop the work or force an important assumption. These reads use `tau.history.read` with `source: "local"`, which reads the host's history and skips any remote collection. Local recording is best-effort, so the newest entries can be missing.
73
+ In the TUI, Alt+Down selects a running subagent and Ctrl+G interrupts it. Interrupting the main session does not interrupt subagents.
177
74
 
178
- At most 16 subagents can be working at once in one session, across both levels. A parent counts while its own turn is active, including when it is waiting for its children. Idle subagents and the main agent do not count. A launch that would exceed the limit fails right away and is not queued.
75
+ ## Lifetime
179
76
 
180
- ### State and waiting
77
+ Subagents belong to the running session on the host. They keep running when clients detach. They end when the host unloads the session, and none survive a host restart, so important results should reach the main agent or a file before that. Rewind removes subagents started by the removed messages, and it is refused while a subagent is running.
181
78
 
182
- A subagent's state has its ID, parent's ID, depth, title, model and reasoning, working directory, status, counts of pending queued and steering input, token usage, context size, and cost. The status is one of:
79
+ Running subagents keep their setup after `/reload`. Native subagents are recorded in [history](history.md) as child sessions.
183
80
 
184
- - `working`: the subagent is handling input.
185
- - `stopping`: an interrupt was requested and the turn has not ended yet.
186
- - `idle`: no turn is running and no input is pending. `reason` tells how the latest turn ended: `completed`, `interrupted`, or `failed`, with an error code and message for a failure.
81
+ ## Claude Code subagents
187
82
 
188
- `completed` means the turn ended normally. It does not mean the task succeeded, so the parent reads the subagent's answer before relying on it. Background Bash and code jobs that a subagent started do not keep it working.
83
+ The `claude-code` provider runs a Claude Code worker on your Claude subscription. Agents manage these workers with the same methods.
189
84
 
190
- `wait_for_agents` takes one or more IDs. It returns as soon as at least one of them is idle, with a text block for every requested subagent:
85
+ 1. Install Claude Code on the execution environment, with `claude` on its login-shell `PATH`.
86
+ 2. Sign in there with a Claude subscription. A login on another machine does not reach it.
87
+ 3. Add the combinations to allow:
191
88
 
89
+ ```json
90
+ {
91
+ "subagents": {
92
+ "launchModels": [
93
+ "claude-code/claude-opus-5-5:medium",
94
+ "claude-code/claude-sonnet-5-5:medium",
95
+ "claude-code/claude-haiku-5-5:low"
96
+ ]
97
+ }
98
+ }
192
99
  ```
193
- id: 0b6c2f1e-7d4a-4c1b-9a53-2e8f0d9c4b71
194
- title: "review authentication"
195
- status: idle
196
- reason: completed
197
- pending: queue=0 steer=0
198
- response_seq: 42
199
- response_complete: true
200
- response_partial: false
201
-
202
- --- response ---
203
- No problems found in the session expiry checks.
204
- ```
205
-
206
- A subagent that is still working or stopping gets only its ID, title, status, and pending counts. An idle subagent also gets `reason`, an `error` line with the code and message after a failed turn, and the last assistant message from its latest turn:
207
-
208
- - `response_seq` is the message's `seq` in the trace, for reading more with `readText`.
209
- - `response_complete` is `false` when the text was shortened to fit the budget, or when some of it is no longer available.
210
- - `response_partial` is `true` when the turn failed or was interrupted, so the message may be an unfinished answer.
211
- - `response: none` replaces these lines when the latest turn produced no assistant message.
212
-
213
- The response text of all requested subagents shares a budget of 8,192 estimated tokens, split evenly between them, working ones included. The optional `maxOutputTokens` sets a different budget, from 1 to 65,536.
214
-
215
- Inside a program, `waitUntilIdle` waits for one subagent with the same meaning of idle and returns its state without the response. Neither wait returns until queued input has been handled too. Both cover only the requested subagents. A parent can be idle while its children are working, and a child finishing does not start another turn for its parent. Cancelling a wait, or stopping the program that waits, does not interrupt the subagent.
216
-
217
- The host also sends attached clients a live summary of subagent activity for display.
218
-
219
- ### Send more input
220
-
221
- `sendInput` requires a `mode`:
222
-
223
- - `queue`: the subagent finishes its current work, then handles the message as a separate turn. Queued messages run in the order they were sent.
224
- - `steer`: the subagent takes the message into account as soon as possible during its current turn. A native Tau subagent applies it at the next safe point, never in the middle of a model response or tool call, as in the [main session](sessions.md#submit-queue-and-steer). [Claude Code subagents](#claude-code-subagents) follow Claude Code's own streaming-input behavior.
225
-
226
- Either mode starts a new turn right away on an idle subagent. The call returns once the input is accepted, before the subagent reads it. The subagent keeps its conversation, model, settings, tools, and working directory.
227
-
228
- Sending input fails while the subagent is stopping, when 64 inputs are already pending, or when the subagent is idle and 16 subagents are already working.
229
-
230
- ### Interrupt
231
-
232
- `interrupt` stops the current turn and discards all pending input, so the subagent does not continue with queued work. With the default `scope: "agent"`, only the selected subagent stops and its descendants keep running. Interrupting an idle subagent this way only returns its state. `scope: "subtree"` stops the selected subagent and all its descendants, even when the selected one is idle. Until they have stopped, they refuse new input, and launches they have in progress fail.
233
-
234
- By default the call waits until every targeted turn has ended. With `wait: false` it returns right away, and the status may still be `stopping`. The result is the selected subagent's state. Background jobs that the subagents started keep running, and the subagents stay available for more input.
235
-
236
- In the TUI, `Ctrl+G` interrupts only the selected running subagent. Interrupting the main session does not interrupt subagents, and interrupting a subagent does not interrupt the main session.
237
-
238
- ### Conversation traces
239
-
240
- Each subagent has a trace: an ordered record of what it was told, what it said, and what its tools returned. Native Tau and Claude Code subagents produce the same kinds of entries:
241
-
242
- | Kind | Contents |
243
- | --- | --- |
244
- | `input` | Each accepted message, with its mode: `initial`, `queue`, or `steer`. |
245
- | `assistant` | The subagent's message text. |
246
- | `tool_call` | The tool name, call ID, and arguments as JSON. |
247
- | `tool_result` | The tool name, call ID, outcome, and result as the subagent received it. |
248
- | `notice` | An event with a machine-readable code, such as `input.discarded` or the failure code of a failed turn. |
249
- | `status` | The subagent started working, began stopping, or became idle. |
250
-
251
- Traces do not contain reasoning or system prompts. Output that a tool itself shortened stays shortened.
252
-
253
- Each entry has a sequence number `seq` and a timestamp. A `trace` call returns the newest matching entries in chronological order, 20 by default and at most 50. It can filter by entry kinds and by tool name. Its `nextCursor` leads to older entries.
254
-
255
- Content of at most 4,096 bytes as JSON, without images, is inline in the entry. Larger content and all images are references. `readText` returns the text of one assistant message or tool result, up to 30,000 UTF-16 code units by default and at most 100,000. Content with JSON or images needs `readContent`, which returns one block per page, with text in chunks of at most 16,384 UTF-16 code units.
256
-
257
- A trace keeps the newest 4,096 entries, up to 64 MiB, for each subagent. When older entries are removed, trace pages report `historyEvicted: true`, and reading a removed entry or reference fails. A single content value larger than 6 MiB is replaced by a block that marks it unavailable. Traces last as long as the subagent and do not survive a host restart.
258
-
259
- A failed call throws an error with a `code` and a `message`. The codes are `invalid_arguments`, `unknown_agent`, `invalid_cursor`, `expired_content`, `content_type`, `operation_failed`, and `cancelled`. A subagent's own failure is part of its state and trace, not a failed call.
260
-
261
- ## Detach, rewind, and recovery
262
-
263
- Subagents belong to the running session on the host, not to an attached TUI. Detaching a client or losing the connection does not stop them while the session stays alive, which [retention](sessions.md#detach-reattach-and-recover) can extend. Another client can attach and see their state.
264
-
265
- Host shutdown or session disposal interrupts and removes all subagents, and none survive a host restart. Recovery removes any saved records, so a recovered session cannot send input to an old subagent ID.
266
-
267
- Rewind also removes subagents that the main agent started from an assistant message the rewind removed, with all their descendants. A subagent started from a `code` program belongs to the assistant message that ran the program, including a program running as a background job. Rewind is refused while any subagent is running.
268
-
269
- Tau records native subagents in [history](history.md#native-subagent-sessions) as child sessions of their immediate parents, even without the `history` tool. These sessions stay after a rewind, but history cannot restore the subagents. Claude Code is excluded.
270
-
271
- Important results should reach the main agent and end up in the session history or in project files before the session on the host goes away. [Sessions](sessions.md) covers saving and recovery in general.
272
-
273
- ## Reloading and validation
274
-
275
- Changes to persona tools or to the launch allowlist apply after `/reload` in an idle session, or in a new session. Reload updates the main agent, so only the subagents it launches later, and their children, use the new setup. Existing subagents keep the setup they started with, including its tools and launch allowlist, and pass it on to children they launch later. For example, an existing subagent can still launch a child with a model you removed from `subagents.launchModels`.
276
100
 
277
- `subagents.launchModels` must be an array of valid `<provider>/<model>:<effort>` strings. Unknown providers, invalid efforts, and malformed entries produce configuration warnings.
101
+ Tau checks for a subscription login before sending a task and has no API fallback. Extra usage on your Claude account can still incur charges, so disable it there if you want to stay within the included allowance.
278
102
 
279
- A launch can fail because of invalid arguments, a model outside the allowlist, the concurrency limit, an interrupted caller, or a prompt or working-directory context that cannot be built. Calls with an ID outside the caller's descendants fail.
103
+ These workers differ from native subagents:
280
104
 
281
- Before starting a local TUI, `tau --debug --persona <id>` shows which tools are available, the model and settings subagents inherit, and the subagents' tool list. In a running session, `/reload` reports file warnings and `tau.agents.list()` shows live subagent state.
105
+ - They use Claude Code's own prompt, instructions, skills, compaction, and MCP configuration from the execution environment.
106
+ - Tau tools map to Claude Code tools: `bash` gives Bash, Read, Glob, and Grep, and `view_image` gives Read, Glob, and Grep. `write`, `edit`, and `web` map to Write, Edit, and WebSearch with WebFetch.
107
+ - They run with permission checks bypassed and the Claude Code sandbox disabled, so review the local Claude settings first.
108
+ - They cannot start subagents or use Tau's `code` capabilities, `tau_docs`, or MCP connections. Hooks and automatic memory are off.
109
+ - They are not recorded in history. A follow-up resumes the same Claude session while the parent session is alive.