-
Notifications
You must be signed in to change notification settings - Fork 373
Replace end-of-session mcpscripts validation with bash to prevent ~5min MCP inactivity timeouts #28816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace end-of-session mcpscripts validation with bash to prevent ~5min MCP inactivity timeouts #28816
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1109,6 +1109,42 @@ When writing workflows that use `cache-memory` to persist data across runs, be a | |||||
|
|
||||||
| ## Key Features | ||||||
|
|
||||||
| ### MCP Connection Inactivity Timeout — Use Bash for End-of-Session Validation | ||||||
|
|
||||||
| **⚠️ CRITICAL WORKFLOW AUTHORING RULE: Use bash, not MCP tools, for build/test validation at the end of a session.** | ||||||
|
|
||||||
| MCP connections (HTTP/WebSocket transports) time out after approximately **5 minutes of inactivity**. Workflows with long file-exploration or analysis phases routinely exceed this threshold. When the agent finally attempts an end-of-session validation call via an MCP tool (e.g., `mcpscripts-make build`, `mcpscripts-go test ./...`), the MCP transport has been torn down, resulting in: | ||||||
|
|
||||||
| ``` | ||||||
| MCP error -32003: context canceled | ||||||
| ``` | ||||||
|
|
||||||
| This causes the entire workflow session to fail at the last step, wasting all preceding work. | ||||||
|
|
||||||
| **Rule**: Always use direct `bash` commands for build, test, and validation steps — especially for any step that runs *after* a file-exploration or analysis phase: | ||||||
|
||||||
| **Rule**: Always use direct `bash` commands for build, test, and validation steps — especially for any step that runs *after* a file-exploration or analysis phase: | |
| **Rule**: Prefer direct `bash` commands for build, test, and validation steps that run *after* a long file-exploration or analysis phase (roughly 5+ minutes idle), since MCP transports may have timed out by then. For shorter, active sessions, `mcpscripts-*` tools are still fine when appropriate: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,10 +168,10 @@ | |
| "version": "v2.2.0", | ||
| "sha": "0c5077e51419868618aeaa5fe8019c62421857d6" | ||
| }, | ||
| "ruby/setup-ruby@v1.305.0": { | ||
| "ruby/setup-ruby@v1.306.0": { | ||
| "repo": "ruby/setup-ruby", | ||
| "version": "v1.305.0", | ||
| "sha": "0cb964fd540e0a24c900370abf38a33466142735" | ||
| "version": "v1.306.0", | ||
| "sha": "c4e5b1316158f92e3d49443a9d58b31d25ac0f8f" | ||
|
Comment on lines
+171
to
+174
|
||
| }, | ||
| "super-linter/super-linter@v8.6.0": { | ||
| "repo": "super-linter/super-linter", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,10 +168,10 @@ | |
| "version": "v2.2.0", | ||
| "sha": "0c5077e51419868618aeaa5fe8019c62421857d6" | ||
| }, | ||
| "ruby/setup-ruby@v1.305.0": { | ||
| "ruby/setup-ruby@v1.306.0": { | ||
| "repo": "ruby/setup-ruby", | ||
| "version": "v1.305.0", | ||
| "sha": "0cb964fd540e0a24c900370abf38a33466142735" | ||
| "version": "v1.306.0", | ||
| "sha": "c4e5b1316158f92e3d49443a9d58b31d25ac0f8f" | ||
|
Comment on lines
+171
to
+174
|
||
| }, | ||
| "super-linter/super-linter@v8.6.0": { | ||
| "repo": "super-linter/super-linter", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow now instructs running
make test-unitvia bash, but this file’stools.bashsafe-command allowlist (frontmatter) doesn’t includemake test-unit. If the agent can only run allowlisted commands, validation will be blocked. Addmake test-unitto the bash allowlist (or switch tobash: trueif unrestricted bash is acceptable for this workflow).