GitHub Issue as Handoff Artifact
A variation of the/handoff skill where the handoff document is published as a GitHub issue instead of a temp-dir markdown file. Bridges /handoff (context forking), /to-issues (work decomposition), and Shared Task Queue (Cross-Worktree) (agent dispatch).
Recommendation: use temp file by default. Upgrade to issue only when persistence, team visibility, or autonomous dispatch is needed. The operational cost of CI setup is real; the temp-file form is zero-infra. See When to Use Each Form.
Core Idea
The original/handoff skill saves to $TMPDIR — ephemeral by design. Replacing the file write with:
Handoff Issue Body Format
The issue body must follow the same structure as the original/handoff skill output — not a freeform “context dump.” Required sections:
Return Handoff (Multi-Hop)
The original/handoff skill supports a grilling → prototype → return handoff → grilling pattern. With GitHub issues, the return handoff is a comment on the original issue, not a new issue:
Tradeoffs vs. Temp File
Lean-Session Interaction
Lean Agentic Coding Workflow useslean-session to write .agents/checkpoint.md on every idle/compaction event. When /handoff fires mid-session, the checkpoint already contains current task state (git state, task list, changed files).
The handoff issue body should reference the checkpoint path as a pointer:
Synthesis with /to-issues
/to-issues decomposes a PRD into vertical-slice GitHub issues for parallel agent execution. A handoff issue sits one level above this:
- Grilling session surfaces out-of-scope task →
/handoff→ creates issue #X (agent-handofflabel) - Receiving agent reads issue #X → if task is multi-session, runs
/to-issues→ child issues created with## Parent: #X - Child issues land in
.agents/inbox/as task files (see materialization below) - Parallel agents claim from inbox; close child issues on completion; comment resolution on #X
/to-issues template’s ## Parent field.
Synthesis with Shared Task Queue
A handoff issue can be materialized into.agents/inbox/ using the task file format required by Shared Task Queue (Cross-Worktree):
scope and do-not-touch fields must be filled by the receiving agent at claim time — they can’t be known at materialization. The task file is a skeleton; the agent completes it before starting work.
Auto-Dispatch via GitHub Actions
Operational requirement: not zero-infra. The dispatch job needs:- A self-hosted runner with Claude Code CLI installed and authenticated (
ANTHROPIC_API_KEYsecret) ghCLI available on the runner- The runner must have repo write access to push commits back
gh issue view <n> as the initial prompt. Auto-dispatch is useful only when the pipeline is fully trusted and the runner is already maintained.
When to Use Each Form
Open Questions (Needs Implementation Experience)
- Does lean-session checkpoint survive long enough for the receiving agent to read it? Depends on how fast the original session continues after handoff.
- What’s the right granularity for
agent-handoffvs.needs-triagelabels? Can an issue carry both? - Return-handoff via comment: does the original session need to poll for comments, or is the URL enough for a human to close the loop?
Related Pages
- Lean Agentic Coding Workflow — lean-session checkpoint; full grill→PRD→AFK loop; /handoff and /to-issues as components
- Shared Task Queue (Cross-Worktree) — atomic
.agents/inbox/claim protocol; task file format spec - Agent Harness — broader orchestration harness context