agents: drop redundant agent-name headers from comments (+ fix self-trigger loop)
Gitea already attributes every comment/PR to its author, so the "🤖 **@name**" / "🔨 **@name**" header at the top of agent comments was redundant noise. Remove it everywhere and, in the process, close a self-trigger loop. - publish.sh: post()/prpost() now append a hidden `<!-- 🤖 … -->` marker instead of each message carrying a visible "🤖 **@name**" header. The gate keys on the '🤖' char to skip agent replies, so the marker preserves loop-prevention while being invisible. All reply/status/autopilot strings drop the name header. - route.sh: the "building on branch" notice is posted with the agent's PAT and previously had NO 🤖 marker + an "@name" mention, so it re-triggered the agent (the observed loop on issue #139). Reword without the self-name and add the hidden marker so it can't fire a new run. - publish.sh: broaden the leading self-header stripper to drop any leading line referencing the agent's own @handle (e.g. "## 🔨 @senior — …"), not just bare "**@name**" lines. Legit headings like "## Summary" are preserved. - run-agent.sh: tell the model not to begin its reply with its own name/handle. - Trigger comments (delegation / autopilot / bounce) stay marker-free by design, so they still fire the next agent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
269e932b19
commit
4c05abac63
@@ -102,6 +102,10 @@ PROMPT="You are @${NAME}, a member of an AI dev team working on this Gitea repos
|
||||
YOUR CAPABILITIES: model ${MODEL}. ${CAP}
|
||||
${NOTE}
|
||||
|
||||
Your reply is posted as a comment already attributed to you (@${NAME}) — your name and avatar are
|
||||
shown by Gitea. Do NOT begin your reply with your own name, an '@${NAME}' header, or a '🤖/🔨 @you'
|
||||
line; just write the content directly.
|
||||
|
||||
TEAM ROSTER (who does what — hand off if a task isn't yours):
|
||||
${ROSTER}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user