Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"network": {
"allowedDomains": [],
"deniedDomains": []
},
"filesystem": {
"denyRead": [],
"allowRead": [],
"allowWrite": ["."],
"denyWrite": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tracked input
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "sandboxed-fspy",
"private": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[[e2e]]
name = "fspy_under_codex_sandbox"
comment = """
Runs `vt run inner` under Codex CLI's built-in `:workspace` permission profile, representing its default workspace-editing posture for a trusted repository. The profile makes the workspace roots and system temp directories writable without adding network or Unix socket access. See [Codex permissions](https://learn.chatgpt.com/docs/permissions#define-and-select-a-profile).

The nested `vt` enables fspy for automatic input inference; changing the file read inside the sandbox checks whether it invalidates the cache.
"""
platform = "macos"
Comment thread
wan9chi marked this conversation as resolved.
ignore = true
steps = [
[
"codex",
"sandbox",
"-P",
":workspace",
"vt",
"run",
"inner",
],
[
"vtt",
"replace-file-content",
"input.txt",
"tracked",
"modified",
],
[
"codex",
"sandbox",
"-P",
":workspace",
"vt",
"run",
"inner",
],
]

[[e2e]]
name = "fspy_under_anthropic_sandbox_runtime"
comment = """
Runs `vt run inner` under a profile matching Claude Code's default enabled Bash sandbox: the working directory and session temp directory are writable, with no pre-allowed network domains or extra Unix socket access. See [Claude Code sandboxing](https://code.claude.com/docs/en/sandboxing#filesystem-isolation).

Claude Code normally creates the writable session temp before invoking Sandbox Runtime, so the harness creates the runtime's default `/tmp/claude` directory before calling `srt` directly. The fixture profile provides only `allowWrite: ["."]`; Sandbox Runtime supplies `/tmp/claude` and its other built-in compatibility paths. See [`getDefaultWritePaths` and `generateProxyEnvVars`](https://github.com/anthropic-experimental/sandbox-runtime/blob/main/src/sandbox/sandbox-utils.ts).

The nested `vt` enables fspy for automatic input inference; changing the file read inside the sandbox checks whether it invalidates the cache.
"""
platform = "macos"
ignore = true
steps = [
{ argv = [
"mkdir",
"-p",
"/tmp/claude",
], comment = "create the session temp that Claude Code supplies before sandboxed Bash commands" },
[
"srt",
"--settings",
"claude-code-default-sandbox.json",
"vt",
"run",
"inner",
],
[
"vtt",
"replace-file-content",
"input.txt",
"tracked",
"modified",
],
[
"srt",
"--settings",
"claude-code-default-sandbox.json",
"vt",
"run",
"inner",
],
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# fspy_under_anthropic_sandbox_runtime

Runs `vt run inner` under a profile matching Claude Code's default enabled Bash sandbox: the working directory and session temp directory are writable, with no pre-allowed network domains or extra Unix socket access. See [Claude Code sandboxing](https://code.claude.com/docs/en/sandboxing#filesystem-isolation).

Claude Code normally creates the writable session temp before invoking Sandbox Runtime, so the harness creates the runtime's default `/tmp/claude` directory before calling `srt` directly. The fixture profile provides only `allowWrite: ["."]`; Sandbox Runtime supplies `/tmp/claude` and its other built-in compatibility paths. See [`getDefaultWritePaths` and `generateProxyEnvVars`](https://github.com/anthropic-experimental/sandbox-runtime/blob/main/src/sandbox/sandbox-utils.ts).

The nested `vt` enables fspy for automatic input inference; changing the file read inside the sandbox checks whether it invalidates the cache.

## `mkdir -p /tmp/claude`

create the session temp that Claude Code supplies before sandboxed Bash commands

```
```

## `srt --settings claude-code-default-sandbox.json vt run inner`

**Exit code:** 1

```
$ vtt print-file input.txt
✗ Failed to set up task communication: Operation not permitted (os error 1)
```

## `vtt replace-file-content input.txt tracked modified`

```
```

## `srt --settings claude-code-default-sandbox.json vt run inner`

**Exit code:** 1

```
$ vtt print-file input.txt
✗ Failed to set up task communication: Operation not permitted (os error 1)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# fspy_under_codex_sandbox

Runs `vt run inner` under Codex CLI's built-in `:workspace` permission profile, representing its default workspace-editing posture for a trusted repository. The profile makes the workspace roots and system temp directories writable without adding network or Unix socket access. See [Codex permissions](https://learn.chatgpt.com/docs/permissions#define-and-select-a-profile).

The nested `vt` enables fspy for automatic input inference; changing the file read inside the sandbox checks whether it invalidates the cache.

## `codex sandbox -P :workspace vt run inner`

**Exit code:** 1

```
$ vtt print-file input.txt
✗ Failed to set up task communication: Operation not permitted (os error 1)
Comment thread
wan9chi marked this conversation as resolved.
```

## `vtt replace-file-content input.txt tracked modified`

```
```

## `codex sandbox -P :workspace vt run inner`

**Exit code:** 1

```
$ vtt print-file input.txt
✗ Failed to set up task communication: Operation not permitted (os error 1)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"tasks": {
"inner": {
"command": "vtt print-file input.txt",
"cache": true,
"input": [
{
"auto": true
}
],
"output": []
}
}
}
2 changes: 2 additions & 0 deletions packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"private": true,
"type": "module",
"dependencies": {
"@anthropic-ai/sandbox-runtime": "catalog:",
"@openai/codex": "catalog:",
"@playwright/browser-chromium": "catalog:",
"@vitest/browser-playwright": "catalog:",
"@voidzero-dev/vite-task-client": "workspace:*",
Expand Down
114 changes: 114 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading