dream

A background memory-maintenance command that reviews stored project memories, either on demand or during scheduled overnight runs on macOS.

In plain words
What is it for?
Use it to run or schedule memory consolidation, force a run, inspect logs, and review model calls, token estimates, costs, or skipped runs.
Why use it?
It helps keep accumulated memories organized while checking machine, time, idle-state, and cost limits before using an AI model.

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/proticom/gnosys/dream
Clone the repo
git clone --depth 1 https://github.com/proticom/gnosys
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 1,088 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.01088
Opus 5 $0.00000 $0.00544
Sonnet 5 $0.00000 $0.00218
Haiku 4.5 $0.00000 $0.00109

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

Security

Grade A, and why

dream 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.

docs/commands/dream.md · 120 lines

How it starts

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

gnosys dream

Dream Mode — night-time memory consolidation. Manual commands run one cycle immediately; scheduled runs are launched by a single machine-level launchd agent, not by MCP connections.

Scheduled runs

gnosys setup dream installs ~/Library/LaunchAgents/com.gnosys.dream.plist on macOS, which runs gnosys dream run --scheduled. Scheduled runs apply four cheap gates before any LLM work — designated machine, night window (dream.schedule), real system idle time (dream.systemIdleMinutes), and dreamworthiness (dream.minNewMemoriesToDream + dream.minHoursBetweenRuns) — and write a skipped-run record explaining any skip.

Cost controls

dream.maxLLMCallsPerRun is a hard ceiling. Relationship/summary/critique work skips memory batches already analyzed (fingerprints in ~/.gnosys/dream-state.json). Every run logs LLM calls made vs skipped, estimated tokens, and estimated cost to ~/.gnosys/dream-runs.jsonl; view it with gnosys dream report.

Usage

gnosys dream
gnosys dream --max-runtime 30 --json
gnosys dream --force
gnosys dream run
gnosys dream log

Options (bare gnosys dream and gnosys dream run)

Option Description
--max-runtime <minutes> Max runtime in minutes (default: 30)
--no-critique Skip self-critique phase
--no-summaries Skip summary generation
--no-relationships Skip relationship discovery
--force Run even if this machine is not the designated dream node
--scheduled Apply the launchd scheduler gates (designated machine, night window, system idle, dreamworthiness)
--json Output raw JSON report instead of formatted text

Behavior

Bare gnosys dream runs one Dream Mode cycle using the active store (same executor as gnosys dream run).

  1. Resolves configured stores via GnosysResolver.
  2. Loads config from the primary store path.
  3. Opens the store DB and verifies gnosys.db is migrated (v2.0).
  4. Checks designated-machine policy against the central DB.
  5. Runs GnosysDreamEngine.dream() with phase progress on stderr.
  6. Prints formatDreamReport(report) to stdout, or JSON when --json is set.

Read the full file on GitHub · 120 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 · 120 lines · 0 tokens per session scan A a36cad1c5d10

Subscribe to this mod's changes

dream is a command published in the GitHub repository proticom/gnosys (4 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,088 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-31.