diff --git a/skills/openai-image-gen/SKILL.md b/skills/openai-image-gen/SKILL.md index 215b45ac4..5db45c2c0 100644 --- a/skills/openai-image-gen/SKILL.md +++ b/skills/openai-image-gen/SKILL.md @@ -29,6 +29,9 @@ Generate a handful of “random but structured” prompts and render them via th ## Run +Note: Image generation can take longer than common exec timeouts (for example 30 seconds). +When invoking this skill via OpenClaw’s exec tool, set a higher timeout to avoid premature termination/retries (e.g., exec timeout=300). + ```bash python3 {baseDir}/scripts/gen.py open ~/Projects/tmp/openai-image-gen-*/index.html # if ~/Projects/tmp exists; else ./tmp/... diff --git a/src/agents/bash-tools.exec-runtime.ts b/src/agents/bash-tools.exec-runtime.ts index 360912643..22d2f14aa 100644 --- a/src/agents/bash-tools.exec-runtime.ts +++ b/src/agents/bash-tools.exec-runtime.ts @@ -535,8 +535,8 @@ export async function runExecProcess(opts: { : "Command not executable (permission denied)" : exit.reason === "overall-timeout" ? typeof opts.timeoutSec === "number" && opts.timeoutSec > 0 - ? `Command timed out after ${opts.timeoutSec} seconds` - : "Command timed out" + ? `Command timed out after ${opts.timeoutSec} seconds. If this command is expected to take longer, re-run with a higher timeout (e.g., exec timeout=300).` + : "Command timed out. If this command is expected to take longer, re-run with a higher timeout (e.g., exec timeout=300)." : exit.reason === "no-output-timeout" ? "Command timed out waiting for output" : exit.exitSignal != null diff --git a/src/agents/bash-tools.test.ts b/src/agents/bash-tools.test.ts index d69fdadbe..151d705f7 100644 --- a/src/agents/bash-tools.test.ts +++ b/src/agents/bash-tools.test.ts @@ -458,6 +458,9 @@ describe("exec tool backgrounding", () => { allowBackground: false, }); await expect(executeExecCommand(customBash, longDelayCmd)).rejects.toThrow(/timed out/i); + await expect(executeExecCommand(customBash, longDelayCmd)).rejects.toThrow( + /re-run with a higher timeout/i, + ); }); it.each(DISALLOWED_ELEVATION_CASES)(