Repository navigation
Fix Claude enclave startup arguments and unattended policy wiring - #11222
Conversation
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 76203b8 |
There was a problem hiding this comment.
🟡 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)
| 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; |
|
@copilot address review feedback and make sure that 'npm test' runs without any failures |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
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. |
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 Smoke CodexOutcome: 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.
|
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓
|
|
🔌 Smoke Services is testing service connectivity for this pull request... |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS — cc @lpcox
|
Smoke Test: Copilot BYOK (Direct) Mode ✅Tests:
Status: PASS — Direct BYOK mode operational
|
Smoke Test
|
|
Cloud Hypervisor + Copilot smoke test
Overall: PASS
|
|
fix: handle Copilot zero-batch tariffs without masking model policy
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
Smoke Copilot: PR "feat: add daily regression failure triage workflow" ✅ MCP | ✅ GitHub.com (200) | ✅ File I/O. PASS —
|
Chroot Version Comparison
Result: Not all tests passed (Node.js version mismatch), so the
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — FAIL Java failure: Environment notes: The
|

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: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.