warn that issue_write body REPLACES content, not appends (fixes #2410)#2443
Open
jluocsa wants to merge 1 commit intogithub:mainfrom
Open
warn that issue_write body REPLACES content, not appends (fixes #2410)#2443jluocsa wants to merge 1 commit intogithub:mainfrom
jluocsa wants to merge 1 commit intogithub:mainfrom
Conversation
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 (github#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 github#2410.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2410.
The
bodyparameter onissue_write(method='update') replaces the entire issue body — matching REST API semantics, but LLM agents frequently misinterpretbodyas "add a note about this issue" and end up silently destroying the original issue description. Real-world examples from the linked issue:reasonargument toget_mefunction #8 status to closed with resolution" → body silently destroyedThis PR updates the
bodyparameter description to make the replace-not-append semantics explicit and to point users atadd_issue_commentfor the common "leave a note" use case.This is option 1 from the issue (description-only fix). Option 2 (a separate
commentparameter) would be a larger schema change; happy to follow up with that as a separate PR if desired.Before
After
Files changed (3 files / 3 lines)
pkg/github/issues.go— thebodyparameter descriptionpkg/github/__toolsnaps__/issue_write.snap— regenerated viaUPDATE_TOOLSNAPS=true go test ./pkg/github -run ^Test_CreateIssue$README.md— regenerated viago run ./cmd/github-mcp-server generate-docsThe granular issue tools (
update_issue_body,add_issue_comment) don't have this confusion and were not modified.Validation
Test_CreateIssuepassesgo test ./...passes for all 22 packagesNote: I was unable to run
script/lintlocally (nogolangci-lintavailable in my environment). CI should validate it. Happy to iterate if anything surfaces.