Skip to content

fix: keep channel-delivered user input instead of dropping it as isMeta (#128) - #149

Merged
fdaviddpt merged 1 commit into
mainfrom
fix/128-channel-input
Jul 25, 2026
Merged

fdaviddpt merged 1 commit into
mainfrom
fix/128-channel-input

Conversation

@fdaviddpt

Copy link
Copy Markdown
Contributor

Closes #128.

Input arriving through a channel integration (the Telegram plugin in the report) is wrapped by the transport and carries isMeta — the same flag Claude Code sets on genuine meta records. extract_messages() filtered on that flag before counting, so every real human turn in such a session was discarded: human count 0, min-human gate never cleared, no memory ever written for that whole class of users.

The wrapped text is now recovered and counted as the human turn it is.

Note this is not fixed by #148's min_exchanges_without_human fallback: the reporter's session was 11 exchanges, still under the default 30 — and even when a long channel session does clear that threshold, the extract contains zero human turns, so the summary would be written from agent output alone.

Fix and tests were written 2026-07-15 and never pushed; rebased onto current main, 528 passed.

…128)

Channel-delivered input (e.g. the Telegram plugin) arrives as a type:"user"
record flagged isMeta:true, wrapping the real message in a <channel>…</channel>
transport envelope. extract_messages dropped every isMeta record, so a session
driven entirely over such a channel counted 0 human messages and never crossed
min_human_messages — memory was never saved.

Add _channel_text() to detect and unwrap a <channel> payload; treat it as human
input while ordinary isMeta records stay filtered.

Co-Authored-By: Max <noreply>
@fdaviddpt
fdaviddpt merged commit a62fe2d into main Jul 25, 2026
12 checks passed
@fdaviddpt
fdaviddpt deleted the fix/128-channel-input branch July 25, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Channel-delivered user input (Telegram plugin) is dropped as isMeta — memory never saves

1 participant