Commit Graph
4068 Commits
Author SHA1 Message Date
Michael Bolin 8da4aaab85 Merge 32e0d6e73e into sapling-pr-archive-bolinfest 2025-09-29 22:05:38 -07:00
Michael Bolin 32e0d6e73e fix: separate codex mcp into codex mcp-server and codex app-server 2025-09-29 22:05:28 -07:00
Michael Bolin f0f0606f0c merge commit for archive created by Sapling 2025-09-29 22:05:17 -07:00
Michael Bolin 9a7aeeb569 fix: separate codex mcp into codex mcp-server and codex app-server 2025-09-29 22:05:12 -07:00
Michael Bolin afbc4ba438 merge commit for archive created by Sapling 2025-09-29 21:58:34 -07:00
Michael Bolin 676bbf8171 fix: separate codex mcp into codex mcp-server and codex app-server 2025-09-29 21:58:26 -07:00
Michael Bolin 6a0089f6d5 merge commit for archive created by Sapling 2025-09-29 21:30:38 -07:00
Michael Bolin f642adda36 fix: separate codex mcp into codex mcp-server and codex app-server 2025-09-29 21:30:32 -07:00
pakrym-oai 27c6c5d7a7 SDK CI (#4483)
Build debug codex in SDK configuration
2025-09-29 21:15:02 -07:00
pakrym-oai c09e131653 Set originator for codex exec (#4485)
Distinct from the main CLI.
2025-09-29 20:59:19 -07:00
pakrym-oai ea82f86662 Rename conversation to thread in codex exec (#4482) 2025-09-29 20:18:30 -07:00
pakrym-oai a8edc57740 Add MCP tool call item to codex exec (#4481)
No arguments/results for now.
```
{
  "type": "item.started",
  "item": {
    "id": "item_1",
    "item_type": "mcp_tool_call",
    "server": "github",
    "tool": "search_issues",
    "status": "in_progress"
  }
}
{
  "type": "item.completed",
  "item": {
    "id": "item_1",
    "item_type": "mcp_tool_call",
    "server": "github",
    "tool": "search_issues",
    "status": "completed"
  }
}
```
2025-09-29 19:45:11 -07:00
pakrym-oai 52e591ce60 Add some types and a basic test to the SDK (#4472) 2025-09-29 19:40:08 -07:00
rakesh-oai 079303091f Rakesh/support device auth (#3531)
# 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.

# test

```
codex-rs % export CODEX_DEVICE_AUTH_BASE_URL=http://localhost:3007
codex-rs % cargo run --bin codex login --experimental_use-device-code
   Compiling codex-login v0.0.0 (/Users/rakesh/code/codex/codex-rs/login)
   Compiling codex-mcp-server v0.0.0 (/Users/rakesh/code/codex/codex-rs/mcp-server)
   Compiling codex-tui v0.0.0 (/Users/rakesh/code/codex/codex-rs/tui)
   Compiling codex-cli v0.0.0 (/Users/rakesh/code/codex/codex-rs/cli)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.90s
     Running `target/debug/codex login --experimental_use-device-code`
To authenticate, enter this code when prompted: 6Q27-KBVRF with interval 5
^C

```

The error in the last line is since the poll endpoint is not yet
implemented
2025-09-30 02:34:57 +00:00
pakrym-oai 4a80059b1b Add turn.failed and rename session created to thread started (#4478)
Don't produce completed when turn failed.
2025-09-29 18:38:04 -07:00
Michael Bolin 8a9e0cbd87 Merge 0c11f25cd7 into sapling-pr-archive-bolinfest 2025-09-29 18:33:52 -07:00
dedrisian-oai bf76258cdc Custom prompts begin with /prompts: (#4476)
<img width="608" height="354" alt="Screenshot 2025-09-29 at 4 41 08 PM"
src="https://github.com/user-attachments/assets/162508eb-c1ac-4bc0-95f2-5e23cb4ae428"
/>
2025-09-29 17:58:16 -07:00
Ahmed Ibrahim c64da4ff71 Fixes (#4458)
Fixing the "? for shortcuts"

- Only show the hint when composer is empty
- Don't reset footer on new task updates
- Reorder the elements
- Align the "?" and "/" with overlay on and off

Based on #4364
2025-09-30 00:10:04 +00:00
Ahmed Ibrahim 98efd352ae reintroduce "? for shortcuts" (#4364)
Reverts openai/codex#4362
2025-09-29 23:35:47 +00:00
Michael Bolin 0c11f25cd7 fix: separate codex mcp into codex mcp-server and codex app-server 2025-09-29 16:30:16 -07:00
Michael Bolin 65c4201a21 merge commit for archive created by Sapling 2025-09-29 16:26:57 -07:00
Michael Bolin d07822a280 fix: separate codex mcp into codex mcp-server and codex app-server 2025-09-29 16:26:47 -07:00
Michael Bolin 59caba5ed7 merge commit for archive created by Sapling 2025-09-29 16:16:42 -07:00
Michael Bolin 3498d3c67d fix: separate codex mcp into codex mcp-server and codex app-server 2025-09-29 16:16:01 -07:00
dedrisian-oai 80ccec6530 Custom prompt args (numeric) (#4470)
[Cherry picked from /pull/3565]

Adds $1, $2, $3, $ARGUMENTS param parsing for custom prompts.
2025-09-29 16:14:37 -07:00
Michael Bolin bd3e46981c Merge 414fe640eb into sapling-pr-archive-bolinfest 2025-09-29 16:04:47 -07:00
Michael Bolin 414fe640eb fix: separate codex mcp into codex mcp-server and codex app-server 2025-09-29 16:01:34 -07:00
Jeremy Rose c81baaabda no background for /command or @file popup (#4469)
before:

<img width="855" height="270" alt="Screenshot 2025-09-29 at 3 42 53 PM"
src="https://github.com/user-attachments/assets/eb247e1f-0947-4830-93c4-d4ecb2992b32"
/>


after:

<img width="855" height="270" alt="Screenshot 2025-09-29 at 3 43 04 PM"
src="https://github.com/user-attachments/assets/46717844-6066-47a4-a34a-1a75508ea2c3"
/>
2025-09-29 22:58:15 +00:00
Jeremy Rose 55b74c95e2 render • as dim (#4467)
<img width="988" height="686" alt="Screenshot 2025-09-29 at 3 28 30 PM"
src="https://github.com/user-attachments/assets/634a6e6f-cdc0-49af-97c1-096e871414bb"
/>
2025-09-29 15:46:47 -07:00
Ahmed Ibrahim 16057e76b0 [Core]: add tail in the rollout data (#4461)
This will help us show the conversation tail and last updated timestamp.
2025-09-29 14:32:26 -07:00
pakrym-oai adbc38a978 TypeScript SDK scaffold (#4455) 2025-09-29 13:27:13 -07:00
dedrisian-oai 83a4d4d8ed Parse out frontmatter for custom prompts (#4456)
[Cherry picked from https://github.com/openai/codex/pull/3565]

Removes the frontmatter description/args from custom prompt files and
only includes body.
2025-09-29 13:06:08 -07:00
Dylan 197f45a3be [mcp-server] Expose fuzzy file search in MCP (#2677)
## Summary
Expose a simple fuzzy file search implementation for mcp clients to work
with

## Testing
- [x] Tested locally
2025-09-29 12:19:09 -07:00
vishnu-oaiandAnton Panasenko 04c1782e52 OpenTelemetry events (#2103)
### Title

## otel

Codex can emit [OpenTelemetry](https://opentelemetry.io/) **log events**
that
describe each run: outbound API requests, streamed responses, user
input,
tool-approval decisions, and the result of every tool invocation. Export
is
**disabled by default** so local runs remain self-contained. Opt in by
adding an
`[otel]` table and choosing an exporter.

```toml
[otel]
environment = "staging"   # defaults to "dev"
exporter = "none"          # defaults to "none"; set to otlp-http or otlp-grpc to send events
log_user_prompt = false    # defaults to false; redact prompt text unless explicitly enabled
```

Codex tags every exported event with `service.name = "codex-cli"`, the
CLI
version, and an `env` attribute so downstream collectors can distinguish
dev/staging/prod traffic. Only telemetry produced inside the
`codex_otel`
crate—the events listed below—is forwarded to the exporter.

### Event catalog

Every event shares a common set of metadata fields: `event.timestamp`,
`conversation.id`, `app.version`, `auth_mode` (when available),
`user.account_id` (when available), `terminal.type`, `model`, and
`slug`.

With OTEL enabled Codex emits the following event types (in addition to
the
metadata above):

- `codex.api_request`
  - `cf_ray` (optional)
  - `attempt`
  - `duration_ms`
  - `http.response.status_code` (optional)
  - `error.message` (failures)
- `codex.sse_event`
  - `event.kind`
  - `duration_ms`
  - `error.message` (failures)
  - `input_token_count` (completion only)
  - `output_token_count` (completion only)
  - `cached_token_count` (completion only, optional)
  - `reasoning_token_count` (completion only, optional)
  - `tool_token_count` (completion only)
- `codex.user_prompt`
  - `prompt_length`
  - `prompt` (redacted unless `log_user_prompt = true`)
- `codex.tool_decision`
  - `tool_name`
  - `call_id`
- `decision` (`approved`, `approved_for_session`, `denied`, or `abort`)
  - `source` (`config` or `user`)
- `codex.tool_result`
  - `tool_name`
  - `call_id`
  - `arguments`
  - `duration_ms` (execution time for the tool)
  - `success` (`"true"` or `"false"`)
  - `output`

### Choosing an exporter

Set `otel.exporter` to control where events go:

- `none` – leaves instrumentation active but skips exporting. This is
the
  default.
- `otlp-http` – posts OTLP log records to an OTLP/HTTP collector.
Specify the
  endpoint, protocol, and headers your collector expects:

  ```toml
  [otel]
  exporter = { otlp-http = {
    endpoint = "https://otel.example.com/v1/logs",
    protocol = "binary",
    headers = { "x-otlp-api-key" = "${OTLP_TOKEN}" }
  }}
  ```

- `otlp-grpc` – streams OTLP log records over gRPC. Provide the endpoint
and any
  metadata headers:

  ```toml
  [otel]
  exporter = { otlp-grpc = {
    endpoint = "https://otel.example.com:4317",
    headers = { "x-otlp-meta" = "abc123" }
  }}
  ```

If the exporter is `none` nothing is written anywhere; otherwise you
must run or point to your
own collector. All exporters run on a background batch worker that is
flushed on
shutdown.

If you build Codex from source the OTEL crate is still behind an `otel`
feature
flag; the official prebuilt binaries ship with the feature enabled. When
the
feature is disabled the telemetry hooks become no-ops so the CLI
continues to
function without the extra dependencies.

---------

Co-authored-by: Anton Panasenko <apanasenko@openai.com>
2025-09-29 11:30:55 -07:00
Michael Bolin 05b3b13954 Merge 0a68853d8b into sapling-pr-archive-bolinfest 2025-09-29 09:55:00 -07:00
Michael Bolin 0a68853d8b feat: build the standalone codex-exec binary as part of the GitHub Release 2025-09-29 09:54:54 -07:00
Jeremy Rose d15253415a fix clear-to-end being emitted at the end of a row (#4447)
This was causing glitchy behavior when a line in the input was the exact
width of the terminal.
2025-09-29 16:52:35 +00:00
Ed Bayes c4120a265b [CODEX-3595] Remove period when copying highlighted text in iTerm (#4419) 2025-09-28 20:50:04 -07:00
Michael Bolin 618a42adf5 feat: introduce npm module for codex-responses-api-proxy (#4417)
This PR expands `.github/workflows/rust-release.yml` so that it also
builds and publishes the `npm` module for
`@openai/codex-responses-api-proxy` in addition to `@openai/codex`. Note
both `npm` modules are similar, in that they each contain a single `.js`
file that is a thin launcher around the appropriate native executable.
(Since we have a minimal dependency on Node.js, I also lowered the
minimum version from 20 to 16 and verified that works on my machine.)

As part of this change, we tighten up some of the docs around
`codex-responses-api-proxy` and ensure the details regarding protecting
the `OPENAI_API_KEY` in memory match the implementation.

To test the `npm` build process, I ran:

```
./codex-cli/scripts/build_npm_package.py --package codex-responses-api-proxy --version 0.43.0-alpha.3
```

which stages the `npm` module for `@openai/codex-responses-api-proxy` in
a temp directory, using the binary artifacts from
https://github.com/openai/codex/releases/tag/rust-v0.43.0-alpha.3.
2025-09-28 19:34:06 -07:00
Michael Bolin 99d2910b95 merge commit for archive created by Sapling 2025-09-28 17:37:00 -07:00
Michael Bolin 9056af50d1 feat: introduce npm module for codex-responses-api-proxy 2025-09-28 17:36:49 -07:00
Michael Bolin 706b11a2ac merge commit for archive created by Sapling 2025-09-28 17:28:38 -07:00
Michael Bolin c1373e9c69 feat: introduce npm module for codex-responses-api-proxy 2025-09-28 17:28:33 -07:00
Michael Bolin 0291618e6b merge commit for archive created by Sapling 2025-09-28 17:19:13 -07:00
Michael Bolin 19c7bd9b9a feat: introduce npm module for codex-responses-api-proxy 2025-09-28 17:19:08 -07:00
Michael Bolin 63ae9a63fa merge commit for archive created by Sapling 2025-09-28 17:17:37 -07:00
Michael Bolin 6d96b085b4 feat: introduce npm module for codex-responses-api-proxy 2025-09-28 17:17:27 -07:00
dedrisian-oai a9d54b9e92 Add /review to main commands (#4416)
<img width="517" height="249" alt="Screenshot 2025-09-28 at 4 33 26 PM"
src="https://github.com/user-attachments/assets/6d34734e-fe3c-4b88-8239-a6436bcb9fa5"
/>
2025-09-28 16:59:39 -07:00
Michael Bolin 9b98beaf55 merge commit for archive created by Sapling 2025-09-28 16:46:49 -07:00
Michael Bolin db95d6782c feat: introduce npm module for codex-responses-api-proxy 2025-09-28 16:46:30 -07:00