#Image tool "This operation was aborted" on secondary agent (openai-codex/gpt-5.4)

1 messages · Page 1 of 1 (latest)

foggy plank
#

Bug: Image tool times out on secondary agent (openai-codex/gpt-5.4)

Environment:

• OpenClaw v2026.4.15 (Linux, Ubuntu)
• Multi-agent setup: main agent (OPI) + secondary agent (ZAI)
• imageModel: openai-codex/gpt-5.4 (primary), zai/glm-4.5v (fallback)

Issue:
The image tool consistently fails with "This operation was aborted" on the secondary agent. The primary agent (main/OPI) works fine with the same model and same OpenAI OAuth account.

What we've tried:

  1. Copied auth-profiles.json from main agent to secondary agent
  2. Changed imageModel primary/fallback order
  3. Updated from v2026.4.2 to v2026.4.15
  4. ZAI vision models (glm-4.6v, glm-4.5v) now return 404 — they've been removed from the API

Result: Always "This operation was aborted" — the request is killed before the model responds. Related to existing issues #56419 and #58071 (30s hard timeout).

Expected: Image tool should work on secondary agents the same as on the primary agent.

meager ermineBOT
dull cipherBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

meager ermineBOT
fleet skiffBOT
#

I found the smoking gun. The image tool itself is still hard-coding timeoutMs: 30_000 in the tool implementation, separate from the media-understanding defaults. I'm checking whether there's any supported config knob around that, but this already explains why the error is an abort rather than auth.

#

I checked the current source, and this looks like a real timeout bug, not primarily an auth bug.

What I found:

  • The image tool is hard-coded to abort after 30s in src/agents/tools/image-tool.ts (three call sites pass timeoutMs: 30_000).
  • Separately, media-understanding defaults set image timeout to 60s in src/media-understanding/defaults.ts.
  • So tools.media.image.timeoutSeconds exists, but it applies to the media-understanding path, not this image tool path.
  • Default LLM idle timeout is 120s, so this is not the normal agent idle timeout either.

What that means:

  • "This operation was aborted" on ZAI is very consistent with the tool hitting that hard 30s ceiling.
  • The auth path for model-based image analysis is the normal per-agent getApiKeyForModel(... agentDir ...) flow. If auth were the main failure, I’d expect a missing-credentials / 401-style error, not a clean abort at ~30s.
  • Primary vs secondary likely differs because OPI returns inside 30s, while ZAI is slower/colder and crosses the ceiling.

How to verify quickly:

  1. Reproduce on ZAI while tailing logs with openclaw logs --follow
  2. Check whether failure lands at about 30 seconds
  3. Send the same image directly in the prompt to ZAI instead of forcing the image tool
#
  • if that works, or lasts longer than 30s, that strongly confirms this is the tool-specific timeout

Safest workarounds right now:

  • Best workaround: avoid the image tool on ZAI, send the image directly to the vision-capable model in the conversation
  • Or use a faster image-capable model for ZAI so it answers inside 30s
  • If you’re comfortable patching locally, the likely fix is to make src/agents/tools/image-tool.ts use config instead of hard-coded 30_000

Docs:

So my read is: yes, this matches the 30s hard-timeout issue, and tools.media.image.timeoutSeconds is probably not enough because the image tool is bypassing it.

If you want, I can help you turn this into a tight GitHub issue comment with the exact file references and expected fix.

foggy plank
#

Thanks. Changed these: openclaw-tools-CUmYpN1l.js lines 2804, 2825, 2845 — three places with timeoutMs: 3e4 (30000ms).

fleet skiffBOT
#

Yep, those are the exact three spots 👍

Next step:

  1. restart the gateway / agent process
  2. retest the same image call on ZAI
  3. watch whether it now either succeeds, or at least runs past ~30s

If it does, that pretty much confirms the root cause.

A couple quick notes:

  • patching openclaw-tools-*.js is fine for proving it, but it’ll get overwritten on update/reinstall
  • the source-side fix belongs in src/agents/tools/image-tool.ts
  • I’d temporarily remove the dead zai/glm-* fallback while testing, just so the 404 noise doesn’t muddy the result

If this confirms it, please add that finding to the GitHub issue you’re tracking, or file one here: https://github.com/openclaw/openclaw/issues

Glad we caught the hard-coded 30s thing. If you want, paste the result after restart and I’ll help sanity-check it.

#

If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow can index it for future users.