Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
1856fc4
system1: add background project memory writer
ThomasK33 Jan 26, 2026
092e901
system1: fix static-check for memory writer
ThomasK33 Jan 26, 2026
f76b16d
system1: pass global AGENTS.md to memory writer
ThomasK33 Jan 26, 2026
d97be23
system1: tag memory writer instruction blocks
ThomasK33 Jan 26, 2026
78fad72
system1: tag memory file content in writer prompt
ThomasK33 Jan 26, 2026
e2906f0
system1: move model/thinking defaults to agentAiDefaults
ThomasK33 Jan 26, 2026
233391c
System1: persist memory writer schedule state across restarts
ThomasK33 Jan 27, 2026
5092c04
settings: restore System 1 settings section
ThomasK33 Jan 27, 2026
f51967a
system1: add debug logs for memory writer scheduling
ThomasK33 Jan 27, 2026
36e9253
system1: dump memory writer trace to debug_obj
ThomasK33 Jan 27, 2026
66dbb6e
tests: fix Settings storybook assertions for System 1
ThomasK33 Jan 28, 2026
b89ec5c
tests: stop expecting Compact in Tasks settings story
ThomasK33 Jan 28, 2026
96b8360
agents: fix Plan tools YAML
ThomasK33 Jan 30, 2026
f6c84ca
rebase: fix send options merge fallout
ThomasK33 Feb 17, 2026
bde1e85
🤖 fix: resolve rebase fallout for system1 stream integration
ThomasK33 Feb 17, 2026
64b8db4
🤖 fix: align flake offline cache hash with CI
ThomasK33 Feb 17, 2026
7db025e
🤖 fix: restore flake offline hash after rebasing main
ThomasK33 Feb 17, 2026
5f8b7cf
🤖 fix: stabilize System1 settings tests after route migration
ThomasK33 Feb 17, 2026
308beb0
🤖 fix: make memory_write replace_count nullish
ThomasK33 Feb 17, 2026
0132828
🤖 fix: avoid ambiguous General button lookup in thinkingPolicy test
ThomasK33 Feb 17, 2026
4f35f2e
🤖 test: align thinkingPolicy assertions with current Internal section…
ThomasK33 Feb 17, 2026
11723c6
Clamp unsupported agent defaults reasoning values in settings
ThomasK33 Feb 17, 2026
b8aeac9
Add CI retries for compaction 1M integration test
ThomasK33 Feb 17, 2026
8d3844a
Harden fast-exit foreground migration assertion on Windows
ThomasK33 Feb 17, 2026
d11d8ea
Wait for stream subscription in compaction retry test
ThomasK33 Feb 17, 2026
db5abe9
Fix memory writer model resolution and event budget clamping
ThomasK33 Feb 17, 2026
93994f9
Avoid logging memory content at info level
ThomasK33 Feb 17, 2026
cc2b464
Schedule deferred memory-writer runs after in-flight completion
ThomasK33 Feb 17, 2026
312edfd
Harden compaction integration test against prolonged 529 overload
ThomasK33 Feb 17, 2026
fd966d9
Read System1 send overrides from agent defaults
ThomasK33 Feb 17, 2026
33b7519
Fix empty-memory CAS prompt and validate replace_count
ThomasK33 Feb 17, 2026
e98f000
Treat compaction integration timeouts as inconclusive
ThomasK33 Feb 17, 2026
5d7836b
🤖 feat: require explicit no-op or write for system1 memories
ThomasK33 Feb 17, 2026
d6cc293
🤖 fix: remove stale import after rebase conflict resolution
ThomasK33 Feb 18, 2026
76b496a
🤖 fix: keep no_new_memories out of default tool allowlist
ThomasK33 Feb 18, 2026
59ca769
🤖 fix: scope no_new_memories away from normal agent toolsets
ThomasK33 Feb 18, 2026
fe3120b
🤖 fix: keep memory mutation tools internal-only
ThomasK33 Feb 19, 2026
5b8435d
🤖 fix: re-check system1 gate for deferred memory runs
ThomasK33 Feb 19, 2026
df372bd
🤖 fix: tighten deferred memory run gating and cleanup
ThomasK33 Feb 19, 2026
d67868d
🤖 fix: skip memory writer scheduling for mux-help
ThomasK33 Feb 19, 2026
29aae56
🤖 fix: address memory writer capacity and fallback metadata
ThomasK33 Feb 19, 2026
97655d6
🤖 fix: require a new turn before follow-up memory runs
ThomasK33 Feb 19, 2026
575801f
🤖 fix: preserve interval cadence during in-flight runs
ThomasK33 Feb 19, 2026
acc5663
🤖 fix: bound gh auth lookup time in signing service
ThomasK33 Feb 19, 2026
65eed73
🤖 fix: soften and retryable gh auth timeout handling
ThomasK33 Feb 19, 2026
7d101dc
🤖 fix: honor memory writer enabled override
ThomasK33 Feb 19, 2026
86b606c
🤖 fix: kill process trees when disposing exec commands
ThomasK33 Feb 19, 2026
ca39a2f
🤖 fix: ignore no_new_memories after failed memory_write
ThomasK33 Feb 19, 2026
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
71 changes: 71 additions & 0 deletions docs/agents/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ tools:
- ask_user_question
# Internal-only tools
- system1_keep_ranges
- memory_read
- memory_write
---

