Commit Graph
471 Commits
Author SHA1 Message Date
Rai (Michael Pokorny) c5f4fafb54 agentydragon(prompts): require manager to review branches and propose merge/resolution after statuses 2025-06-24 14:34:36 -07:00
Rai (Michael Pokorny) 5f6352bbfa agentydragon(prompts): remind developers to commit changes at end 2025-06-24 14:32:23 -07:00
Rai (Michael Pokorny) fb4857acb1 agentydragon(prompts): consult conventions defined in docs in manager prompt 2025-06-24 14:31:48 -07:00
Rai (Michael Pokorny) 09d975e93b add check_task_frontmatter.py and document frontmatter lint in task-template 2025-06-24 14:28:42 -07:00
Rai (Michael Pokorny) b0f14f1f55 task-template: document valid status enum in frontmatter 2025-06-24 14:24:58 -07:00
Rai (Michael Pokorny) 2f0109faeb tasks: use dash-based branch names to avoid agentydragon ref conflict 2025-06-24 14:06:20 -07:00
Rai (Michael Pokorny) a86790c553 docs: update Worktree helper usage to include --tmux and multi-ID support 2025-06-24 14:04:02 -07:00
Rai (Michael Pokorny) cb0051f274 tasks: use tmux windows (tabs) instead of splits for multi-task mode 2025-06-24 14:00:07 -07:00
Rai (Michael Pokorny) 58975e5db1 create-task-worktree.sh: update usage to accept slug or two-digit ID for multiple tasks 2025-06-24 13:55:19 -07:00
Rai (Michael Pokorny) ad5e28d96a create-task-worktree.sh: allow multiple task IDs when --tmux, correct usage check 2025-06-24 13:52:40 -07:00
Rai (Michael Pokorny) 83ce407baf agentydragon: add Project Manager prompt and launch-project-manager.sh 2025-06-24 13:51:45 -07:00
Rai (Michael Pokorny) c370c0cca6 tasks: add review-unmerged-task-branches.sh wrapper to launch Codex agent 2025-06-24 13:49:10 -07:00
Rai (Michael Pokorny) aa0a4bfba4 update create-task-worktree.sh: add --tmux mode and numeric two-digit ID support 2025-06-24 13:48:27 -07:00
Rai (Michael Pokorny) 12dced2d53 tasks: allow numeric ID only resolving to full slug 2025-06-24 13:41:53 -07:00
Rai (Michael Pokorny) 3fe8b3c5a9 agentydragon(tasks): add Task 16 to require double Ctrl+C for exit confirmation 2025-06-24 13:40:08 -07:00
Rai (Michael Pokorny) 84a4e64bf1 tasks: branch new worktrees off agentydragon instead of master 2025-06-24 13:39:21 -07:00
Rai (Michael Pokorny) 5c62d7d42c agentydragon(tasks): add Task 15 for embedded Neovim prompt editor 2025-06-24 13:38:32 -07:00
Rai (Michael Pokorny) 1df8e3c308 tasks(15): adjust scope to script scaffolding and whitelist tmpdir 2025-06-24 13:36:34 -07:00
Rai (Michael Pokorny) 2e3e115128 agentydragon(tasks): consolidate external script predicates as Python predicates (never expire) 2025-06-24 13:28:28 -07:00
Rai (Michael Pokorny) 3762c71818 agentydragon(tasks): update auto-approve predicates to 3-state vote semantics (deny/allow/no-opinion) 2025-06-24 13:27:03 -07:00
Rai (Michael Pokorny) 4eedb33a1f tasks: add --agent mode to create-task-worktree.sh to spawn codex agent in task workspace 2025-06-24 13:24:10 -07:00
Rai (Michael Pokorny) a527582e32 codex-rs: enable config tests, expose find_codex_home, add auto‑mount repo sandbox logic 2025-06-24 13:21:01 -07:00
Rai (Michael Pokorny) 1c2722335d agentydragon(tasks): add TUI status‑bar indicators to Task 10 for network/mounts/permissions 2025-06-24 13:17:51 -07:00
Rai (Michael Pokorny) 62dda0b041 cli(config): implement 'codex config' subcommand and document it 2025-06-24 13:14:51 -07:00
Rai (Michael Pokorny) 771017c5be agents: point to agentydragon/README.md and define add-task conventions 2025-06-24 13:06:26 -07:00
Rai (Michael Pokorny) 872e89f8e8 gitignore: ignore oaipkg/ artifacts 2025-06-24 13:04:06 -07:00
Rai (Michael Pokorny) a36ab4797c docs(agentydragon): add worktree helper script and branch convention to README 2025-06-24 12:58:46 -07:00
Rai (Michael Pokorny) 481a76458f docs: centralize task list removal and update AGENTS.md guidance 2025-06-24 12:56:42 -07:00
Rai (Michael Pokorny) db8e6f3255 docs(agentydragon): add Task 13 for interactive input during execution 2025-06-24 12:55:29 -07:00
Rai (Michael Pokorny) 489d2db021 docs(agentydragon): add Task 12 for runtime internet toggle 2025-06-24 12:52:57 -07:00
Rai (Michael Pokorny) 52c7328242 docs(agentydragon): add Task 11 for custom approval predicates 2025-06-24 12:50:43 -07:00
Rai (Michael Pokorny) a6050c920b docs: add Cargo installation instructions for codex-rs 2025-06-24 12:35:44 -07:00
Rai (Michael Pokorny) 8d13b6a652 docs: instruct agents to update agentydragon/README.md instead of AGENTS.md 2025-06-24 12:32:35 -07:00
Rai (Michael Pokorny) f84ed7d584 docs: instruct agents to update AGENTS.md with their work summaries 2025-06-24 12:31:38 -07:00
Rai (Michael Pokorny) 32c9c0d23b docs(agentydragon): add README summarizing changes on agentydragon branch 2025-06-24 12:29:42 -07:00
Rai (Michael Pokorny) f2e27c46d6 wip 2025-06-21 06:40:33 -07:00
Rai (Michael Pokorny) 719eb2a0f0 wip 2025-06-21 06:39:27 -07:00
Rai (Michael Pokorny) 65e5d926ab tui session load 2025-06-21 06:38:29 -07:00
Rai (Michael Pokorny) bb19ef1434 botom pane height, restore cmd 2025-06-21 03:49:22 -07:00
Rai (Michael Pokorny) c37d82e3d5 tasks 2025-06-21 03:47:32 -07:00
Rai (Michael Pokorny) e585e6c8cd docs: clarify 'exact command' wording in approval prompts and config 2025-06-21 03:01:47 -07:00
Michael Bolin b73426c1c4 docs: update codex-rs/README.md to list new features in the Rust CLI (#1267)
Let users know about what the Rust CLI supports that the TypeScript CLI
doesn't!
2025-06-06 18:32:10 -07:00
Reilly Wood 345a38502d codex-rs: Rename /clear to /new, make it start an entirely new chat (#1264)
I noticed that `/clear` wasn't fully clearing chat history; it would
clear the chat history widgets _in the UI_, but the LLM still had access
to information from previous messages.

This PR renames `/clear` to `/new` for clarity as per Michael's
suggestion, resetting `app_state` to a fresh `ChatWidget`.
2025-06-06 16:29:37 -07:00
Michael Bolin 029f39b9da feat: port maybeRedeemCredits() from get-api-key.tsx to login_with_chatgpt.py (#1221)
This builds on https://github.com/openai/codex/pull/1212 and ports the
`maybeRedeemCredits()` function from `get-api-key.ts` to
`login_with_chatgpt.py`:


https://github.com/openai/codex/blob/a80240cfdc345a33508333e16560759b2a4abf6d/codex-cli/src/utils/get-api-key.tsx#L84-L89
codex-rs-5fc3c3023d9f179fb416b2722d1434bac278e916-1-rust-v0.0.2506060849
2025-06-05 23:34:10 -07:00
Michael Bolin a80240cfdc chore: ensure next Node.js release includes musl binaries for arm64 Linux (#1232)
Target a workflow with more recent binary artifacts.
2025-06-05 23:14:10 -07:00
Michael Bolin 2d5246050a fix: use aarch64-unknown-linux-musl instead of aarch64-unknown-linux-gnu (#1228)
Now that we have published a GitHub Release that contains arm64 musl
artifacts for Linux, update the following scripts to take advantage of
them:

- `dotslash-config.json` now uses musl artifacts for the `linux-aarch64`
target
- `install_native_deps.sh` for the TypeScript CLI now includes
`codex-linux-sandbox-aarch64-unknown-linux-musl` instead of
`codex-linux-sandbox-aarch64-unknown-linux-gnu` for sandboxing
- `codex-cli/bin/codex.js` now checks for `aarch64-unknown-linux-musl`
artifacts instead of `aarch64-unknown-linux-gnu` ones
codex-rs-ac6e1b2661320a631d80aa51bdfa8f1635e0c8fa-1-rust-v0.0.2506052246
2025-06-05 22:45:45 -07:00
Michael Bolin 77b017f67d fix: truncate auth.json file before rewriting it (#1231)
This was missed in https://github.com/openai/codex/pull/1212. Caught by
@rizwankce in
https://github.com/openai/codex/discussions/1174#discussioncomment-13377475.
codex-rs-121686615fd634e35f3e415896f36908cf8632f9-1-rust-v0.0.2506052203
2025-06-05 22:11:02 -07:00
Michael Bolin c02d25fbad fix: include codex-linux-sandbox-aarch64-unknown-linux-musl in the set of release artifacts (#1230)
This was missed in https://github.com/openai/codex/pull/1225. Once we
create a new GitHub Release with this change, we can use the URL from
the workflow that triggered the release in
https://github.com/openai/codex/pull/1228.
2025-06-05 22:03:07 -07:00
Michael Bolin 9db53b33aa fix: support arm64 build for Linux (#1225)
Users were running into issues with glibc mismatches on arm64 linux. In
the past, we did not provide a musl build for arm64 Linux because we had
trouble getting the openssl dependency to build correctly. Though today
I just tried the same trick in `Cargo.toml` that we were doing for
`x86_64-unknown-linux-musl` (using `openssl-sys` with `features =
["vendored"]`), so I'm not sure what problem we had in the past the
builds "just worked" today!

Though one tweak that did have to be made is that the integration tests
for Seccomp/Landlock empirically require longer timeouts on arm64 linux,
or at least on the `ubuntu-24.04-arm` GitHub Runner. As such, we change
the timeouts for arm64 in `codex-rs/linux-sandbox/tests/landlock.rs`.

Though in solving this problem, I decided I needed a turnkey solution
for testing the Linux build(s) from my Mac laptop, so this PR introduces
`.devcontainer/Dockerfile` and `.devcontainer/devcontainer.json` to
facilitate this. Detailed instructions are in `.devcontainer/README.md`.

We will update `dotslash-config.json` and other release-related scripts
in a follow-up PR.
codex-rs-84eae7b1bc4e3b5420f2d6127b7c17e7a979a5b0-1-rust-v0.0.2506052135
2025-06-05 20:29:46 -07:00
Michael Bolin 515b6331bd feat: add support for login with ChatGPT (#1212)
This does not implement the full Login with ChatGPT experience, but it
should unblock people.

**What works**

* The `codex` multitool now has a `login` subcommand, so you can run
`codex login`, which should write `CODEX_HOME/auth.json` if you complete
the flow successfully. The TUI will now read the `OPENAI_API_KEY` from
`auth.json`.
* The TUI should refresh the token if it has expired and the necessary
information is in `auth.json`.
* There is a `LoginScreen` in the TUI that tells you to run `codex
login` if both (1) your model provider expects to use `OPENAI_API_KEY`
as its env var, and (2) `OPENAI_API_KEY` is not set.

**What does not work**

* The `LoginScreen` does not support the login flow from within the TUI.
Instead, it tells you to quit, run `codex login`, and then run `codex`
again.
* `codex exec` does read from `auth.json` yet, nor does it direct the
user to go through the login flow if `OPENAI_API_KEY` is not be found.
* The `maybeRedeemCredits()` function from `get-api-key.tsx` has not
been ported from TypeScript to `login_with_chatgpt.py` yet:


https://github.com/openai/codex/blob/a67a67f3258fc21e147b6786a143fe3e15e6d5ba/codex-cli/src/utils/get-api-key.tsx#L84-L89

**Implementation**

Currently, the OAuth flow requires running a local webserver on
`127.0.0.1:1455`. It seemed wasteful to incur the additional binary cost
of a webserver dependency in the Rust CLI just to support login, so
instead we implement this logic in Python, as Python has a `http.server`
module as part of its standard library. Specifically, we bundle the
contents of a single Python file as a string in the Rust CLI and then
use it to spawn a subprocess as `python3 -c
{{SOURCE_FOR_PYTHON_SERVER}}`.

As such, the most significant files in this PR are:

```
codex-rs/login/src/login_with_chatgpt.py
codex-rs/login/src/lib.rs
```

Now that the CLI may load `OPENAI_API_KEY` from the environment _or_
`CODEX_HOME/auth.json`, we need a new abstraction for reading/writing
this variable, so we introduce:

```
codex-rs/core/src/openai_api_key.rs
```

Note that `std::env::set_var()` is [rightfully] `unsafe` in Rust 2024,
so we use a LazyLock<RwLock<Option<String>>> to store `OPENAI_API_KEY`
so it is read in a thread-safe manner.

Ultimately, it should be possible to go through the entire login flow
from the TUI. This PR introduces a placeholder `LoginScreen` UI for that
right now, though the new `codex login` subcommand introduced in this PR
should be a viable workaround until the UI is ready.

**Testing**

Because the login flow is currently implemented in a standalone Python
file, you can test it without building any Rust code as follows:

```
rm -rf /tmp/codex_home && mkdir /tmp/codex_home
CODEX_HOME=/tmp/codex_home python3 codex-rs/login/src/login_with_chatgpt.py
```

For reference:

* the original TypeScript implementation was introduced in
https://github.com/openai/codex/pull/963
* support for redeeming credits was later added in
https://github.com/openai/codex/pull/974
2025-06-04 08:44:17 -07:00