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
@@ -71,7 +71,9 @@ else # comment on an issue, no branch ye
|
||||
git push -u origin "HEAD:ai/issue-$NUM" || true
|
||||
url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/src/branch/ai/issue-$NUM"
|
||||
curl -sS -X POST "${hdr[@]}" "$API/issues/$NUM/comments" \
|
||||
-d "$(jq -nc --arg b "🔨 **@$name** is on it — building on branch [\`ai/issue-$NUM\`]($url). I'll open a PR when it's ready." '{body:$b}')" >/dev/null || true
|
||||
-d "$(jq -nc --arg b "🔨 Building on branch [\`ai/issue-$NUM\`]($url) — I'll open a PR when it's ready.
|
||||
|
||||
<!-- 🤖 agent reply — do not trigger -->" '{body:$b}')" >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user