Skip to content

Bug: Unicode middle dot (·) in enrichment output breaks Telegram JSON delivery #4

@nhaener

Description

@nhaener

Problem

The enrichment output in enrichment.mjs uses the Unicode middle dot character (·, U+00B7) as a separator between token counts and cost figures:

Groups  6.3M tok · $5.55  (1)
claude-sonnet-4-6: 6.5M tok · $6.22
Total: 7.2M tokens · $6.64

When this output is passed through OpenClaw's cron delivery system to Telegram, the multi-byte UTF-8 encoding of · (0xC2 0xB7) causes a JSON parse error:

Bad control character in string literal in JSON at position 89 (line 1 column 90)

Affected files

  • enrichment.mjs lines ~364, ~375, ~388

Fix

Replace · with a plain ASCII separator such as - or |:

Groups  6.3M tok - $5.55  (1)

Workaround

Local patch applied on our end:

sed -i 's/ · / - /g' enrichment.mjs

Environment

  • OpenClaw 2026.4.2
  • Telegram delivery via cron announce
  • tide-pools-plugin feat/usage-truth-layer branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions