Commit Graph
342 Commits
Author SHA1 Message Date
James Peter 91d550bbca Merge branch 'main' of https://github.com/just-every/code 2025-12-23 07:33:42 +10:00
James Peter fb43de4ff9 Merge upstream/main: keep local workflows 2025-12-23 03:15:41 +10:00
jif-oaiandGitHub 45727b9ed3 chore: drop undo from the docs (#8431) 2025-12-22 15:09:48 +00:00
Robby HeandGitHub 372de6d2c5 docs: add developer_instructions config option and update descriptions (#8376)
Updates the configuration documentation to clarify and improve the
description of the `developer_instructions` and `instructions` fields.

Documentation updates:

* Added a description for the `developer_instructions` field in
`docs/config.md`, clarifying that it provides additional developer
instructions.
* Updated the comments in `docs/example-config.md` to specify that
`developer_instructions` is injected before `AGENTS.md`, and clarified
that the `instructions` field is ignored and that `AGENTS.md` is
preferred.

___

ref #7973 

Thanks to @miraclebakelaser for the message. I have double-confirmed
that developer instructions are always injected before user
instructions. According to the source code
[codex_core::codex::Session::build_initial_context](https://github.com/openai/codex/blob/rust-v0.77.0-alpha.2/codex-rs/core/src/codex.rs#L1279),
we can see the specific order of these instructions.
2025-12-22 07:37:37 -07:00
GitHub Action 548269b276 docs(changelog): update for v0.6.13 [skip ci] 2025-12-22 11:27:37 +00:00
James Peter 7b75daca4c docs(slash-commands): clarify /push workflow checks 2025-12-22 20:18:33 +10:00
James Peter 369e930ab6 Merge branch 'main' of https://github.com/just-every/code 2025-12-22 20:12:02 +10:00
James Peter ce8d4b344d fix(core/mcp): make rmcp client default 2025-12-22 19:25:02 +10:00
Charlie WeemsandGitHub 99cbba8ea5 Update ghost_commit flag reference to undo (#8091)
Minor documentation update to fix #7966 (documentation of undo flag).
2025-12-21 23:27:54 -08:00
James Peter 26f7fc0283 Merge upstream/main: sync mirror updates 2025-12-22 17:01:37 +10:00
Eric TrautandGitHub d281bcfcd4 Point skills docs to developer documentation site (#8407) 2025-12-21 16:18:58 -08:00
Shijie RaoandGitHub 987dd7fde3 Chore: remove rmcp feature and exp flag usages (#8087)
### Summary
With codesigning on Mac, Windows and Linux, we should be able to safely
remove `features.rmcp_client` and `use_experimental_use_rmcp_client`
check from the codebase now.
2025-12-20 14:18:00 -08:00
Josh McKinneyandGitHub 63942b883c feat(tui2): tune scrolling inpu based on (#8357)
## TUI2: Normalize Mouse Scroll Input Across Terminals (Wheel +
Trackpad)

This changes TUI2 scrolling to a stream-based model that normalizes
terminal scroll event density into consistent wheel behavior (default:
~3 transcript lines per physical wheel notch) while keeping trackpad
input higher fidelity via fractional accumulation.

Primary code: `codex-rs/tui2/src/tui/scrolling/mouse.rs`

Doc of record (model + probe-derived data):
`codex-rs/tui2/docs/scroll_input_model.md`

### Why

Terminals encode both mouse wheels and trackpads as discrete scroll
up/down events with direction but no magnitude, and they vary widely in
how many raw events they emit per physical wheel notch (commonly 1, 3,
or 9+). Timing alone doesn’t reliably distinguish wheel vs trackpad, so
cadence-based heuristics are unstable across terminals/hardware.

This PR treats scroll input as short *streams* separated by silence or
direction flips, normalizes raw event density into tick-equivalents,
coalesces redraws for dense streams, and exposes explicit config
overrides.

### What Changed

#### Scroll Model (TUI2)

- Stream detection
  - Start a stream on the first scroll event.
  - End a stream on an idle gap (`STREAM_GAP_MS`) or a direction flip.
- Normalization
- Convert raw events into tick-equivalents using per-terminal
`tui.scroll_events_per_tick`.
- Wheel-like vs trackpad-like behavior
- Wheel-like: fixed “classic” lines per wheel notch; flush immediately
for responsiveness.
- Trackpad-like: fractional accumulation + carry across stream
boundaries; coalesce flushes to ~60Hz to avoid floods and reduce “stop
lag / overshoot”.
- Trackpad divisor is intentionally capped: `min(scroll_events_per_tick,
3)` so terminals with dense wheel ticks (e.g. 9 events per notch) don’t
make trackpads feel artificially slow.
- Auto mode (default)
  - Start conservatively as trackpad-like (avoid overshoot).
- Promote to wheel-like if the first tick-worth of events arrives
quickly.
- Fallback for 1-event-per-tick terminals (no tick-completion timing
signal).

#### Trackpad Acceleration

Some terminals produce relatively low vertical event density for
trackpad gestures, which makes large/faster swipes feel sluggish even
when small motions feel correct. To address that, trackpad-like streams
apply a bounded multiplier based on event count:

- `multiplier = clamp(1 + abs(events) / scroll_trackpad_accel_events,
1..scroll_trackpad_accel_max)`

The multiplier is applied to the trackpad stream’s computed line delta
(including carried fractional remainder). Defaults are conservative and
bounded.

#### Config Knobs (TUI2)

All keys live under `[tui]`:

- `scroll_wheel_lines`: lines per physical wheel notch (default: 3).
- `scroll_events_per_tick`: raw vertical scroll events per physical
wheel notch (terminal-specific default; fallback: 3).
- Wheel-like per-event contribution: `scroll_wheel_lines /
scroll_events_per_tick`.
- `scroll_trackpad_lines`: baseline trackpad sensitivity (default: 1).
- Trackpad-like per-event contribution: `scroll_trackpad_lines /
min(scroll_events_per_tick, 3)`.
- `scroll_trackpad_accel_events` / `scroll_trackpad_accel_max`: bounded
trackpad acceleration (defaults: 30 / 3).
- `scroll_mode = auto|wheel|trackpad`: force behavior or use the
heuristic (default: `auto`).
- `scroll_wheel_tick_detect_max_ms`: auto-mode promotion threshold (ms).
- `scroll_wheel_like_max_duration_ms`: auto-mode fallback for
1-event-per-tick terminals (ms).
- `scroll_invert`: invert scroll direction (applies to wheel +
trackpad).

Config docs: `docs/config.md` and field docs in
`codex-rs/core/src/config/types.rs`.

#### App Integration

- The app schedules follow-up ticks to close idle streams (via
`ScrollUpdate::next_tick_in` and `schedule_frame_in`) and finalizes
streams on draw ticks.
  - `codex-rs/tui2/src/app.rs`

#### Docs

- Single doc of record describing the model + preserved probe
findings/spec:
  - `codex-rs/tui2/docs/scroll_input_model.md`

#### Other (jj-only friendliness)

- `codex-rs/tui2/src/diff_render.rs`: prefer stable cwd-relative paths
when the file is under the cwd even if there’s no `.git`.

### Terminal Defaults

Per-terminal defaults are derived from scroll-probe logs (see doc).
Notable:

- Ghostty currently defaults to `scroll_events_per_tick = 3` even though
logs measured ~9 in one setup. This is a deliberate stopgap; if your
Ghostty build emits ~9 events per wheel notch, set:

  ```toml
  [tui]
  scroll_events_per_tick = 9
  ```

### Testing

- `just fmt`
- `just fix -p codex-core --allow-no-vcs`
- `cargo test -p codex-core --lib` (pass)
- `cargo test -p codex-tui2` (scroll tests pass; remaining failures are
known flaky VT100 color tests in `insert_history`)

### Review Focus

- Stream finalization + frame scheduling in `codex-rs/tui2/src/app.rs`.
- Auto-mode promotion thresholds and the 1-event-per-tick fallback
behavior.
- Trackpad divisor cap (`min(events_per_tick, 3)`) and acceleration
defaults.
- Ghostty default tradeoff (3 vs ~9) and whether we should change it.
2025-12-20 12:48:12 -08:00
GitHub Action 90728b1018 docs(changelog): update for v0.6.12 [skip ci] 2025-12-20 12:30:12 +00:00
James Peter cd4d80c466 Merge origin/main: adopt release notes/version bumps 2025-12-20 21:37:36 +10:00
James Peter a76bc96925 feat(sync): align models, exec schema, skills defaults 2025-12-20 21:36:06 +10:00
James Peter 6929aa81d0 Merge upstream/main: refresh mirror and align configs 2025-12-20 17:04:03 +10:00
jdijk-deventitandGitHub b15b5082c6 Fix link to contributing.md in experimental.md (#8311)
# External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated
"Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text
with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.
2025-12-19 09:42:56 -08:00
Andrew AmbrosinoandGitHub 9fb9ed6cea Set exclude to true by default in app server (#8281) 2025-12-18 14:28:30 -08:00
GitHub Action ca048e2a62 docs(changelog): update for v0.6.11 [skip ci] 2025-12-18 19:53:50 +00:00
James Peter 635e535b49 Merge upstream/main: keep local workflows; sync upstream history 2025-12-19 04:40:01 +10:00
Magson Leone dos SantosandGitHub 4c9d589f14 docs: clarify codex resume --all (CWD column & filtering) (#8264)
This pull request makes a small update to the session picker
documentation for `codex resume`. The main change clarifies how to view
the original working directory (CWD) for sessions and when the Git
branch is shown.

- The session picker now displays the recorded Git branch when
available, and instructions are added for showing the original working
directory by using the `--all` flag, which also disables CWD filtering
and adds a `CWD` column.
2025-12-18 16:54:50 +00:00
GitHub Action c913e183d7 docs(changelog): update for v0.6.10 [skip ci] 2025-12-18 09:24:43 +00:00
GitHub Action 8327beb29d docs(changelog): update for v0.6.9 [skip ci] 2025-12-18 07:24:48 +00:00
James Peter 343178c574 Merge branch 'code-branch-20251217-230845' 2025-12-18 15:59:23 +10:00
James Peter 820991e9d6 feat(tui/cards): set ANSI-16 card backgrounds
When PaletteMode::Ansi16, render tool cards with solid ANSI backgrounds and force high-contrast text (white on dark, black on light).

Mappings:
- Auto Drive: magenta / light magenta
- Agent (read): green / light green
- Agent (write): yellow / light yellow
- Browser: red / light red

Also extend /demo to accept 'auto drive card' for quickly previewing all ANSI-16 backgrounds.
2025-12-18 15:52:59 +10:00
GitHub Action b0bd3c4ebe docs(changelog): update for v0.6.8 [skip ci] 2025-12-18 00:03:40 +00:00
James Peter bfc41e2815 feat(agents): make gemini-3-flash the default
Replace gemini-2.5-flash with gemini-3-flash and treat gemini as the primary Gemini alias.

Update docs, examples, and legacy upgrade paths.
2025-12-18 09:00:29 +10:00
Michael BolinandGitHub 1e9babe178 fix: PathBuf -> AbsolutePathBuf in ConfigToml struct (#8205)
We should not have any `PathBuf` fields in `ConfigToml` or any of the
transitive structs we include, as we should use `AbsolutePathBuf`
instead so that we do not have to keep track of the file from which
`ConfigToml` was loaded such that we need it to resolve relative paths
later when the values of `ConfigToml` are used.

I only found two instances of this: `experimental_instructions_file` and
`experimental_compact_prompt_file`. Incidentally, when these were
specified as relative paths, they were resolved against `cwd` rather
than `config.toml`'s parent, which seems wrong to me. I changed the
behavior so they are resolved against the parent folder of the
`config.toml` being parsed, which we get "for free" due to the
introduction of `AbsolutePathBufGuard ` in
https://github.com/openai/codex/pull/7796.

While it is not great to change the behavior of a released feature,
these fields are prefixed with `experimental_`, which I interpret to
mean we have the liberty to change the contract.

For reference:

- `experimental_instructions_file` was introduced in
https://github.com/openai/codex/pull/1803
- `experimental_compact_prompt_file` was introduced in
https://github.com/openai/codex/pull/5959
2025-12-17 12:08:18 -08:00
jif-oaiandGitHub 3d92b443b0 feat: add config to disable warnings around ghost snapshot (#8178) 2025-12-17 18:50:22 +00:00
jif-oaiandGitHub ac6ba286aa feat: experimental menu (#8071)
This will automatically render any `Stage::Beta` features.

The change only gets applied to the *next session*. This started as a
bug but actually this is a good thing to prevent out of distribution
push

<img width="986" height="288" alt="Screenshot 2025-12-15 at 15 38 35"
src="https://github.com/user-attachments/assets/78b7a71d-0e43-4828-a118-91c5237909c7"
/>


<img width="509" height="109" alt="Screenshot 2025-12-15 at 17 35 44"
src="https://github.com/user-attachments/assets/6933de52-9b66-4abf-b58b-a5f26d5747e2"
/>
2025-12-17 17:08:03 +00:00
GitHub Action ed6fed4a82 docs(changelog): update for v0.6.7 [skip ci] 2025-12-17 10:59:29 +00:00
James Peter 34ead92c05 Merge upstream/main: keep local workflows; adopt upstream metadata 2025-12-17 13:24:24 +10:00
Michael BolinandGitHub bef36f4ae7 feat: if .codex is a sub-folder of a writable root, then make it read-only to the sandbox (#8088)
In preparation for in-repo configuration support, this updates
`WritableRoot::get_writable_roots_with_cwd()` to include the `.codex`
subfolder in `WritableRoot.read_only_subpaths`, if it exists, as we
already do for `.git`.

As noted, currently, like `.git`, `.codex` will only be read-only under
macOS Seatbelt, but we plan to bring support to other OSes, as well.

Updated the integration test in `seatbelt.rs` so that it actually
attempts to run the generated Seatbelt commands, verifying that:

- trying to write to `.codex/config.toml` in a writable root fails
- trying to write to `.git/hooks/pre-commit` in a writable root fails
- trying to write to the writable root containing the `.codex` and
`.git` subfolders succeeds
2025-12-15 22:54:43 -08:00
Lucas KimandGitHub 54def78a22 docs: fix gpt-5.2 typo in config.md (#8079)
Fix small typo in docs/config.md: `gpt5-2` -> `gpt-5.2`
2025-12-15 15:15:14 -08:00
Eric TrautandGitHub 5b472c933d Fixed formatting issue (#8069) 2025-12-15 06:18:33 -08:00
Mikhail BeliakovandGitHub 4501c0ece4 Update config.md (#8066)
Update supporting docs with the actual options
2025-12-15 06:12:52 -08:00
jif-oaiandGitHub 4274e6189a feat: config ghost commits (#7873) 2025-12-15 09:13:06 +01:00
GitHub Action 74ecd3f789 docs(changelog): update for v0.6.6 [skip ci] 2025-12-15 02:06:21 +00:00
James Peter 56f3c89a4a docs(readme): add Auto Review video thumbnail 2025-12-15 11:14:04 +10:00
Victor VannaraandGitHub 7c6a47958a docs: document enabling experimental skills (#8024)
## Notes

Skills are behind the experimental `skills` feature flag (disabled by
default), but the skills guide didn't explain how to turn them on.

- Add an explicit enable section to `docs/skills.md` (config +
`--enable`)
- Add the skills flag to `docs/config.md` and `docs/example-config.md`
- Document the `/skills` slash command
2025-12-14 14:34:22 -08:00
James Peter 814c6de334 Merge upstream/main: refresh mirror and keep fork defaults 2025-12-15 06:56:16 +10:00
GitHub Action b202169516 docs(changelog): update for v0.6.4 [skip ci] 2025-12-13 03:33:31 +00:00
GitHub Action 6f33cb4b51 docs(changelog): update for v0.6.3 [skip ci] 2025-12-12 07:14:51 +00:00
GitHub Action 82880bef88 docs(changelog): update for v0.6.2 [skip ci] 2025-12-12 05:25:19 +00:00
Victor VannaraandGitHub 190fa9e104 docs: clarify xhigh reasoning effort on gpt-5.2 (#7911)
## Changes
- Update config docs and example config comments to state that "xhigh"
is supported on gpt-5.2 as well as gpt-5.1-codex-max
- Adjust the FAQ model-support section to reflect broader xhigh
availability
2025-12-11 21:18:47 -08:00
James Peter b965a384b3 Merge upstream/main: keep release script, drop contributing doc 2025-12-12 09:34:37 +10:00
dank-openaiandGitHub 36610d975a Fix toasts on Windows under WSL 2 (#7137)
Before this: no notifications or toasts when using Codex CLI in WSL 2.

After this: I get toasts from Codex
2025-12-11 15:09:00 -08:00
Michael BolinandGitHub e0d7ac51d3 fix: policy/*.codexpolicy -> rules/*.rules (#7888)
We decided that `*.rules` is a more fitting (and concise) file extension
than `*.codexpolicy`, so we are changing the file extension for the
"execpolicy" effort. We are also changing the subfolder of `$CODEX_HOME`
from `policy` to `rules` to match.

This PR updates the in-repo docs and we will update the public docs once
the next CLI release goes out.

Locally, I created `~/.codex/rules/default.rules` with the following
contents:

```
prefix_rule(pattern=["gh", "pr", "view"])
```

And then I asked Codex to run:

```
gh pr view 7888 --json title,body,comments
```

and it was able to!
2025-12-11 14:46:00 -08:00
Ahmed IbrahimandGitHub c4f3f566a5 remove release script (#7885) 2025-12-11 13:40:48 -08:00