feat: Make Claude CLI timeout configurable, increase default, and bump version to 1.11.0#26
feat: Make Claude CLI timeout configurable, increase default, and bump version to 1.11.0#26
Conversation
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Looks like a good change, any reason why not merged? |
|
Mostly because I'm not using this anymore - buuuut I'll add that to my list and craft a new release soon, thanks for the ping! |
|
I see, is there an alternative to this repo in terms of built-in aspects of claude code? I couldn't find any other way to avoid the permissions issues while allowing (say) claude code or some other MCP client to use claude code itself as MCP server. |
|
run claude with --dangerously-skip-permissions? |
|
For background, the existing sub agents or tasks cannot themselves run tasks. Yet I and others want this feature. maybe it's coming, but one never knows. To solve this, I tried running (claude mcp serve has no permissions options) including with settings.json changes for allowing everything. The idea is then separate claude talking to this MCP can run full claude that also allows tasks inside. This works, but fails due to permissions when that every is encountered, regardless of how one runs claude with Only your package was able to be used in this way. I'm not even clear how people using cursor use the normal claude mcp server since it would be asking for permissions constantly. |
| MIT License | ||
|
|
||
| Copyright (c) 2025 Peter Steinberger | ||
| \g<1>2026 Peter Steinberger |
There was a problem hiding this comment.
LICENSE file corrupted by malformed regex replacement
The copyright line in the LICENSE file contains \g<1>2026 Peter Steinberger instead of Copyright (c) 2026 Peter Steinberger. This appears to be a regex replacement pattern (Python-style backreference syntax) that was accidentally left in the file during a find-and-replace operation. This corrupts the legal copyright notice, which could have implications for the project's licensing.
| 1. Be concise, explicit & step-by-step for complex tasks. No need for niceties, this is a tool to get things done. | ||
| 2. For multi-line text, write it to a temporary file in the project root, use that file, then delete it. | ||
| 3. If you get a timeout, split the task into smaller steps. | ||
| 4. **Seeking a second opinion/analysis**: If you\\'re stuck or want advice, you can ask \\\`claude_code\\\` to analyze a problem and suggest solutions. Clearly state in your prompt that you are looking for analysis only and no actual file modifications should be made. |
There was a problem hiding this comment.
Escaped apostrophe causes visible backslash in tool description
In the tool description template, \\'re will produce \'re in the output string (with a visible backslash before the apostrophe). In JavaScript template literals, single quotes don't need escaping, so \\' produces a literal backslash followed by an apostrophe. The text "If you're stuck" will be displayed to users instead of the intended "If you're stuck". The apostrophe should simply be ' without any escaping.
| err.stderr = stderr.trim(); | ||
| err.exitCode = code; | ||
| reject(err); | ||
| } |
There was a problem hiding this comment.
Timeout detection fails due to missing signal/code properties
When Node.js spawn times out, the process is killed and the close event fires with code: null. The error object created in spawnAsync sets exitCode, stdout, and stderr but does not set signal or code properties. However, the timeout detection in the CallToolRequest handler checks for error.signal === 'SIGTERM' or error.code === 'ETIMEDOUT'. Since these properties are never set by spawnAsync, timeout errors are not properly detected, causing users to receive a generic "Claude CLI execution failed" message instead of the timeout-specific message. The tests pass because they mock spawnAsync to reject with the expected properties.
This PR introduces a configurable timeout for the Claude CLI via the CLAUDE_CLI_TIMEOUT_SECONDS environment variable, defaulting to 3600 seconds (60 minutes). It also updates the README and CHANGELOG accordingly. Version bumped to 1.11.0.
Note
Highlights
CLAUDE_CLI_TIMEOUT_SECONDS(default 3600s); default increased from 30m to 60mClaude CLIand MCP server versions; formatting/escaping improvementsserver.runnow logs startup normallyCode refactor
constants.ts,utils.ts(withfindClaudeCli,spawnAsync,debugLog), andtypes.ts;server.tsnow injects utils and improves error handling/timeoutsTests/build
setupTests.ts, updatedvitest.config.unit.ts; removed legacy version-print testvitest run), addedwhichand types, bumped version to1.11.0Docs
Written by Cursor Bugbot for commit 5ded913. This will update automatically on new commits. Configure here.