Skip to content

Find closest .rwx dir when resolving default sandbox config file#433

Merged
robinaugh merged 1 commit intomainfrom
jason/rwx-158-find-closest-rwx-dir-when-looking-for-default-sandbox-file
Mar 18, 2026
Merged

Find closest .rwx dir when resolving default sandbox config file#433
robinaugh merged 1 commit intomainfrom
jason/rwx-158-find-closest-rwx-dir-when-looking-for-default-sandbox-file

Conversation

@robinaugh
Copy link
Contributor

@robinaugh robinaugh commented Mar 17, 2026

Summary

  • When running from a subdirectory (e.g. agent-go/), sandbox start, sandbox reset, and sandbox exec were hardcoding ".rwx/sandbox.yml" relative to cwd, causing the config to not be found when .rwx/ lives in a parent directory
  • Added FindDefaultSandboxConfigFile() to reuse the existing upward-traversal logic (findRwxDirectoryPath) already used for general .rwx discovery
  • Falls back to ".rwx/sandbox.yml" only when no .rwx directory is found anywhere up the tree

Test plan

  • From a subdirectory of a repo with .rwx/sandbox.yml at the root, run rwx sandbox start — should find the config without specifying it explicitly
  • From the repo root, behavior is unchanged
  • Explicitly passing a config file path still works as before
  • Unit tests pass: go test ./internal/cli/... ./cmd/...

When running from a subdirectory, the hardcoded ".rwx/sandbox.yml" path
resolved relative to cwd and failed to find the config. Now uses the same
upward-traversal logic as the rest of the CLI to locate the nearest .rwx
directory.
@robinaugh robinaugh self-assigned this Mar 17, 2026
@robinaugh robinaugh marked this pull request as ready for review March 17, 2026 22:28
@robinaugh robinaugh merged commit a0e4c55 into main Mar 18, 2026
1 check passed
@robinaugh robinaugh deleted the jason/rwx-158-find-closest-rwx-dir-when-looking-for-default-sandbox-file branch March 18, 2026 15:06
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