@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,77 +1,138 @@
1
1
  # Code mode
2
2
 
3
- `code` runs a JavaScript program that combines the enabled capabilities: `tau.web`, `tau.history`, `tau.mcp`, `tau.bash`, `tau.models`, and `tau.agents`. The Bash, write, edit, and image tools stay available as separate tools.
3
+ Code mode lets the agent do many operations in one tool call. The `code` tool runs a short JavaScript program against Tau's APIs, and only what the program prints goes back to the model. The agent can therefore run ten searches or read a large result, keep the two lines that matter, and use little context.
4
4
 
5
- ## Saved programs and input
5
+ The program runs in a sandbox with no imports, timers, files, network, environment variables, or credentials of its own. It can act only through the `tau` namespace, which holds the capabilities the persona selected:
6
6
 
7
- A call passes exactly one of `code`, with inline source, or `file`, with the path of a saved `.js` program. A relative path resolves from the agent's working directory. Tau reads the file once from the execution environment when the call starts, so later edits do not affect a running program. The file can be at most 1 MiB. A saved program runs in the same sandbox, with the same capabilities and limits, as inline code. It cannot import modules or other files.
7
+ | API | What it does |
8
+ | --- | --- |
9
+ | `tau.bash` | Run commands and manage background jobs. |
10
+ | `tau.web` | Search the web, fetch pages, and discover Markdown versions of pages. |
11
+ | `tau.history` | Search and read past transcripts. See [history](history.md). |
12
+ | `tau.mcp` | Find and call tools on [MCP servers](mcp.md). |
13
+ | `tau.models` | Run standalone model calls through OpenRouter. These see no session context. |
14
+ | `tau.agents` | Start and manage [subagents](subagents.md). |
8
15
 
9
- The optional `input` is any JSON value of at most 16 KiB when serialized as UTF-8 JSON. The program reads it from the global `input`, which is `null` when no input is supplied. This lets a skill or project keep a reviewed program in a file and run it with different inputs:
16
+ The agent reads the API reference when it needs it, by printing `docs` or `await tau.docs("web")`, so you do not need to learn these APIs to use Tau. You will want to know them when you write skills or review what an agent did.
10
17
 
11
- ```js
12
- code({
13
- file: ".agents/skills/audit/audit.js",
14
- input: { project: "checkout", limit: 100 },
15
- });
16
-
17
- // audit.js
18
- const { project, limit } = input;
19
- ```
18
+ ## Examples
20
19
 
21
- ## Documentation and output
22
-
23
- If the agent has not yet seen the runtime guide, it first runs a program that only prints it:
20
+ **Keep only what matters.** Run a noisy command and return only the failures:
24
21
 
25
22
  ```js
26
- printText(docs);
23
+ const result = await tau.bash.run({ command: "npm test" });
24
+ const failures = result.output
25
+ .split("\n")
26
+ .filter((line) => line.includes("FAIL"));
27
+ printText(`exit ${result.exitCode}, ${failures.length} failures`);
28
+ printText(truncate(failures.join("\n"), { maxChars: 4000 }));
27
29
  ```
28
30
 
29
- The guide covers runtime rules, capabilities, and examples. It does not depend on how a call is run: it describes deadlines and output for both foreground and background programs. The agent reads each capability's reference it has not seen yet in a separate call that only prints documentation:
31
+ **Work in parallel.** Run several searches and print a short summary of each:
30
32
 
31
33
  ```js
32
- printText(await tau.docs("web"));
34
+ const queries = ["node 24 release notes", "node 24 breaking changes"];
35
+ const responses = await Promise.all(
36
+ queries.map((query) => tau.web.search(query, { numResults: 3 })),
37
+ );
38
+ for (const response of responses) {
39
+ for (const page of response.results) {
40
+ printText(
41
+ `${page.title}\n${page.url}\n${(page.highlights ?? []).join("\n")}\n`,
42
+ );
43
+ }
44
+ for (const notice of response.notices) printText(`notice: ${notice.message}`);
45
+ }
33
46
  ```
