pi-mono/packages/coding-agent/src
Jeremy Gayed b0e05b4423
fix(coding-agent): resize images returned by tools (#7330)
Images produced by tools (extensions, MCP bridges, screenshot tools) went into
session history at full resolution because processImage was only wired to the
read tool and @file CLI attachments. Providers validate every image in the
request, so one oversized image poisons the whole conversation: Anthropic drops
its per-image cap from 8000px to 2000px once a request carries many images, and
every later turn re-sends the same payload. Switching models does not help.

Normalize tool result images in AgentSession.afterToolCall, after the extension
tool_result hook so extension-injected images are covered too. Honors
images.autoResize, and keeps the original block when processing fails so an
unavailable image backend does not delete tool output.

Refs #5369

Assisted-By: devx/86bf3b09-9aba-4d03-8154-50fca3ffc9b5
2026-08-03 14:02:03 +02:00
..
bun fix(coding-agent): bundle OAuth flows in Bun binaries 2026-07-16 15:36:16 +02:00
cli feat(coding-agent): compose experimental CLI commands 2026-08-02 11:50:56 +03:00
client feat: add remote session client coordination 2026-08-01 02:05:49 +03:00
core fix(coding-agent): resize images returned by tools (#7330) 2026-08-03 14:02:03 +02:00
extensions fix(coding-agent): enable streaming usage for llama.cpp provider (#7258) 2026-07-29 10:03:59 +02:00
modes fix(coding-agent): flash fullscreen copy confirmation 2026-08-03 12:00:39 +02:00
utils fix(coding-agent): resize images returned by tools (#7330) 2026-08-03 14:02:03 +02:00
cli.ts feat(coding-agent): set AI_AGENT environment variable (#7493) 2026-08-03 13:45:32 +02:00
config.ts fix(coding-agent): install checked pi update version 2026-06-21 14:46:07 +02:00
index.ts feat(coding-agent): add ui mode setting 2026-07-31 15:33:52 +02:00
main.ts feat(coding-agent): add ui mode setting 2026-07-31 15:33:52 +02:00
migrations.ts fix(coding-agent): treat uppercase config values as literals 2026-06-13 21:24:22 +02:00
package-manager-cli.ts feat(coding-agent): add model catalog refresh flag 2026-07-16 12:46:49 +02:00
rpc-entry.ts feat(coding-agent): set AI_AGENT environment variable (#7493) 2026-08-03 13:45:32 +02:00