issue_write body parameter overwrites issue content on update — easily confused with adding a comment
还没有人认领这个 Issue。
评估
调研方向
首先找到 issue_write 工具的定义及其更新处理方式,然后将其与 add_issue_comment 入口进行比较。确定项目需要的是警告、评论参数还是其他方案;当用户想要发表评论时,更新不再默默鼓励替换现有 issue 内容,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the feature or problem you'd like to solve
When using issue_write with method: "update", passing a ody parameter replaces the entire issue body. This matches the REST API semantics, but LLM agents frequently misinterpret ody as "write a comment about this issue" rather than "replace the issue's entire description". The result is silent data loss — the original issue body gets wiped and replaced with a closing note.
Proposed solution
Two possible approaches:
- Add a prominent warning in the ody parameter description, e.g.: "WARNING: This replaces the entire issue body on update, not append. Use add_issue_comment to add a comment."
- Add a comment parameter to issue_write as a convenience — when provided on method: "update", it posts a comment instead of modifying the body.
Option 2 reduces unnecessary round-trips (close issue + add comment = 2 calls becomes 1).
Example prompts or workflows
- "Close issue
#42and explain why it was fixed" — agent should NOT touch the original body, but currently tends to overwrite it - "Mark issue
#17as duplicate and leave a note" — agent replaces body with "duplicate of #X" instead of commenting - "Update issue
#8status to closed with resolution" — body gets silently destroyed
Additional context
This was encountered using OpenCode (CLI-based AI coding tool) with DeepSeek V4 Flash model, connecting via the GitHub MCP Server (local binary). The ody field name is especially misleading for LLMs because in natural language, "body of a message" typically means the message content itself, not the metadata/description of the thing being acted upon.
- 主要语言
- Go
- 星标
- 33.1k
- 派生
- 5k
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 25
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/github-mcp-server 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
github/github-mcp-server#3235 ·
-
enhancement
难度 1/5 1 小时以内 新手友好度 88/100
github/github-mcp-server#3042 · 2 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
github/github-mcp-server#3032 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 74/100
github/github-mcp-server#2803 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
github/github-mcp-server#2740 ·
查看 github/github-mcp-server 的全部 Issue
相似的 Issue
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
kind/bug status/0-triage
难度 2/5 1-3 小时 新手友好度 75/100
-
🤔 refinement needed
难度 2/5 1-3 小时 新手友好度 75/100
equinor/radix-operator#1979 ·