fix(server): accept timeout_seconds as an alias on run and wait - #44
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #37.
Root cause of the report: the schema only knows
timeout_ms. A caller passingtimeout_seconds: 600had the unknown key silently stripped by validation, so the wait ran with its 120s default and returnedstatus: \"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:
runandwaitaccept an optionaltimeout_secondsalias (capped at 24h) converted viaresolveTimeoutMs; explicittimeout_mswins when both are set. Defaults unchanged.Tests: in-memory MCP client asserts the alias converts on both tools and that
timeout_mswins; existing default-value tests still pass. Full gate green (typecheck, lint, test, build).