Skip to content

Commit b7808ec

Browse files
committed
warn that issue_write body REPLACES content, not appends
The `body` parameter on `issue_write` (method='update') replaces the entire issue body, matching REST API semantics. However, LLM agents frequently misinterpret `body` as "add a note about this issue" and end up silently destroying the original issue description (#2410). Update the parameter description to make the replace-not-append semantics explicit and to point users at `add_issue_comment` for the common "leave a note" use case. Updates the issue_write toolsnap and README accordingly. Fixes #2410.
1 parent 1add5fe commit b7808ec

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ The following sets of tools are available:
853853
- **issue_write** - Create or update issue
854854
- **Required OAuth Scopes**: `repo`
855855
- `assignees`: Usernames to assign to this issue (string[], optional)
856-
- `body`: Issue body content (string, optional)
856+
- `body`: Issue body content (Markdown). On method='update', this REPLACES the entire issue body, it does NOT append. To add a comment to an issue without modifying its body, use the add_issue_comment tool instead. (string, optional)
857857
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
858858
- `issue_number`: Issue number to update (number, optional)
859859
- `labels`: Labels to apply to this issue (string[], optional)

pkg/github/__toolsnaps__/issue_write.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"type": "array"
2323
},
2424
"body": {
25-
"description": "Issue body content",
25+
"description": "Issue body content (Markdown). On method='update', this REPLACES the entire issue body, it does NOT append. To add a comment to an issue without modifying its body, use the add_issue_comment tool instead.",
2626
"type": "string"
2727
},
2828
"duplicate_of": {

pkg/github/issues.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ Options are:
14711471
},
14721472
"body": {
14731473
Type: "string",
1474-
Description: "Issue body content",
1474+
Description: "Issue body content (Markdown). On method='update', this REPLACES the entire issue body, it does NOT append. To add a comment to an issue without modifying its body, use the add_issue_comment tool instead.",
14751475
},
14761476
"assignees": {
14771477
Type: "array",

0 commit comments

Comments
 (0)