Skip to content

Fix Claude enclave startup arguments and unattended policy wiring - #11222

Merged
lpcox merged 5 commits into
mainfrom
copilot/fix-docker-enclave-native-cli-exit
Nov 7, 2026
Merged

lpcox merged 5 commits into
mainfrom
copilot/fix-docker-enclave-native-cli-exit

Conversation

Copilot AI commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Claude Code 2.1.280 rejects --permission-prompts auto, causing native exit 1 before initialization—not a timeout. Production launches also omitted the shell/file approvals supplied by the opt-in fixture.

  • Launch policy: Change the command-builder fallback to host; set fixed unattended approvals in the trusted child-environment builder shared by Docker and Cloud Hypervisor:

    --permission-mode default --permission-prompts none \
      --allowedTools Bash,Read,Write,Edit,Glob,Grep

    No request-controlled policy or broad environment passthrough.

  • Safe diagnostics: Classify pre-initialization argument/configuration failures using bounded input and a finite vocabulary. Preserve classifications through host and protected-artifact projection without retaining raw stderr, prompts, credentials, or model output.

  • Regression coverage: Exercise production environment generation with the command builder and pinned CLI against a synthetic provider, covering legacy argv rejection, successful shell output, and permission-denied/no-output behavior.

Existing sandbox isolation, storage bounds, deadlines, and explicit failure semantics remain unchanged.

Copilot AI changed the title [WIP] Fix Claude Docker enclave immediate native-CLI exit after changes Fix Claude enclave startup arguments and unattended policy wiring Nov 6, 2026
Copilot AI requested a review from lpcox November 6, 2026 23:21
@lpcox
lpcox marked this pull request as ready for review November 6, 2026 23:23
Copilot AI adaptive review requested due to automatic review settings November 6, 2026 23:23
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-11222 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit 76203b8

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Event-cap saturation after startup retries can discard the final startup-failure observation, leaving host diagnostics and protected artifacts with stale unknown classifications.

1 open issue
What changed in this PR

This PR fixes Claude enclave startup arguments and consistently applies trusted unattended tool approvals across Docker and Cloud Hypervisor.

Changes:

  • Corrects permission arguments and wires fixed shell/file approvals into production launches.
  • Adds bounded, allowlisted startup-failure classifications without retaining raw engine content.
  • Expands launch-policy, pinned-CLI, and diagnostic privacy regression coverage.
File Description
src/​enclave/​claude-unattended.test.ts Exercises production launch wiring and opt-in pinned-CLI execution.
src/​enclave/​agent-provider-environment.test.ts Verifies Claude-only approvals across both runtimes.
src/​enclave/​agent-entrypoint-diagnostics.test.ts Tests permission defaults, startup classifications, and privacy bounds.
src/​cloud-hypervisor/​enclave-session-diagnostics.test.ts Checks allowlisted classification retention.
scripts/​ci/​collect-enclave-smoke-debug.test.ts Tests protected-artifact projection and invalid-class rejection.
scripts/​ci/​collect-enclave-smoke-debug.cjs Allows finite startup-failure diagnostic fields.
docs/​enclaves-architecture.md Documents unattended policy and startup diagnostics.
containers/​enclave/​agent-executor/​session-diagnostics.js Projects allowlisted startup-failure classifications.
containers/​enclave/​agent-executor/​agent-provider-environment.js Sets trusted unattended Claude permissions.
containers/​enclave/​agent-entrypoint.py Corrects permission defaults and classifies pre-initialization failures.

Review effort: Max (auto)

Comment on lines +89 to +92
if (value.stage === 'claude-startup-failure' && allowed(value.classification, [
'unknown-option', 'invalid-option-value', 'missing-option-value',
'invalid-settings', 'invalid-mcp-config', 'unknown',
])) result.classification = value.classification;
@lpcox

lpcox commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback and make sure that 'npm test' runs without any failures

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@copilot Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

Copilot AI commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address review feedback and make sure that 'npm test' runs without any failures

Fixed in 3992706. The final startup-failure classification is now retained independently of the capped event list and preserved through artifact projection; I also aligned Claude launch tests and defaults with the safe prompt/tool policy. npm test passes.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

Smoke Codex

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Smoke Codex · gpt54 · ~17 AIC · ⊞ 21.0K · ◷

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request...

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

💎 Smoke Gemini is crystallizing results on this pull request...

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services is testing service connectivity for this pull request...

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@lpcox
lpcox enabled auto-merge (squash) November 7, 2026 00:24
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

  • ✅ Allowed (api.github.com): 200
  • ✅ Blocked (example.com): blocked

Overall: PASS — cc @lpcox

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode ✅

Tests:

  • ✅ GitHub MCP: PR data retrieved (2 recent merged PRs confirmed)
  • ✅ GitHub.com: HTTP 200 connectivity
  • ✅ File I/O: Smoke test file readable
  • ✅ BYOK Inference: Running in direct mode (COPILOT_PROVIDER_API_KEY → api-proxy → api.githubcopilot.com)

Status: PASS — Direct BYOK mode operational

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test

  • fix: handle Copilot zero-batch tariffs without masking model policy
  • Centralize sudo operator identity parsing
  • GitHub merged PRs: ✅
  • PR detail lookup: ✅
  • Playwright title check: ❌
  • File write/read: ✅
  • AWF build: ✅
  • Overall: FAIL

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Cloud Hypervisor + Copilot smoke test

  1. Merged PR lookup: PASS
  2. github.com connectivity: PASS (HTTP 200)
  3. File write/read: PASS
  4. example.com blocked: PASS (HTTP 000)

Overall: PASS

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

fix: handle Copilot zero-batch tariffs without masking model policy
Centralize sudo operator identity parsing
✅ MCP ✓ GH ✓ File ✓ BYOK
Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL)
Overall: PASS
@Copilot @lpcox

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

  • API status: ✅ PASS
  • GitHub check: ✅ PASS
  • File status: ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #11222 · claude · haiku45 · ~35 AIC · ⊞ 6.1K · ◷
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot: PR "feat: add daily regression failure triage workflow" ✅ MCP | ✅ GitHub.com (200) | ✅ File I/O. PASS — @Copilot @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison

Runtime Host Version Chroot Version Match?
Python Python 3.12.16 Python 3.12.16 ✅ YES
Node.js v24.22.2 v22.23.2 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Result: Not all tests passed (Node.js version mismatch), so the smoke-chroot label was not added.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia ✅ 1/1 passed ✅ PASS
Bun hono ✅ 1/1 passed ✅ PASS
C++ fmt ✅ N/A ✅ PASS
C++ json ✅ N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world ✅ N/A ✅ PASS
.NET json-parse ✅ N/A ✅ PASS
Go color ✅ ok ✅ PASS
Go env ✅ ok ✅ PASS
Go uuid ✅ ok ✅ PASS
Java gson ❌ not run ❌ FAIL
Java caffeine ❌ not run ❌ FAIL
Node.js clsx ✅ all passed ✅ PASS
Node.js execa ✅ all passed ✅ PASS
Node.js p-limit ✅ all passed ✅ PASS
Rust fd ✅ 1/1 passed ✅ PASS
Rust zoxide ✅ 1/1 passed ✅ PASS

Overall: 7/8 ecosystems passed — FAIL

Java failure: mvn compile could not resolve maven-resources-plugin:3.4.0 from Maven Central ("Could not transfer artifact ... from/to central"). The required ~/.m2/settings.xml points at the squid-proxy:3128 host, which this runner does not resolve. This is an environment/proxy failure, not a code failure.

Environment notes: ~/.m2 was root-owned, so Maven needed -Dmaven.repo.local=/tmp/.... .NET needed XDG_RUNTIME_DIR and DOTNET_CLI_HOME set to writable paths. With those set, .NET passed.

The build-test label was not added because Java failed.

Generated by Build Test Suite for #11222 · copilot · auto · ~22 AIC · ⊞ 5.7K · ◷
Add label ready-for-aw to run again

@lpcox
lpcox merged commit 54697f8 into main Nov 7, 2026
152 of 163 checks passed
@lpcox
lpcox deleted the copilot/fix-docker-enclave-native-cli-exit branch November 7, 2026 00:55

This branch was previously deployed

1 inactive deployment
aoai-model — 3992706f Deployed Nov 7, 2026 by lpcox via conclusion #2279
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Claude Docker enclave immediate native-CLI exit after unattended launch changes

4 participants