Skip to content

Replace fixed timeout with output-stability detection; add ctrl+c to cancel tool calls#2

Merged
Cicolas merged 8 commits intorelease/v1.0.4from
worktree-fix-timeout-reading
Mar 10, 2026
Merged

Replace fixed timeout with output-stability detection; add ctrl+c to cancel tool calls#2
Cicolas merged 8 commits intorelease/v1.0.4from
worktree-fix-timeout-reading

Conversation

@Cicolas
Copy link
Owner

@Cicolas Cicolas commented Mar 8, 2026

Summary

  • PendingCapture now tracks last_line_count/last_change instead of a fixed 1500 ms deadline
  • Fires 300 ms after PTY output stops growing (command finished) rather than waiting a fixed amount of time
  • Added CancelToolCall action: pressing ctrl+c in the LLM tab cancels any in-progress tool call, clears the pending capture, appends a [tool call cancelled by user] message to history, and unlocks the terminal

Notes

Part of a batch of worktree changes targeting release/next.

Tests

  • Run a fast command (e.g. ls) via tool call — output should be forwarded to Claude ~300 ms after it completes
  • Run a slow command (e.g. find /) via tool call — output should be forwarded ~300 ms after the last line appears
  • While a tool call is running, switch focus to the LLM tab and press ctrl+c — tool call should be cancelled, terminal unlocked, and [tool call cancelled by user] shown in chat
  • ctrl+c with a text selection still copies (existing behaviour preserved)

🤖 Generated with Claude Code

Cicolas and others added 2 commits March 8, 2026 17:54
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- finish-worktree now defaults to release/v<CARGO_VERSION> instead of release/next
- new ship-release skill: reviews open PRs on the release branch, warns on unchecked test cases, asks user to include/skip each, then creates a release PR to main

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Cicolas Cicolas changed the base branch from release/next to release/v1.0.4 March 8, 2026 21:03
@Cicolas
Copy link
Owner Author

Cicolas commented Mar 8, 2026

  • test case 2 command is not working, the prompt stop after ~1000ms

Cicolas and others added 5 commits March 8, 2026 18:19
…g push

- release.yml now triggers on both release/* → main PR merge and v* tag push
- On PR merge: reads version from Cargo.toml, creates+pushes the tag, then builds
- On tag push: uses the pushed tag directly, skips tag creation step
- Removes tag-release.yml (now redundant)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace F3 context push with read_terminal tool description
- Remove F3 from keybindings table
- Update release instructions to mention release branch merge workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cancel tool calls

- PendingCapture now tracks last_line_count/last_change instead of a fixed deadline
- Fires 300 ms after PTY output stops growing (command finished) instead of 1500 ms fixed wait
- Added CancelToolCall action: ctrl+c in LLM tab cancels in-progress tool calls, clears pending capture, and unlocks the terminal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

fix: don't fire output capture before command produces any output

The stability timer was starting from command-send time, so commands
taking >300 ms to produce output would trigger the capture prematurely.
Now the 300 ms stability window only starts once output appears; commands
that produce no output at all fall back to a 5 s timeout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Cicolas Cicolas force-pushed the worktree-fix-timeout-reading branch from 4458460 to 31083c4 Compare March 10, 2026 03:23
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Cicolas Cicolas merged commit 6546576 into release/v1.0.4 Mar 10, 2026
1 check 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