Skip to content

Studio: let the model see images read in imported Claude Code chats - #18702

Merged
danielhanchen merged 3 commits into
unslothai:mainfrom
NilayYadav:imported-read-tool-images
Nov 22, 2026
Merged

danielhanchen merged 3 commits into
unslothai:mainfrom
NilayYadav:imported-read-tool-images

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

In an imported Claude Code chat, an image opened by the Read tool showed in the chat but reached the model as an empty result, so follow-up questions about it went unanswered. These images are now sent the same way as images from Studio's own image tools. This only applies to imported chats, and text-only models still get text only.

Before (left, main) and after (right, this branch):

before-after

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 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-22T09:27:03.707509Z 39a57ce 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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 6c55e3be45

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 39a57cef58

ℹ️ 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".

@unslothai unslothai deleted a comment from NilayYadav Nov 22, 2026
@danielhanchen
danielhanchen merged commit 94d96c0 into unslothai:main Nov 22, 2026
danielhanchen added a commit that referenced this pull request Nov 22, 2026
…d up front (intermittent diffusion-shard timeout) (#18885)

## Summary

`(Python 3.13, diffusion)` fails intermittently on unrelated PRs with
the same test:

```
studio/backend/tests/test_diffusion_ddp.py::test_all_reduce_averages_grads_and_loss_and_flags
tests/test_diffusion_ddp.py:55: in _spawn
    codes = [p.wait(timeout = timeout) for p in procs]
E   Failed: Timeout (>330.0s) from pytest-timeout.
```

It is the failing test in 3 of the last 6 failed Backend CI runs
(`studio-wan-vae-2frame`, `audio-cpp-accelerator-chosen-install`,
`perf/r37-translate-history-memo`) and on #18851 and #18702.

The test (from #18771) spawns two gloo ranks and joins them through a
`TCPStore` on a port that `_port()` found free by binding and closing a
socket in the parent. The port is only bound for real later, by rank 0
in its own process, after torch has imported. Under xdist another worker
can take that port in the meantime. Rank 0 then fails to bind, rank 1
waits out the store's 300 s timeout, and pytest-timeout kills the test
at 330 s. In the failing logs only one of the spawned pairs ever prints
the gloo "connected to 1 peer ranks" lines.

## Fix

The two spawned ranks rendezvous through a `FileStore` in a fresh temp
directory per spawn (same 300 s store timeout), so there is no port to
race for. `diffusion_ddp`'s gate only uses `store.set` / `store.wait`,
which `FileStore` provides. Production code is unchanged; this is the
test harness only.

## Testing

- `studio/backend/tests/test_diffusion_ddp.py`: 22 passed, including the
gradient all-reduce and the two-rank `train` spawns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants