Skip to content

Conversation

@cpage-pivotal
Copy link

Summary

Fixes critical issues preventing LocalSandbox from executing Claude CLI commands on macOS with Java 25:

  • Environment variable inheritance - Subprocess now inherits parent PATH to find commands
  • Command resolution for shebang scripts - Returns command name instead of absolute path to avoid #!/usr/bin/env node issues
  • Java 25 ProcessBuilder restrictions - Wraps commands in shell with cd instead of using .directory() which has severe restrictions on macOS
  • Auto-create working directory - Creates temp directory if it doesn't exist to prevent directory-not-found errors

Test Plan

  • Verify LocalSandbox successfully executes Claude CLI commands
  • Confirm working directory is created automatically
  • Test command execution with proper PATH inheritance
  • Run existing integration tests to ensure no regressions
  • Test on macOS with Java 25
  • Test on Linux environments

Technical Details

Modified Files:

  • LocalSandbox.java - Core fixes for environment, directory handling, and auto-creation
  • ClaudeCliDiscovery.java - Command name resolution fix

These changes resolve the root cause of sandbox execution failures discovered during local testing.

Add AutoConfiguration.imports file to support Spring Boot 3.x's new
autoconfiguration discovery mechanism. This ensures ClaudeAgentAutoConfiguration
and SandboxAutoConfiguration are properly discovered in Spring Boot 3.x
applications.

The existing spring.factories file is retained for Spring Boot 2.x compatibility.

Fixes the "No qualifying bean of type 'AgentClient$Builder' available" error
when running samples with Spring Boot 3.5.0.
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