34
47
 
35
- The agent does not re-read documentation it has already seen. MCP tool descriptions are read separately. Programs do not need to print intermediate results.
48
+ **Combine capabilities.** Find open issues on an MCP server and check each one against the repository:
36
49
 
37
- `printText` accepts only strings; objects and arrays throw a `TypeError`. The agent selects relevant fields and explicitly formats concise plain text to save tokens. `JSON.stringify` is reserved for cases where the structure matters or machine-readable JSON is requested, with fields selected first instead of dumping whole responses.
50
+ ```js
51
+ const { tools } = await tau.mcp.searchTools("list open issues", { limit: 1 });
52
+ const list = await tau.mcp.callTool(tools[0].server, tools[0].name, {
53
+ state: "open",
54
+ });
55
+ if (list.isError) throw new Error(list.content[0].text);
56
+ const issues = JSON.parse(list.content[0].text);
57
+ for (const issue of issues) {
58
+ const grep = await tau.bash.run({
59
+ command: `git log --oneline --grep="#${issue.number}"`,
60
+ });
61
+ printText(
62
+ `#${issue.number} ${issue.title}: ${grep.stdout.trim() || "no commits"}`,
63
+ );
64
+ }
65
+ ```
38
66
 
39
- Only `printText(string)` and awaited `printImage({ data, mimeType })` produce output, in the order they are called. Return values are ignored. In the foreground, text is truncated in the middle to `maxOutputTokens` (default 8,192; range 1–65,536). The agent leaves it unset unless needed, and may raise it to 16,384 on its own. Higher values require an explicit user request. When text from the built-in `code` tool is truncated, Tau saves it to a temporary file in the execution environment when possible and reports the path. The agent reads that file instead of running the program again with its side effects. The file does not contain images or text lost to capture limits.
67
+ **Classify with a cheap model.** Ask a decision model typed questions, so the program can act on the answers without parsing prose. `tau.models` sees only what you pass:
40
68
 
41
- JPEG, PNG, and WebP images are validated outside the sandbox and fitted to 4,096 pixels per dimension and 3.5 MiB each. Source images can be at most 40 megapixels, and a program can emit at most 16 images. Valid images are kept even if the built-in `code` program fails.
69
+ ```js
70
+ const reports = await tau.bash.run({ command: "cat reports/*.txt" });
71
+ const { answers } = await tau.models.decisions({
72
+ model: "openai/gpt-6-luna-decisions",
73
+ state: reports.stdout,
74
+ questions: {
75
+ has_crash: {
76
+ type: "noul",
77
+ instructions: "Do these reports describe a crash?",
78
+ },
79
+ urgency: {
80
+ type: "score",
81
+ instructions: "How urgent is the worst report?",
82
+ criteria: ["Can wait", "Fix soon", "Blocking revenue"],
83
+ },
84
+ },
85
+ });
86
+ printText(JSON.stringify(answers));
87
+ ```
42
88
 
43
- The helper functions `truncate(text, { maxChars, position? })` and `truncateLines(text, { maxLines, position? })` return shortened strings with a marker where text was removed. `position` defaults to `middle`; `start` and `end` keep that end of the text. They do not print anything.
89
+ **Run subagents and collect results.** Start one worker per package, wait for all of them, and print a status line for each. Subagents keep running if the program ends early:
44
90
 
45
91
  ```js
