Skip to content

Commit 6eab97e

Browse files
aibrahim-oaigpeal
andauthored
fix: Update the deprecation message to link to the docs (openai#6211)
The deprecation message is currently a bit confusing. Users may not understand what is `[features].x`. I updated the docs and the deprecation message for more guidance. --------- Co-authored-by: Gabriel Peal <[email protected]>
1 parent 8328e03 commit 6eab97e

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

codex-rs/cli/src/mcp_cmd.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,9 @@ async fn run_login(config_overrides: &CliConfigOverrides, login_args: LoginArgs)
353353
.context("failed to load configuration")?;
354354

355355
if !config.features.enabled(Feature::RmcpClient) {
356-
bail!("OAuth login is only supported when [features].rmcp_client is true in config.toml.");
356+
bail!(
357+
"OAuth login is only supported when [features].rmcp_client is true in config.toml. See https://github.com/openai/codex/blob/main/docs/config.md#feature-flags for details."
358+
);
357359
}
358360

359361
let LoginArgs { name, scopes } = login_args;

codex-rs/core/src/codex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ impl Session {
553553
None
554554
} else {
555555
Some(format!(
556-
"You can either enable it using the CLI with `--enable {canonical}` or through the config.toml file with `[features].{canonical}`"
556+
"Enable it with `--enable {canonical}` or `[features].{canonical}` in config.toml. See https://github.com/openai/codex/blob/main/docs/config.md#feature-flags for details."
557557
))
558558
};
559559
post_session_configured_events.push(Event {

codex-rs/core/tests/suite/deprecation_notice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async fn emits_deprecation_notice_for_legacy_feature_flag() -> anyhow::Result<()
4343
assert_eq!(
4444
details.as_deref(),
4545
Some(
46-
"You can either enable it using the CLI with `--enable streamable_shell` or through the config.toml file with `[features].streamable_shell`"
46+
"Enable it with `--enable streamable_shell` or `[features].streamable_shell` in config.toml. See https://github.com/openai/codex/blob/main/docs/config.md#feature-flags for details."
4747
),
4848
);
4949

docs/config.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Codex configuration gives you fine-grained control over the model, execution env
44

55
## Quick navigation
66

7+
- [Feature flags](#feature-flags)
78
- [Model selection](#model-selection)
89
- [Execution environment](#execution-environment)
910
- [MCP integration](#mcp-integration)
@@ -26,6 +27,36 @@ Codex supports several mechanisms for setting config values:
2627

2728
Both the `--config` flag and the `config.toml` file support the following options:
2829

30+
## Feature flags
31+
32+
Optional and experimental capabilities are toggled via the `[features]` table in `$CODEX_HOME/config.toml`. If you see a deprecation notice mentioning a legacy key (for example `experimental_use_exec_command_tool`), move the setting into `[features]` or pass `--enable <feature>`.
33+
34+
```toml
35+
[features]
36+
streamable_shell = true # enable the streamable exec tool
37+
web_search_request = true # allow the model to request web searches
38+
# view_image_tool defaults to true; omit to keep defaults
39+
```
40+
41+
Supported features:
42+
43+
| Key | Default | Stage | Description |
44+
| ----------------------------------------- | :-----: | ------------ | ---------------------------------------------------- |
45+
| `unified_exec` | false | Experimental | Use the unified PTY-backed exec tool |
46+
| `streamable_shell` | false | Experimental | Use the streamable exec-command/write-stdin pair |
47+
| `rmcp_client` | false | Experimental | Enable oauth support for streamable HTTP MCP servers |
48+
| `apply_patch_freeform` | false | Beta | Include the freeform `apply_patch` tool |
49+
| `view_image_tool` | true | Stable | Include the `view_image` tool |
50+
| `web_search_request` | false | Stable | Allow the model to issue web searches |
51+
| `experimental_sandbox_command_assessment` | false | Experimental | Enable model-based sandbox risk assessment |
52+
| `ghost_commit` | false | Experimental | Create a ghost commit each turn |
53+
| `enable_experimental_windows_sandbox` | false | Experimental | Use the Windows restricted-token sandbox |
54+
55+
Notes:
56+
57+
- Omit a key to accept its default.
58+
- Legacy booleans such as `experimental_use_exec_command_tool`, `experimental_use_unified_exec_tool`, `include_apply_patch_tool`, and similar `experimental_use_*` keys are deprecated; setting the corresponding `[features].<key>` avoids repeated warnings.
59+
2960
## Model selection
3061

3162
### model

0 commit comments

Comments
 (0)