[Repo Assist] Wire WorkingDirectory config field through to launched process#2181
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Draft
Conversation
The ServerConfig.WorkingDirectory field was declared but never applied when launching stdio backend processes. This caused the configuration option to be silently ignored at runtime. Changes: - Add workingDir parameter to mcp.NewConnection and set cmd.Dir when non-empty - Pass serverCfg.WorkingDirectory from launcher.launchStdioConnection - Log the working directory at launch time for observability - Add test covering the WorkingDirectory config field path Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated pull request from Repo Assist.
Summary
ServerConfig.WorkingDirectory(working_directoryin TOML/JSON config) was declared but never applied when launching stdio backend processes. The field was silently ignored at runtime.Root Cause
mcp.NewConnectioncreated anexec.Cmdbut never setcmd.Dir, so the working directory config had no effect.Changes
internal/mcp/connection.go: AddedworkingDir stringparameter toNewConnection; setscmd.Dirwhen non-emptyinternal/launcher/launcher.go: PassesserverCfg.WorkingDirectorywhen callingmcp.NewConnection; logs the working directory at launch timeinternal/launcher/getorlaunch_stdio_test.go: Added a test covering theWorkingDirectoryconfig field pathTrade-offs
mcp.NewConnectionsignature (which is internal-only)working_directoryis empty (the existing default)Test Status
Fixes the silent no-op for
working_directoryin server config.Warning
The following domain was blocked by the firewall during workflow execution:
proxy.golang.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.