fix: reduce redundant envelope formatting for iMessage and Signal#1080
Closed
tyler6204 wants to merge 2 commits intoopenclaw:mainfrom
Closed
fix: reduce redundant envelope formatting for iMessage and Signal#1080tyler6204 wants to merge 2 commits intoopenclaw:mainfrom
tyler6204 wants to merge 2 commits intoopenclaw:mainfrom
Conversation
steipete
added a commit
that referenced
this pull request
Jan 17, 2026
Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
Contributor
|
Landed on main after rebasing onto latest main, added clarifying comments + changelog entry, and ran pnpm lint/build/test. Commits:
Thanks @tyler6204! |
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…tyler6204 Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cleans up message envelope formatting to reduce noise and improve readability for the agent. Previously, envelopes contained redundant information that cluttered the context window without adding value.
Problem
Messages were being formatted with unnecessary repetition:
DM envelopes showed the sender twice:
The
id:suffix is redundant when it matches the normalized sender.Group envelopes doubled the channel name:
"iMessage" appeared twice because
fromLabelwas set to "iMessage Group" while the channel was already "iMessage".Sender info appeared twice in group messages:
The
[from:]suffix detection didn't recognize senders appearing after the]bracket, so it added a redundant suffix even when the sender was already shown as a prefix.Solution
iMessage & Signal monitors:
id:suffix when the raw sender differs from the normalized sender (e.g., email vs phone normalization)Sender meta detection:
(^|\n)sender:to(^|\n|\]\s*)sender:to detect sender prefix after envelope header bracketsResult
Clean, non-redundant formatting:
[iMessage +1234567890 2026-01-17T07:24Z] Test[iMessage Group id:2 2026-01-17T07:23Z] +1234567890: TestTest plan
[from:]suffix not added when sender already prefixed