mirror of
https://github.com/openai/codex.git
synced 2026-10-30 19:18:49 +00:00
Merge remote-tracking branch 'origin/main' into jif/multi-agent-1
# Conflicts: # codex-rs/core/src/codex.rs # codex-rs/core/src/tasks/regular.rs
This commit is contained in:
+9
-4
@@ -50,6 +50,7 @@ Supported features:
|
||||
| `ghost_commit` | false | Experimental | Create a ghost commit each turn |
|
||||
| `enable_experimental_windows_sandbox` | false | Experimental | Use the Windows restricted-token sandbox |
|
||||
| `tui2` | false | Experimental | Use the experimental TUI v2 (viewport) implementation |
|
||||
| `skills` | false | Experimental | Enable discovery and injection of skills |
|
||||
|
||||
Notes:
|
||||
|
||||
@@ -218,13 +219,13 @@ model = "mistral"
|
||||
|
||||
### model_reasoning_effort
|
||||
|
||||
If the selected model is known to support reasoning (for example: `o3`, `o4-mini`, `codex-*`, `gpt-5.1-codex-max`, `gpt-5.1`, `gpt-5.1-codex`), reasoning is enabled by default when using the Responses API. As explained in the [OpenAI Platform documentation](https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning), this can be set to:
|
||||
If the selected model is known to support reasoning (for example: `o3`, `o4-mini`, `codex-*`, `gpt-5.1-codex-max`, `gpt-5.1`, `gpt-5.1-codex`, `gpt-5.2`), reasoning is enabled by default when using the Responses API. As explained in the [OpenAI Platform documentation](https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning), this can be set to:
|
||||
|
||||
- `"minimal"`
|
||||
- `"low"`
|
||||
- `"medium"` (default)
|
||||
- `"high"`
|
||||
- `"xhigh"` (available only on `gpt-5.1-codex-max`)
|
||||
- `"xhigh"` (available on `gpt-5.1-codex-max` and `gpt-5.2`)
|
||||
|
||||
Note: to minimize reasoning, choose `"minimal"`.
|
||||
|
||||
@@ -344,7 +345,7 @@ disk, but attempts to write a file or access the network will be blocked.
|
||||
|
||||
A more relaxed policy is `workspace-write`. When specified, the current working directory for the Codex task will be writable (as well as `$TMPDIR` on macOS). Note that the CLI defaults to using the directory where it was spawned as `cwd`, though this can be overridden using `--cwd/-C`.
|
||||
|
||||
On macOS (and soon Linux), all writable roots (including `cwd`) that contain a `.git/` folder _as an immediate child_ will configure the `.git/` folder to be read-only while the rest of the Git repository will be writable. This means that commands like `git commit` will fail, by default (as it entails writing to `.git/`), and will require Codex to ask for permission.
|
||||
On macOS (and soon Linux), all writable roots (including `cwd`) that contain a `.git/` or `.codex/` folder _as an immediate child_ will configure those folders to be read-only while the rest of the root stays writable. This means that commands like `git commit` will fail, by default (as it entails writing to `.git/`), and will require Codex to ask for permission.
|
||||
|
||||
```toml
|
||||
# same as `--sandbox workspace-write`
|
||||
@@ -774,6 +775,8 @@ notify = ["python3", "/Users/mbolin/.codex/notify.py"]
|
||||
> [!NOTE]
|
||||
> Use `notify` for automation and integrations: Codex invokes your external program with a single JSON argument for each event, independent of the TUI. If you only want lightweight desktop notifications while using the TUI, prefer `tui.notifications`, which uses terminal escape codes and requires no external program. You can enable both; `tui.notifications` covers in‑TUI alerts (e.g., approval prompts), while `notify` is best for system‑level hooks or custom notifiers. Currently, `notify` emits only `agent-turn-complete`, whereas `tui.notifications` supports `agent-turn-complete` and `approval-requested` with optional filtering.
|
||||
|
||||
When Codex detects WSL 2 inside Windows Terminal (the session exports `WT_SESSION`), `tui.notifications` automatically switches to a Windows toast backend by spawning `powershell.exe`. This ensures both approval prompts and completed turns trigger native toasts even though Windows Terminal ignores OSC 9 escape sequences. Terminals that advertise OSC 9 support (iTerm2, WezTerm, kitty, etc.) continue to use the existing escape-sequence backend, and the `notify` hook remains unchanged.
|
||||
|
||||
### hide_agent_reasoning
|
||||
|
||||
Codex intermittently emits "reasoning" events that show the model's internal "thinking" before it produces a final answer. Some users may find these events distracting, especially in CI logs or minimal terminal output.
|
||||
@@ -970,6 +973,8 @@ Valid values:
|
||||
| `tui.animations` | boolean | Enable terminal animations (welcome screen, shimmer, spinner). Defaults to true; set to `false` to disable visual motion. |
|
||||
| `instructions` | string | Currently ignored; use `experimental_instructions_file` or `AGENTS.md`. |
|
||||
| `features.<feature-flag>` | boolean | See [feature flags](#feature-flags) for details |
|
||||
| `ghost_snapshot.ignore_large_untracked_files` | number | Exclude untracked files larger than this many bytes from ghost snapshots (default: 10 MiB). Set to `0` to disable. |
|
||||
| `ghost_snapshot.ignore_large_untracked_dirs` | number | Ignore untracked directories with at least this many files (default: 200). Set to `0` to disable. |
|
||||
| `mcp_servers.<id>.command` | string | MCP server launcher command (stdio servers only). |
|
||||
| `mcp_servers.<id>.args` | array<string> | MCP server args (stdio servers only). |
|
||||
| `mcp_servers.<id>.env` | map<string,string> | MCP server env vars (stdio servers only). |
|
||||
@@ -1001,7 +1006,7 @@ Valid values:
|
||||
| `hide_agent_reasoning` | boolean | Hide model reasoning events. |
|
||||
| `check_for_update_on_startup` | boolean | Check for Codex updates on startup (default: true). Set to `false` only if updates are centrally managed. |
|
||||
| `show_raw_agent_reasoning` | boolean | Show raw reasoning (when available). |
|
||||
| `model_reasoning_effort` | `minimal` \| `low` \| `medium` \| `high` | Responses API reasoning effort. |
|
||||
| `model_reasoning_effort` | `minimal` \| `low` \| `medium` \| `high`\|`xhigh` | Responses API reasoning effort. |
|
||||
| `model_reasoning_summary` | `auto` \| `concise` \| `detailed` \| `none` | Reasoning summaries. |
|
||||
| `model_verbosity` | `low` \| `medium` \| `high` | GPT‑5 text verbosity (Responses API). |
|
||||
| `model_supports_reasoning_summaries` | boolean | Force‑enable reasoning summaries. |
|
||||
|
||||
@@ -71,25 +71,6 @@ No special Git commands, email attachments, or commit footers required.
|
||||
|
||||
The **DCO check** blocks merges until every commit in the PR carries the footer (with squash this is just the one).
|
||||
|
||||
### Releasing `codex`
|
||||
|
||||
_For admins only._
|
||||
|
||||
Make sure you are on `main` and have no local changes. Then run:
|
||||
|
||||
```shell
|
||||
VERSION=0.2.0 # Can also be 0.2.0-alpha.1 or any valid Rust version.
|
||||
./codex-rs/scripts/create_github_release.sh "$VERSION"
|
||||
```
|
||||
|
||||
This will make a local commit on top of `main` with `version` set to `$VERSION` in `codex-rs/Cargo.toml` (note that on `main`, we leave the version as `version = "0.0.0"`).
|
||||
|
||||
This will push the commit using the tag `rust-v${VERSION}`, which in turn kicks off [the release workflow](../.github/workflows/rust-release.yml). This will create a new GitHub Release named `$VERSION`.
|
||||
|
||||
If everything looks good in the generated GitHub Release, uncheck the **pre-release** box so it is the latest release.
|
||||
|
||||
Create a PR to update [`Cask/c/codex.rb`](https://github.com/Homebrew/homebrew-cask/blob/main/Formula/c/codex.rb) on Homebrew.
|
||||
|
||||
### Security & responsible AI
|
||||
|
||||
Have you discovered a vulnerability or have concerns about model output? Please e-mail **security@openai.com** and we will respond promptly.
|
||||
|
||||
@@ -37,7 +37,7 @@ model_provider = "openai"
|
||||
# Reasoning & Verbosity (Responses API capable models)
|
||||
################################################################################
|
||||
|
||||
# Reasoning effort: minimal | low | medium | high | xhigh (default: medium; xhigh only on gpt-5.1-codex-max)
|
||||
# Reasoning effort: minimal | low | medium | high | xhigh (default: medium; xhigh on gpt-5.1-codex-max and gpt-5.2)
|
||||
model_reasoning_effort = "medium"
|
||||
|
||||
# Reasoning summary: auto | concise | detailed | none (default: auto)
|
||||
@@ -220,6 +220,7 @@ view_image_tool = true
|
||||
web_search_request = false
|
||||
ghost_commit = false
|
||||
enable_experimental_windows_sandbox = false
|
||||
skills = false
|
||||
|
||||
################################################################################
|
||||
# Experimental toggles (legacy; prefer [features])
|
||||
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
# Execpolicy quickstart
|
||||
|
||||
Codex can enforce your own rules-based execution policy before it runs shell commands. Policies live in `.codexpolicy` files under `~/.codex/policy`.
|
||||
Codex can enforce your own rules-based execution policy before it runs shell commands. Policies live in `.rules` files under `~/.codex/rules`.
|
||||
|
||||
## How to create and edit rules
|
||||
|
||||
@@ -12,12 +12,12 @@ Codex CLI will present the option to whitelist commands when a command causes a
|
||||
|
||||
Whitelisted commands will no longer require your permission to run in current and subsequent sessions.
|
||||
|
||||
Under the hood, when you approve and whitelist a command, codex will edit `~/.codex/policy/default.codexpolicy`.
|
||||
Under the hood, when you approve and whitelist a command, codex will edit `~/.codex/rules/default.rules`.
|
||||
|
||||
### Editing `.codexpolicy` files
|
||||
### Editing `.rules` files
|
||||
|
||||
1. Create a policy directory: `mkdir -p ~/.codex/policy`.
|
||||
2. Add one or more `.codexpolicy` files in that folder. Codex automatically loads every `.codexpolicy` file in there on startup.
|
||||
1. Create a policy directory: `mkdir -p ~/.codex/rules`.
|
||||
2. Add one or more `.rules` files in that folder. Codex automatically loads every `.rules` file in there on startup.
|
||||
3. Write `prefix_rule` entries to describe the commands you want to allow, prompt, or block:
|
||||
|
||||
```starlark
|
||||
@@ -40,10 +40,10 @@ In this example rule, if Codex wants to run commands with the prefix `git push`
|
||||
Use the `codex execpolicy check` subcommand to preview decisions before you save a rule (see the [`codex-execpolicy` README](../codex-rs/execpolicy/README.md) for syntax details):
|
||||
|
||||
```shell
|
||||
codex execpolicy check --policy ~/.codex/policy/default.codexpolicy git push origin main
|
||||
codex execpolicy check --rules ~/.codex/rules/default.rules git push origin main
|
||||
```
|
||||
|
||||
Pass multiple `--policy` flags to test how several files combine, and use `--pretty` for formatted JSON output. See the [`codex-rs/execpolicy` README](../codex-rs/execpolicy/README.md) for a more detailed walkthrough of the available syntax.
|
||||
Pass multiple `--rules` flags to test how several files combine, and use `--pretty` for formatted JSON output. See the [`codex-rs/execpolicy` README](../codex-rs/execpolicy/README.md) for a more detailed walkthrough of the available syntax.
|
||||
|
||||
Example output when a rule matches:
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ In 2021, OpenAI released Codex, an AI system designed to generate code from natu
|
||||
|
||||
### Which models are supported?
|
||||
|
||||
We recommend using Codex with GPT-5.1 Codex Max, our best coding model. The default reasoning level is medium, and you can upgrade to high or xhigh (Codex Max only) for complex tasks with the `/model` command.
|
||||
We recommend using Codex with GPT-5.1 Codex Max, our best coding model. The default reasoning level is medium, and you can upgrade to high or xhigh (where supported, e.g. `gpt-5.1-codex-max` and `gpt-5.2`) for complex tasks with the `/model` command.
|
||||
|
||||
You can also use older models by using API-based auth and launching codex with the `--model` flag.
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# Release Management
|
||||
|
||||
Currently, we made Codex binaries available in three places:
|
||||
|
||||
- GitHub Releases https://github.com/openai/codex/releases/
|
||||
- `@openai/codex` on npm: https://www.npmjs.com/package/@openai/codex
|
||||
- `codex` on Homebrew: https://formulae.brew.sh/cask/codex
|
||||
|
||||
# Cutting a Release
|
||||
|
||||
Run the `codex-rs/scripts/create_github_release` script in the repository to publish a new release. The script will choose the appropriate version number depending on the type of release you are creating.
|
||||
|
||||
To cut a new alpha release from `main` (feel free to cut alphas liberally):
|
||||
|
||||
```
|
||||
./codex-rs/scripts/create_github_release --publish-alpha
|
||||
```
|
||||
|
||||
To cut a new _public_ release from `main` (which requires more caution), run:
|
||||
|
||||
```
|
||||
./codex-rs/scripts/create_github_release --publish-release
|
||||
```
|
||||
|
||||
TIP: Add the `--dry-run` flag to report the next version number for the respective release and exit.
|
||||
|
||||
Running the publishing script will kick off a GitHub Action to build the release, so go to https://github.com/openai/codex/actions/workflows/rust-release.yml to find the corresponding workflow. (Note: we should automate finding the workflow URL with `gh`.)
|
||||
|
||||
When the workflow finishes, the GitHub Release is "done," but you still have to consider npm and Homebrew.
|
||||
|
||||
## Publishing to npm
|
||||
|
||||
The GitHub Action is responsible for publishing to npm.
|
||||
|
||||
## Publishing to Homebrew
|
||||
|
||||
For Homebrew, we ship Codex as a cask. Homebrew's automation system checks our GitHub repo every few hours for a new release and will open a PR to update the cask with the latest binary.
|
||||
|
||||
Inevitably, you just have to refresh this page periodically to see if the release has been picked up by their automation system:
|
||||
|
||||
https://github.com/Homebrew/homebrew-cask/pulls?q=%3Apr+codex
|
||||
|
||||
For reference, our Homebrew cask lives at:
|
||||
|
||||
https://github.com/Homebrew/homebrew-cask/blob/main/Casks/c/codex.rb
|
||||
@@ -4,6 +4,19 @@
|
||||
|
||||
Codex can automatically discover reusable "skills" you keep on disk. A skill is a small bundle with a name, a short description (what it does and when to use it), and an optional body of instructions you can open when needed. Codex injects only the name, description, and file path into the runtime context; the body stays on disk.
|
||||
|
||||
## Enable skills
|
||||
|
||||
Skills are behind the experimental `skills` feature flag and are disabled by default.
|
||||
|
||||
- Enable in config (preferred): add the following to `$CODEX_HOME/config.toml` (usually `~/.codex/config.toml`) and restart Codex:
|
||||
|
||||
```toml
|
||||
[features]
|
||||
skills = true
|
||||
```
|
||||
|
||||
- Enable for a single run: launch Codex with `codex --enable skills`
|
||||
|
||||
## Where skills live
|
||||
|
||||
- Location (v1): `~/.codex/skills/**/SKILL.md` (recursive). Hidden entries and symlinks are skipped. Only files named exactly `SKILL.md` count.
|
||||
@@ -23,6 +36,11 @@ Codex can automatically discover reusable "skills" you keep on disk. A skill is
|
||||
- If valid skills exist, Codex appends a runtime-only `## Skills` section after `AGENTS.md`, one bullet per skill: `- <name>: <description> (file: /absolute/path/to/SKILL.md)`.
|
||||
- If no valid skills exist, the section is omitted. On-disk files are never modified.
|
||||
|
||||
## Using skills
|
||||
|
||||
- Mention a skill by name in a message using `$<skill-name>`.
|
||||
- In the TUI, you can also use `/skills` to browse and insert skills.
|
||||
|
||||
## Validation and errors
|
||||
|
||||
- Invalid skills (missing/invalid YAML, empty/over-length fields) trigger a blocking, dismissible startup modal in the TUI that lists each path and error. Errors are also logged. You can dismiss to continue (invalid skills are ignored) or exit. Fix SKILL.md files and restart to clear the modal.
|
||||
|
||||
+19
-18
@@ -10,23 +10,24 @@ Slash commands are special commands you can type that start with `/`.
|
||||
|
||||
Control Codex’s behavior during an interactive session with slash commands.
|
||||
|
||||
| Command | Purpose |
|
||||
| ------------ | ----------------------------------------------------------- |
|
||||
| `/model` | choose what model and reasoning effort to use |
|
||||
| `/approvals` | choose what Codex can do without approval |
|
||||
| `/review` | review my current changes and find issues |
|
||||
| `/new` | start a new chat during a conversation |
|
||||
| `/resume` | resume an old chat |
|
||||
| `/init` | create an AGENTS.md file with instructions for Codex |
|
||||
| `/compact` | summarize conversation to prevent hitting the context limit |
|
||||
| `/undo` | ask Codex to undo a turn |
|
||||
| `/diff` | show git diff (including untracked files) |
|
||||
| `/mention` | mention a file |
|
||||
| `/status` | show current session configuration and token usage |
|
||||
| `/mcp` | list configured MCP tools |
|
||||
| `/logout` | log out of Codex |
|
||||
| `/quit` | exit Codex |
|
||||
| `/exit` | exit Codex |
|
||||
| `/feedback` | send logs to maintainers |
|
||||
| Command | Purpose |
|
||||
| ------------ | -------------------------------------------------------------------------- |
|
||||
| `/model` | choose what model and reasoning effort to use |
|
||||
| `/approvals` | choose what Codex can do without approval |
|
||||
| `/review` | review my current changes and find issues |
|
||||
| `/new` | start a new chat during a conversation |
|
||||
| `/resume` | resume an old chat |
|
||||
| `/init` | create an AGENTS.md file with instructions for Codex |
|
||||
| `/compact` | summarize conversation to prevent hitting the context limit |
|
||||
| `/undo` | ask Codex to undo a turn |
|
||||
| `/diff` | show git diff (including untracked files) |
|
||||
| `/mention` | mention a file |
|
||||
| `/status` | show current session configuration and token usage |
|
||||
| `/mcp` | list configured MCP tools |
|
||||
| `/skills` | browse and insert skills (experimental; see [docs/skills.md](./skills.md)) |
|
||||
| `/logout` | log out of Codex |
|
||||
| `/quit` | exit Codex |
|
||||
| `/exit` | exit Codex |
|
||||
| `/feedback` | send logs to maintainers |
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user