Skip to content

feat(codersdk/toolsdk): add MCP workspace bash background parameter #19034

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hugodutka
Copy link
Contributor

@hugodutka hugodutka commented Jul 24, 2025

Addresses coder/internal#820. I'm not sure how I could go about adding automated tests for this, so I only tested manually.

Screen.Recording.2025-07-24.at.15.11.54.mov

@hugodutka hugodutka requested a review from ThomasK33 July 24, 2025 13:16
@hugodutka hugodutka force-pushed the hugodutka/workspace-bash-bg-param branch from da40c51 to 08c72bf Compare July 24, 2025 14:22
Copy link
Member

adding automated tests

Could we add a test (similar to the other ones in bash_test.go), that performs two bash tool calls/handler invocations?
One would launch a python http server on port 8123, and the second handler call would curl that port and check if it received an error.

@hugodutka hugodutka force-pushed the hugodutka/workspace-bash-bg-param branch from 08c72bf to 6463e41 Compare July 24, 2025 16:57
@hugodutka hugodutka changed the base branch from main to thomask33/feat_add_timeout_support_to_workspace_bash_tool July 24, 2025 16:57
@hugodutka hugodutka force-pushed the hugodutka/workspace-bash-bg-param branch from 6463e41 to e61cab7 Compare July 24, 2025 16:57
@hugodutka
Copy link
Contributor Author

@ThomasK33 I didn't know we had setupWorkspaceForAgent! Thanks for spotting. I added integration tests and temporarily rebased onto your timeout branch until its merged. The tests don't spawn a python server though - I don't want to make our test suite depend on python.

Base automatically changed from thomask33/feat_add_timeout_support_to_workspace_bash_tool to main July 28, 2025 09:25
Copy link
Member

@ThomasK33 ThomasK33 left a comment

Choose a reason for hiding this comment

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

This needs to be revised to align with Blink's behavior. Specifically, we should capture stdout and stderr until the timeout is reached. After that, the command should continue running in the background, and we will return the captured stdout and stderr as the tool's result.

@hugodutka hugodutka force-pushed the hugodutka/workspace-bash-bg-param branch from e61cab7 to 3750aee Compare July 28, 2025 09:37
@ThomasK33 ThomasK33 force-pushed the hugodutka/workspace-bash-bg-param branch 2 times, most recently from 99f8271 to d6ae953 Compare July 28, 2025 16:17
…nohup

Change-Id: If67c30717158bdd84e9f733b56365af7c8d0b51a
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33 ThomasK33 force-pushed the hugodutka/workspace-bash-bg-param branch from d6ae953 to c29186c Compare July 28, 2025 16:44
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy