# UI-TARS Timeout Patch & Context Pruner

> Fix UI-TARS Desktop agent runs that die on slow local inference: 'agent step timed out', steps cancelled at 30 seconds with a healthy llama.cpp server, a clean server log, and no crash. Covers UI-TARS Desktop 0.2.4, whose invokeModelProvider hard-codes 'timeout: 3e4' twice in dist/main/main.js, and

UI-TARS Timeout Patch & Context Pruner is a paid AI agent skill on Agensi by Nick, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Nick](https://www.agensi.io/creators/nick-2)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.1.4
- Last updated: 2026-11-30
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/ui-tars-timeout-patch-context-pruner
- Tags: debugging, automation, desktop-agent, electron

## What it does

- Identifies if agent steps are being cancelled by a hard-coded 30 second limit
- Patches the desktop app files to allow for much longer processing times
- Creates backup files automatically before making any changes to your software
- Checks your local server to ensure the model is actually online and responsive
- Optimizes vision and memory settings to prevent graphics card crashes
- Updates application security hashes so the patched software still opens correctly

## Who it's for

- **Users running UI-TARS on their own computer:** Stop your AI agent from giving up just because your computer is slow. Try: "Help me fix the 30 second timeout error in UI-TARS."
- **People with older or mid-range graphics cards:** Get stable performance on modest hardware without crashing your video card. Try: "My agent keeps timing out at 30 seconds, can you patch it?"

## About this skill

Fix UI-TARS Desktop agent runs that die on slow local inference: 'agent step timed out', steps cancelled at 30 seconds with a healthy llama.cpp server, a clean server log, and no crash. Covers UI-TARS Desktop 0.2.4, whose invokeModelProvider hard-codes 'timeout: 3e4' twice in dist/main/main.js, and the field-proven patch to 6e5, including the asar repack and integrity-hash swap it requires. Also covers context pruning: cap the vision encoder with --image-max-tokens (768 is the proven sweet spot; uncapped encode crashes with 'ggml_vulkan: device lost'), hold server context at -c 8192, and verify /v1/models answers before a run. Ships three zero-dependency scripts: a dry-run-first timeout patcher, a server health check, and a scripted asar-hash swapper for the repack. Companion skill: sd-cpp-vulkan-vram-diagnostic.

## Requires

- Python 3.8+
- UI-TARS Desktop 0.2.4

## Known limitations

Timeout literals and the repack are verified on UI-TARS Desktop 0.2.4 only; other versions may spell the value differently (the patcher recognises 3e4 / 30000 / 30_000 and reports not-found rather than guessing). The integrity-hash swap assumes the hash is embedded as a hex string, as in 0.2.4; the script stops with an inspect-first verdict if it is not found.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the UI-TARS Timeout Patch & Context Pruner skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does UI-TARS Timeout Patch & Context Pruner do?

Fix UI-TARS Desktop agent runs that die on slow local inference: 'agent step timed out', steps cancelled at 30 seconds with a healthy llama.cpp server, a clean server log, and no crash. Covers UI-TARS Desktop 0.2.4, whose invokeModelProvider hard-codes 'timeout: 3e4' twice in dist/main/main.js, and

### Which AI agents support UI-TARS Timeout Patch & Context Pruner?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use UI-TARS Timeout Patch & Context Pruner?

Connect your AI agent to Agensi through MCP, then ask it to use UI-TARS Timeout Patch & Context Pruner on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
