Skip to content

gut(config): remove dead memorySearch config tree #2291

@alexey-pelykh

Description

@alexey-pelykh

Context

Memory was gutted in the RemoteClaw fork (WI-079, Middleware Boundary Principle — agents bring their own memory). The entire agents.defaults.memorySearch config tree (~35+ keys) and the compaction.memoryFlush sub-config are parsed by Zod but have zero consumers.

What to remove

memorySearch config tree

Types in src/config/types.tools.ts:

  • MemorySearchConfig type and all nested types (provider, remote, local, store, vector, chunking, query, hybrid, MMR, temporal decay, cache, sync)

Types in src/config/types.agent-defaults.ts:

  • memorySearch?: MemorySearchConfig at :180
  • import type { MemorySearchConfig } from "./types.tools.js" at :9

Zod schema in src/config/zod-schema.agent-defaults.ts:

  • Full memorySearch schema tree — replace with z.unknown().optional() stub

Help text in src/config/schema.help.ts:

  • Lines :714-798 (~45 lines) — all agents.defaults.memorySearch.* entries

Labels in src/config/schema.labels.ts:

  • Lines :283-325 (~43 lines) — all agents.defaults.memorySearch.* entries

Legacy migration rules in src/config/legacy.rules.ts:

  • Line :160-162 — memorySearchagents.defaults.memorySearch migration

compaction memoryFlush config

Types in src/config/types.agent-defaults.ts:

  • AgentCompactionMemoryFlushConfig type (:317-331)
  • memoryFlush?: AgentCompactionMemoryFlushConfig in AgentCompactionConfig (:314)

Zod schema — remove memoryFlush from compaction schema, replace with z.unknown().optional() stub.

Help text — remove any agents.defaults.compaction.memoryFlush.* entries.

Dead tool display entry

  • src/agents/tool-display-overrides.json:75memory_search entry (memory tool gutted)

Tests

  • src/config/schema.help.quality.test.ts — remove all agents.defaults.memorySearch.* from expected key lists (:71-101, :486-493, :631)
  • src/config/merge-patch.test.ts — remove memorySearch test cases (:16-51)

What to KEEP

  • compaction.mode, compaction.reserveTokens, compaction.keepRecentTokens, etc. — alive (context management)
  • compaction.identifierPolicy / identifierInstructions — alive

Acceptance Criteria

  • Entire memorySearch config tree removed from types, Zod schema, help, labels, legacy rules
  • compaction.memoryFlush removed from types and Zod schema
  • Zod compat stubs (z.unknown().optional()) in place for parse compatibility
  • Dead tool display entry removed
  • All affected tests updated
  • bun run build passes
  • bun run test passes
  • Existing configs with memorySearch or memoryFlush fields still parse without error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions