@markusylisiurunen/tau 0.3.82 → 0.3.84

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 (183) hide show
  1. package/README.md +1 -3
  2. package/dist/core/agent/agent_runtime.js +10 -6
  3. package/dist/core/agent/agent_runtime.js.map +1 -1
  4. package/dist/core/cli.js +2 -2
  5. package/dist/core/cli.js.map +1 -1
  6. package/dist/core/code_mode/models.js +61 -22
  7. package/dist/core/code_mode/models.js.map +1 -1
  8. package/dist/core/commands/auto_compact.js +16 -0
  9. package/dist/core/commands/auto_compact.js.map +1 -0
  10. package/dist/core/commands/registry.js +13 -0
  11. package/dist/core/commands/registry.js.map +1 -1
  12. package/dist/core/history/cli.js +48 -0
  13. package/dist/core/history/cli.js.map +1 -1
  14. package/dist/core/history/history_manager.js +9 -3
  15. package/dist/core/history/history_manager.js.map +1 -1
  16. package/dist/core/history/local_history_store.js +9 -2
  17. package/dist/core/history/local_history_store.js.map +1 -1
  18. package/dist/core/history/remote_history_client.js +18 -3
  19. package/dist/core/history/remote_history_client.js.map +1 -1
  20. package/dist/core/models/openrouter.js +17 -5
  21. package/dist/core/models/openrouter.js.map +1 -1
  22. package/dist/core/models/openrouter_decisions.js +16 -1
  23. package/dist/core/models/openrouter_decisions.js.map +1 -1
  24. package/dist/core/runtime/chat_runtime.js +5 -0
  25. package/dist/core/runtime/chat_runtime.js.map +1 -1
  26. package/dist/core/session/auto_compaction_threshold.js +4 -0
  27. package/dist/core/session/auto_compaction_threshold.js.map +1 -0
  28. package/dist/core/static/tau_docs/client-tools.md +53 -53
  29. package/dist/core/static/tau_docs/config-reference.md +46 -43
  30. package/dist/core/static/tau_docs/configuration.md +40 -36
  31. package/dist/core/static/tau_docs/credentials.md +32 -31
  32. package/dist/core/static/tau_docs/getting-started.md +28 -28
  33. package/dist/core/static/tau_docs/history.md +114 -79
  34. package/dist/core/static/tau_docs/image-generation.md +20 -18
  35. package/dist/core/static/tau_docs/index.md +30 -31
  36. package/dist/core/static/tau_docs/manifest.json +1 -0
  37. package/dist/core/static/tau_docs/models.md +17 -17
  38. package/dist/core/static/tau_docs/node-sdk.md +74 -69
  39. package/dist/core/static/tau_docs/nook.md +75 -69
  40. package/dist/core/static/tau_docs/openrouter.md +28 -13
  41. package/dist/core/static/tau_docs/ownership-and-scope.md +21 -23
  42. package/dist/core/static/tau_docs/pdf-unpacking.md +6 -6
  43. package/dist/core/static/tau_docs/personas.md +29 -27
  44. package/dist/core/static/tau_docs/prompts-and-project-context.md +41 -39
  45. package/dist/core/static/tau_docs/remote-sessions.md +38 -38
  46. package/dist/core/static/tau_docs/sdk-diff-review.md +16 -12
  47. package/dist/core/static/tau_docs/security.md +72 -72
  48. package/dist/core/static/tau_docs/session-protocol-methods.md +69 -45
  49. package/dist/core/static/tau_docs/session-protocol.md +59 -52
  50. package/dist/core/static/tau_docs/sessions.md +112 -88
  51. package/dist/core/static/tau_docs/skills.md +25 -20
  52. package/dist/core/static/tau_docs/speech-generation.md +5 -5
  53. package/dist/core/static/tau_docs/subagents.md +42 -44
  54. package/dist/core/static/tau_docs/telegram-projects.md +142 -0
  55. package/dist/core/static/tau_docs/telegram.md +67 -181
  56. package/dist/core/static/tau_docs/tools.md +72 -80
  57. package/dist/core/static/tau_docs/troubleshooting.md +94 -149
  58. package/dist/core/static/tau_docs/tui.md +127 -80
  59. package/dist/core/subagents/agent_supervisor.js +1 -0
  60. package/dist/core/subagents/agent_supervisor.js.map +1 -1
  61. package/dist/core/telegram/adapter.js +31 -1
  62. package/dist/core/telegram/adapter.js.map +1 -1
  63. package/dist/core/telegram/session_manager.js +11 -0
  64. package/dist/core/telegram/session_manager.js.map +1 -1
  65. package/dist/core/tool/image_generate.js +5 -17
  66. package/dist/core/tool/image_generate.js.map +1 -1
  67. package/dist/core/tool/openrouter.js +21 -2
  68. package/dist/core/tool/openrouter.js.map +1 -1
  69. package/dist/core/utils/gemini_transcription.js +43 -13
  70. package/dist/core/utils/gemini_transcription.js.map +1 -1
  71. package/dist/core/utils/model_stream.js +17 -1
  72. package/dist/core/utils/model_stream.js.map +1 -1
  73. package/dist/core/version.js +2 -2
  74. package/dist/diff_tool/app/dist/assets/{angular-html-D20byCHL.js → angular-html-Dr923UVo.js} +1 -1
  75. package/dist/diff_tool/app/dist/assets/{angular-ts-CvVQslm2.js → angular-ts-DOChuIbB.js} +1 -1
  76. package/dist/diff_tool/app/dist/assets/{apl-DNIxlYWe.js → apl-Bs_bcAcm.js} +1 -1
  77. package/dist/diff_tool/app/dist/assets/{astro-DDOw4EUG.js → astro-a4yvqyGV.js} +1 -1
  78. package/dist/diff_tool/app/dist/assets/{blade-DlhB-SLW.js → blade-BD5OxwVc.js} +1 -1
  79. package/dist/diff_tool/app/dist/assets/{c-C1f4vhDm.js → c-CPWQkPLc.js} +1 -1
  80. package/dist/diff_tool/app/dist/assets/{chapel-Ctt8xOX1.js → chapel-DaQatW92.js} +1 -1
  81. package/dist/diff_tool/app/dist/assets/{cobol-BXw71PAA.js → cobol-Dv7H5p9m.js} +1 -1
  82. package/dist/diff_tool/app/dist/assets/{coffee-CRh_5Nmr.js → coffee-BUGvGi57.js} +1 -1
  83. package/dist/diff_tool/app/dist/assets/{cpp-IlI-zWOZ.js → cpp-fo_wPsB8.js} +1 -1
  84. package/dist/diff_tool/app/dist/assets/{crystal-CXeL28i7.js → crystal--pI-R_dD.js} +1 -1
  85. package/dist/diff_tool/app/dist/assets/{css-BfST9hFI.js → css-BssyxPkY.js} +1 -1
  86. package/dist/diff_tool/app/dist/assets/{edge--Q22k_ty.js → edge-CZ8t3-Ec.js} +1 -1
  87. package/dist/diff_tool/app/dist/assets/{elixir-CIfC_rQx.js → elixir-UZt0J7RJ.js} +1 -1
  88. package/dist/diff_tool/app/dist/assets/{elm-OkZ29XRO.js → elm-DIbchse0.js} +1 -1
  89. package/dist/diff_tool/app/dist/assets/{erb-B8ZXgEqv.js → erb-BOBhlFtI.js} +1 -1
  90. package/dist/diff_tool/app/dist/assets/{git-rebase-CxkO_WGd.js → git-rebase-BAOt70YV.js} +1 -1
  91. package/dist/diff_tool/app/dist/assets/{glimmer-js-BVadyIrr.js → glimmer-js-CEvU-NQC.js} +1 -1
  92. package/dist/diff_tool/app/dist/assets/{glimmer-ts-D5J3Qb7n.js → glimmer-ts-BTMr7YQb.js} +1 -1
  93. package/dist/diff_tool/app/dist/assets/{glsl-B6iy73-Y.js → glsl-BdwQytbZ.js} +1 -1
  94. package/dist/diff_tool/app/dist/assets/{graphql-Dc3rUXf5.js → graphql-MVXf_Gip.js} +1 -1
  95. package/dist/diff_tool/app/dist/assets/{hack-q8Utf8Jp.js → hack-BKsyThYd.js} +1 -1
  96. package/dist/diff_tool/app/dist/assets/{haml-mjMIlj_2.js → haml-aYjo4kTQ.js} +1 -1
  97. package/dist/diff_tool/app/dist/assets/{handlebars-CA-BL8Ks.js → handlebars-CkBj5nNj.js} +1 -1
  98. package/dist/diff_tool/app/dist/assets/{html-BmPxhYCX.js → html-V_XLZjq3.js} +1 -1
  99. package/dist/diff_tool/app/dist/assets/{html-derivative-CvknIjuB.js → html-derivative-CLtkZVT2.js} +1 -1
  100. package/dist/diff_tool/app/dist/assets/{http-DNxLDRIi.js → http-nUN1ldGy.js} +1 -1
  101. package/dist/diff_tool/app/dist/assets/{hurl-kbd3Eq2V.js → hurl-BBwLfekr.js} +1 -1
  102. package/dist/diff_tool/app/dist/assets/index-Dt2v7POE.js +341 -0
  103. package/dist/diff_tool/app/dist/assets/{java-BuZshgf1.js → java-DLkxtNEL.js} +1 -1
  104. package/dist/diff_tool/app/dist/assets/{javascript-DfL2oeFU.js → javascript-CVr4Rx0e.js} +1 -1
  105. package/dist/diff_tool/app/dist/assets/{jinja-Bu0KQihU.js → jinja-BOSJTyD0.js} +1 -1
  106. package/dist/diff_tool/app/dist/assets/{jison-Bqn7Mf3Q.js → jison-Di3-hBGP.js} +1 -1
  107. package/dist/diff_tool/app/dist/assets/{json-BuX5LKaB.js → json-D9C8xfZt.js} +1 -1
  108. package/dist/diff_tool/app/dist/assets/{jsx-DdVJ-ZBp.js → jsx-CUDhGSfU.js} +1 -1
  109. package/dist/diff_tool/app/dist/assets/{julia-CQeijOoQ.js → julia-CRy8R7YY.js} +1 -1
  110. package/dist/diff_tool/app/dist/assets/{just-vzAktFGR.js → just-tUqjHI43.js} +1 -1
  111. package/dist/diff_tool/app/dist/assets/{latex-Dm60cg0k.js → latex-8_LCZmZN.js} +1 -1
  112. package/dist/diff_tool/app/dist/assets/{liquid-vxKzm2P8.js → liquid-CvGorueR.js} +1 -1
  113. package/dist/diff_tool/app/dist/assets/{lua-DIoqi4dd.js → lua-DR_7pVFC.js} +1 -1
  114. package/dist/diff_tool/app/dist/assets/{marko-BTHgFKby.js → marko-sTN8ZOd5.js} +1 -1
  115. package/dist/diff_tool/app/dist/assets/{mdc-CEfz8gZ9.js → mdc-xRsS5Ubl.js} +1 -1
  116. package/dist/diff_tool/app/dist/assets/{nginx-DNlFDEfJ.js → nginx-ypaVSshx.js} +1 -1
  117. package/dist/diff_tool/app/dist/assets/{nim-DnvT_0lZ.js → nim-DTc1FpAl.js} +1 -1
  118. package/dist/diff_tool/app/dist/assets/{org-BbD-ElVf.js → org-B7I2tEAw.js} +1 -1
  119. package/dist/diff_tool/app/dist/assets/{perl-DTsbnAmK.js → perl-CTNhHvKx.js} +1 -1
  120. package/dist/diff_tool/app/dist/assets/{php-CwEsJe-W.js → php-LzxyOsOP.js} +1 -1
  121. package/dist/diff_tool/app/dist/assets/{pug-BOttMVH-.js → pug-D5FIy7qc.js} +1 -1
  122. package/dist/diff_tool/app/dist/assets/{qml-C8KkSItN.js → qml-CfdV5Js7.js} +1 -1
  123. package/dist/diff_tool/app/dist/assets/{r-K4ksJj_R.js → r-CZ-EMZDs.js} +1 -1
  124. package/dist/diff_tool/app/dist/assets/{razor-yuWRrrG6.js → razor-BhyBjPmN.js} +1 -1
  125. package/dist/diff_tool/app/dist/assets/{regexp-CV-jhnUz.js → regexp-iPvMX04S.js} +1 -1
  126. package/dist/diff_tool/app/dist/assets/{rst-CLA3Attc.js → rst-Dpp9DE6Q.js} +1 -1
  127. package/dist/diff_tool/app/dist/assets/{ruby-DiHR2-DX.js → ruby-CVyShlOK.js} +1 -1
  128. package/dist/diff_tool/app/dist/assets/{sas-DxIjbYJ5.js → sas-DFmollAV.js} +1 -1
  129. package/dist/diff_tool/app/dist/assets/{scss-CShwEaV4.js → scss-Di6lsIQE.js} +1 -1
  130. package/dist/diff_tool/app/dist/assets/{shellscript-CeezOnrF.js → shellscript-CRHervLi.js} +1 -1
  131. package/dist/diff_tool/app/dist/assets/{shellsession-CjSS2r7j.js → shellsession-CHP7Q5Ym.js} +1 -1
  132. package/dist/diff_tool/app/dist/assets/{soy-CI_v23nJ.js → soy-CNXyGE_T.js} +1 -1
  133. package/dist/diff_tool/app/dist/assets/{sql-D9GaB00A.js → sql-DnPFF_uz.js} +1 -1
  134. package/dist/diff_tool/app/dist/assets/{stata-hK92TPE_.js → stata-CobN2W6n.js} +1 -1
  135. package/dist/diff_tool/app/dist/assets/{surrealql-UO8LtPJG.js → surrealql-DqvGXHs7.js} +1 -1
  136. package/dist/diff_tool/app/dist/assets/{svelte-kIlaw_oh.js → svelte-ChhfFBzQ.js} +1 -1
  137. package/dist/diff_tool/app/dist/assets/{templ-DFRz1JP6.js → templ-DKi2U_4-.js} +1 -1
  138. package/dist/diff_tool/app/dist/assets/{tex-CfxIXk_z.js → tex-Cjl-M5D5.js} +1 -1
  139. package/dist/diff_tool/app/dist/assets/{ts-tags-BtUHl0ff.js → ts-tags-CV2veQhe.js} +1 -1
  140. package/dist/diff_tool/app/dist/assets/{tsx-Cd4SAe2C.js → tsx-Dw0DYsvT.js} +1 -1
  141. package/dist/diff_tool/app/dist/assets/{twig-CWk4q5Y3.js → twig-r46-w1o_.js} +1 -1
  142. package/dist/diff_tool/app/dist/assets/{typescript-BqxGJiP0.js → typescript-QuYM-098.js} +1 -1
  143. package/dist/diff_tool/app/dist/assets/{typst-D9nAun2p.js → typst-B9jAU5LS.js} +1 -1
  144. package/dist/diff_tool/app/dist/assets/{vue-D6HYhg6_.js → vue-CIrFiYWU.js} +1 -1
  145. package/dist/diff_tool/app/dist/assets/{vue-html-1VRlaENS.js → vue-html-bfczklzO.js} +1 -1
  146. package/dist/diff_tool/app/dist/assets/{vue-vine-BaH0We9y.js → vue-vine-BmBCOwQI.js} +1 -1
  147. package/dist/diff_tool/app/dist/assets/{xml-C4RWnUuj.js → xml-DYPsS0xh.js} +1 -1
  148. package/dist/diff_tool/app/dist/assets/{xsl-D1iD38ga.js → xsl-DZFDwCkt.js} +1 -1
  149. package/dist/diff_tool/app/dist/assets/{yaml-yAb4W0G-.js → yaml-9CQ32JJD.js} +1 -1
  150. package/dist/diff_tool/app/dist/index.html +1 -1
  151. package/dist/history/worker/index.js +87 -83
  152. package/dist/history/worker/index.js.map +1 -1
  153. package/dist/host/hosted_ephemeral_agent_session.js +1 -0
  154. package/dist/host/hosted_ephemeral_agent_session.js.map +1 -1
  155. package/dist/host/local_session_host.js +30 -1
  156. package/dist/host/local_session_host.js.map +1 -1
  157. package/dist/host/session_protocol_handler.js +18 -0
  158. package/dist/host/session_protocol_handler.js.map +1 -1
  159. package/dist/main.js +6 -7
  160. package/dist/main.js.map +1 -1
  161. package/dist/protocol/index.d.ts +1 -1
  162. package/dist/protocol/index.js.map +1 -1
  163. package/dist/protocol/session_protocol.d.ts +13 -2
  164. package/dist/protocol/session_protocol.js +31 -1
  165. package/dist/protocol/session_protocol.js.map +1 -1
  166. package/dist/sdk/index.d.ts +1 -1
  167. package/dist/sdk/index.js.map +1 -1
  168. package/dist/sdk/session.js +11 -0
  169. package/dist/sdk/session.js.map +1 -1
  170. package/dist/sdk/types.d.ts +2 -0
  171. package/dist/store/session_snapshot_migrations.js +19 -1
  172. package/dist/store/session_snapshot_migrations.js.map +1 -1
  173. package/dist/tui/session_chat_controller.js +41 -4
  174. package/dist/tui/session_chat_controller.js.map +1 -1
  175. package/dist/tui/terminal.js +1 -0
  176. package/dist/tui/terminal.js.map +1 -1
  177. package/dist/tui/ui/chat_container.js +34 -17
  178. package/dist/tui/ui/chat_container.js.map +1 -1
  179. package/dist/tui/ui/footer.js +2 -4
  180. package/dist/tui/ui/footer.js.map +1 -1
  181. package/package.json +11 -10
  182. package/dist/diff_tool/app/dist/assets/index-D8ZI_2RC.js +0 -340
  183. package/dist/nook/README.md +0 -123
