Skip to content

feat(coderd): add view_image tool behind fork-view-image - #284

Closed
ibetitsmike wants to merge 14 commits into
mainfrom
mike/issue-250-read-images
Closed

ibetitsmike wants to merge 14 commits into
mainfrom
mike/issue-250-read-images

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Coder Agents opened this PR on behalf of @ibetitsmike.

Closes #250

What

A new fork chat tool, view_image, behind a new fork-view-image experiment. It loads a PNG, JPEG, GIF or WebP file from the workspace into the model's context as an image, so a chat can review its own screenshots.

Why a separate tool and not read_file

read_file is upstream code (chattool). Teaching it to return images would mean changes inside upstream files. A fork tool lives in fork_view_image.go. The upstream changes are the existing appendForkTools hook line in turn_environment.go:743, which now also passes the turn's model, prompt and pending tail (forkToolsWithModel), and one hook line in generation.go:1339 for a compaction override model. The tool also gets its own experiment instead of riding on fork-chat-todos.

Behavior

  • Type by content: chatfiles.DetectMediaType on the bytes. A PNG named shot.txt works. A text file named shot.png fails with ... is text/plain, not a PNG, JPEG, GIF or WebP image. Use read_file for text files.
  • Model check: the route signal chatprovider.Model.AcceptsFilePartMediaType. A route that takes no image type fails with model "<model>" on provider "<provider>" does not accept image input. Switch to a model with image input to view images. A route that rejects one type, such as Google and GIF, fails with does not accept image/gif images.
  • Size limit:
    • On a route with an inline image cap (Anthropic, and Bedrock through the Anthropic API) the limit is 3,932,160 bytes. That is codersdk.AnthropicInlineImageCapBytes (5 MiB) times 3/4, so the base64 form fits Anthropic's per-image limit.
    • On other routes it is codersdk.MaxChatFileSizeBytes (10 MiB), the limit chatloop already applies to every tool result media.
    • Over the limit the error names the number and the reason. The tool does not resize.
  • Structure check: a header that decodes is not enough. imageComplete walks the PNG chunks and their CRCs up to IEND, requires a JPEG end marker after the last scan, a GIF trailer, and WebP chunks that fit the RIFF size and the file, with a VP8, VP8L or ANMF image chunk. A VP8 chunk must hold the first partition its frame tag names. A truncated or damaged file fails with ... is not a valid image/png image: ..., so a broken image never gets stored and replayed. imageDecodes then fully decodes a PNG, a JPEG or the first GIF frame with the stdlib decoders, so damaged image data behind an intact structure fails too, for example a PNG with no IDAT. A total of 25,000,000 pixels (viewImageMaxPixels) bounds the memory of one decode to about 200 MB, and viewImageDecodeSlot runs one decode at a time.
  • Animated GIFs fail with ... is an animated GIF with N frames, and view_image accepts only still images, because OpenAI rejects them. gifFrames walks the GIF blocks without decoding the frames.
  • At most 8 view_image calls per model response. buildTurnEnvironment builds the tools for each step, so a counter in the tool value counts one response's calls, which chatloop runs concurrently. The ninth and later fail with view_image runs at most 8 times per response. This bounds the reads and the stored results of one batch.
  • The path is used as given, like read_file. Only an all-whitespace path fails as empty.
  • Pixel limit: 8000 pixels per side, Anthropic's documented limit. A stored image over it would fail every later request, so the tool rejects it up front. Dimensions come from the stdlib png, jpeg and gif DecodeConfig, and a small WebP header parser (VP8, VP8L, VP8X). No new dependency.
  • Known gap: the OpenAI-compatible, OpenRouter and Vercel routes report that they take any image (chatprovider.go:155-163). Coder Agents cannot tell a text-only model behind them, so the image goes to the provider anyway. This is documented in docs/fork/pstack-adapter.md.

Storage, later turns and compaction

  • The result is a normal media tool result. It is stored with is_media, the data and the MIME type, like other tool results, and is sent again on later turns.
  • To keep base64 from growing without bound, appendForkTools passes the prompt through limitViewedImages on every step. The prompt keeps the newest 8 view_image images, and always the newest one. Together with the prompt's other images it keeps at most 20, because Anthropic tightens its per-image limits above 20 images. The 10 MiB byte budget, sized so the base64 form fits Bedrock's 20 MB request limit, counts the prompt's other media first, such as computer screenshots and attachments, so viewed images only fill what is left. That includes the attachments of the unanswered user tail, which buildTurnEnvironment appends after the bound, so turn_environment.go:743 passes pendingPrompt too. Older ones become the text note [image no longer in context: only the newest viewed images are kept. Call view_image again to see it.] followed by the original text. The stored conversation keeps every image. The bound also runs with the experiment off, so a chat that viewed images earlier stays bounded. With a compaction model override, generateCompaction applies the bound again with the override model (one hook line in generation.go), because the override can have a lower image size limit.
  • The bound uses the turn's model. After a switch to a route with a lower limit, such as from OpenAI to Anthropic, an earlier image over the new view_image limit becomes the note [image omitted: N bytes is larger than the view_image limit of M bytes for this model. ...] and does not count toward the 8. Upstream replaceUnsupportedMedia compares the decoded size with the base64 cap, so it would let such an image through.
  • A result belongs to the newest earlier call with its ID, so a reused call ID does not make another tool's result count as a viewed image.
  • While fork-view-image is off and the turn offers the chat's dynamic tools with one named view_image, the caller's tool owns the name, so the bound does not touch its results. Plan-mode turns, explore children and deployments that disable caller-supplied tools offer no dynamic tools, so the bound runs there.
  • The bound runs before the prompt is captured for compaction, so the compaction request is bounded too. After a compaction, images before the summary are no longer sent, like any other tool result.

Access

  • Plan-mode turns and explore children do not get view_image, because their upstream allow-lists (turn_environment.go:2050, :2122) do not name it.
  • A custom agent with readonly: true keeps it. The Read alias maps to read_file and view_image.
  • A caller-supplied dynamic tool named view_image gets neither: readonly drops it, and a tools list keeps it only when it names view_image itself.
  • In an isolated worktree child, a relative path resolves against the worktree, like read_file. A caller-supplied view_image is not wrapped, so it stays a *dynamicTool and the custom agent policy above still drops it.

Web UI

No site/ source change. The generic tool card already renders an is_media result as the image (GenericToolRenderer, ToolResultMedia). site/src/api/typesGenerated.ts gains the experiment constant from the generator.

Generated files

  • site/src/api/typesGenerated.ts comes from the generator.
  • coderd/apidoc/docs.go, coderd/apidoc/swagger.json and docs/reference/api/schemas.md are hand edited to add fork-view-image, the same way feat: add the message_family_chat tool behind fork-family-messages #265 added fork-family-messages. Running swag reorders the fork enum values (map order) and would churn every fork entry. ./.github/fork/check-apidoc.sh passes.
  • Full make gen stops at the helm golden target because helm is not installed in this workspace.

Docs

  • docs/fork/pstack-adapter.md: a Tools table row, a new "View images" section with the limits, errors, gap, prompt bound and access, the readonly and Read notes, the worktree path list, and source references.
  • coderd/x/chatd/ARCHITECTURE.md: view_image in the list of fork tools and a "Viewing images" bullet. The repository rule says agents leave TODOs there for the human author. The lead asked this workstream to write the update itself and leave no TODOs.

Tests

  • TestViewImageReachesModel (end to end, chattest.NewAnthropic): the tool is offered, a PNG with a known payload reaches the second model request as an image block with the exact base64, the next turn's request still carries it, and the stored tool message has is_media, the data and the MIME type.
  • TestViewImageTool: type by content, JPEG, GIF and WebP, a non-image file, the size limit, the pixel limit, invalid and truncated images (cut PNG, bad PNG CRC, cut JPEG, GIF and WebP, a WebP chunk past the file end, a VP8 chunk shorter than its first partition, a WebP with no image chunk, a PNG with only IHDR and IEND, and a JPEG and a GIF with damaged data and a restored end marker), the total-pixel limit, an animated GIF, the per-response call limit, a path with outer spaces, a model without image input (Copilot route and an unknown provider), and a route that rejects one type.
  • TestLimitViewedImages: the count bound, the byte bound, the newest kept, the input left unchanged, other media taking the byte budget first (a screenshot and an attachment), the pending tail's attachments taking it too, other images taking the image count (a PDF does not), a reused call ID, and the per-model size limit.
  • TestViewImageCustomAgentPolicy: readonly, the Read alias and a named entry, each with the built-in and a dynamic view_image.
  • TestViewImageToolGate: the tool only with the experiment on, the prompt bound in both cases, and no bound when a dynamic view_image owns the name with the experiment off, except in plan mode.
  • TestForkWorktreeBindingTools/ViewImageRelative and /DynamicViewImageUnbound: the built-in tool resolves a relative path against the worktree, and a caller-supplied view_image comes back unwrapped.
  • The tests fail without the change: with the tool append and the limitViewedImages call removed from fork_tools.go, TestViewImageReachesModel and both TestViewImageToolGate subtests fail. With the other-media count or the dynamic-tool check removed, TestLimitViewedImages/OtherMediaTakesBudget and TestViewImageToolGate/OffWithDynamicTool fail. With the plan-mode check removed, TestViewImageToolGate/OffWithDynamicToolInPlanMode fails.

Commands run, all under flock ~/.fork-go.lock:

  • go test ./coderd/x/chatd/ -run 'TestViewImageReachesModel|TestViewImageTool|TestLimitViewedImages|TestViewImageToolGate' -count=1 -v: pass
  • go test ./coderd/x/chatd/ -run 'AgentToolPolicy|CustomAgent|WorktreeBinding|ForkTools|ChatTodoTools|MediaSanitize|ReplaceUnsupportedMedia|TestViewImage|TestLimitViewed' -count=1: pass
  • After the review fixes: go test ./coderd/x/chatd/ -run 'TestViewImage|TestLimitViewedImages|AgentToolPolicy|CustomAgent|ForkTools' -count=1: pass, and TestViewImageReachesModel -v: pass
  • After the second review: go test ./coderd/x/chatd/ -run 'TestViewImage|TestLimitViewedImages|AgentToolPolicy|CustomAgent|ForkTools|MediaSanitize|ReplaceUnsupportedMedia|DynamicTool' -count=1: pass
  • After the third review: go test ./coderd/x/chatd/ -run 'TestViewImage|TestLimitViewedImages|ForkTools' -count=1: pass
  • After the fourth review: go test ./coderd/x/chatd/ -run 'TestViewImage|TestLimitViewedImages|AgentToolPolicy|CustomAgent|ForkTools|MediaSanitize|ReplaceUnsupportedMedia|DynamicTool' -count=1: pass. With the chunk walk removed, TestViewImageTool/InvalidImages fails.
  • After the fifth review: go test ./coderd/x/chatd/ -run 'TestViewImage|TestLimitViewedImages|AgentToolPolicy|CustomAgent|ForkTools|DynamicTool|MediaSanitize|ReplaceUnsupportedMedia' -count=1: pass. With the pending tail left out of the count, TestLimitViewedImages/PendingMediaTakesBudget fails.
  • After the sixth review: go test ./coderd/x/chatd/ -run 'TestViewImage|TestLimitViewedImages|ForkTools|DynamicTool|CompactionModelOverride|Compaction' -count=1: pass, and TestActiveServer_CompactionModelOverride and TestViewImageToolGate with -v: every subtest passes.
  • After the seventh review: go test ./coderd/x/chatd/ -run 'TestViewImage|TestLimitViewedImages|ForkTools' -count=1: pass. With imageDecodes disabled, TestViewImageTool/InvalidImages fails on the new PNG, JPEG and GIF cases.
  • After the eighth review: go test ./coderd/x/chatd/ -run 'TestForkWorktreeBinding|TestViewImage|ForkTools|AgentToolPolicy|CustomAgent' -count=1: pass. With the dynamic-tool check removed from the worktree binding, TestForkWorktreeBindingTools/DynamicViewImageUnbound fails.
  • After the ninth review: go test ./coderd/x/chatd/ -run 'TestViewImage|TestLimitViewedImages|ForkTools|TestForkWorktreeBinding|AgentToolPolicy|CustomAgent|MediaSanitize|ReplaceUnsupportedMedia|DynamicTool' -count=1: pass. With the call counter, the frame check and the image count disabled, TestViewImageTool/CallsPerResponse, TestViewImageTool/AnimatedGIF and TestLimitViewedImages/OtherImagesTakeCount fail.
  • go test ./codersdk -run 'TestExperimentDisplayNames|TestForkExperiments' -count=1: pass
  • golangci-lint run on ./coderd/x/chatd/ and ./codersdk/: no finding in the changed files. The new-code config with --new-from-merge-base=origin/main: 0 issues.
  • make lint/emdash lint/check-experiment-keys lint/architecture, paralleltestctx, intxcheck on the changed packages, markdownlint on docs/fork/pstack-adapter.md: pass

