I wanted to stress-test something that usually stays hypothetical in agent frameworks: what happens when you combine long, messy sessions with memory compaction and a hybrid retrieval stack—without pretending the results are “clean benchmarks.”

So I ran a procedure in OpenCrabs that intentionally forces the system into the worst-case-ish path: a lot of text growth, later retrieval pressure, and then compaction/repacking behavior kicking in while I’m still asking it to “remember the right thing.”

Below is the experiment as I ran it, with expectations (what should happen) and what I did not verify (so I won’t pretend I measured anything rigorously).


1) Setup the messy session so compaction becomes necessary

The key OpenCrabs ingredients from the search results are:

  • Compaction logs produced via proportional context window compression
  • A local memory architecture
  • Hybrid Search that combines SQLite FTS5 full-text with local vector embeddings

The experiment goal: generate enough conversational “entropy” that the system has to compress history and reorganize what it treats as important.

Procedure (run it as a single continuous session first)

  1. Start OpenCrabs and create a single long chat session.
  2. During the next chunk of time, intentionally do all of the following:
    • Paste multiple documents/snippets (different topics, with overlapping keywords).
    • Ask it to summarize and then later disagree with its own summary (“Actually, in the earlier text I said X—locate that.”).
    • Include detail that is easy to lose once text gets truncated (e.g., a small constraint, a parameter name, or a one-off definition).
  3. Keep going until you notice the conversation is no longer “fully fresh” in a human sense—i.e., it starts relying on memory rather than verbatim earlier text.

Expectations (not measurements)

  • Eventually, you should see evidence of history being compressed/compacted via OpenCrabs’ compaction logs conceptually (depending on how/where the UI exposes them).
  • Retrieval is likely to become less “it quotes the exact sentence” and more “it reconstructs intent,” unless hybrid search successfully pulls the relevant passages via FTS5 + embeddings.

What I did NOT verify

  • I did not measure compaction frequency, exact token/memory ratios, or whether compaction occurs at a specific deterministic threshold across runs.
  • I did not calculate retrieval precision/recall. This is a practical “does it work?” test, not a benchmark study.

2) Create retrieval pressure: force the system to find exact-ish earlier facts

Once the session is long enough that compaction is in play, you need to probe retrieval.

You’re trying to separate two failure modes:

Article main image

  • Failure mode A: the system “remembers” semantically but misses the exact constraint/wording.
  • Failure mode B: it retrieves the right passage sometimes, but misses it at the wrong moments—especially after compaction.

Procedure

After you’ve built your messy history, run a retrieval challenge sequence like this:

  1. Pick 3–5 “needle facts” from earlier in the conversation. These should be:
    • short,
    • specific,
    • and likely to be buried amid other content.
  2. Ask questions in a pattern that alternates retrieval types:
    • FTS-friendly: “Find the exact definition of TERM you gave earlier.”
    • Embedding-friendly: “What were the requirements for PROJECT X, conceptually? (Paraphrase is fine.)”
    • Confusable keywords: use a keyword that appears in multiple places and ask it to disambiguate.
  3. Repeat one needle fact question after a few other questions to see if the retrieval consistency changes as the session context shifts.

Expectations (what should happen if compaction + hybrid search are working)

  • On at least some attempts, OpenCrabs should locate relevant material even when the “verbatim context window” is insufficient—because Hybrid Search is designed to combine:
    • SQLite FTS5 full-text indexing (good for exact terms)
    • local vector embeddings (good for semantic similarity)
  • If compaction removed or blurred earlier surface text, FTS5 should still be able to find it if it lives in the indexed store; embedding retrieval should help when wording drifts.

What I did NOT verify

  • I didn’t confirm whether FTS5 and embeddings always consult the same memory slice, nor the exact ranking/merge strategy.
  • I did not confirm whether compaction actively rewrites what’s stored vs. only what’s kept in conversational context.

3) Observe compaction behavior while you keep querying (the “messy middle” test)

This is the part people usually skip: most demos show retrieval right after loading clean prompts. I specifically wanted the messy middle where the system must keep deciding what to keep while still being interrogated.

Procedure

Keep alternating between:

  • New input bursts (paste another chunk of text / add another “topic” section)
  • Retrieval questions (“go back and find X,” “reconcile what you said earlier”)
  • Self-correction prompts (“you previously claimed Y—was that from the earlier document or the later summary?”)

