Skip to content

Workspace Strategy Memory

Workspace strategy memory makes BMO adaptive across time. After several sessions in a workspace, BMO converges to effective orchestration faster because it uses prior workspace evidence — remembering which genome presets, expression profiles, and patterns worked in past sessions.

Maturity: Advanced context-memory surface. It influences orchestration context from prior runs; it is not a hidden instruction channel and does not override current mode, tools, permissions, or operator steering.

  • Faster convergence — BMO uses the orchestration strategy that worked before, instead of re-discovering it every session.
  • Loop avoidance — Past loop detection patterns are surfaced so BMO can deprioritize tools that caused loops.
  • Informed classification — The adaptive orchestration classifier receives a soft prior from past sessions, biased by efficacy evidence rather than raw repetition alone.

Strategy memory builds on Adaptive Orchestration (the genome preset and classifier it biases), expression profiles from plasticity, and Persistent Memory (the storage backend). It complements the Prompt Enhancer by adding workspace-specific orchestration history to the system prompt context.

Workspace strategy memory is on by default for regular BMO runs. Keep it on when you work in the same workspace regularly and want BMO to learn from past sessions:

[options.workspace_strategy_memory]
# enabled = false # opt out when every session should start strategy-cold
retention_cap = 20 # entries to keep (default: 20, range: 1-100)

When disabled, BMO behaves without cross-session strategy context: each session starts strategy-cold.

  • You need a one-off session to ignore prior workspace strategy evidence.
  • You are debugging orchestration classification and want a strategy-cold run.
  • You need durable task handoff notes; use workstreams, markers, or explicit documentation instead.

If a higher-precedence config sets retention_cap = 0, BMO resets to the normal default retention behavior instead of inheriting a lower-precedence nonzero cap. See the Configuration reference for merge semantics.

Use the /strategy slash command to open the workspace strategy inspector. It shows all strategy entries for the current workspace with their confidence scores, dominant presets, and key signals.

Strategy entries are also accessible via memory tools (memory_list, memory_search) with scope = "workspace_strategy".

The current session’s adaptive orchestration inspector and get_adaptive_orchestration parity payload also include a compact efficacy verdict (helped, hurt, neutral, or insufficient) when there is enough session evidence to say anything useful. This is observability only; it does not auto-promote a genome.

Workspace Strategy Memory emits process-scoped slog records under workspace_strategy.fired and workspace_strategy.action via workspaceStrategyEmitter (internal/agent/workspace_strategy_emit.go). A 16-cap metadata-only ring backs four parity surfaces driven from one app.BuildWorkspaceStrategyStatusSnapshot aggregator (REQ-MAT-005, REQ-MAT-008) — the same JSON shape is reachable from CLI, TUI, HTTP, and an agent session.

ActionSeverityLaneMeaning
distill_startedinfodistillEpisode entered; signals being scored
distill_below_mininfodistillConfidence below the persistence threshold; no entry written
persist_attempt / persist_okinfopersistEntry queued / written to the memory store
persist_failedwarnpersistMemory-store write failed; failure streak incremented
persist_degradedwarnpersistThree consecutive persist_failed arms — sticky-degraded state set
prune_raninfopersistFIFO pruning advanced past the retention cap
load_failedwarnloadStrategy entries could not be loaded for system-prompt injection
genome_prior_appliedinfocompositionSoft prior applied to the adaptive-orchestration classifier
prompt_injectedinfocompositionStrategy summary added to the system prompt

workspace_strategy.fired and the ring carry metadata only: hashed FNV32 prefixes (8 hex chars) for session_id and namespace, plus invocation_id, bounded confidence, turns, entries, pruned, and failure_streak scalars. Raw session IDs, workspace namespaces (filesystem paths), prompt text, and persisted entry JSON are never emitted on either record or stored in the ring.

Renders the merged workspace-strategy config plus the recent-events ring tail and sticky-degraded persistence flag.

Aliases: /strategy. Read-only. Renders enablement, retention cap, last persist outcome, sticky-degraded flag, and the recent-events ring tail.

Returns the same WorkspaceStrategyStatusSnapshot JSON as the CLI/TUI, protected by the existing requireAuth middleware (KTD-7).

list_recent_workspace_strategy_events (agent tool)

Section titled “list_recent_workspace_strategy_events (agent tool)”

Returns JSON { "ring_capacity", "returned", "events" } with snake_case event fields. Optional session_id_hash filter (FNV32 hex prefix from a prior event) and limit (default: full ring; capped at ring capacity, currently 16).

See tracing recipes for jq lanes against bmo logs, including a dedicated “Diagnosing degraded persistence” recipe for the sticky-degraded path.

  • Does this change how BMO responds to my messages? Only indirectly. Strategy memories add context to the system prompt (“Based on N previous sessions, genome preset X has been effective”) and provide a soft prior to the classifier. The agent and classifier can still choose different strategies based on your current message.
  • What if the workspace changes significantly? Old entries are naturally pushed out by FIFO pruning as new sessions create new entries. The confidence scoring and recency sorting in the system prompt further deprioritize stale entries.
  • Is there an LLM call for distillation? No. Strategy signals are extracted deterministically from existing run data (regulatory history, expression profiles, loop detection, run outcomes). Distillation is fast (<10ms).
  • Can I clear strategy memories? Yes. Use /strategy to inspect entries and clear them for the current workspace.