You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/config-files.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -377,7 +377,7 @@ Retries only apply to transient failures — connection errors, timeouts, HTTP 4
377
377
|`print_wait_ceiling_s`|`integer`|`2147483`| In print mode (`pythinker -p`), the wall-clock ceiling (seconds) for the wait/steer loop when `print_background_mode` is `"drain"` or `"steer"` (the default is ~24.8 days — effectively unbounded). Has no effect outside print mode or when it is `"exit"`|
378
378
|`print_max_turns`|`integer`|`100000`| In print mode (`pythinker -p`) with `print_background_mode = "steer"`, the maximum number of new turns that may be triggered by background-task completions, to keep the steering loop bounded (the default is effectively unbounded) |
379
379
380
-
`keep_alive_on_exit` can be overridden by the `PYTHINKER_CODE_BACKGROUND_KEEP_ALIVE_ON_EXIT` environment variable, and `max_running_tasks` by `PYTHINKER_CODE_BACKGROUND_MAX_RUNNING_TASKS`; both take higher priority than `config.toml`.
380
+
`keep_alive_on_exit` can be overridden by the `PYTHINKER_CODE_BACKGROUND_KEEP_ALIVE_ON_EXIT` environment variable, `max_running_tasks` by `PYTHINKER_CODE_BACKGROUND_MAX_RUNNING_TASKS`, `bash_task_timeout_s` by `PYTHINKER_CODE_BACKGROUND_BASH_TASK_TIMEOUT_S`, and `print_background_mode`, `print_wait_ceiling_s`, and `print_max_turns` by `PYTHINKER_CODE_BACKGROUND_PRINT_BACKGROUND_MODE`, `PYTHINKER_CODE_BACKGROUND_PRINT_WAIT_CEILING_S`, and `PYTHINKER_CODE_BACKGROUND_PRINT_MAX_TURNS`; all take higher priority than `config.toml`.
381
381
382
382
In print mode (`pythinker -p "<prompt>"`), Pythinker Code stays alive after the main agent's turn as long as background tasks are still pending: each completion is fed back to the main agent as a synthetic user message, steering it into a new turn (`print_background_mode = "steer"` by default), and the run exits once a turn ends with nothing pending. The loop is bounded by `print_wait_ceiling_s` and `print_max_turns`, both effectively unbounded by default. Background work is never killed by a wall-clock cap in print mode either: background `Bash` tasks default to no timeout (`bash_task_timeout_s = 0`), and subagents run without a timeout (`[subagent] timeout_ms` and `[dynamic_workflow] timeout_ms` both default to `0` unless explicitly set), so only the model itself stops a task. Set `print_background_mode` to `"drain"` to wait for tasks without feeding results back, or `"exit"` to end the run as soon as the main agent finishes.
Copy file name to clipboardExpand all lines: docs/configuration/env-vars.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,10 @@ Switches that control the behavior of subsystems such as telemetry, background t
126
126
|`PYTHINKER_CODE_PASSWORD`| Set a parallel auth credential for the `pythinker web` local server, valid alongside the bearer token; recommended when binding the server beyond loopback — see [Local server and API](../guides/server.md#authentication)| Any non-empty string; when unset, only the token is valid |
127
127
|`PYTHINKER_CODE_BACKGROUND_KEEP_ALIVE_ON_EXIT`| Whether to keep background tasks when the session closes; takes higher priority than `config.toml`. The default is to stop them on exit | Truthy: `1`/`true`/`yes`/`on`; falsy: `0`/`false`/`no`/`off`|
128
128
|`PYTHINKER_CODE_BACKGROUND_MAX_RUNNING_TASKS`| Cap on concurrently running background tasks; takes higher priority than `[background] max_running_tasks` in `config.toml` (unset means no cap) | Positive integer; invalid values are ignored |
129
+
|`PYTHINKER_CODE_BACKGROUND_BASH_TASK_TIMEOUT_S`| Default timeout (seconds) for background `Bash` tasks, also used to re-arm foreground commands moved to the background; takes higher priority than `[task] bash_task_timeout_s` (`0` means no timeout) | Non-negative integer; invalid values are ignored |
130
+
|`PYTHINKER_CODE_BACKGROUND_PRINT_BACKGROUND_MODE`| What `pythinker -p` does while background tasks are still pending after the main turn; takes higher priority than `[task] print_background_mode`|`exit`, `drain`, or `steer`; invalid values are ignored |
131
+
|`PYTHINKER_CODE_BACKGROUND_PRINT_WAIT_CEILING_S`| Wall-clock ceiling (seconds) for the print-mode drain/steer wait; takes higher priority than `[task] print_wait_ceiling_s`| Positive integer; invalid values are ignored |
132
+
|`PYTHINKER_CODE_BACKGROUND_PRINT_MAX_TURNS`| Maximum number of new turns triggered by background-task completions in print mode; takes higher priority than `[task] print_max_turns`| Positive integer; invalid values are ignored |
129
133
|`PYTHINKER_IMAGE_MAX_EDGE_PX`| Longest-edge ceiling (px) for image compression; takes higher priority than `[image] max_edge_px` in `config.toml` (default `2000`) | Positive integer; invalid values are ignored |
130
134
|`PYTHINKER_IMAGE_READ_BYTE_BUDGET`| Per-image byte budget for model-initiated image reads (`ReadMediaFile` default reads); takes higher priority than `[image] read_byte_budget` in `config.toml` (default `262144`, i.e. 256 KB) | Positive integer; invalid values are ignored |
131
135
|`PYTHINKER_CODE_PLUGIN_MARKETPLACE_URL`| Override the plugin marketplace JSON loaded by `/plugins`; useful for dev loopback servers, staging CDN files, or alternate marketplace directories | Unset (no default catalog; unset means only built-in entries are shown); accepts `http://`, `file://` URLs, and local paths |
0 commit comments