@@ -1,24 +1,24 @@
1
1
  # Subagents
2
2
 
3
- Subagents are host-supervised background agent threads created by the main agent. They are useful when work can proceed independently or needs a separate context. A subagent is not a second session and does not have its own persona file.
3
+ Subagents are background agents that the main agent starts and the host supervises. They help when part of the work can run independently or benefits from a separate context. A subagent belongs to its parent session. It is not a session of its own and has no persona file.
4
4
 
5
5
  ## Background workers
6
6
 
7
- Subagents are general-purpose background workers with no named types. Multiple instances can run concurrently, each with its own task and conversation.
7
+ Subagents are general-purpose workers. There are no named types. Several can run at once, each with its own task and conversation.
8
8
 
9
- The worker inherits the active main persona's model-facing behavior through Tau's maintained wrapper. Its instructions and description are not configuration surfaces. Supply task-specific instructions in the launch prompt, including any relevant skill guidance.
9
+ A subagent behaves like the active main persona, wrapped in instructions that Tau maintains. Those instructions and the subagent's description cannot be configured. Put task-specific instructions, including any relevant skill guidance, in the launch prompt.
10
10
 
11
- Availability follows the main persona's tool list. Built-in personas and standalone custom personas that omit `tools` enable the five supervision tools. A custom persona can prevent launches by providing an explicit `tools` list without `spawn_agent`; omit all five supervision tools when no subagent interaction is wanted. There is no separate subagent enable or disable setting. See [personas](personas.md).
11
+ Whether the agent can start subagents depends on the main persona's tool list. Built-in personas, and custom personas that omit `tools`, enable all five subagent tools. A custom persona with a `tools` list that lacks `spawn_agent` cannot start subagents. Leave out all five subagent tools when no subagent interaction is wanted. There is no other setting to turn subagents on or off. See [personas](personas.md).
12
12
 
