Coding

subagent-timeout-config

Try it

One-click subagent timeout configurator for OpenClaw. Configures the three related fields (agents.defaults.timeoutSeconds + subagents.runTimeoutSeconds + acp...

What it does

**Author**: Evan Song · github.com/Songhonglei **Repository**: https://github.com/Songhonglei/better-agent-skills **License**: MIT

The skill document

subagent-timeout-config

One-click timeout configurator for OpenClaw subagents. Set the three related timeout fields atomically with built-in constraint validation, automatic backup, and optional gateway restart.

⚠️ OpenClaw-only by default — reads/writes ~/.openclaw/openclaw.json. Use --config to target a different runtime's JSON config file.


Why this skill exists

OpenClaw timeouts are split across three nested fields that must be tuned together:

FieldPathWhat it controls
timeoutSecondsagents.defaults.timeoutSecondsPer-tool-call wait
runTimeoutSecondsagents.defaults.subagents.runTimeoutSecondsPer-subagent task budget
ttlMinutesacp.runtime.ttlMinutesACP session lifetime

Hidden trap: ttlMinutes * 60 must be ≥ runTimeoutSeconds, otherwise sessions die before subagents finish. Default OpenClaw values (30s / 30min / 30min) are too tight for many real-world tasks (codex/claude-code planning, large refactors, complex analysis).

This skill picks the right combination in one command, validates the constraint, backs up the original config, and restarts the gateway.


Preset Profiles

ProfiletimeoutSecondsrunTimeoutSecondsttlMinutesUse case
quick60s (1min)3600s (1h)60min (1h)Fast feedback, interactive debugging
normal180s (3min)7200s (2h)120min (2h)Everyday development
patient300s (5min)10800s (3h)180min (3h)Long-running tasks, big codebases

Aliases: impatient / fastquick, slowpatient.


Usage

python3 /scripts/set_timeout.py --profile normal --dry-run

Apply a profile (with auto-restart)

python3 /scripts/set_timeout.py --profile patient

Apply without restarting Gateway

python3 /scripts/set_timeout.py --profile normal --no-restart
# Then later, when you're ready:
openclaw gateway restart

Custom values

# Format: timeoutSeconds,runTimeoutSeconds,ttlMinutes
python3 /scripts/set_timeout.py --custom 240,9000,150

Check current configuration

python3 /scripts/set_timeout.py --status

List all profiles

python3 /scripts/set_timeout.py --list

Target a non-default config path

python3 /scripts/set_timeout.py \
  --profile normal --config /path/to/your/openclaw.json
# Or via env:
OPENCLAW_CONFIG=/path/to/openclaw.json python3 <...>/set_timeout.py --profile normal

Workflow (when the agent invokes this skill)

  1. Ask the user which profile suits their task (or accept --custom).
  2. Show --dry-run diff first when the user is unsure.
  3. Apply with default settings (auto-backup + auto-restart).
  4. Confirm new settings via --status.
  5. If validation fails (e.g. TTL too small), explain the constraint and offer a corrected value.

Safety Features

  • Auto-backup: Before every write, the original config is copied to .bak.. Restore by cp if needed.
  • Atomic write: New config is written to a .tmp file then renamed, so a crash mid-write never leaves a corrupt JSON.
  • Constraint validation: Refuses to apply invalid combos (e.g. ttlMinutes too small for runTimeoutSeconds). Validation runs before any file modification — --dry-run and real applies both validate.
  • Restart opt-out: --no-restart lets you defer the Gateway restart (useful when you have a long-running task you don't want to interrupt).

CLI Reference

FlagDescription
--profile Apply preset: quick / normal / patient (+ aliases)
--custom T,R,TTLApply custom values (3 comma-separated integers)
--statusPrint current configuration
--listList all available profiles
--config Override config file path (default ~/.openclaw/openclaw.json)
--dry-runPreview diff; do not write file or restart Gateway
--no-restartSkip openclaw gateway restart after writing

Exit codes: 0 = success, 1 = error (bad args, IO, validation failure).


Dependencies

  • Python 3.8+ (standard library only — no pip dependencies)
  • openclaw CLI on PATH (only needed for the auto-restart step; use --no-restart if you don't have it)

What This Skill Is NOT

  • Not a generic timeout tool — it only knows about OpenClaw's three specific fields. For other agent runtimes' config formats, use --config to point at a custom JSON path but be aware the schema is OpenClaw-specific.
  • Not a persistent daemon — it's a one-shot CLI invocation.
  • Not a profile editor — to add a new preset, edit PROFILES in scripts/set_timeout.py.

Key Files

FilePurpose
scripts/set_timeout.pyConfigurator: profiles, validation, backup, restart

Related skills

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván1 installs

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván1 installs

Read and write Excel workbooks, worksheets, ranges, tables, and charts in OneDrive through Microsoft Graph with managed OAuth.

by byungkyu800 installs42 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants

More from songhonglei

Browse all skills

小红书图文笔记自动发布技能。通过 ego-browser 自动化完成图片上传、标题填写、正文编辑、 话题标签、发布等全流程。附带 28 种多样式风格卡片生成器(含 3 种照片背景氛围主题), 卡片主题、布局、背景图、遮罩强度、模糊、颗粒等参数均可自由配置。 当用户要求发小红书、发布图文笔记、上传到小红书、小红书发帖或涉及小红书内容发布时触发此技能。 前置依赖:ego-browser (ego-lite) 已安装且正在运行,小红书账号已登录。

by songhonglei2 installs1 stars

Guided token optimization for AI agent workspaces. Triggers on phrases like "save tokens", "optimize tokens", "context window too large", "memory files too b...

by songhonglei2 installs1 stars

将 Markdown/纯文本内容智能分析、排版并导出为高分辨率精美长图或分享海报(内置 18 种视觉风格)。 当用户说「生成长图」「做海报」「文字转图片」「高颜值排版」「做大图」「make a poster」 「export as image」「generate image from text/markdown」等意图时触发本技能。

by songhonglei2 installs

Generic skill-quality auditor for any agent skill (Claude, OpenClaw, Cursor, etc.). Runs a 7-dimension static analysis (D1 process closure & idempotency, D2 tool/command conventions, D3 portability & defense, D4 skill usability, D5 security & op risk, D6 code & doc quality, D7 dependency & footprint) with explicit ERR / WARN severity, 120-point scoring (pass line 90 + zero ERR), and an opt-in `--fix` workflow that always backs up first. Two depths: L1 static (~2 min) and L2 dryRun (~5 min, read-only hub + reachability checks). Strict red lines — read-only by default, never executes the audited skill's writes. Use when the user asks to "audit a skill", "check skill quality", "is this skill ready to ship", "lint my skill", or runs this tool by name. Triggers also: "审计这个 Skill"、"检查 Skill 质量"、"Skill 能上线吗"、 "skill-deep-audit"、"审一下 xxx skill"。

by songhonglei1 installs1 stars

Turn any content — Markdown, plain text, images, tables, Excel (.xlsx), Word (.docx) — into a polished single-page HTML, pick one of 19 built-in themes, set the page Title and FavIcon, then publish it as a live page. When the input is already a well-designed HTML page (or an image with a clear layout), it switches to "layout inheritance" mode: the original layout is kept intact and only the colour theme is swapped, instead of tearing it apart and rebuilding. Use when the user says "turn this into a web page", "make this an HTML page", "convert this doc/table/Excel to HTML", "make it pretty", "把这个转成网页", "做成 HTML 页面", "内容转 HTML".

by songhonglei3 installs

Systematic quality check for code, skills, configs, and documents. Two modes — GLIC for internal quality (4 dimensions: Grammar / Logic / Integrity / Contain...

by songhonglei1 installs1 stars