Skip to content

fix: use milliseconds for bash timeouts - #33

Merged
K-Mistele merged 2 commits into
mainfrom
debug-bash-tool-session-hang-and-timeout-issues
Sep 1, 2026
Merged

fix: use milliseconds for bash timeouts#33
K-Mistele merged 2 commits into
mainfrom
debug-bash-tool-session-hang-and-timeout-issues

Conversation

@K-Mistele

Copy link
Copy Markdown
Contributor

Summary

  • rename the Bash tool timeout input from timeout to timeout_ms
  • interpret explicit timeouts in milliseconds, matching Claude Code and Codex shell conventions
  • document milliseconds, the 120-second default, and the maximum in both the parameter and top-level tool descriptions
  • update timeout validation, failure messages, and process-group timeout coverage

Why

Models were emitting values such as 120000 with millisecond intent, while Fold interpreted them as seconds. A two-minute timeout therefore became 33 hours and left sessions waiting on commands long after Riptide considered them inactive.

Historical session events remain readable because persisted tool-call parameters are stored as unknown data and are not re-executed during replay.

Validation

  • bun --cwd packages/fold-agent test test/Tools/BashTool.vi.test.ts (21 passed)
  • bun run --cwd packages/fold-agent typecheck
  • bun run format:check

@K-Mistele
K-Mistele merged commit 0115f1f into main Sep 1, 2026
5 checks passed
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.

1 participant