sync

A background watcher that notices when another coding session adds shared notes to the project and alerts you. It can also perform one check and exit.

In plain words
What is it for?
Run it in a separate terminal while working with multiple AI sessions, or use a one-time check to see what has already been shared.
Why use it?
It keeps parallel coding sessions from silently missing discoveries or decisions recorded by another session.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/404-not-found/mindlink/sync
Clone the repo
git clone --depth 1 https://github.com/404-not-found/mindlink
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 553 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00553
Opus 5 $0.00000 $0.00277
Sonnet 5 $0.00000 $0.00111
Haiku 4.5 $0.00000 $0.00055

Measured 2d ago against content hash d90b597d6214, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/sync.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Watch for shared context written by other sessions and surface it automatically.

Run this in a dedicated background terminal tab while your AI sessions are active. It stays running until you stop it (Ctrl+C).


Synopsis

mindlink sync [--once] [--no-progress]

What "watch mode" means

Watch mode is the default — when you run mindlink sync with no flags, the process stays alive. It watches .brain/SHARED.md for any new content written by other sessions in this project. The moment another session appends a discovery or decision, sync detects the change and prints a notification so you know to tell your AI to check SHARED.md.

This is designed to run in a separate terminal tab alongside your AI session, not as a one-shot command.

--once runs a single check and exits — useful when you just want to see what's been shared so far without keeping a watcher running.

If you enabled auto-sync during mindlink init, sync runs automatically in the background — you don't need to run this manually.


Options

Flag Description
--once Sync once and exit instead of watching continuously
--no-progress Suppress progress output (useful in scripts)

Examples

Watch mode (default) — runs until you stop it:

mindlink sync

Sync once and exit:

mindlink sync --once

Output

Watch mode:

Watching for changes...  (Ctrl+C to stop)

[Apr 9 14:32]  Session A wrote 3 new entries  →  synced ✓
[Apr 9 14:45]  Session B wrote 1 new entry    →  synced ✓

Single run:

Syncing shared context...

Session A  →  3 new entries
Session B  →  1 new entry

[████████████████████] 100%

✓  SHARED.md merged. Both sessions are now in sync.

Nothing to sync:

✓  Already in sync. No new entries to merge.

Changing Auto-Sync Setting

To enable or disable auto-sync (set during mindlink init):

mindlink config

Select Auto-sync from the menu.

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 97 lines · 0 tokens per session scan A d90b597d6214

Subscribe to this mod's changes

sync is a command published in the GitHub repository 404-not-found/mindlink (11 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 553 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.