Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add timeout support to workspace bash tool#19035

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

ThomasK33
Copy link
Member

Add timeout support to workspace bash tool

This PR adds a timeout feature to the workspace bash tool, allowing users to specify a maximum execution time for commands. Key changes include:

  • Added atimeout_ms parameter to control command execution time (defaults to 60 seconds, with a maximum of 5 minutes)
  • Implemented a newexecuteCommandWithTimeout function that properly handles command timeouts
  • Added proper output capturing during timeout scenarios, returning all output collected before the timeout
  • Updated documentation to explain the timeout feature and provide usage examples
  • Added comprehensive tests for the timeout functionality, including integration tests

When a command times out, the tool now returns all captured output up to that point along with a cancellation message, making it clear to users what happened.

@ThomasK33ThomasK33 self-assigned thisJul 24, 2025
@ThomasK33Graphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@ThomasK33ThomasK33 marked this pull request as ready for reviewJuly 24, 2025 15:00
@ThomasK33ThomasK33force-pushed thethomask33/feat_add_timeout_support_to_workspace_bash_tool branch from023275c tof641d85CompareJuly 24, 2025 16:05
t.Run("ActualTimeoutBehavior",func(t*testing.T) {
t.Parallel()

// Test the specific scenario you described: echo "123"; sleep 60; echo "456" with 5s timeout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
//Test the specific scenario you described: echo "123"; sleep 60; echo "456" with 5s timeout
//Scenario: echo "123"; sleep 60; echo "456" with 5s timeout

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ah yes, AI leaking through 😂

@hugodutka
Copy link
Contributor

Approving barring the lint check

Change-Id: I996cbde4a50debb54a0a95ca5a067781719fa25aSigned-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33ThomasK33force-pushed thethomask33/feat_add_timeout_support_to_workspace_bash_tool branch fromf641d85 to00dd127CompareJuly 24, 2025 16:30
@ThomasK33ThomasK33 merged commit398e80f intomainJul 28, 2025
47 of 48 checks passed
@ThomasK33ThomasK33 deleted the thomask33/feat_add_timeout_support_to_workspace_bash_tool branchJuly 28, 2025 09:25
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 28, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@hugodutkahugodutkahugodutka approved these changes

Assignees

@ThomasK33ThomasK33

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ThomasK33@hugodutka

[8]ページ先頭

©2009-2025 Movatter.jp