Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
2c62a51 to
438bb26
Compare
|
+1 from the #8647 side, with a fresh measurement showing what this layout would match. I captured real Claude Code 2.1.331 locally against a dummy endpoint, running
No tools, and no I sent the same caller request through v8.1.12 (and v8.1.11) with We'd turn it on as soon as it lands. |
|
Correction to my measurement above: I only inspected the top-level |
438bb26 to
cb8fbab
Compare
cb8fbab to
d585c66
Compare
Purpose
Add an opt-in relaxed system-prompt layout for Claude Messages generation requests. Keep caller instructions in the top-level
systemarray after the required Claude Code billing and identity blocks and any configured system-prompt prefix, using the existing configuration lookup and request pipeline.Behavior
cloak.relaxed-system-prompt: truekeeps billing and identity first, follows with any configured system-prompt prefix, and then appends nonempty caller text blocks in their original order with their supplied fields. Duplicate injected attribution blocks are omitted.strict-modetakes precedence, and shared upstream defaults still govern whether cloaking runs. Confirmed native Claude Code requests retain upstream passthrough behavior, including explicitnever/uncloakhandling on non-CLI credentials; relaxed mode does not restore attribution removed by that policy. An explicit credential mode can override the shared default.Configuration
The optional boolean preserves omitted,
false, andtruethrough YAML loading/saving, runtime cloning, management edits, and configuration change detection.The option follows the existing authoritative cloak lookup. In Home mode, a present
credential_options.cloakobject supplies the credential's cloak configuration; otherwise the matching local Claude key supplies it. An explicit relaxed value in that resolved configuration overrides executor attributes and top-level credential metadata, includingfalse. An omitted value falls back to those attributes/metadata. Standalone mode ignores the Home-only object.Home credentials can supply the boolean as
credential_options.cloak.relaxed-system-prompt. File credentials can usecloak_relaxed_system_promptas a JSON boolean or string. Metadata reads use the existing credential metadata lock, including the structured Home read; the new option does not add a separate configuration path.The Home server uses its CPA SDK to build credential options from its configuration. Its SDK must include this field to emit it from Home-managed YAML.
Follow-up to #6410
This revision is based on
devata15c8f2. It retains the turn-aware system builder and the upstreamcloak.cache-ttloption. The relaxed layout and the cache TTL are resolved independently, with caller message placement, strict-mode precedence, explicit cache control, and the final payload rules preserved. The management test exercises the registered v8 routes. Closing reviewValidation
./cmd/serveron Linux amd64 with Go 1.26.10 and CGO enabled.gofmtandgit diff --checkpassed.