[FEATURE] Harness runtimes (Claude Code, Codex) accept image parts in a user message
维护者通常 1 天内回复
@krishhgg 已经在做这个了。
开始于 2026年11月4日。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- go, kubernetes
调研方向
Start in go/harness/runtime/a2a/executor.go at validateRequest, which currently rejects anything other than one text part, and in go/harness/runtime/runtime.go where runtime.Turn holds only Prompt. Then read the Claude driver's stream-json user message in go/harness/claude/internal/driver/process.go and the Codex turn/start input in go/harness/codex/internal/driver/process.go. Done means an A2A message with text plus a PNG part reaches both drivers as image content, other media types are refused with a clear error, and the UI's canAttach is true only for harnesses that accept images.
由索引模型根据 Issue 内容生成。
描述
What
Let the harness runtimes (Claude Code, Codex) take image parts in a user message, as the kagent runtime already does.
Why
The UI attaches files to a message since #2936 (images, text files; PDF and Office in #3200), sent as A2A file parts. The kagent runtime passes them to the model. On an agent that runs on a harness, the composer hides the attach button (canAttach, "Only kagent does", ui/src/components/chat/ChatComposer.tsx), and an A2A client that sends a file part anyway is refused:
go/harness/runtime/a2a/executor.go(validateRequest):harness runtime accepts exactly one user text part, so a text part plus an image part fails, and so does an image alone.runtime.TurncarriesPrompt stringonly (go/harness/runtime/runtime.go).- The Claude driver sends the turn as a stream-json user message whose
contentis a plain string (go/harness/claude/internal/driver/process.go); the Codex driver sends[]textInput{Type: "text"}only (go/harness/codex/internal/driver/process.go).
So a person cannot show a Claude Code or Codex agent a screenshot of the bug they report, while both CLIs take images: Claude Code's stream-json input accepts image content blocks (base64), Codex's turn/start accepts image input items.
Proposal
- Accept, in a user message, one or more text parts plus file parts whose media type is
image/png,image/jpeg,image/giforimage/webp(raw bytes or a URL the runtime may fetch), and keep refusing other kinds with a clear error. - Carry them on
runtime.Turn(e.g.Images []Image{MediaType, Data}), and pass them to each driver: Claude Code asimagecontent blocks next to the text block, Codex as image input items. - Advertise it, so the UI's
canAttachcan be true for a harness that takes images (images only, not the other file types).
The gRPC limits (16 MiB) and the UI's 10 MiB cap per message already fit images.
Context
Found while building screenshot attachments in a product on kagent 1.0.0-rc1, whose agents run mostly on the Claude Code harness. Today the only way round is a reference in the text and an MCP tool that returns the image, which the kagent runtime then turns into base64 text.
- 主要语言
- Go
- 星标
- 4.5k
- 派生
- 937
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 150
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kagent-dev/kagent 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
kagent-dev/kagent#3792 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
kagent-dev/kagent#3790 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
kagent-dev/kagent#3789 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
kagent-dev/kagent#3787 ·
维护者通常 1 天内回复
-
[BUG] Python memory summarization fails for Gemini models: the request has no model name可能已有人在做 @BahaaMattar 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
kagent-dev/kagent#3710 ·
维护者通常 1 天内回复
查看 kagent-dev/kagent 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
-
难度 1/5 1 小时以内 新手友好度 82/100
-
Add CybeDefend未关闭
难度 1/5 1 小时以内 新手友好度 66/100
slavakurilyak/awesome-ai-agents#1031 ·