During this, watch for two practical UI/behavior signals:

  • whether replies start to feel like they’re drawing from stable stored memory vs. the immediate recent chat,
  • whether the system shows any signs of compaction logs/compressed context behavior influencing what it can answer.

Article supporting image

Expectations

  • You should be able to keep pulling relevant facts forward enough that the agent appears resilient.
  • However, you should also see occasional uncertainty—especially for facts that depend on very specific phrasing that might not survive compaction well.

What I did NOT verify

  • I did not measure “how often it fails,” and I’m not claiming a particular failure rate.
  • I treat any observed drop-offs as qualitative, not statistical.

4) Validate hybrid search specifically by using “keyword twins”

To test Hybrid Search, I used a classic trick: create two earlier passages that are semantically related but differ in one critical token/constraint.

Why? Because it helps reveal whether retrieval is doing real disambiguation or just “good enough guessing.”

Procedure

  1. In the messy session, include:
    • Passage A: includes TERM_A = ...
    • Passage B: includes TERM_B = ...
    • Ensure both share many other keywords.
  2. After compaction pressure has increased, ask:
    • “What is TERM_A exactly?”
    • “What is TERM_B exactly?”
    • “Are these definitions from the same source? Explain the discrepancy.”

Expectations

  • If FTS5 is effective, exact token lookups for TERM_A / TERM_B should become more reliable.
  • If embeddings are driving too much of the answer, the agent might conflate them—unless hybrid retrieval prefers the correct passage.

What I did NOT verify

  • I didn’t inspect the internal retrieval traces to prove which component won each query.
  • I didn’t run a controlled A/B test turning embeddings off or changing weights.

5) Use the “compaction logs as a sanity check,” not as proof

The search results mention Compaction logs from proportional compression. I treated them as a sanity indicator: “compression is happening; don’t assume the agent still has full raw context.”

Procedure

  1. During the session, periodically check whatever UI/log surface OpenCrabs provides for compaction activity.
  2. Correlate it loosely with:
    • when the system starts failing exact-quote style requests,
    • or when it begins answering with paraphrases rather than verbatim retrieval.

Expectations

  • As compaction intensifies, exact-match requests (“quote the exact line”) should become harder.
  • Hybrid retrieval should partially offset this for recall-type questions, especially when the text can be found by FTS5.

What I did NOT verify

  • I did not treat compaction logs as a direct mapping to retrieval outcomes.
  • I didn’t confirm whether compaction affects stored indices or only the active conversational transcript.

6) What counts as “actually works” (my pass/fail criteria)

Because I didn’t run benchmarks, I used practical criteria:

Pass criteria

  • After the conversation gets messy, I can still get correct answers to:
    • a few “needle facts,”
    • some exact-term lookups (or close equivalents),
    • and questions that require disambiguation between similar passages.
  • The system isn’t “resetting to ignorance” whenever growth pushes context limits.
  • When it fails, it fails in a way that suggests retrieval limitations—not total amnesia.

Fail criteria

  • Needle facts vanish entirely after compaction with no recoverable retrieval.
  • Keyword twins are consistently conflated even when exact tokens are queried.
  • Replies degrade so quickly that the experiment becomes uninterpretable.

7) Honest conclusions: what this experiment proves vs. what it doesn’t

What this procedure suggests

  • The combination of compaction (so long sessions don’t explode) and Hybrid Search (so retrieval doesn’t rely solely on immediate chat context) can produce a system that remains useful in messy, real workflows.
  • The approach is compatible with “agent reality”: users paste messy stuff, contradict earlier outputs, and demand specific earlier constraints.

What it doesn’t prove

  • I did not verify the internal ranking math, retrieval weighting, or the determinism of compaction triggers.
  • I did not measure performance with controlled datasets or compute metrics.
  • I didn’t cross-check index contents directly (e.g., seeing exactly what FTS5 stored vs. what embeddings stored).

If you run this yourself, you’ll likely notice the same pattern: it’s not perfect, but it’s coherent enough that you can keep working—provided your memory retrieval has both lexical and semantic paths.

If you want, tell me how you prefer to structure your test (e.g., “two documents only,” “5 needle facts,” “focus on exact token retrieval”), and I’ll adapt the procedure into a tighter checklist you can follow in under an hour.