13
13
  ## Trigger sensitivity
14
14
 
15
- The main agent launches subagents only when the user or active instructions explicitly request delegation. Ask for a subagent in ordinary language; no named agent tag is needed. A request does not itself create a thread: the main agent still calls `spawn_agent`.
15
+ The main agent starts subagents only when the user or active instructions explicitly ask for delegation. Ask in ordinary language; no special tag is needed. The request itself does not create a subagent: the main agent still has to call `spawn_agent`.
16
16
 
17
- This is agent-facing policy. The host validates launches but does not infer whether a prompt semantically authorized delegation.
17
+ The agent follows this rule itself. Tau checks that a launch is valid, but it does not judge whether the request really asked for delegation.
18
18
 
19
- ## Tool inheritance and restriction
19
+ ## Tools
20
20
 
21
- The eligible inherited tools are:
21
+ A subagent can receive these tools:
22
22
 
23
23
  - `bash`
24
24
  - `write`
@@ -30,31 +30,29 @@ The eligible inherited tools are:
30
30
  - `mcp`, when the host has enabled MCP servers
31
31
  - `models`
32
32
 
33
- Tau then adds intrinsic `tau_docs` to every subagent registry, independently of this subset. A persona’s `tools` list cannot disable it. Apart from `tau_docs`, subagents do not receive subagent supervision tools, client tools, or TUI-local tools.
33
+ A subagent gets each of these that the main persona also has. For example, a main persona with `bash`, `edit`, `history`, and `spawn_agent` gives its subagents `bash`, `edit`, and `history`. Names such as `web` and `history` enable the matching capability in the subagent's `code` tool. MCP uses the host's existing connections, whatever the subagent's working directory. There is no separate tool list for subagents.
34
34
 