Not verified

  • The compaction override hook, generation.go:1339, runs in TestActiveServer_CompactionModelOverride, but no test has a viewed image over the override's limit. TestViewImageToolGate covers limitViewedImagesForModel itself.
  • No run against a real provider. The end-to-end test uses the Anthropic mock.
  • Not exercised in a browser. The UI claim rests on the existing generic renderer code.
  • The VP8L bitstream and the VP8 partition contents are not decoded, because the fork has no WebP decoder. A WebP whose chunks are intact but whose compressed data is damaged still passes.
  • Only the first GIF frame is decoded. Damaged data in a later frame of an animated GIF passes.
  • The context cancel path while a call waits for the decode slot has no test.
  • The newest viewed image always stays, so a prompt that already holds 20 or more other images still goes over 20. Animated WebP is not detected.
  • Vale did not run: mise cannot install it in this workspace (permission denied).
  • Full make lint and full make gen did not run here; fork-ci covers them.
  • After merge, Mike needs to enable fork-view-image for the tool to appear.

Add a fork view_image chat tool that loads a PNG, JPEG, GIF or WebP file
from the workspace into the model's context as a media tool result. The
type comes from the content, the size limit from the route's per-image
cap or the chat tool media limit, and a model without image input gets
an error that names the model and the provider. The prompt keeps the
newest 8 viewed images, up to 15 MiB.

Closes #250
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T01:29:46.783515Z 0ad8545 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fb3c1c2a59

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/fork_tools.go Resolved
Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread coderd/x/chatd/fork_view_image.go Resolved
Reject truncated or damaged images by structure, drop a stored image
over the current model's view_image limit from the prompt, map tool
results to the newest call with their ID, keep a dynamic view_image out
of readonly and the Read alias, and pass the path as given.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: b49342a88a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

Merged main (607a95b, adds one test file). @codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 692e193ce2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread coderd/x/chatd/ARCHITECTURE.md Resolved
Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Count other tool media and attachments before viewed images in the
15 MiB budget, skip the bound when a caller-supplied view_image owns
the name, drop semicolons from the messages and rename the docs
section to View images.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b2c71f875d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Treat a caller-supplied view_image as the owner of the name only on
turns that offer dynamic tools, and state the newest-image exception
to the 15 MiB budget.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 934b236b91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread coderd/x/chatd/fork_view_image.go Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 4e6611d0b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

Merged main (5c34d7e) into the branch. @codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48f0b822d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/fork_view_image.go Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48f0b822d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/turn_environment.go Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6bd1b7f68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/fork_view_image.go Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d80c0cdf08

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/fork_view_image.go Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ebe0dfdf8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 659094c6be

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread coderd/x/chatd/fork_view_image.go Resolved
Comment thread coderd/x/chatd/turn_environment.go Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 0ad8545dc6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Coder Agents acted on behalf of @ibetitsmike.

Closing in favor of a stack of three smaller PRs, per the lead's request to split this one:

  1. feat(coderd/x/chatd): add the view_image tool behind fork-view-image #308: the experiment, the view_image tool core and the model check, on main.
  2. feat(coderd/x/chatd): bound the viewed images a prompt carries #309: the bound on viewed images in the prompt, on feat(coderd/x/chatd): add the view_image tool behind fork-view-image #308.
  3. fix(coderd/x/chatd): reject damaged and animated images in view_image, and document it #310: the structure and decode checks, the per-response call limit and the docs, on feat(coderd/x/chatd): bound the viewed images a prompt carries #309. Its tree equals this PR's head 0ad8545.

Declined review findings worth doing later are in #291. The branch mike/issue-250-read-images stays as it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chatd: let the model read image files from the workspace

1 participant