Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 0 additions & 78 deletions docs/agents/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ tools:
# Exec mode doesn't use planning tools
- propose_plan
- ask_user_question
# Internal-only tools
- system1_keep_ranges
# Global config and catalog tools stay out of general-purpose agents
- mux_agents_.*
- agent_skill_write
Expand Down Expand Up @@ -647,8 +645,6 @@ tools:
# No planning tools
- propose_plan
- ask_user_question
# Internal-only
- system1_keep_ranges
# Global config and catalog tools
- mux_agents_.*
- agent_skill_write
Expand Down Expand Up @@ -746,80 +742,6 @@ Do not emit text responses. Call the `propose_name` tool immediately.

</Accordion>

### System1 Bash (internal)

**Fast bash-output filtering (internal)**

<Accordion title="View system1_bash.md">

```md
---
name: System1 Bash
description: Fast bash-output filtering (internal)
ui:
hidden: true
subagent:
runnable: false
tools:
add:
- system1_keep_ranges
---

You are a fast bash-output filtering assistant.

You will be given:

- `maxKeptLines` (budget)
- `Display name` (optional): a short intent label for the command
- `Bash script`
- `Numbered output`

Given the numbered output, decide which lines to keep so the user sees the most relevant information.

IMPORTANT:

- You MUST call `system1_keep_ranges` exactly once.
- Do NOT output markdown or prose. Only the tool call (with valid JSON arguments).

Rules:

- Line numbers are 1-based indices into the numbered output.
- Use the `Display name` and `Bash script` as intent hints.
- If intent is exploration/listing/search (e.g. `ls`, `find`, `rg`, `grep`, `git status`), prioritize keeping
representative file paths/matches and any summary/counts (not just errors).
- If intent is build/test/logs, prefer errors, stack traces, failing test summaries, and actionable warnings.
- If the script already narrows output to a slice (e.g. `head`, `tail`, `sed -n` line ranges), avoid extra
denoising: prefer keeping most/all lines within the budget.
- Never filter out git merge conflict markers (`<<<<<<<`, `|||||||`, `=======`, `>>>>>>>`). If the command is searching for these markers (e.g. `rg`/`grep`), do not keep only representative matches; keep all matches within the budget.
- Prefer omitting tool-generated advisory blocks (especially git lines starting with `hint:`) that only suggest
next-step commands or point to docs/help. Keep the underlying `error:`/`fatal:`/`CONFLICT` lines, file paths,
and conflict markers instead.
- Exception: keep `hint:` blocks when the script is explicitly searching for them (e.g. `rg '^hint:'`) or when
the hint is the only clue explaining a blocking state.
- Prefer high signal density: keep ranges tight around important lines plus minimal surrounding context.
- Merge adjacent/overlapping ranges only when the lines between are also informative. Do NOT add noise just
to reduce range count; it's OK to return many ranges when denoising (e.g., > 8).
- Denoise aggressively: omit duplicate/redundant lines and repeated messages with the same meaning
(e.g., repeated progress, retries, or identical stack traces). If the same error repeats, keep only
the most informative instance plus minimal surrounding context.
- If there are many similar warnings/errors, keep only a few representative examples (prefer those
with file paths/line numbers) plus any summary/count.
- Always keep at least 1 line if any output exists.
- Choose ranges that keep at most `maxKeptLines` lines total (the caller may truncate).

Example:

- Numbered output:
- 0001| building...
- 0002| ERROR: expected X, got Y
- 0003| at path/to/file.ts:12:3
- 0004| done
- Tool call:
- system1_keep_ranges({"keep_ranges":[{"start":2,"end":3,"reason":"error"}]})
```

</Accordion>

{/* END BUILTIN_AGENTS */}

## Related Docs
Expand Down
12 changes: 0 additions & 12 deletions docs/hooks/tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -594,18 +594,6 @@ If a value is too large for the environment, it may be omitted (not set). Mux al

</details>

<details>
<summary>system1_keep_ranges (4)</summary>

| Env var | JSON path | Type | Description |
| ------------------------------------------- | ----------------------------- | ------ | ------------------------------------------------------- |
| `MUX_TOOL_INPUT_KEEP_RANGES_<INDEX>_END` | `keep_ranges[<INDEX>].end` | number | 1-based end line (inclusive) in the numbered output |
| `MUX_TOOL_INPUT_KEEP_RANGES_<INDEX>_REASON` | `keep_ranges[<INDEX>].reason` | string | Optional short reason for keeping this range |
| `MUX_TOOL_INPUT_KEEP_RANGES_<INDEX>_START` | `keep_ranges[<INDEX>].start` | number | 1-based start line (inclusive) in the numbered output |
| `MUX_TOOL_INPUT_KEEP_RANGES_COUNT` | `keep_ranges.length` | number | Number of elements in keep_ranges (Line ranges to keep) |

</details>

<details>
<summary>task (8)</summary>

Expand Down
Loading
Loading