You are in Exec mode.
Expand Down Expand Up @@ -525,6 +527,11 @@ tools:
remove:
# Plan should not apply sub-agent patches.
- task_apply_git_patch
# Internal-only tools
- system1_keep_ranges
- memory_read
- memory_write

# Note: file_edit_* tools ARE available but restricted to plan file only at runtime
# Note: task tools ARE enabled - Plan delegates to Explore sub-agents
---
Expand Down Expand Up @@ -758,6 +765,70 @@ Example:

</Accordion>

### System1 Memory Writer (internal)

**Background project memory writing (internal)**

<Accordion title="View system1_memory_writer.md">

```md
---
name: System1 Memory Writer
description: Background project memory writing (internal)
ui:
hidden: true
subagent:
runnable: false
tools:
add:
- memory_read
- memory_write
- no_new_memories
---

You are a background memory-writing assistant.

You will be given:

- The current conversation transcript (including tool calls/results)
- Global instructions (wrapped in <global-instructions>...</global-instructions>)
- Project/workspace instructions (wrapped in <context-instructions>...</context-instructions>)
- The current contents of the project's memory file (wrapped in <memory-file>...</memory-file>)

Your task:

- Extract durable, project-specific learnings that would help future assistants.
- Do NOT restate information already present in either global or project/workspace instructions.
- Be concise. Prefer short bullet points.
- Avoid timestamps and ephemeral details unless they are truly important.
- NEVER store secrets, API keys, credentials, or private user data.

Output requirements:

- Do NOT output prose or markdown directly.
- Use tool calls only.
- You MUST finish by calling exactly one of:
- memory_write (when adding/updating memories)
- no_new_memories (when no durable update is needed)

Writing rules:

- Prefer a compare-and-swap style update:
- Set old_string to the exact memory content you were provided.
- Set new_string to the full updated memory file content.
- This avoids clobbering concurrent updates.

- If the provided transcript has no durable project memory updates worth storing:
- Call no_new_memories exactly once.

- If your first memory_write call fails because old_string is stale:
- Call memory_read() to fetch the latest memory file content.
- Retry memory_write using the latest content as old_string.
- Do at most one read+retry.
```

</Accordion>

{/* END BUILTIN_AGENTS */}

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

</details>

<details>
<summary>memory_write (3)</summary>

| Env var | JSON path | Type | Description |
| ------------------------------ | --------------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
| `MUX_TOOL_INPUT_NEW_STRING` | `new_string` | string | Replacement text (usually the full updated file content) |
| `MUX_TOOL_INPUT_OLD_STRING` | `old_string` | string | Exact text to replace (usually the full current file content) |
| `MUX_TOOL_INPUT_REPLACE_COUNT` | `replace_count` | number | Number of occurrences to replace (default: 1). Use -1 to replace all occurrences. If 1, old_string must be unique. |

</details>

<details>
<summary>mux_global_agents_write (2)</summary>

Expand Down
Loading
Loading