-
Notifications
You must be signed in to change notification settings - Fork 902
feat(agents): add opt-in plaintext V2 collaboration messages #2496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ routes, and limits delegated work. | |
| | `subagentModelFallbackPollMs?` | `number` | `60000` | Availability-probe cache interval. Values below 1000 ms fall back to the default. | | ||
| | `effortCap?` | `string` | — | Hard ceiling for qualifying v2 main turns and marked spawned-child turns. Accepts `low` through `ultra`. | | ||
| | `subagentEffortCap?` | `string` | — | Additional ceiling for spawned-child turns only. When both caps apply, the lower wins. | | ||
| | `plaintextV2AgentMessages?` | `boolean` | `false` | Experimental opt-in that asks native ChatGPT v2 parents to emit `spawn_agent`, `send_message`, and `followup_task` message arguments as plaintext. See [Plaintext v2 agent messages](#plaintext-v2-agent-messages). | | ||
| | `agentTaskRecovery?` | `object` | — | Experimental opt-in recovery for backend-encrypted v2 tasks sent to routed providers. Disabled unless `enabled: true`; see [Encrypted v2 task recovery](#encrypted-v2-task-recovery). | | ||
|
|
||
| Manage the surface with the dashboard or | ||
|
|
@@ -120,6 +121,42 @@ fails instead of routing unreadable ciphertext elsewhere. | |
| } | ||
| ``` | ||
|
|
||
| ## Plaintext v2 agent messages | ||
|
|
||
| `plaintextV2AgentMessages` is an experimental, disabled-by-default alternative to post-encryption | ||
| recovery. On a v2 Responses request whose final destination is the canonical ChatGPT backend, | ||
| opencodex recognizes the v2 catalog by a top-level `collaboration` namespace with a direct | ||
|
Comment on lines
+126
to
+128
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win The documentation does not state the exact provider and authentication boundary. The supported rewrite applies only to canonical
As per path instructions, document the canonical ChatGPT forward path, unchanged provider authentication and HTTPS transport, and unsupported API-key, arbitrary-compatible, custom, and routed-provider targets. 📍 Affects 3 files
🤖 Prompt for AI AgentsSource: Path instructions |
||
| `spawn_agent` child. It removes `parameters.properties.message.encrypted: true`, when present, only | ||
| from `spawn_agent`, `send_message`, and `followup_task`. ChatGPT reserves both the `collaboration` | ||
| namespace and those three tool names, so the request uses fixed private aliases for all four | ||
| identities. OpenCodex restores the original namespace and tool names in JSON, SSE, and WebSocket | ||
| responses before Codex receives the tool call. The `encrypted_function_args: []` field is preserved | ||
| so compatible Codex clients recognize the message as plaintext. | ||
|
|
||
| This path adds no recovery request and therefore does not spend the extra ChatGPT quota used by a | ||
| cache miss in `agentTaskRecovery`. It cannot change tasks that are already encrypted. If the request | ||
| already declares the private alias or a conflicting reference, opencodex leaves that request | ||
| unchanged; separately enabled recovery can still handle a routed task that is later encrypted. If | ||
| ChatGPT rejects or ignores the modified schema, or the Codex client does not recognize the plaintext | ||
| response fields, the call can fail. OpenCodex does not retry the parent request with the original | ||
| schema because doing so could duplicate quota use or tool calls. | ||
|
|
||
| For successfully rewritten calls, the option removes application-layer encryption from agent | ||
| message arguments. HTTPS still encrypts network transport, but message text can appear in Codex | ||
| task history, routed-provider requests, `responses-state.json` or its spill files, and | ||
| `usage-debug.jsonl` when debug capture is enabled. The behavior depends on undocumented ChatGPT | ||
| schema and response fields and may stop working after a backend or client update. Startup prints a | ||
| warning while it is enabled. | ||
|
|
||
| ```json | ||
| { | ||
| "plaintextV2AgentMessages": true | ||
| } | ||
| ``` | ||
|
|
||
| The equivalent CLI command is `ocx config set plaintextV2AgentMessages true`. Restart the proxy | ||
| after changing the setting. | ||
|
|
||
| ## Encrypted v2 task recovery | ||
|
|
||
| `agentTaskRecovery` is an experimental compatibility path for a native ChatGPT parent spawning a | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
The documentation publishes an incorrect default for
plaintextV2AgentMessages. The runtime contract andtests/config.test.ts, Line 604, useundefinedfor a fresh configuration, not an explicitfalse; both disable the feature, but the documented configuration shape must match the implementation.docs-site/src/content/docs/reference/configuration/agents.md#L26-L26: Change the default to unset/disabled, or add explicitfalsetogetDefaultConfigand update the test.docs-site/src/content/docs/zh-cn/reference/configuration/agents.md#L24-L24: Apply the same default correction in the Chinese table.As per path instructions, user-facing and translated documentation must stay in sync with actual CLI/API behavior.
📍 Affects 2 files
docs-site/src/content/docs/reference/configuration/agents.md#L26-L26(this comment)docs-site/src/content/docs/zh-cn/reference/configuration/agents.md#L24-L24🤖 Prompt for AI Agents
Source: Path instructions