Skip to content

feat: --issue flag to fetch and inject GitHub issue body into agent prompt #166

@marshall-ch-personal

Description

@marshall-ch-personal

Problem

When the AIPMO pipeline dispatches a coding agent for a GitHub issue, the issue body (which contains the full spec, acceptance criteria, library names, etc.) gets summarized/rephrased by the supervisor SOP before reaching the coding agent. This telephone game loses critical details.

Proposed Solution

Add --issue <number> flag to agentctl launch. When provided:

  1. Fetch the issue via gh issue view <number> -R <repo> --json title,body,labels
  2. Inject the full issue title + body into the agent prompt as context (similar to --spec)
  3. Optionally accept --repo <owner/repo> to specify which repo (default: infer from CWD)

Example

agentctl launch claude-code \
  --worktree ~/personal/template \
  --branch feat/12-tauri-desktop \
  --issue 12 \
  -p 'Implement this issue. Follow the spec exactly.'

The agent would receive:

--- GitHub Issue #12: Spike: Add Tauri desktop app stack with E2E testing ---
[full issue body here]
---
Implement this issue. Follow the spec exactly.

Why This Matters

Today we lost 2+ hours because three coding agents all ignored the core requirement (integrate a specific library) because the supervisor rephrased the issue instead of passing it verbatim. The issue body was perfectly clear — the telephone game broke it.

Workaround

SOPs can do this manually:

gh issue view 12 -R c-h-personal/template --json body --jq .body > /tmp/issue-12.md
agentctl launch claude-code --spec /tmp/issue-12.md -p 'Implement this issue.'

But --issue would make this first-class and ensure it always happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions