What happened?
Problem
When the AFT plugin is active, the read tool returns only a metadata string for image files (e.g., Image read successfully (PNG, 59KB). File: /path/to/image.png). The actual image content is never returned to the model.
Expected behavior
For models configured with attachment: true and modalities: { input: ["text", "image"] }, the read tool should return image content so the model can process it with its vision capabilities — matching the behavior of OpenCode's native read tool.
Observed behavior
AFT's read tool detects image file extensions and returns a metadata-only string, regardless of whether the calling model supports image input. The model receives only the string Image read successfully (PNG, 59KB). File: ... and cannot see the actual image.
Steps to reproduce
- Install AFT plugin (
@cortexkit/aft-opencode@latest)
- Configure a model with
attachment: true and modalities: { input: ["text", "image"] }
- Have the model call
read on any .png or .jpg file
- Observe: only metadata string is returned, no image content
Impact
Any workflow that uses read to load image files for multimodal models is broken. For example, OMOslim's observer agent (using a multimodal model) cannot read images when delegated via task() — the observer calls read on the image file but only receives metadata, so it cannot perform visual analysis.
Diagnostics
AFT binary version: 0.39.4
AFT plugin version: 0.39.4
Platform: Windows 11 (win32-x64)
OpenCode version: 1.17.11
Plugin version
0.39.4
AFT binary version
0.39.4
Platform
Windows 11 (win32-x64)
Log output (optional)
N/A — relevant logs are in OpenCode's main log, not in `/tmp/aft-plugin.log`. The OMOslim image-hook log shows the flow: image is saved to disk, observer session is created, `read` tool is called on the saved image, but only metadata is returned.
What happened?
Problem
When the AFT plugin is active, the
readtool returns only a metadata string for image files (e.g.,Image read successfully (PNG, 59KB). File: /path/to/image.png). The actual image content is never returned to the model.Expected behavior
For models configured with
attachment: trueandmodalities: { input: ["text", "image"] }, thereadtool should return image content so the model can process it with its vision capabilities — matching the behavior of OpenCode's nativereadtool.Observed behavior
AFT's
readtool detects image file extensions and returns a metadata-only string, regardless of whether the calling model supports image input. The model receives only the stringImage read successfully (PNG, 59KB). File: ...and cannot see the actual image.Steps to reproduce
@cortexkit/aft-opencode@latest)attachment: trueandmodalities: { input: ["text", "image"] }readon any.pngor.jpgfileImpact
Any workflow that uses
readto load image files for multimodal models is broken. For example, OMOslim's observer agent (using a multimodal model) cannot read images when delegated viatask()— the observer callsreadon the image file but only receives metadata, so it cannot perform visual analysis.Diagnostics
Plugin version
0.39.4
AFT binary version
0.39.4
Platform
Windows 11 (win32-x64)
Log output (optional)