46
- const result = await tau.bash.run({ command: "npm test" });
47
- printText(truncate(result.stdout, { maxChars: 4000 }));
92
+ const packages = ["api", "web", "worker"];
93
+ const workers = await Promise.all(
94
+ packages.map((name) =>
95
+ tau.agents.spawn({
96
+ title: `audit ${name}`,
97
+ prompt: `Audit packages/${name} for unused dependencies and list them.`,
98
+ }),
99
+ ),
100
+ );
101
+ const states = await Promise.all(
102
+ workers.map(({ id }) => tau.agents.waitUntilIdle({ id })),
103
+ );
104
+ for (const state of states)
105
+ printText(`${state.title}: ${state.status}, ${state.reason}`);
48
106
  ```
49
107
 
50
- ## Execution and limits
108
+ **Reuse a program.** A skill can ship a reviewed program and run it with different input, so the agent does not write it again. The agent passes `file` in place of inline code:
51
109
 
52
- Programs have no direct access to files, processes, environment variables, credentials, imports, timers, or the network. They can act only through the capabilities. Keep data in variables, and use `tau.bash` for files.
110
+ ```js
111
+ code({
112
+ file: ".agents/skills/audit/audit.js",
113
+ input: { project: "checkout", limit: 100 },
114
+ });
115
+
116
+ // audit.js
117
+ const { project, limit } = input;
118
+ ```
53
119
 
54
- A foreground `code` program times out after 5 minutes by default. `timeout` accepts 1–3,600,000 ms (60 minutes). The deadline covers the whole program, including capability calls. When it passes, the program stops, unresolved capability calls are cancelled, and the text printed so far is returned with a timeout notice. `tau.bash.run` follows the timeout rules of the `bash` tool: 60 seconds by default, and any positive number of milliseconds with no upper limit. The program's own deadline still cancels the command. A program can make 4,096 API requests, 32 at a time. Each serialized request and response can be at most 64 MiB. Object properties set to `undefined` are dropped, while `undefined` arguments and array entries are rejected. Programs are never retried, and failure or cancellation does not undo actions already taken.
120
+ A saved program is a single file of at most 1 MiB and cannot import other files. `input` is any JSON value up to 16 KiB.
55
121
 
56
- ## Background code jobs
122
+ ## Output
57
123
 
58
- With `background: true`, `code` starts the program as a background job and returns its ID right away. A background program has no overall deadline, and `background: true` cannot be combined with `timeout` or `maxOutputTokens`. Each capability call keeps its own time limit, and the request limits above still apply. As with Bash, agents are told to use background mode only when they can do other useful work while the program runs.
124
+ Only `printText(string)` and `await printImage({ data, mimeType })` produce output. Return values are ignored. `truncate(text, { maxChars })` and `truncateLines(text, { maxLines })` shorten text before printing.
59
125
 
60
- Along with `code`, Tau provides `list_code_jobs`, `read_code_job`, `stop_code_job`, and `wait_for_code_jobs`. They take the same arguments as the [Bash job tools](tools.md#bash) and return the same labeled blocks, with `source` (the file path or `inline code`) in place of `command` and no exit code. Status is `running`, `succeeded`, `failed`, or `stopped`. Output budgets, text logs, `includeOutput`, the wait timeout, and the 64-record limit work the same way. Each agent has separate 64-record limits for code jobs and Bash jobs.
126
+ Long text is cut in the middle to `maxOutputTokens`, which defaults to 8,192. When that happens, Tau tries to save the text to a temporary file and reports the path. The agent should read that file, because running the program again would repeat its side effects.
61
127
 
62
- A job keeps its images and the last 1 MiB of its printed text, in the order the program emitted them. The error message or stack trace of a failed program is part of its output. The text log contains only text. A response for several jobs includes at most 16 images in total, and says how many it left out; read those jobs one at a time to get their images.
128
+ ## Limits
63
129
 
64
- `stop_code_job` cancels the program and its in-flight capability calls, then waits for the program to end. Bash jobs that the program started with `tau.bash.start` keep running, and so do subagents it started with `tau.agents.spawn`. Stopping does not undo actions already taken.
130
+ A foreground program times out after 5 minutes, and `timeout` can raise this to 60 minutes. Programs can make 4,096 API requests, 32 at a time, and each request and response can be up to 64 MiB. Programs are never retried, and a failed program does not undo what it did.
65
131
 
66
- Code jobs have the same lifecycle and ownership as background Bash jobs: each job belongs to the agent that started it, and other agents cannot see it. Jobs keep running across turns, interruptions, and client disconnects, and keep an idle session loaded until they finish. Closing the session or shutting down the host stops the code jobs of every agent, then their Bash jobs. Jobs are not recovered after a restart, a failed program is never run again automatically, and a finished job never starts an agent turn by itself.
132
+ ## Background programs
67
133
 
68
- ## Capabilities
134
+ With `background: true`, `code` returns a job ID right away and the program has no overall deadline. `list_code_jobs`, `read_code_job`, `wait_for_code_jobs`, and `stop_code_job` work like the [Bash job tools](tools.md). Stopping a program does not stop the Bash jobs or subagents it started.
69
135
 
70
- - `tau.web`: metadata discovery, Exa search, and fetching page content. Search uses Auto with Dynamic Highlights to select evidence across results. An optional `objective` (1–4,096 nonblank characters) describes the broader task and facts to extract. Results include a `notices` array with retrieval qualifications such as relaxed query restrictions; each notice retains its `code`, `path`, `message`, and optional `details`. The agent prints notices alongside selected search results. The agent prefers local data, dedicated CLIs, first-party APIs, and structured sources over scraping web pages. For GitHub it uses `gh` or a Git checkout where suitable. Metadata discovery works without an Exa key; search and content fetching need one.
71
- - `tau.history`: read-only search and paginated transcripts. The agent uses it only when explicitly told to look at past sessions. It treats past content as data and never follows instructions in it. See [history](history.md).
72
- - `tau.mcp`: finding and calling tools and resources on configured MCP servers. When the persona allows MCP, enabled server names and optional configured descriptions are visible in the initial tool definition, before any tool call. Disabled servers and connection settings are omitted. These summaries guide discovery and do not grant permission to act. The agent reads each tool's description and schema before calling it. The capability is missing from sessions on a remote execution environment. A session and its subagents share connections, which open on first use, and calls that change data are never retried. An `isError` result is returned as data, while protocol failures throw. MCP server configuration and trust rules apply. See [configuration reference](config-reference.md#mcpservers) and [security](security.md#trust-mcp-servers).
73
- - `tau.bash`: `run`, `start`, `list`, `read`, `wait`, and `stop`. `run` returns stdout, stderr, and exit and termination fields, capturing up to 24 MiB. Beyond that it keeps the end, so check `truncated` before parsing. Optional UTF-8 `stdin` is limited to 16 MiB and closed after writing. Without `stdin` the command has no stdin at all, while `""` gives it an empty one. `start` takes no stdin. Background jobs are the same jobs that the agent's Bash job tools show, and each keeps the last 24 MiB of output. `read`, `wait`, and `stop` return that retained output as a string, without the job tools' token budget. `list` leaves out output and execution error messages. Jobs survive the program ending and interruption, while foreground commands are cancelled. The [Bash rules](tools.md#bash) apply.
74
- - `tau.models`: lists a fixed set of OpenRouter models and runs standalone chats or typed decisions with them. The initial tool definition names the chat and decision model IDs, so the agent can see them before any tool call. These calls do not see the session's conversation or tools. A chat can include a JSON Schema. Tau then requests structured output from the provider, and a complete answer is the parsed JSON. The agent uses that answer directly for ordinary extraction and analysis. How strictly the schema is enforced varies by provider, so the agent adds targeted checks when a constraint matters for a consequential action. Chat and decision media can be paths on the agent's machine or inline padded base64 with a matching MIME type. Inline media counts toward the 64 MiB request limit, so large files go by path. Credentials stay on the host. Provider usage data is returned, but these charges are not included in the session's cost or usage logs. Requests can be cancelled and are never retried automatically. Limits on input, models, media, responses, and requests are the same as in [OpenRouter](openrouter.md). Tau holds concurrent model requests to a shared memory budget, so a large request can wait for earlier ones to finish. Check whether a response completed or was refused instead of assuming it is a full answer.
75
- - `tau.agents`: starts subagents, sends them queued or steering input, interrupts them, waits until they are idle, and reads pages of their conversation traces. The main agent has it when the persona selects `agents`, and so do native Tau subagents at depth 1. Each agent reaches only its own descendants. Subagents keep working when the program that started or waits for them ends. See [subagents](subagents.md#managing-subagents).
136
+ ## Your own code-mode tools
76
137
 
77
- SDK and command client tools built on code mode use the same sandbox functions and output rules, with their own declared APIs. They take only inline code, without saved files, input, or background mode. Their programs time out after 60 seconds unless configured otherwise.
138
+ An SDK program or a client tool command can give the model its own API in the same sandbox. See [client tools](client-tools.md).
@@ -1,200 +1,106 @@
1
1
  # Configuration
2
2
 
3
- Tau builds configuration for a working directory. It combines the shipped defaults, the global level when it applies, and every project level on the path to that directory. The same field can therefore have different values on different machines or in different directories, so first find out which working directory applies.
4
-
5
- This page explains how the layers behave. Use [configuration reference](config-reference.md) for the fields themselves and [ownership and scope](ownership-and-scope.md) when more than one machine is involved.
6
-
7
- ## Where configuration is loaded
8
-
9
- Tau recognizes these `config.json` locations:
10
-
11
- | Level | Path | Included when |
12
- | --- | --- | --- |
13
- | Shipped defaults | Built into the installed Tau version | Always |
14
- | Global | `~/.config/tau/config.json` | The relevant `cwd` is the home directory or lies below it |
15
- | Project | `<ancestor>/.tau/config.json` | The ancestor is on the path from the relevant `cwd` to the discovery stop |
16
-
17
- When `cwd` is inside home, discovery stops at home. When it is outside home, the global level is omitted and project discovery continues to the filesystem root.
18
-
19
- A directory counts as a project level when it contains `.tau/` or `.agents/skills/`. The level does not need a `config.json` file, so a directory with only skills still takes part in content discovery.
20
-
21
- For this layout:
3
+ Tau reads `config.json` from these levels, and nearer levels win:
22
4
 
23
5
  ```text
24
- /home/ada/
25
- .config/tau/config.json
26
- work/ledger/
27
- .tau/config.json
28
- packages/api/
29
- .tau/config.json
30
- ```
31
-
32
- starting from `/home/ada/work/ledger/packages/api` loads, from least to most specific:
33
-
34
- ```text
35
- /home/ada/.config/tau/config.json
36
- /home/ada/work/ledger/.tau/config.json
37
- /home/ada/work/ledger/packages/api/.tau/config.json
38
- ```
39
-
40
- In a remote session, the session uses the `cwd` and home of the execution environment. An attached TUI loads its own client settings from the `cwd` and home of the `tau attach` process.
41
-
42
- ## How levels combine
43
-
44
- For most fields, **the most specific level wins**. A value in the nearest project level replaces the same field from broader levels, including whole objects.
45
-
46
- In `~/.config/tau/config.json`:
47
-
48
- ```json
49
- {
50
- "defaultPersona": "sonnet-5.5-coder"
51
- }
6
+ ~/.config/tau/config.json global, only when cwd is inside home
7
+ <ancestor>/.tau/config.json each project level, from broadest to nearest
52
8
  ```
53
9
 
54
- In `~/work/ledger/.tau/config.json`:
55
-
56
- ```json
57
- {
58
- "defaultPersona": "gpt-6.1-sol-coder:high"
59
- }
10
+ When the working directory is inside home, the search stops at home. Otherwise it continues to the filesystem root and skips the global level. A session reads these files on its execution environment, and a client reads them from its own startup directory. See [how Tau works](how-tau-works.md).
11
+
12
+ ## Fields
13
+
14
+ ```ts
15
+ type Config = {
16
+ defaultPersona?: string; // "id" or "id:reasoning", default "sonnet-5.5-coder"
17
+ defaultTheme?: string; // built-in theme ID, default "gold"
18
+ apiKeys?: Record<string, string>; // global only, keyed by provider
19
+ subagents?: { launchModels?: string[] }; // "<provider>/<model>:<effort>"
20
+ modelSystemNotices?: Record<string, string>; // keyed by "<provider>/<model>"
21
+ mcpServers?: Record<string, McpServer>; // see mcp.md
22
+ clientTools?: CommandClientTool[]; // global only, see client-tools.md
23
+ enabledClientTools?: string[]; // project only, [] selects none
24
+ speech?: {
25
+ voiceId?: string; // ElevenLabs voice for /speak and Telegram /tts_on
26
+ recordingShortcut?: {
27
+ key: string; // one printable character, "ctrl+y", or "f1" to "f12"
28
+ gesture: "press" | "double-tap";
29
+ };
30
+ cleanupStyle?: "off" | "default"; // TUI dictation cleanup, default "off"
31
+ vocabulary?: string[]; // spelling hints for transcription
32
+ };
33
+ markdownExport?: {
34
+ // global only, see tui.md
35
+ url: string; // HTTPS, or HTTP on localhost
36
+ token?: string;
37
+ tokenEnv?: string; // variable holding the token
38
+ };
39
+ history?: {
40
+ // global only, see history.md
41
+ endpoint: string;
42
+ apiKey?: string;
43
+ apiKeyEnv?: string;
44
+ };
45
+ flySprites?: {
46
+ // see remote-sessions.md
47
+ baseURL?: string; // default "https://api.sprites.dev"
48
+ token?: string;
49
+ tokenEnv?: string;
50
+ home?: string; // default "/home/sprite"
51
+ };
52
+ };
60
53
  ```
