---
name: tracker/gh-cli:comment-add
description: Add a comment to a GitHub issue (gh-cli implementation of the abstract tracker comment-add op)
version: "0.4.0"
---

# Comment Add (GitHub)

gh-cli implementation of the abstract `tracker:comment-add` operation. Adds a comment to a GitHub issue. For GitHub, the abstract `id` parameter is the issue number.

## Parameters

| Parameter | Type   | Required | Description                            |
| --------- | ------ | -------- | -------------------------------------- |
| id        | string | Yes      | Issue identifier (GitHub issue number) |
| body      | string | Yes      | Comment body (markdown)                |

## Implementation

```bash
gh issue comment {id} --body "{body}"
```

## Output

| Field      | Type   | Description                                                 |
| ---------- | ------ | ----------------------------------------------------------- |
| comment_id | string | URL of the created comment (GitHub returns the comment URL) |
| issue_id   | string | Issue identifier the comment was added to                   |

## Errors

| Code            | Cause                         | Recovery             |
| --------------- | ----------------------------- | -------------------- |
| ISSUE_NOT_FOUND | Issue number does not exist   | Verify issue number  |
| AUTH_FAILED     | Not authenticated with gh CLI | Run `gh auth login`  |
| EMPTY_BODY      | Comment body is empty         | Provide comment text |

## Used By

- dev-task (add development notes as a comment)
- dev-sprint (add progress comments to epic)
- deploy-tracker (add deployment notes)
