@@ -277,10 +277,6 @@ func (c *Client) WaitForServerReady(ctx context.Context) error {
277277 // Set initial state
278278 c.SetServerState(StateStarting)
279279
280− // Create a context with timeout
281− ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
282− defer cancel()
283−
284280 // Try to ping the server with a simple request
285281 ticker := time.NewTicker(500 * time.Millisecond)
286282 defer ticker.Stop()
@@ -495,14 +491,9 @@ func (c *Client) RegisterServerRequestHandler(method string, handler transport.H
495491
496492// openKeyConfigFiles opens important configuration files that help initialize the server.
497493func (c *Client) openKeyConfigFiles(ctx context.Context) {
498− wd, err := os.Getwd()
499− if err != nil {
500− return
501− }
502−
503494 // Try to open each file, ignoring errors if they don't exist
504495 for _, file := range c.config.RootMarkers {
505− file = filepath.Join(wd, file)
496+ file = filepath.Join(c.cwd, file)
506497 if _, err := os.Stat(file); err == nil {
507498 // File exists, try to open it
508499 if err := c.OpenFile(ctx, file); err != nil {