# Github Issue Closeout Race Safe

> Close GitHub issues without losing the evidence comment when multiple agents or races may close the issue concurrently.

- Skill: `vamseeachanta/github-issue-closeout-race-safe` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/github-issue-closeout-race-safe`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/github-issue-closeout-race-safe/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/github-issue-closeout-race-safe

---


# GitHub issue closeout race-safe pattern

Use when:
- closing issues after verification or implementation
- multiple agents/terminals may act on the same issue
- the closeout comment is important evidence and must not be lost

## Problem

`gh issue close --comment "..."` is convenient, but in live multi-agent use the comment can be lost if the issue becomes closed before the command lands cleanly.

## Safe pattern

1. Post the evidence comment first.
2. Close the issue as a separate command.

```bash
gh issue comment <issue> --body-file /tmp/closeout.md
gh issue close <issue>
```

## Why this works

- The closeout evidence becomes durable even if a separate process closes the issue moments later.
- It avoids silent loss of the most important verification/implementation summary.

## Recommended closeout block

Include:
- Result: landed / already done / blocked
- Evidence checked
- Validation commands/results
- Commit hashes or artifact paths
- Residual risks or blockers

## Extra verification

After commenting/closing, verify:

```bash
gh issue view <issue> --json state,comments,url
```

Confirm:
- issue state is `CLOSED` when intended
- the closeout comment is present in recent comments

## When not necessary

If you intentionally want a single quick close with no meaningful evidence, `gh issue close` alone is fine. But when evidence matters, always comment first, then close.

