OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

OpenClaw memory plugin misclassifies cron distillation tasks as transcript-ingest and injects ingest-reply-assist

Open Suidge opened this issue 8 months ago • 1 comments

Summary

OpenViking's OpenClaw memory plugin can misclassify cron maintenance prompts (specifically Daily Memory Distillation / Weekly Synthesis style tasks) as transcript-ingestion input and inject the ingest-reply-assist prompt block.

This is an upstream plugin bug because these cron maintenance tasks are not memory-ingestion transcripts, yet they receive transcript-specific prompt augmentation and can produce unwanted mid-run chatter.

Environment

  • OpenClaw with plugins.slots.contextEngine = openviking
  • OpenViking runtime env: ~/.openviking/.venv
  • OpenViking version: 0.2.11
  • OpenClaw plugin path under test:
    • examples/openclaw-memory-plugin/index.ts
    • examples/openclaw-memory-plugin/text-utils.ts
  • Daily distillation cron job payload:
Daily memory maintenance. Read skills/opencortex/references/distillation.md for full instructions and follow them. Workspace: /Users/neoshi/.openclaw/workspace

What happens

The plugin applies:

<ingest-reply-assist>
The latest user input looks like a multi-speaker transcript used for memory ingestion.
...
</ingest-reply-assist>

...even though the task is a cron maintenance job, not a transcript-ingestion request.

Observed log pattern:

openviking: ingest-reply-assist applied (reason=transcript_like_ingest, speakerTurns=2, chars=454)

Impact

Two different impacts were observed:

  1. Hard failure mode

    • A 03:00 distillation run produced only a one-line opening message and then stopped without any tool calls.
    • Session transcript contained only the cron prompt + one assistant line.
  2. Residual degraded mode

    • After a local mitigation, a 07:54 manual backfill run still received ingest-reply-assist, but it completed successfully.
    • It executed the full workflow:
      • read distillation.md
      • created/cleaned lockfile
      • read/write/archive files
      • appended debrief to archived daily log
      • final summary matched actual tool execution
    • However, transcript-ingest prompt injection still remained, and mid-run chatter was still possible.

So the critical execution path can recover, but the plugin still misclassifies cron maintenance prompts and injects the wrong prompt block.

Why this looks like a plugin bug

The current transcript detection is too broad for OpenClaw cron-maintenance traffic.

These maintenance prompts may contain structured metadata / speaker-like formatting, causing them to look transcript-like under current heuristics, even though semantically they are control/maintenance tasks.

This should be filtered upstream in the plugin rather than relying on downstream prompt resilience.

Minimal expected behavior

For cron maintenance prompts such as:

  • Daily memory maintenance
  • Weekly synthesis
  • prompts that explicitly read maintenance reference docs
  • prompts that include cron markers / workspace execution instructions

The plugin should not inject ingest-reply-assist.

Suggested fix direction

Add an explicit exclusion path in the OpenClaw memory plugin before transcript-ingest assistance is applied, e.g. detect cron-maintenance/task-run prompts and skip ingestReplyAssist for them.

A stronger solution would likely rely on session/task context rather than only transcript-text heuristics.

Evidence summary

  • Failed run: only one assistant opening line, zero tool calls
  • Successful backfill run: 20+ tool calls, 111s duration, workflow completed
  • Both were still subject to ingest-reply-assist injection
  • Therefore the root bug is not gone; it is just less destructive after local mitigation

Requested outcome

Please treat cron-maintenance prompts as a first-class exclusion for transcript-ingest assistance in the OpenClaw memory plugin.

Suidge avatar Mar 26 '26 00:03 Suidge

Thanks for the detailed report.

I re-checked this against the current releases:

  • Latest stable release: v0.3.21
  • Latest pre-release/tag: v0.3.22

The original failure path no longer exists in either version. The issue was present in v0.2.11 because ingestReplyAssist was enabled by default and isTranscriptLikeIngest() used a text-shape heuristic based on speaker-like turns, so cron/maintenance prompts could be misclassified as transcript-ingest input and receive the <ingest-reply-assist> block.

This was resolved through the later OpenClaw plugin changes:

  1. v0.3.2 / #1136 added a session-pattern guard for the ingest reply assist path.
  2. #1206 changed ingestReplyAssist to be opt-in instead of enabled by default.
  3. v0.3.9 / #1564 removed the ingestReplyAssist feature and all related runtime logic/tests entirely.

I also verified that the current v0.3.21 and v0.3.22 code no longer contain the runtime symbols/strings for this path, including isTranscriptLikeIngest, transcript_like_ingest, and <ingest-reply-assist>.

So this specific bug is fixed in current versions. Closing as completed.

Mijamind719 avatar May 30 '26 18:05 Mijamind719