Skip to content

remember: write_class='deliberate' contract violated (below_threshold rejection) and force=true intermittently raises FileNotFoundError #147

Description

@cdeust

Observed (2026-07-15, MCP plugin session, PG backend healthy — recall and plain writes working throughout)

Two related write-path defects observed in one session, likely sharing a root cause:

1. write_class: "deliberate" rejected by the novelty gate — documented contract violated

The tool description states: deliberate — « NEVER rejected by the gate for low novelty » (near-duplicates should be merged/linked/superseded by curation, not dropped). Yet:

  • remember(write_class="deliberate"){"stored":false,"action":"rejected","reason":"below_threshold (novelty=0.174, threshold=0.4)"}
  • Same call, different content → {"stored":false,"action":"rejected","reason":"below_threshold (novelty=0.392, threshold=0.4)"}
  • Also observed: omitting write_class (source-based fallback should classify as deliberate) → same below_threshold rejection.

2. force=true intermittently raises FileNotFoundError: [Errno 2] No such file or directory

  • ~12:30: remember(..., write_class="deliberate", force=true)stored OK, reason: "forced", memory_id 4334770.
  • ~2h later, same session: two consecutive remember(..., force=true) calls → FileNotFoundError: [Errno 2] No such file or directory (error text suggests checking DATABASE_URL, but PG was demonstrably healthy — non-force writes and recalls succeeded immediately before/after).
  • A subagent in the same period hit the same FileNotFoundError on a plain remember and fell back to memory-tool.sh.

3. Diagnostic clue — reason: "bypass_error" on SUCCESSFUL stores

Earlier in the same session, two successful deliberate writes returned {"stored":true,"action":"stored","reason":"bypass_error", ...} (memory_ids 4334564, 4334566). bypass_error as a reason on a successful store suggests the write-class bypass path throws internally and the code falls through: sometimes into a plain store (symptom 3), sometimes into the flat gate which then rejects a deliberate write (symptom 1), and on the force path the exception escapes as FileNotFoundError (symptom 2). One failing internal path — probably a missing file/dir dependency (artifact store? gist spool? classifier asset) — with three inconsistent surfacings.

Expected

  • deliberate writes are never novelty-rejected (per tool contract) — duplicates go through curation (merge/link/supersede).
  • force=true always inserts or fails with an actionable error naming the actual missing path.
  • No bypass_error reason on successful stores — if the bypass path fails, the error should surface with the failing path, not silently degrade contract semantics.

Repro hints

Session of 2026-07-15 ~11:00–14:30 CEST, domains session-optimizer / prd-spec-generator / default cwd /Users/cdeust/Developments. The FileNotFoundError repros were back-to-back identical calls; the earlier identical-shape call succeeded, so state accumulated mid-session (spool dir removed? rotation?) is a candidate.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions