fix: prevent dual-agent conflict for codex by skipping post_agent_comment#705
fix: prevent dual-agent conflict for codex by skipping post_agent_comment#705
Conversation
…ment When PRs are created from issues labeled with agent:codex, the template was posting @codex start comments which triggered the UI agent. However, the CLI keepalive loop already handles codex PRs through the workflow system. Having both agents run simultaneously causes conflicts. This fix: - Skips post_agent_comment for agent:codex (CLI keepalive handles it) - Keeps post_agent_comment for other agents like agent:claude - Preserves workflow_dispatch behavior for manual overrides Supersedes PR #701 (which had unrelated commits mixed in) Addresses P2 issue raised in PR #700 review comment. See docs/keepalive/Agents.md for CLI vs UI agent distinction.
There was a problem hiding this comment.
Pull request overview
This PR fixes a dual-agent conflict issue where PRs created from agent:codex labeled issues would trigger both the UI agent (via @codex start comments) and the CLI keepalive loop simultaneously, causing conflicts. The fix skips automatic agent comment posting for codex agents while preserving manual override capabilities.
Key Changes
- Modified
post_agent_commentlogic to skip posting for codex agents in automatic workflows - Preserved workflow_dispatch manual override functionality
- Added clear documentation explaining the conflict prevention
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Summary
Testing
|
Automated Status SummaryHead SHA: 65f004b
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
🤖 Keepalive Loop StatusPR #705 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
Automated Status Summary
Scope
See
docs/keepalive/Agents.mdfor the CLI vs UI agent architecture:Context for Agent
Design Decisions & Constraints
agent:codexlabel → triggers CLI keepalive looppost_agent_commentforagent:codex(CLI keepalive handles it)post_agent_commentfor other agents likeagent:claudedocs/keepalive/Agents.mdfor the CLI vs UI agent architecture:@codexcommentspost_codex_commentfor codex selections, preventing unintended codex UI triggers on manual dispatch runs. templates/consumer-repo/.github/workflows/agents-issue-intake.ymlL170-L189Related Issues/PRs
References
Workflows/templates/consumer-repo/.github/workflows/agents-issue-intake.yml
Lines 170 to 189 in 7fb1a83
Tasks
@codexcomments@codexcomments (backup/manual mode)Acceptance criteria
agent:codexlabelsworkflow_dispatchHead SHA: 495545c
Latest Runs: ✅ success — Gate
Required: gate: ✅ success