35
- The worker inherits the intersection of the main persona's tools and those nine eligible names. MCP uses the parent's shared host connections, independent of the child's working directory. For example, a main persona with `bash`, `edit`, `history`, and `spawn_agent` gives the child `bash`, `edit`, and `history`, plus intrinsic `tau_docs`. Service selectors enable namespaces in the child's `code` tool. There is no separate child tool allowlist.
36
-
37
- Subagents cannot launch other subagents: supervision tools are never included in a child's registry. See [tools](tools.md) for the broader availability contract.
35
+ Every subagent also gets the built-in `tau_docs` tool, and a persona's `tools` list cannot remove it. Subagents never get the subagent tools, client tools, or TUI tools, so a subagent cannot start subagents of its own. See [tools](tools.md) for how tool availability works in general.
38
36
 
39
37
  ## Models and settings
40
38
 
41
- By default, a new subagent inherits the active persona's model and complete settings, including reasoning and service tier. This inheritance is captured when the thread is created. Later persona or reasoning changes do not reconfigure that existing thread.
39
+ By default, a new subagent uses the active persona's model and all of its settings, including reasoning and service tier. These are fixed when the subagent starts. Later persona or reasoning changes do not affect it.
42
40
 
43
- A launch override must use exact form:
41
+ A model override uses this exact form:
44
42
 
45
43
  ```text
46
44
  <provider>/<model>:<effort>
47
45
  ```
48
46
 
49
- The provider is normalized to lowercase. The model ID remains exact and case-sensitive. Effort is one of `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`.
47
+ 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`.
50
48
 
51
- The configured launch-model list is an allowlist, not a default selection. The main agent should normally omit the `model` argument to `spawn_agent`; when omitted, the subagent inherits the active persona model and reasoning. When supplied, the normalized value must exactly match an entry in the configured allowlist. The override changes provider, model, and reasoning. Other inherited settings remain.
49
+ The configured list of launch models is an allowlist. It does not choose a default. The main agent should normally omit the `model` argument to `spawn_agent`, and the subagent then uses the active persona's model and reasoning. When `model` is given, it must exactly match an allowlist entry after normalization. The override changes the provider, model, and reasoning, and keeps the other settings.
52
50
 
53
- Model IDs may be unbundled when their provider is known, following the synthesis rules in [models](models.md). Invalid provider, model, effort, or format rejects the configuration field. Duplicate normalized entries are removed.
51
+ 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.
54
52
 
55
53
  ### Allowing model overrides
56
54
 
57
- Configure the built-in worker’s launch allowlist through `subagents.launchModels` in `config.json`:
55
+ Configure the allowlist with `subagents.launchModels` in `config.json`:
58
56
 
59
57
  ```json
