Skip to content

fix(server): accept timeout_seconds as an alias on run and wait - #44

Merged
tomfordweb merged 1 commit into
mainfrom
fix/timeout-seconds-alias
Jul 30, 2026
Merged

fix(server): accept timeout_seconds as an alias on run and wait#44
tomfordweb merged 1 commit into
mainfrom
fix/timeout-seconds-alias

Conversation

@tomfordweb

Copy link
Copy Markdown
Owner

Closes #37.

Root cause of the report: the schema only knows timeout_ms. A caller passing timeout_seconds: 600 had the unknown key silently stripped by validation, so the wait ran with its 120s default and returned status: \"timeout\" (elapsed_ms: 120000) on a healthy job — exactly the reported shape. The host's 120s backgrounding is a separate, cosmetic layer: the tool result still arrives when the call completes.

Fix: run and wait accept an optional timeout_seconds alias (capped at 24h) converted via resolveTimeoutMs; explicit timeout_ms wins when both are set. Defaults unchanged.

Tests: in-memory MCP client asserts the alias converts on both tools and that timeout_ms wins; existing default-value tests still pass. Full gate green (typecheck, lint, test, build).

Agents kept passing timeout_seconds; schema validation silently
stripped the unknown key, the call fell back to the 60s/120s default,
and a healthy long job came back status=timeout — reading as failure.

run and wait now take an optional timeout_seconds (capped at 24h),
converted to ms; an explicit timeout_ms wins when both are set.

Closes #37
@tomfordweb
tomfordweb merged commit 11cb769 into main Jul 30, 2026
1 check passed
@tomfordweb
tomfordweb deleted the fix/timeout-seconds-alias branch July 30, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wait: timeout_seconds above the host's 120s MCP ceiling always returns status=timeout for a healthy job

1 participant