fix(run-agent): stop agents self-posting their reply as a duplicate comment #104

Merged
ffaerber merged 1 commits from fix/no-self-post-duplicate-comments into main 2026-07-07 15:09:46 +02:00
Owner

Symptom: @pm (and other agents) often leave two comments on one issue — a hand-written report/answer AND the automation-posted transcript.

Cause: the framework already posts each agent reply as a comment (run-agent.sh:148), but the prompt never says the agent must not ALSO post it via the gitea-api skill. On the daily-report task @pm used gitea-api to POST the report itself, then the automation posted its reply too — duplicate.

Not a re-trigger loop: the !contains(...,'🤖') gate works; only one agent run fired. This is purely a double-post within a single run.

Fix: explicit prompt instruction — on the current thread, agents use gitea-api only to READ or to take an explicit requested action (label/close/merge); the report/answer must be the reply text, not a self-posted comment. Cross-issue posting (e.g. opening a sub-issue) is unaffected.

**Symptom:** @pm (and other agents) often leave two comments on one issue — a hand-written report/answer AND the automation-posted transcript. **Cause:** the framework already posts each agent reply as a comment (run-agent.sh:148), but the prompt never says the agent must not ALSO post it via the `gitea-api` skill. On the daily-report task @pm used `gitea-api` to POST the report itself, then the automation posted its reply too — duplicate. **Not a re-trigger loop:** the `!contains(...,'🤖')` gate works; only one agent run fired. This is purely a double-*post* within a single run. **Fix:** explicit prompt instruction — on the current thread, agents use `gitea-api` only to READ or to take an explicit requested action (label/close/merge); the report/answer must be the reply text, not a self-posted comment. Cross-issue posting (e.g. opening a sub-issue) is unaffected.
ffaerber added 1 commit 2026-07-07 15:09:32 +02:00
fix(run-agent): forbid agents self-posting their reply (dup comments)
ci / lint (pull_request) Successful in 11s
ci / lint (push) Skipped
39977fcda7
ffaerber merged commit 4b73d0b8e9 into main 2026-07-07 15:09:46 +02:00
ffaerber deleted branch fix/no-self-post-duplicate-comments 2026-07-07 15:09:46 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea/agents#104