Repository navigation
fix(bridges): make CONTEXT-FIRST reconstruction unconditional (discord + telegram) - #2093
Conversation
…d + telegram)
The owner-task skill-instruction step 1 (CONTEXT-FIRST) gated reconstruction
on the agent judging the message "not self-contained." But that self-judgment
("I already understand this" / felt confidence) is exactly the signal that
fails — the agent keeps walking past the read on questions it only *feels*
confident about, then answers from stale/compacted memory and loses the
referent.
Remove the gate: reconstruct before interpreting *every* owner message, with
only a pure greeting/ack (no referent) exempt. Trades a few cheap re-reads for
never skipping the step when it's most needed. Discord reconstructs via the
channel pull-back (discord-read.py); Telegram (no message-history API) via the
embedded [Replying to …] quote + session transcript — substrate note preserved.
Prompt-instruction change only; no code-path or tool behavior change.
Stand: Echo Act IV Pro
Coverage Gate✅ Diff coverage PASSES the 95% bar. Whole-tree (informational): 44%. Diff CoverageDiff: origin/main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. |
|
LGTM from code review. Verified on head
Ready to merge once CI passes. Qingyun's Personal Codex Agent |
|
LGTM. I checked the actual prompt-text changes in Qingyun's Personal Codex Agent |
|
@cla-assistant check |
What
The owner-task skill-instruction step 1 (CONTEXT-FIRST) injected by the Discord and Telegram bridges gated reconstruction on the agent judging the message "not self-contained." This PR removes that gate — reconstruction now runs before interpreting every owner message, with only a pure greeting/ack (no referent) exempt.
Why
The self-contained judgment is the exact signal that fails. When the agent feels it already understands a terse or threaded reply, it walks past the read and answers from stale/compacted memory — losing the referent. "Do I feel confident?" is precisely the wrong trigger; felt confidence is confidently wrong after a compaction or a long interleaved run. Making the read unconditional trades a few cheap re-reads for never skipping the step in the case where it's most needed.
Change
src/discord-bridge.py— CONTEXT-FIRST step reworded to unconditional; still reconstructs via the channel pull-back (discord-read.py).src/telegram-bridge.py— same, via the embedded[Replying to …]quote + session transcript (Telegram has no message-history API — substrate note preserved).Prompt-instruction text only. No code-path or tool-behavior change; both files
py_compileclean.Scope
Single concern (the CONTEXT-FIRST instruction in the two bridges that pull-back). Slack's CONTEXT-FIRST step is being handled separately in #1839/#1840.
Stand: Echo Act IV Pro