61
54
 
62
- Within the project, the effective default persona is `gpt-6.1-sol-coder:high`.
63
-
64
- A few fields use other rules:
65
-
66
- - `apiKeys` is global-only; project values are rejected.
67
- - `modelSystemNotices` merges by normalized `<provider>/<model>` key.
68
- - `flySprites` configures one connection; more-specific connection fields replace broader values.
69
- - `subagents.launchModels` selects the most-specific list.
70
- - `clientTools` is defined only at global scope. `enabledClientTools` at the most-specific project level is an exact selection from those definitions.
71
- - `history` is accepted only at global scope.
72
-
73
- An empty `enabledClientTools` list in a project disables all command client tools for that project:
55
+ An example:
74
56
 
75
57
  ```json
76
58
  {
77
- "enabledClientTools": []
59
+ "defaultPersona": "gpt-6.1-sol-coder:high",
60
+ "speech": { "vocabulary": ["Tau", "PostgreSQL"] },
61
+ "subagents": { "launchModels": ["openai/gpt-6-luna:medium"] },
62
+ "modelSystemNotices": {
63
+ "openai/gpt-6.1-sol": "Use the repository's formatter for source changes."
64
+ }
78
65
  }
79
66
  ```
80
67
 
81
- Without `enabledClientTools`, Tau selects global client tools whose `defaultEnabled` value is `true`. Unknown selected names are ignored.
68
+ A model system notice is added to later user input for that model. It is saved with the session, so keep secrets out of it.
82
69
 
83
- ## How relative paths resolve
70
+ ## How levels combine
84
71
 
85
- A relative path resolves from the level that declares it:
72
+ The nearest level replaces the whole field, with these exceptions:
86
73
 
87
- - A global `clientTools[].command` containing a slash resolves from home.
88
- - A bare command such as `git` is left bare and resolves through the owning process's `PATH`.
74
+ | Field | Behavior |
75
+ | --- | --- |
76
+ | `speech` | Merges by field. `vocabulary` lists add up, nearest first. |
77
+ | `modelSystemNotices` | Merges by key. |
78
+ | `flySprites` | Merges by field. |
79
+ | `mcpServers` | Merges by server name. A nearer entry replaces the whole server, including its credentials. |
89
80
 
90
- Other fields that contain paths are used as written, unless the field's reference entry says otherwise. For example, the `home` value of a hosted execution environment is passed on unchanged.
81
+ `apiKeys`, `clientTools`, `history`, and `markdownExport` are read from global configuration only. Tau rejects them in project files, so a cloned repository cannot set them.
91
82
 
92
83
  ## Invalid and unknown fields
93
84
 
94
- Each `config.json` must contain a JSON object. Malformed JSON, wrong types, invalid enum values, unknown model targets, and fields used at a forbidden scope produce configuration warnings. Tau keeps valid fields from the same file and continues merging other levels. Run `/reload` in an idle session to see the current warnings.
95
-
96
- An invalid field is skipped. If a broader level sets the same field validly, that broader value stays in effect. A warning therefore means your override did not apply.
97
-
98
- Unknown fields are removed without a warning, both at the top level and inside nested objects. This lets an older Tau version read configuration written for a newer one. It also means a misspelled field silently has no effect:
85
+ An invalid value produces a warning and is skipped, so a broader value may stay in effect. Unknown fields are removed without a warning, which means a misspelled field has no effect:
99
86
 
100
87
  ```json
101
- {
102
- "defaultPersnoa": "gpt-6.1-sol-coder"
103
- }
104
- ```
105
-
106
- This is valid JSON but sets nothing, because `defaultPersnoa` is not a known field. Check edited keys against the [configuration reference](config-reference.md), especially when no warning appears.
107
-
108
- ### See configuration warnings
109
-
110
- Where warnings appear depends on how the session was loaded:
111
-
112
- - `tau` prints warnings for its startup directory before opening the TUI. It shows warnings for other sessions it loads in the transcript.
113
- - `tau serve` and `tau telegram` write warnings for each session they create or recover to standard error, as JSON.
114
- - An in-process [Node SDK](node-sdk.md) client receives them through `onDiagnostic`.
115
- - `/reload` and `session.reload` return warnings for the current session, also in an attached client.
116
-
117
- ## Make a safe edit
118
-
119
- First find out what reads the setting, and on which machine, `cwd`, and home. Then choose the narrowest level that works:
120
-
121
- - Personal defaults and secrets usually belong in global configuration.
122
- - Settings for a repository that collaborators share belong in the project's `.tau/config.json`, as long as they contain no secrets or machine-specific commands.
123
- - Use a nested project level only when that subdirectory needs a different value.
124
- - Client commands belong on the client. Defining them in a remote execution environment does not make them appear on an attached laptop.
125
-
126
- Keep examples small and edit only the intended field. Validate JSON before asking Tau to load it:
127
-
128
- ```sh
129
- node -e 'JSON.parse(require("node:fs").readFileSync(process.argv[1], "utf8"))' \
130
- ~/.config/tau/config.json
88
+ { "defaultPersnoa": "gpt-6.1-sol-coder" }
131
89
  ```
132
90
 