60
58
  {
@@ -67,66 +65,66 @@ Configure the built-in worker’s launch allowlist through `subagents.launchMode
67
65
  }
68
66
  ```
69
67
 
70
- This list is layered configuration. The nearest defined `launchModels` array replaces the broader array rather than appending to it. Tau applies the effective list to every persona that exposes `spawn_agent`.
68
+ The nearest `launchModels` list replaces broader ones; lists are not combined. The resulting list applies to every persona that has `spawn_agent`.
71
69
 
72
- ## Working-directory context
70
+ ## Working directory
73
71
 
74
- `spawn_agent` normally runs the child in the main session's `cwd`. Its optional `workingDirectory` may be absolute or relative to that `cwd`; Tau resolves it to an absolute execution-environment path.
72
+ `spawn_agent` normally runs the subagent in the main session's `cwd`. The optional `workingDirectory` may be absolute or relative to that `cwd`. Tau resolves it to an absolute path on the execution environment.
75
73
 
76
- When the resolved path differs from the parent `cwd`, Tau rebuilds prompt context from that target directory. It discovers the target platform and repository metadata, reads applicable `AGENTS.md`, and discovers all target skills.
74
+ When that path differs from the parent's `cwd`, 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.
77
75
 
78
- The target directory does **not** select a different persona, model catalog, runtime configuration, credential source, or tool policy for the child. Those remain under parent-session authority. Target configuration is consulted only where needed to rebuild target prompt context, such as skill discovery.
76
+ The new directory does **not** change the subagent's persona, model catalog, runtime configuration, credentials, or tool policy. Those always come from the parent session. Configuration in the new directory is read only where context needs it, such as for skill discovery.
79
77
 
80
- This distinction matters in monorepos and hosted environments. `workingDirectory` is an execution-environment path. The host and attached client must not reinterpret it against their own filesystems.
78
+ `workingDirectory` is always a path on the execution environment, which matters in monorepos and hosted environments. The host and attached clients never resolve it against their own filesystems.
81
79
 
82
- A launch is blocked if Tau cannot build target context, the directory is invalid for the backend, or working-directory resolution is unavailable. Passing `.` or another path that resolves to the existing parent `cwd` reuses the already composed parent context.
80
+ A launch fails if Tau cannot build context for the directory, if the directory is invalid for the environment, or if the environment cannot resolve working directories. A path that resolves to the parent's `cwd`, such as `.`, reuses the parent's context.
83
81
 
84
- ## Lifecycle and supervision tools
82
+ ## Lifecycle and subagent tools
85
83
 
86
- Subagent threads are addressed by host-generated IDs. IDs identify individual live thread records.
84
+ Each subagent has an ID that the host generates.
87
85
 
88
86
  ### Spawn
89
87
 
90
- `spawn_agent` accepts a title, prompt, optional launch model, and optional working directory. The prompt is the child's only initial user input, so it should be self-contained. A successful call returns immediately with the new ID while the child continues in the background.
88
+ `spawn_agent` takes a title, a prompt, an optional model, and an optional working directory. The prompt is the subagent's only initial input, so it should be self-contained. The call returns right away with the new ID, and the subagent keeps working in the background.
91
89
 
92
- At most eight subagent runs may be active concurrently within one main session. Completed or interrupted idle threads do not consume active capacity.
90
+ At most eight subagents can be running at once in one main session. Subagents that have finished or been interrupted do not count toward this limit.
93
91
 
94
92
  ### Observe and wait
95
93
 
96
- `list_agents` returns every retained thread with its ID, name, title, runtime model and reasoning, working directory, run state, context usage, cost, and response availability. Use it to rediscover an ID or inspect progress.
94
+ `list_agents` returns every subagent with its ID, name, title, model and reasoning, working directory, run state, context usage, cost, and whether a response is ready. Use it to find an ID again or to check progress.
97
95
 
98
- `wait_for_agents` accepts one or more IDs. It returns as soon as at least one requested thread finishes, and includes current state for all requested IDs. A completed response remains readable through later waits until a follow-up run replaces that retained response.
96
+ `wait_for_agents` takes one or more IDs. It returns as soon as at least one of them finishes, with the current state of all of them. A finished response stays readable through later waits until a follow-up run replaces it.
99
97
 
100
- The host also publishes bounded live subagent activity to observing clients. That activity is presentation state, not a replacement for the final response returned by supervision tools.
98
+ The host also sends live subagent activity to attached clients for display. It is a summary for display, and the final response from these tools remains the real result.
101
99
 
102
100
  ### Follow up
103
101
 
104
- `send_input_to_agent` starts another run on an existing idle thread. The thread retains its conversation state, model, settings, tools, and working directory. It must finish or be interrupted before another input is accepted.
102
+ `send_input_to_agent` starts another run on an idle subagent. The subagent keeps its conversation, model, settings, tools, and working directory. It must finish or be interrupted before it accepts more input.
105
103
 
106
- Starting a follow-up replaces the previously retained response in the thread's latest-run state. Read any needed result before sending the next input. Follow-ups do not reread a changed persona definition or adopt a newly reloaded launch allowlist.
104
+ A follow-up replaces the subagent's previous response, so read anything you need first. Follow-ups do not pick up a changed persona definition or a reloaded allowlist.
107
105
 
108
106
  ### Interrupt
109
107
 
110
- `interrupt_agent` requests interruption of the current run and waits for its latest state. The thread remains available for follow-up input. Calling it on an already idle thread simply returns that state.
108
+ `interrupt_agent` asks the current run to stop and waits for the subagent's latest state. The subagent stays available for follow-up input. On an idle subagent, the call just returns its state.
111
109
 
112
- The TUI can also interrupt the selected running subagent with `Ctrl+G`. Interrupting the main session and interrupting a child are separate actions.
110
+ In the TUI, `Ctrl+G` interrupts the selected running subagent. Interrupting the main session does not interrupt subagents, and interrupting a subagent does not interrupt the main session.
113
111
 
114
112
  ## Detach, rewind, and recovery
115
113
 
116
- Subagents are owned by the live host session, not by an observing TUI. Detaching a client or losing an attach transport does not by itself stop children while the hosted session remains alive. Another observer can reconnect to that live session and see current projected state.
114
+ 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. Another client can attach to the session and see their current state.
117
115
 
118
- Subagent runtimes are not recoverable across host-session disposal or process recovery. Tau may persist projected agent status while the session is live, but recovery removes those records and agent-owned presentation because the underlying conversation runtimes no longer exist. A recovered session cannot send follow-up input to an old subagent ID.
116
+ Subagents do not survive the end of a session on the host or a host restart. Their status may be saved while the session is live, but recovery removes those records, because the subagents' conversations no longer exist. A recovered session cannot send input to an old subagent ID.
119
117
 
120
- Rewind also removes subagent threads whose spawning assistant message is no longer in active history. Host shutdown or session disposal interrupts and disposes all child runtimes.
118
+ Rewind also removes subagents that were started by an assistant message the rewind removed. Host shutdown or session disposal interrupts and removes all subagents.
121
119
 
122
- Plan durable work accordingly. Important conclusions should be returned to the main agent and committed to ordinary session history or project files before the live host disappears. [Sessions](sessions.md) explains persistence and recovery more broadly.
120
+ Plan long work with this in mind. 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.
123
121
 
124
122
  ## Reloading and validation
125
123
 
126
- Persona tool selections and launch-policy changes take effect after `/reload` in an idle TUI session or in a newly created session. Reload updates new launches without reconfiguring already spawned threads. Follow-ups continue on their captured runtime.
124
+ Changes to persona tools or to the launch allowlist apply after `/reload` in an idle session, or in a new session. Reload affects only new launches. Running subagents, and follow-ups to them, keep their existing setup.
127
125
 
128
- `subagents.launchModels` must be a string array of valid `<provider>/<model>:<effort>` values. Unknown providers, invalid efforts, and malformed entries produce configuration diagnostics.
126
+ `subagents.launchModels` must be an array of valid `<provider>/<model>:<effort>` strings. Unknown providers, invalid efforts, and malformed entries produce configuration warnings.
129
127
 
130
- At execution time, launches can be blocked by invalid arguments, a model outside the allowlist, exhausted concurrency, missing prompt composition, or target-context failure. Follow-up, wait, and interrupt calls reject unknown IDs; follow-up also rejects a thread that is still running.
128
+ A launch can fail because of invalid arguments, a model outside the allowlist, the concurrency limit, a prompt that cannot be built, or a working directory whose context cannot be built. Follow-up, wait, and interrupt calls reject unknown IDs. A follow-up also fails while the subagent is still running.
131
129
 
132
- Use `tau --debug --persona <id>` before starting a local TUI to inspect effective tool availability, inherited model and settings, and the child tool list. In a running session, `/reload` reports file warnings and `list_agents` shows live thread state.
130
+ 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 `list_agents` shows live subagent state.
@@ -0,0 +1,142 @@
1
+ # Telegram projects and workspaces
2
+
3
+ A Telegram runner starts every session in a project. The project decides which repository or directory the session works in, how its workspace is prepared, and what happens to the workspace when the session ends or the runner restarts. Projects are defined under `projects` in the runner's config file and offered to chats per bot, as described in [Telegram](telegram.md).
4
+
5
+ ## Project IDs and common fields
6
+
7
+ Project IDs become `/use_<projectId>` command suffixes. They must contain only lowercase letters, digits, and underscores, and may be at most 28 characters:
8
+
9
+ ```text
10
+ ledger
11
+ platform_api
12
+ release2026
13
+ ```
14
+
15
+ Every project can have an optional non-empty `description`. Repository and persistent-directory projects can select `persona` as `<id>` or `<id>:<reasoning>`. Composite projects require their own persona. Sessions load applicable `AGENTS.md` instructions.
16
+
17
+ Each project must define exactly one workspace source: `repo`, `directory`, or `projectIds`.
18
+
19
+ ## Repository projects
20
+
21
+ A repository project clones one GitHub repository into a session-specific managed workspace:
22
+
23
+ ```json
24
+ {
25
+ "projects": {
26
+ "ledger": {
27
+ "repo": "acme/ledger",
28
+ "ref": "main",
29
+ "workingDirectory": "packages/api",
30
+ "persona": "gpt-6.1-sol-coder"
31
+ }
32
+ }
33
+ }
34
+ ```
35
+
36
+ `repo` must be a GitHub `owner/repo`; other Git URLs are not accepted. The runner needs `gh` and `git` on its login shell's `PATH`, and `gh` must already be signed in with access to the repository.
37
+
38
+ All managed projects use the top-level `workspaceRoot`. A session workspace is:
39
+
40
+ ```text
41
+ <effective-workspace-root>/<project-id>/<telegram-session-id>
42
+ ```
43
+
44
+ `workingDirectory` is optional and must be a relative directory inside the clone. Tau validates that it exists and does not escape the repository, then uses it as the session `cwd`. Without it, the repository root is the `cwd`.
45
+
46
+ `ref` is optional and is passed to `git checkout` after cloning. Without it, the clone's default branch remains checked out. Configure a ref when sessions must begin from a predictable branch or commit.
47
+
48
+ ### Repository caches
49
+
50
+ Tau keeps a persistent bare cache at:
51
+
52
+ ```text
53
+ <effective-workspace-root>-repo-cache/<project-id>.git
54
+ ```
55
+
56
+ The first preparation uses `gh repo clone <owner/repo> <cache> -- --bare`. Later preparations fetch and prune the cache, then create the session workspace with a shared local clone. If the repository configured for the same project ID changes, Tau discards and recreates that cache.
57
+
58
+ Sessions never work in the cache directly.
59
+
60
+ ## Persistent-directory projects
61
+
62
+ A persistent-directory project reuses one existing directory instead of creating a managed clone:
63
+
64
+ ```json
65
+ {
66
+ "projects": {
67
+ "notes": {
68
+ "directory": "/srv/tau/notes",
69
+ "persona": "gpt-6.1-sol-coder"
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ Relative `directory` paths resolve from the Telegram config file's directory. JSON does not expand `~`, so use an absolute path when referring to a home directory.
76
+
77
+ The directory must already exist. Tau never creates, replaces, provisions, or removes it. `/new`, session close, runner shutdown, and startup cleanup all preserve it.
78
+
79
+ Every session of this project works in the same directory, including sessions from different chats or bots, and Tau does not stop them from editing at the same time. If the directory cannot handle that, use `maxSessions`, per-bot projects, and allowlists to prevent it.
80
+
81
+ Persistent-directory sessions have no `repository` attribute. On recovery, the configured directory must match the one saved in the session. Changing `directory` does not move existing sessions; their recovery fails instead.
82
+
83
+ ## Composite projects
84
+
85
+ A composite project creates a root containing multiple repositories:
86
+
87
+ ```json
88
+ {
89
+ "projects": {
90
+ "web": { "repo": "acme/web", "ref": "main" },
91
+ "api": { "repo": "acme/api", "workingDirectory": "services/http" },
92
+ "platform": {
93
+ "projectIds": ["web", "api"],
94
+ "persona": "gpt-6.1-sol-coder:high",
95
+ "instructions": "Keep shared contracts synchronized.",
96
+ "subagents": {
97
+ "launchModels": ["openai/gpt-6.1-sol:high"]
98
+ }
99
+ }
100
+ }
101
+ }
102
+ ```
103
+
104
+ `projectIds` requires at least two unique repository projects; directories and composites are invalid members. Order controls workspace context and history `repository`.
105
+
106
+ Members are placed at `<composite-root>/<member-project-id>` and use each repository's cache, ref, and working directory. The root is the session's `cwd`. When the workspace is created, Tau writes a root `AGENTS.md` that lists the members and any `instructions`, and a root `.tau/config.json` containing `subagents` or `{}`. These are ordinary workspace files. They do not follow later Telegram configuration changes and are not rewritten when a preserved session reconnects.
107
+
108
+ `subagents.launchModels` sets which models subagents may be started with. See [subagents](subagents.md) for the syntax and inheritance.
109
+
110
+ The composite's settings apply to the whole session: persona, subagents, model catalog, configuration, and tools. Members' `.tau/config.json` files are not merged. A subagent started in a member directory rebuilds only the context that depends on the directory: environment and repository details, the applicable `AGENTS.md`, and the skills found there.
111
+
112
+ If any member cannot be prepared, Tau removes the whole composite workspace. Composite workspaces and member caches use the top-level `workspaceRoot`.
113
+
114
+ ## Managed workspace lifecycle
115
+
116
+ Repository and composite projects work the same way. Tau prepares one workspace per session, and the session keeps working there. A normal runner restart reconnects without fetching or checking out repositories, running provision hooks, or rewriting generated files. Changes to workspace preparation in the Telegram config affect only workspaces prepared later.
117
+
118
+ If the expected workspace is missing, recovery reconstructs it from the caches and current project configuration. `/new` and session close remove a managed workspace; normal shutdown preserves it. Tau does not commit, push, or save uncommitted changes elsewhere.
119
+
120
+ ## Managed workspace safety
121
+
122
+ **Important:** startup removes entries under managed workspace roots that no persisted session references. Dedicate these roots to Tau; never use a home directory, repository collection, or unrelated tree.
123
+
124
+ Tau preserves referenced managed workspaces, configured persistent directories, and repository caches. `/new` closes the active session before replacing it. Closing a repository or composite session interrupts work and removes its workspace; persistent directories remain untouched.
125
+
126
+ ## Provision hooks
127
+
128
+ A repository can include `.tau/scripts/provision` at its root. It must be a regular executable file, not a symlink, and start with a shebang. Tau runs it in the session's working directory once the session is available, without blocking chat input.
129
+
130
+ New and reconstructed workspaces run their hooks; preserved workspaces and persistent-directory projects do not. Composite sessions run member hooks in order and continue after failures. A failure is reported to linked chats but leaves the session usable. Keep hooks repeatable and non-interactive.
131
+
132
+ ## Troubleshooting
133
+
134
+ **Repository preparation fails.** Check that the runner machine has `gh` signed in with access to the repository, `git`, and network access. Check `repo`, `ref`, the workspace root's permissions and free space, and that `workingDirectory` exists after checkout. Changing the repository of an existing project ID rebuilds its cache. Do not delete caches or workspaces first; keep the logs and fix access or configuration.
135
+
136
+ **Startup removed unexpected files.** The workspace root was not dedicated to Tau. Stop the runner and move `workspaceRoot` to an empty directory of its own before restarting. Tau cannot restore unrelated files it deleted.
137
+
138
+ **Provisioning fails but chat still works.** This is intended: a provisioning failure does not break the session. Fix the executable bit, shebang, script, or dependencies. Then run the script by hand if it supports that, or start a new session to provision again.
139
+
140
+ **A persistent-directory session fails recovery.** Recovery rejects a saved `cwd` that differs from the configured directory. Restore the directory at its original path, or set the project config back, or start a new session in the new directory. Tau does not move an existing session to a new directory.
141
+
142
+ **A recovered session does not match the current configuration.** Preserved workspaces are used as they are, and composite root files are not regenerated, so configuration changes apply only to new workspaces. Recovery also needs the same `workspaceRoot`, project definitions, host home, and Tau sessions. Check the runner logs and `/status`. Do not edit runner state, project preferences, saved sessions, or managed workspaces to force a match.