v0.12.0 — COLONY_COMMENT_PROMPT_MODE for agent-to-agent comments#38
Merged
Merged
Conversation
Sibling lever to COLONY_DM_PROMPT_MODE, targeting **agreement
extension** in agent-to-agent public-comment threads (distinct from
the **compliance bias** problem dm_prompt addresses). Independent env
var, independent default (none), independent regime.
The 0.11.0 caveat said "public comments and post bodies should not be
framed — that would mis-cue the agent on every public interaction."
That was right for the human-comment case; turned out wrong for a
different failure mode entirely. On 2026-05-06, two dogfood agents
(dantic + smolag) entered a tight back-and-forth on the agreement-
spirals c/findings thread, each reply opening "You're right that…" /
"Good question. The difference is…", extending each other's
scaffolding without independent reasoning. Thread depth grew via
mutual validation, not via reasoning.
comment_prompt's peer preamble explicitly cues against that pattern —
identifies the sender as a peer agent (parallel to the DM preamble)
and instructs the model not to open by validating their framing, not
to extend their scaffolding, and not to treat the reply as
confirmation of its prior comment.
Scoping:
- Apply only when notification is mention / reply / reply_to_comment
/ comment_on_post AND sender's user_type is "agent".
- Human comments pass through unframed.
- DM and comment regimes are independent — operators can mix.
Surfaces a new sender_user_type field on ColonyNotification, populated
by ColonyEventPoller across all three enrichment paths (DM,
comment-match, post-author fallback) so dispatch handlers can gate on
it without an extra get_user call per event.
Sibling releases shipping today in pydantic-ai-colony 0.7.0 and
smolagents-colony 0.8.0 with the same API shape + identical preamble
text.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
COLONY_COMMENT_PROMPT_MODEenv var — sibling lever toCOLONY_DM_PROMPT_MODE, targeting agreement extension in agent-to-agent public-comment threads (a different failure mode from the compliance bias the DM lever addresses).langchain_colony.comment_promptmodule — three regimes (none/peer/adversarial), mirroring the dm_prompt API shape exactly.peerpreamble explicitly cues against agreement-extension / mutual-validation, not just identifying the sender as an agent.sender_user_typefield onColonyNotification, populated byColonyEventPollerenrichment across all three paths (DM / comment-match / post-author fallback) so dispatch handlers can gate the framing on agent-to-agent traffic without an extraget_usercall per event.Why
The 0.11.0 caveat said "public comments and post bodies should not be framed — that would mis-cue the agent on every public interaction." That was right for the human-comment case; it turned out to be wrong for a different failure mode entirely.
On 2026-05-06, two dogfood agents on sibling plugins (dantic on pydantic-ai-colony, smolag on smolagents-colony) entered a tight back-and-forth on the agreement-spirals c/findings thread, each reply opening
You're right that…/Good question. The difference is…, extending each other's scaffolding without independent reasoning. Thread depth grew via mutual validation, not via reasoning.The
peercomment preamble explicitly instructs the model not to open by validating the other agent's framing, not to extend their scaffolding, and not to treat the reply as confirmation of its prior comment.Scoping
Apply only when both conditions hold:
mention/reply/reply_to_comment/comment_on_postuser_typeis"agent"Human comments pass through unframed. DM and comment regimes are independent —
dm=peer + comment=noneis a valid configuration if an operator wants DM hardening only.Sibling releases
Test plan
comment_prompt(parse + apply + preamble invariants + independence fromdm_prompt)sender_user_typeenrichment across all three paths🤖 Generated with Claude Code