Skip to content

Raise default PowerShell timeout to 10 minutes - #67

Merged
Antonytm merged 2 commits into
Antonytm:mainfrom
mg-aceik:powershell-timeout-default
Jul 30, 2026
Merged

Raise default PowerShell timeout to 10 minutes#67
Antonytm merged 2 commits into
Antonytm:mainfrom
mg-aceik:powershell-timeout-default

Conversation

@mg-aceik

Copy link
Copy Markdown
Contributor

Why

POWERSHELL_TIMEOUT_MS defaulted to 60s. That was originally chosen to match the tool-call timeout most AI agents enforce, on the reasoning that a longer server-side timeout would just let the agent give up first. In practice it fires constantly on larger scripts — index rebuilds, publishing, bulk item updates — and aborts work that would have succeeded.

The tradeoff is worth restating: this timeout exists to stop a hung Sitecore endpoint holding a connection open forever, not to bound legitimate script runtime. For that job a generous default is the safer failure mode, and an agent with a shorter tool-call timeout still cuts things short first regardless of what the server allows.

What

  • Default raised from 60s to 10 minutes in src/tools/powershell/client.ts, with the reasoning recorded in the comment. Still overridable via POWERSHELL_TIMEOUT_MS in either direction.
  • Version bumped 1.4.1 → 1.4.2 following the existing convention: package.json plus the hardcoded tags in both docker publish workflows. The docker:*:build/push npm scripts were also bumped — they had drifted behind at 1.4.0, so they would have built and pushed an already-published tag.
  • CHANGELOG restructured into dated [1.4.0] / [1.4.1] / [1.4.2] sections. Everything was still sitting under [Unreleased] despite 1.4.0 and 1.4.1 being tagged and published, so the file described behaviour that did not match either released version. The 1.4.0 request-timeouts entry now correctly documents the 60s default that version shipped, with a pointer to the 1.4.2 change.

Notes

  • [1.4.2] is dated 2026-07-30 on the assumption of a release around now; worth adjusting if it slips.
  • No [Unreleased] heading remains — happy to add an empty one back as a landing spot for the next change if you prefer that.

Testing

npm run typecheck passes. The change is a single default constant, no behavioural branch added.

mg-aceik added 2 commits July 30, 2026 15:51
The 60s default was tuned to the tool-call timeout most AI agents enforce,
but it fired constantly on larger scripts (index rebuilds, publishing, bulk
item updates) and aborted work that would have succeeded. This timeout is
there to stop a hung Sitecore endpoint holding the connection open forever,
not to bound legitimate script runtime, so a generous default is the safer
failure mode. Still overridable via POWERSHELL_TIMEOUT_MS.

Bumps 1.4.1 -> 1.4.2 (package.json, docker publish workflow tags, and the
docker:* npm scripts, which had drifted behind at 1.4.0).
Everything in the file sat under [Unreleased] even though 1.4.0 and 1.4.1 had
already been tagged and published to npm and Docker Hub. Split it into dated
[1.4.0] (the harden & modernize work, tag 983b773) and [1.4.1] (docker publish
workflow fixes only), and give the new PowerShell timeout default its own
[1.4.2] section.

The 1.4.0 request-timeouts entry is restored to describe the 60s default that
version actually shipped, with a pointer to the 1.4.2 change.
@Antonytm
Antonytm merged commit c936a22 into Antonytm:main Jul 30, 2026
1 check passed
@Antonytm

Copy link
Copy Markdown
Owner

@mg-aceik

Approved. A new release was prepared.
https://github.com/Antonytm/mcp-sitecore-server/releases/tag/1.4.2

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.

2 participants