Commit Graph
44 Commits
Author SHA1 Message Date
James Peter 95a3b15a22 Merge upstream-merge into main: restore fork features and keep upstream improvements
- Core: keep browser_*/agent_* tool exposure and web_fetch in openai_tools; preserve browser gating + screenshot UX; adapt recorder API
- Protocol: keep TS model changes for protocol-ts; align image shape
- Default client: reinstate UA helpers (USER_AGENT_SUFFIX, get_codex_user_agent_default)
- CI/Docs: carry remote minor updates

Build: ./build-fast.sh clean
2025-09-11 20:55:52 +10:00
James Peter 01368915b8 ci(upstream-merge): expand agent context with fork enhancements + generic guards
- Add docs/fork-enhancements.md (initial list; instruct agent to scan repo for more)
- Inject the overview into the merge prompt
- Generalize verify guards to handler↔tool parity by family (browser_*, agent_*, web_fetch), and keep UA/version check

Prevents silent loss of fork features and gives the agent richer context.
2025-09-11 20:12:17 +10:00
just-every-code 5fd5eb942b merge(upstream): bring in openai/codex@main (no conflicts)
Policy: prefer ours (tui/cli/workflows/docs), prefer theirs (core/common/protocol/exec/file-search). Purge checks passed.\nVerification: scripts/upstream-merge/verify.sh PASS (build_fast=ok, api_check=ok).
2025-09-10 18:30:41 +00:00
Kazuhiro SeraandGitHub c60a2a821c Remove a broken link to prompting_guide.md in docs/getting-started.md (#2858)
The file no longer exists. We've been receiving this feedback several
times.
- https://github.com/openai/codex/issues/2374
- https://github.com/openai/codex/issues/2810
- https://github.com/openai/codex/issues/2826

My previous PR https://github.com/openai/codex/pull/2413 for this issue
restored the file but now it's compatible with the current file
structure. Thus, let's simply delete the link.
2025-09-10 10:52:50 -07:00
James PeterandGitHub 52407cb184 Merge pull request #107 from just-every/upstream-merge
Upstream merge: openai/codex@main into main
2025-09-09 12:42:11 +10:00
James Peter 1d7e9432c0 docs: move theme config to docs/ and remove obsolete root files
Consolidate documentation under docs/.\n- Move THEME_CONFIG.md to docs/THEME_CONFIG.md (with minor edits)\n- Remove outdated root files: MERGE.md, PNPM.md, profile.sh\n\nValidated with ./build-fast.sh: build succeeds cleanly.
2025-09-09 12:01:09 +10:00
just-every-code 8dd5a2e740 merge(upstream): merge upstream/main into upstream-merge (by-bucket)\n\n- Prefer ours: TUI, CLI, workflows, docs\n- Prefer theirs: core/common/protocol/exec/file-search\n- Purged disallowed assets; resolved conflicts per policy 2025-09-09 00:21:14 +00:00
RobertandGitHub a389f40064 Improve explanation of how the shell handles quotes in config.md (#3169)
* Clarify how the shell's handling of quotes affects the interpretation
of TOML values in `--config`/`-c`
* Provide examples of the right way to pass complex TOML values
* The previous explanation incorrectly demonstrated how to pass TOML
values to `--config`/`-c` (misunderstanding how the shell’s handling of
quotes affects things) and would result in invalid invocations of
`codex`.
2025-09-08 15:58:25 -07:00
cbe82219d3 feat(mcp): per-server startup timeout (#3182)
Seeing timeouts on certain, slow mcp server starting up when codex is
invoked. Before this change, the timeout was a hard-coded 10s. Need the
ability to define arbitrary timeouts on a per-server basis.

## Summary of changes

- Add startup_timeout_ms to McpServerConfig with 10s default when unset
- Use per-server timeout for initialize and tools/list
- Introduce ManagedClient to store client and timeout; rename
LIST_TOOLS_TIMEOUT to DEFAULT_STARTUP_TIMEOUT
- Update docs to document startup_timeout_ms with example and options
table

---------

Co-authored-by: Matthew Dolan <[email protected]>
2025-09-08 08:12:08 -07:00
James Peter d789642831 feat(core/auth): prefer ChatGPT over API key when tokens exist
- Default  and conversation startup to
- Honor explicit API-key preference only when requested

feat(arg0/env): ignore provider keys in project .env

- Load ~/.code/.env first
- Always ignore OPENAI_API_KEY/AZURE_OPENAI_API_KEY in local .env

feat(tui): show bold "Auth: API key" badge when not using ChatGPT

feat(tui/onboarding): set Never + DangerFullAccess on trust

docs(auth): document .env safety and UI indicator

refactor(core/token_data): remove API-key plan heuristics (unused)
2025-09-09 00:50:17 +10:00
James Peter ae6bb27ebb feat(tui/mcp): add /mcp command for MCP status, on/off toggles, and add; persist to config and update docs\n\n- Add config helpers to list/add/enable/disable MCP servers in ~/.codex/config.toml\n- New /mcp slash command with subcommands: status, on, off, add\n- Wire command dispatch; update slash-commands docs\n- No live reload yet; suggest starting a new chat to apply 2025-09-08 12:44:03 +10:00
James Peter 338bb51fff docs(slash-commands): add comprehensive slash command reference; link from core README; add code comments reminding to update docs when adding commands 2025-09-08 09:56:03 +10:00
James Peter e19e49e6f5 feat(tui/github): add settings view and Actions tools; wire into bottom pane and chatwidget
- core(config): add GithubConfig and setter for check_on_push
- tui: integrate gh_actions panel; exec tools plumbing
- workflows: use RUNNER_TEMP cargo-home; enforce policy removals (images + cargo caches)
- repo: ignore .cargo2; docs(config): clarify allow_git_writes default
- protocol: minor adjustments across core/protocol crates
2025-09-07 17:43:58 +10:00
Michael BolinandGitHub 200c43a408 fix: change create_github_release to take either --publish-alpha or --publish-release (#3231)
No more picking out version numbers by hand! Now we let the script do
it:

```
$ ./codex-rs/scripts/create_github_release --dry-run --publish-alpha
Running gh api GET /repos/openai/codex/releases/latest
Running gh api GET /repos/openai/codex/releases?per_page=100
Publishing version 0.31.0-alpha.3
$ ./codex-rs/scripts/create_github_release --dry-run --publish-release
Running gh api GET /repos/openai/codex/releases/latest
Publishing version 0.31.0
```

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/3230).
* __->__ #3231
* #3230
* #3228
* #3226
2025-09-05 22:08:34 -07:00
Ahmed IbrahimandGitHub 673765aa62 hide resume until it's complete (#3218)
Hide resume functionality until it's fully done.
2025-09-05 13:12:46 -07:00
pakrym-oaiandGitHub 73f9cf8c85 Never store requests (#3212)
When item ids are sent to Responses API it will load them from the
database ignoring the provided values. This adds extra latency.

Not having the mode to store requests also allows us to simplify the
code.

## Breaking change

The `disable_response_storage` configuration option is removed.
2025-09-05 10:41:47 -07:00
James Peter 0ab0b647fd feat(tui/history): enforce strict global ordering and stream IDs
- Replace legacy turn-window logic with stable  per insert
- Require non-empty stream IDs; seed order keys per (kind,id)
- Pair out-of-order ExecEnd/Begin and drop canceled execs
- Surface init/submit errors as BackgroundEvent diagnostics
- Improve status panes, borders, and preview truncation by display width
- Update release workflow; docs: AGENTS.md, prompt_coder.md; add MERGE.md and postmortem

Build: ./build-fast.sh passes locally with no warnings.
2025-09-05 16:13:31 +10:00
Anton PanasenkoandGitHub 7a0b82fac1 [codex] move configuration for reasoning summary format to model family config type (#3171) 2025-09-04 11:00:01 -07:00
Ahmed IbrahimandGitHub 0fe45932b4 TUI: Add session resume picker (--resume) and quick resume (--continue) (#3135)
Adds a TUI resume flow with an interactive picker and quick resume.

- CLI: 
  - --resume / -r: open picker to resume a prior session
  - --continue   / -l: resume the most recent session (no picker)
- Behavior on resume: initial history is replayed, welcome banner
hidden, and the first redraw is suppressed to avoid flicker.
- Implementation:
- New tui/src/resume_picker.rs (paginated listing via
RolloutRecorder::list_conversations)
  - App::run accepts ResumeSelection; resumes from disk when requested
- ChatWidget refactor with ChatWidgetInit and new_from_existing; replays
initial messages
- Tests: cover picker sorting/preview extraction and resumed-history
rendering.
- Docs: getting-started updated with flags and picker usage.



https://github.com/user-attachments/assets/1bb6469b-e5d1-42f6-bec6-b1ae6debda3b
2025-09-04 06:20:40 +00:00
James Peter b8f48d8ada merge(core): integrate upstream main, adopt default_client UA; fix auth originator and tool docs
- Resolve upstream delete of user_agent.rs; use default_client::get_codex_user_agent
- Switch client construction to default_client with originator header
- Update AuthManager::shared and CodexAuth::from_codex_home call sites to pass originator
- Fix openai_tools shell tool description formatting and include writable roots
- Deduplicate/repair config_types derives; import Serialize/Display early
- Use rollout::policy::is_persisted_response_item and remove dead import
- Keep our TUI architecture intact; no functional UI changes

Build: ./build-fast.sh passes with zero warnings
2025-09-04 07:21:05 +10:00
Anton PanasenkoandGitHub c61302350b [codex] document use_experimental_reasoning_summary toml key config (#3118)
Follow up on https://github.com/openai/codex/issues/3101
2025-09-03 11:16:07 -07:00
Gabriel PealandGitHub f9af1ddda1 Update guidance on API key permissions (#3112)
Fixes https://github.com/openai/codex/issues/3108
2025-09-03 12:44:16 -04:00
James Peter 4de65f4db7 fix(tui/input): normalize KeyEvent kind on non-enhanced terminals to restore typing on Git Bash/mintty (Windows)
This maps Release-only key events to Press when keyboard enhancement flags are unsupported, fixing unresponsive input and Ctrl+C on some Windows terminals.

Closes #18. Closes #14.
2025-09-03 21:44:29 +10:00
James Peter 08609e46c7 merge: integrate upstream/main (prefer ours); keep TUI fork, drop legacy vt100 tests, retain local common.rs 2025-09-03 19:49:35 +10:00
Zhongsheng JiandGitHub 59676e7d91 docs: fix typo of config.md (#3082)
Fixed a typo in config.md. I guess TOML doesn't have the “key”: “value”
syntax.
2025-09-02 23:14:57 -07:00
Michael BolinandGitHub bf5935f9c2 docs: update link to point to https://agents.md/ (#3089)
Given the link text is "official AGENTS.md documentation," this seems
like the right URL.
2025-09-02 23:13:04 -07:00
Reuben NaradandGitHub 02de01ebbd fix config reference table (#3063)
3 quick fixes to docs/config.md

- Fix the reference table so option lists render correctly
- Corrected the default `stream_max_retries` to 5 (Old: 10)
- Update example approval_policy to untrusted (Old: unless-allow-listed)
2025-09-02 13:03:11 -07:00
James Peter 4ea3f9136d chore(tui): polish maintainability
- Remove legacy string-based  (use ExecAction everywhere)
- Add ergonomic traits for newtype IDs (From<&str>, From<String>, AsRef<str>, Display)
- Replace remaining direct streaming mutations with streaming facade
- Update refactor docs: Step 3 and 4 marked DONE

Build: ./build-fast.sh clean
2025-09-02 21:14:34 +10:00
James Peter 718f1cfb7e docs(tui): mark merge API consolidation done; note ExecAction adoption and next steps 2025-09-02 19:39:25 +10:00
James Peter 699feec966 docs(tui): update refactor plan status
- Mark history helper adoption as DONE
- Note new history_*_and_maybe_merge API and partial adoption
- Update TODO checklist accordingly
2025-09-02 17:43:46 +10:00
James Peter 310a1fb688 refactor(tui/chatwidget): finish history helper adoption across TUI
- Replace direct history mutations with shim:
  - add_to_history -> history_push
  - history_cells[idx] = … -> history_replace_at
  - history_cells.remove(i) -> history_remove_at (where safe)
- Sweep chatwidget.rs, chatwidget/tools.rs, chatwidget/exec_tools.rs, chatwidget/interrupts.rs
- Preserve move-before-assistant helpers where removal return value is required
- Keep behavior identical; centralize invalidation/redraw in helpers

Validated with ./build-fast.sh (no warnings).
2025-09-02 17:41:46 +10:00
James Peter 0c644deb34 chore: commit local changes before sync 2025-08-29 13:42:37 +10:00
James Peter c84b285080 merge(upstream-2025-08-29): integrate upstream main with -X ours; align web_search events; fix TUI popup APIs; clean warnings; build passes 2025-08-29 12:55:03 +10:00
dedrisian-oaiandGitHub 9e254eda06 Custom /prompts (#2696)
Adds custom `/prompts` to `~/.codex/prompts/<command>.md`.

<img width="239" height="107" alt="Screenshot 2025-08-25 at 6 22 42 PM"
src="https://github.com/user-attachments/assets/fe6ebbaa-1bf6-49d3-95f9-fdc53b752679"
/>

---

Details:

1. Adds `Op::ListCustomPrompts` to core.
2. Returns `ListCustomPromptsResponse` with list of `CustomPrompt`
(name, content).
3. TUI calls the operation on load, and populates the custom prompts
(excluding prompts that collide with builtins).
4. Selecting the custom prompt automatically sends the prompt to the
agent.
2025-08-29 02:16:39 +00:00
James Peter f52f1a172a Merge upstream/main into fork (prefer ours), integrate pager overlay; keep our transcript_app.rs for now 2025-08-29 11:50:50 +10:00
James Peter 3b76f9a3df feat(tui): highlight executed commands as bash; show inline duration
- Apply shell syntax highlighting to executed command lines in history cells
- Append running duration dimmed inline on the first command line
- Render full command via highlighter instead of plain text
- Prune obsolete local docs and test artifact files

Refs: fix/strip-osc8-in-markdown
2025-08-29 10:50:37 +10:00
James Peter ba488c82b6 feat(tui): codeblock background + syntax highlighting\n\n- Add code block background styling and improved syntax highlighting\n- Update , , streaming controller\n- Adjust colors/theme and diff rendering for consistency\n- Core: execution event plumbing tweaks\n- Docs: add markdown showcase 2025-08-28 16:57:54 +10:00
84b0c238d9 README / docs refactor (#2724)
This PR cleans up the monolithic README by breaking it into a set
navigable pages under docs/ (install, getting started, configuration,
authentication, sandboxing and approvals, platform details, FAQ, ZDR,
contributing, license). The top‑level README is now more concise and
intuitive, (with corrected screenshots).

It also consolidates overlapping content from codex-rs/README.md into
the top‑level docs and updates links accordingly. The codex-rs README
remains in place for now as a pointer and for continuity.

Finally, added an extensive config reference table at the bottom of
docs/config.md.

---------

Co-authored-by: Hanzo Dev <[email protected]>
2025-08-27 10:30:39 -07:00
James Peter ef77a0a12d docs(README): add screenshots with captions; feat(README): mention diff viewer in Why Code; build(build-fast): suppress warnings in dev-fast output 2025-08-17 18:55:59 +10:00
James Peter e1f9079b50 chore: commit pending changes on main (CLI, TUI, core, docs) 2025-08-17 18:55:58 +10:00
James PeterandHanzo Dev c57b93536d fix: correct /chrome command parsing in handle_browser_command
The function was expecting '/browser' to be in the command text and
looking at parts[1], but /chrome passes just 'chrome' or 'chrome [port]',
so we need to look at parts[0] instead.

- Changed index from parts[1] to parts[0] for first argument
- Fixed port parsing to use parts[1] instead of parts[2]
- Updated condition from parts.len() > 1 to \!parts.is_empty()

Co-authored-by: Hanzo Dev <[email protected]>
2025-08-13 21:08:18 +10:00
James PeterandHanzo Dev 80bf3d50a9 feat: rebrand from openai/codex to just-every/coder
- Update GitHub Actions workflow for version handling
- Change command references from 'codex' to 'coder'
- Improve release script with better version validation
- Update browser mode UI displays
- Update repository references and branding

Co-authored-by: Hanzo Dev <[email protected]>
2025-08-12 22:51:50 +10:00
Michael BolinandGitHub c6165d5d9e fix: improve npm release process (#2055)
This improves the release process by introducing
`scripts/publish_to_npm.py` to automate publishing to npm (modulo the
human 2fac step).

As part of this, it updates `.github/workflows/rust-release.yml` to
create the artifact for npm using `npm pack`.

And finally, while it is long overdue, this memorializes the release
process in `docs/release_management.md`.
2025-08-08 19:07:36 -07:00
Ilan BigioandGitHub f31a5e35c3 Set up CLA process and remove DCO (#129)
Signed-off-by: Ilan Bigio <[email protected]>
2025-04-16 15:24:31 -07:00