Skip to content

groupmind poller: carry reply_to and resolve reply targets into agent-facing lines - #70

Merged
ThinkOffApp merged 1 commit into
mainfrom
fix/poller-reply-targets
Aug 27, 2026
Merged

ThinkOffApp merged 1 commit into
mainfrom
fix/poller-reply-targets

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

What

The GroupMind poller adapter dropped reply_to in normalize(), so every agent-facing surface showed replies as freestanding statements. Today that made "Great! Please spec this" (a reply to a specific message) get interpreted by guess, and the wrong spec was built (THI-26 / the AgentOS mixup).

The client always sent reply_to; the server stores and returns it. The drop was here.

How

  • fetch(): resolves reply targets from the same poll batch (a fresh reply's target is nearly always within the window)
  • normalize(): payload now carries reply_to + resolved reply_target {from, body}
  • formatLine(): renders ⤷ in reply to <from>: "<snippet>"; an unresolved reply is still marked as a reply with its target id, never shown freestanding

Tests

4 new regression tests (resolved, unresolved, non-reply formats); full suite 210/210.

Part of THI-19's re-aim (agent-side reply reading). The remaining half - the Android app's vanishing reply preview - is a separate CodeWatch client fix.

🤖 Generated with Claude Code

…e line

A reply's meaning lives in its target. The client sent reply_to, the server
stored it, the API returned it - and this adapter dropped it in normalize(),
so every agent read replies as freestanding statements and guessed at
referents (Aug 27: petrus's 'spec this' built the wrong spec).

- fetch(): resolve targets from the same batch (fresh replies are near
  always within the poll window)
- normalize(): payload carries reply_to + resolved reply_target
- formatLine(): '⤷ in reply to <from>: "<snippet>"' - and an unresolved
  reply is still marked as a reply, never shown freestanding
- 4 regression tests; suite 210/210
@ThinkOffApp
ThinkOffApp merged commit c3bfe8a into main Aug 27, 2026
3 checks passed
@ThinkOffApp

Copy link
Copy Markdown
Owner Author

Blocking integration issue: formatLine() now returns two physical lines for replies (src/adapters/groupmind.mjs:89-97), but writeNotification() appends formatted results to a newline-delimited notification file and both readAndClearNotifications() (src/team-relay/common/notify.mjs:49-54) and checkRoomMessages() (src/team-relay/room-poller.mjs:135-143) parse with content.split("\n"). I reproduced this: one reply becomes two returned entries, with the ⤷ context detached as if it were another message. room_ack also counts the continuation as an additional message line. Please keep each notification record single-line, or introduce a structured/framed format and update every reader plus tests. Add an end-to-end notification-file regression test. The adapter unit tests pass, but they do not cover these consumers.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca1231f2af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +77 to +78
reply_to: msg.reply_to || null,
reply_target: msg._replyTarget || null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the GroupMind adapter imported by the CLI

When users run ide-agent-kit platform watch, this reply metadata and formatting never execute: bin/cli.mjs imports src/team-relay/adapters/groupmind.mjs, which still has the old implementation, while a repo-wide import search finds this changed adapter used only by test/unified-poller.test.mjs. Consequently, the production poller continues presenting replies as freestanding messages even though the new tests pass; apply the change to the team-relay adapter used by the CLI (and test that module directly).

Useful? React with 👍 / 👎.

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.

1 participant