mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
chore: merge hooks precedence into hook safety controls
Co-authored-by: Codex noreply@openai.com
This commit is contained in:
+25
-5
@@ -12,14 +12,34 @@ Codex can connect to MCP servers configured in `~/.codex/config.toml`. See the c
|
||||
|
||||
- https://developers.openai.com/codex/config-reference
|
||||
|
||||
## MCP tool approvals
|
||||
|
||||
Codex stores per-tool approval overrides for custom MCP servers under
|
||||
`mcp_servers` in `~/.codex/config.toml`:
|
||||
MCP tools default to serialized calls. To mark every tool exposed by one server
|
||||
as eligible for parallel tool calls, set `supports_parallel_tool_calls` on that
|
||||
server:
|
||||
|
||||
```toml
|
||||
[mcp_servers.docs]
|
||||
command = "docs-server"
|
||||
supports_parallel_tool_calls = true
|
||||
```
|
||||
|
||||
Only enable parallel calls for MCP servers whose tools are safe to run at the
|
||||
same time. If tools read and write shared state, files, databases, or external
|
||||
resources, review those read/write race conditions before enabling this setting.
|
||||
|
||||
## MCP tool approvals
|
||||
|
||||
Codex stores approval defaults and per-tool overrides for custom MCP servers
|
||||
under `mcp_servers` in `~/.codex/config.toml`. Set
|
||||
`default_tools_approval_mode` on the server to apply a default to every tool,
|
||||
and use per-tool `approval_mode` entries for exceptions:
|
||||
|
||||
```toml
|
||||
[mcp_servers.docs]
|
||||
command = "docs-server"
|
||||
default_tools_approval_mode = "approve"
|
||||
|
||||
[mcp_servers.docs.tools.search]
|
||||
approval_mode = "approve"
|
||||
approval_mode = "prompt"
|
||||
```
|
||||
|
||||
## Apps (Connectors)
|
||||
|
||||
@@ -86,6 +86,7 @@ imported local file. They are not resolved relative to the imported file's locat
|
||||
- `codex.emitImage(...)` accepts a data URL, a single `input_image` item, an object like `{ bytes, mimeType }`, or a raw tool response object that contains exactly one image and no text. Call it multiple times if you want to emit multiple images.
|
||||
- `codex.emitImage(...)` rejects mixed text-and-image content.
|
||||
- Request full-resolution image processing with `detail: "original"` only when the `view_image` tool schema includes a `detail` argument. The same availability applies to `codex.emitImage(...)`: if `view_image.detail` is present, you may also pass `detail: "original"` there. Use this when high-fidelity image perception or precise localization is needed, especially for CUA agents.
|
||||
- Raw MCP image blocks can request the same behavior by returning `_meta: { "codex/imageDetail": "original" }` on the image content item.
|
||||
- Example of sharing an in-memory Playwright screenshot: `await codex.emitImage({ bytes: await page.screenshot({ type: "jpeg", quality: 85 }), mimeType: "image/jpeg", detail: "original" })`.
|
||||
- Example of sharing a local image tool result: `await codex.emitImage(codex.tool("view_image", { path: "/absolute/path", detail: "original" }))`.
|
||||
- When encoding an image to send with `codex.emitImage(...)` or `view_image`, prefer JPEG at about 85 quality when lossy compression is acceptable; use PNG when transparency or lossless detail matters. Smaller uploads are faster and less likely to hit size limits.
|
||||
|
||||
@@ -65,6 +65,14 @@ Up/Down recall is handled by `ChatComposerHistory` and merges two sources:
|
||||
This distinction keeps the on-disk history backward compatible and avoids persisting attachments,
|
||||
while still providing a richer recall experience for in-session edits.
|
||||
|
||||
### Reverse history search (Ctrl+R)
|
||||
|
||||
Ctrl+R enters an incremental reverse search mode without immediately previewing the latest history entry. While search is active, the footer line becomes the editable query field and the composer body is only a preview of the currently matched entry. `Enter` accepts the preview as a normal editable draft, and `Esc` or Ctrl+C restores the exact draft that existed before search started.
|
||||
|
||||
The composer owns the search session because it controls draft snapshots, footer rendering, cursor placement, and preview highlighting. `ChatComposerHistory` owns traversal: it scans persistent and local entries in one offset space, skips duplicate prompt text within a search session, keeps boundary hits on the current match, and resumes scans after asynchronous persistent history responses.
|
||||
|
||||
The search query and composer text intentionally remain separate. A no-match result restores the original draft while leaving the footer query open for more typing, and accepting a match clears the search session so highlight styling disappears from the now-editable composer text.
|
||||
|
||||
## Config gating for reuse
|
||||
|
||||
`ChatComposer` now supports feature gating via `ChatComposerConfig`
|
||||
|
||||
Reference in New Issue
Block a user