133
- That check covers syntax only. To validate fields and content references, start Tau from the relevant `cwd`:
134
-
135
- ```sh
136
- cd ~/work/ledger
137
- tau --debug
138
- ```
139
-
140
- `--debug` inspects a local startup, and its output can include project instructions. It cannot show the state of a running host, a remote execution environment, or an attached client. For a running session, use `/reload` and read its configuration warnings. No command prints the complete effective configuration.
141
-
142
- Never check a secret by printing the full config or environment into a shared transcript. Instead, run the operation that needs the credential. For Codex OAuth accounts, use the auth commands.
143
-
144
- ## When changes take effect
145
-
146
- ### New local or client process
147
-
148
- Tau loads client configuration before opening the TUI. Restart the local TUI or `tau attach` to apply client changes such as:
149
-
150
- - `defaultTheme`
151
- - `clientTools` and `enabledClientTools`
152
- - `speech.voiceId` and `speech.recordingShortcut`
153
- - the client's global `speech.vocabulary` terms
154
- - client environment variables
155
-
156
- `/theme:<id>` changes only the current client's appearance. Themes are not saved in the session.
157
-
158
- ### Current session runtime
159
-
160
- When no turn is running, `/reload` reads configuration and content again from the execution environment. It updates the session's runtime configuration, model catalog, personas, prompts, skills, the selected persona's definition, and project context. It also reports warnings and refreshes the session catalog, including its speech vocabulary. MCP server definitions stay as they were when the host loaded the session, and reload warns if the definitions on disk differ. See [`mcpServers`](config-reference.md#mcpservers).
161
-
162
- The session keeps its current persona if that persona still exists. Otherwise Tau picks the first available persona. Changing `defaultPersona` does not switch an existing session on reload. It applies to new sessions, unless a CLI flag or creation request chooses another persona.
163
-
164
- A turn keeps the persona, model settings, and tools it started with. Reload is refused while a turn is running, and reloaded settings apply to later turns.
165
-
166
- ### Host startup
167
-
168
- Restart the host process to apply settings that the host reads once at startup, including:
169
-
170
- - `flySprites`
171
- - `history`
172
- - host environment variables
173
-
174
- For `tau serve`, make the changes on the host machine and restart the server. Restarting an attached TUI does not restart the host.
175
-
176
- ### New session or runner
177
-
178
- Some settings apply only when something new is created. `defaultPersona` and startup persona flags choose the persona of a new session. The execution environment's kind, identity, `cwd`, and home are fixed when the session is created or recovered.
179
-
180
- The Telegram runner loads its speech provider and its runner config at startup. Restart it after changing its voice, its global speech vocabulary, bot startup settings, presets, projects, routing, or workspace preparation.
181
-
182
- - Workspace-preparation changes apply when a managed workspace is created or reconstructed. Restarting does not change a preserved workspace.
183
- - Command client tools are chosen when the runner creates the client for a session. Changes apply to new sessions, and also to existing sessions when a runner restart recovers them.
184
- - Existing sessions keep their recorded execution environment, unless recovery has to reconstruct a missing managed workspace (see [Telegram projects and workspaces](telegram-projects.md)).
185
-
186
- ## Common precedence mistakes
187
-
188
- **Editing global config for a project outside home.** The global level is skipped when the relevant `cwd` is outside home. Add a project level, or change the environment's configured home.
189
-
190
- **Editing the laptop for host behavior.** Credentials, session storage, hosted-environment definitions, and project configuration on the laptop do not reach a remote host through an attached TUI.
191
-
192
- **Editing the host's files for a hosted environment.** A hosted execution environment has its own project files and home. Put project `.tau` content on that environment, not at a similar path on the host.
91
+ `tau` prints warnings at startup, `/reload` shows them for the current session, and `tau serve` and `tau telegram` write them to stderr. To check a new local startup, run `tau --debug` from the project directory.
193
92
 
194
- **Expecting nested objects to deep-merge.** A nearer `mcpServers` entry replaces the whole entry with the same name, including its credentials. Repeat every setting the entry needs.
93
+ ## When changes apply
195
94
 
196
- **Expecting `/reload` to restart the client or server.** Reload affects only the current session. Restart the process that reads the setting at startup.
95
+ | Change | How to apply |
96
+ | --- | --- |
97
+ | `subagents`, `modelSystemNotices`, `speech.vocabulary` in a project | `/reload` while idle |
98
+ | `defaultPersona` | Applies to new sessions |
99
+ | `mcpServers` | New session, or reopen the session after the host unloads it |
100
+ | `defaultTheme`, `voiceId`, `recordingShortcut`, `cleanupStyle`, `markdownExport`, client tools | Restart the client |
101
+ | `apiKeys`, `history`, `flySprites`, host environment variables | Restart the host |
102
+ | Telegram configuration | Restart the runner |
197
103
 
198
- **Using a project file for global-only fields.** `apiKeys`, `clientTools`, and `history` are rejected outside global config. `enabledClientTools` is rejected outside project config.
104
+ ## Choosing a level
199
105
 
200
- **Trusting a silent typo.** Unknown fields are removed without a warning. Valid JSON is not necessarily valid Tau configuration, so check exact names and confirm the setting changed behavior.
106
+ Put personal defaults and secrets in global configuration. Put settings that collaborators share in the repository's `.tau/config.json`, and use a nested level only when a subdirectory needs a different value.