From b59ba1dc8ea587e05534554a92c8fce287b53e95 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Fri, 24 Apr 2026 23:18:25 -0700 Subject: [PATCH] docs: cover new contextInjection 'never' mode and Nix daemon PATH support Two recent code changes lacked or had only partial doc coverage: - contextInjection 'never' (#65006, xDarkicex): the new mode is now documented under agents.defaults.contextInjection, alongside the existing 'continuation-skip' mode, with guidance on when to use it (custom context engines, native runtimes that own their prompt). - Nix Home Manager daemon PATH (#44402, jerome.benoit): document the service PATH auto-discovery (NIX_PROFILES right-to-left precedence and ~/.nix-profile/bin fallback) under the Nix install page. Also sentence-case three Title-Cased headings on the Nix page ('What You Get', 'Quick Start', 'Nix Mode Runtime Behavior') and drop a duplicate body H1 that restated the frontmatter title. --- docs/gateway/config-agents.md | 1 + docs/install/nix.md | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/gateway/config-agents.md b/docs/gateway/config-agents.md index 9224859790d..a9b98244602 100644 --- a/docs/gateway/config-agents.md +++ b/docs/gateway/config-agents.md @@ -72,6 +72,7 @@ Disables automatic creation of workspace bootstrap files (`AGENTS.md`, `SOUL.md` Controls when workspace bootstrap files are injected into the system prompt. Default: `"always"`. - `"continuation-skip"`: safe continuation turns (after a completed assistant response) skip workspace bootstrap re-injection, reducing prompt size. Heartbeat runs and post-compaction retries still rebuild context. +- `"never"`: disable workspace bootstrap and context-file injection on every turn. Use this only for agents that fully own their prompt lifecycle (custom context engines, native runtimes that build their own context, or specialized bootstrap-free workflows). Heartbeat and compaction-recovery turns also skip injection. ```json5 { diff --git a/docs/install/nix.md b/docs/install/nix.md index 371cee007a2..df7efe88ff4 100644 --- a/docs/install/nix.md +++ b/docs/install/nix.md @@ -7,22 +7,20 @@ read_when: title: "Nix" --- -# Nix Installation - -Install OpenClaw declaratively with **[nix-openclaw](https://github.com/openclaw/nix-openclaw)** -- a batteries-included Home Manager module. +Install OpenClaw declaratively with **[nix-openclaw](https://github.com/openclaw/nix-openclaw)** — a batteries-included Home Manager module. The [nix-openclaw](https://github.com/openclaw/nix-openclaw) repo is the source of truth for Nix installation. This page is a quick overview. -## What You Get +## What you get - Gateway + macOS app + tools (whisper, spotify, cameras) -- all pinned - Launchd service that survives reboots - Plugin system with declarative config - Instant rollback: `home-manager switch --rollback` -## Quick Start +## Quick start @@ -50,7 +48,7 @@ The [nix-openclaw](https://github.com/openclaw/nix-openclaw) repo is the source See the [nix-openclaw README](https://github.com/openclaw/nix-openclaw) for full module options and examples. -## Nix Mode Runtime Behavior +## Nix-mode runtime behavior When `OPENCLAW_NIX_MODE=1` is set (automatic with nix-openclaw), OpenClaw enters a deterministic mode that disables auto-install flows. @@ -82,6 +80,18 @@ OpenClaw reads JSON5 config from `OPENCLAW_CONFIG_PATH` and stores mutable data | `OPENCLAW_STATE_DIR` | `~/.openclaw` | | `OPENCLAW_CONFIG_PATH` | `$OPENCLAW_STATE_DIR/openclaw.json` | +### Service PATH discovery + +The launchd/systemd gateway service auto-discovers Nix-profile binaries so +plugins and tools that shell out to `nix`-installed executables work without +manual PATH setup: + +- When `NIX_PROFILES` is set, every entry is added to the service PATH in + right-to-left precedence (matches Nix shell precedence — rightmost wins). +- When `NIX_PROFILES` is unset, `~/.nix-profile/bin` is added as a fallback. + +This applies to both macOS launchd and Linux systemd service environments. + ## Related - [nix-openclaw](https://github.com/openclaw/nix-openclaw) -- full setup guide