fix: auto-start coding agent for issue-triggered PRs#695
Conversation
The consumer repo template for agents-issue-intake.yml was always passing post_agent_comment as false for issue-triggered events (when inputs are undefined), preventing the coding agent from auto-starting. Changed to default to 'true' for issue events, allowing workflow_dispatch to override via the post_codex_comment input parameter. This matches the reusable workflow's default behavior. Fixes the issue where PRs created from issues (e.g., via verify:create-issue) would never start the coding agent, leaving them stuck in 'agent-run-skipped' state across all consumer repos.
Automated Status SummaryHead SHA: 5129dde
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 #695 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where the coding agent failed to auto-start for PRs created from labeled issues. The problem was that the post_agent_comment parameter was always evaluating to 'false' for issue-triggered events because inputs is undefined in those contexts.
Key Changes:
- Modified the conditional logic for
post_agent_commentto default to'true'for issue events while respecting theinputs.post_codex_commentvalue only forworkflow_dispatchevents
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| mode: "create" | ||
| post_agent_comment: ${{ inputs.post_codex_comment && 'true' || 'false' }} | ||
| post_agent_comment: ${{ github.event_name == 'workflow_dispatch' && (inputs.post_codex_comment && 'true' || 'false') || 'true' }} | ||
| agent_pr_draft: ${{ inputs.bridge_draft_pr && 'true' || 'false' }} |
There was a problem hiding this comment.
For consistency with line 181, this should follow the same pattern of checking github.event_name before accessing inputs.bridge_draft_pr. During issue events, inputs is undefined, and while this currently evaluates to 'false' (matching the reusable workflow's default), the pattern should be:
agent_pr_draft: ${{ github.event_name == 'workflow_dispatch' && (inputs.bridge_draft_pr && 'true' || 'false') || 'false' }}
This makes the behavior explicit and consistent with how post_agent_comment is now handled.
| agent_pr_draft: ${{ inputs.bridge_draft_pr && 'true' || 'false' }} | |
| agent_pr_draft: ${{ github.event_name == 'workflow_dispatch' && (inputs.bridge_draft_pr && 'true' || 'false') || 'false' }} |
|
Summary
Testing
|
Problem
When PRs are created from issues (e.g., via
verify:create-issuelabel), the Issue Intake workflow in consumer repos was always passingpost_agent_comment: false, preventing the coding agent from automatically starting work.This caused PRs to be stuck in
agent-run-skippedstate because:inputsinputs.post_codex_comment && 'true' || 'false'→'false'@codex startcomment is postedSolution
Changed the consumer repo template to:
'true'for issue events (auto-start agent)inputs.post_codex_commentonly forworkflow_dispatchImpact
All consumer repos using this template will now auto-start the coding agent when PRs are created from labeled issues, fixing:
Testing
Tested the logic:
post_agent_comment→'true'(auto-start)post_codex_comment: false: →'false'(no auto-start)post_codex_comment: true: →'true'(auto-start)Resolves the issue affecting: