Skip to content

Commit af01dbe

Browse files
authored
Detect Codex in is_llm() (#2352)
Fixes #2317
1 parent 09dcd88 commit af01dbe

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎R/reporter-llm.R‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#' occur and the total number of successes at the end.
77
#'
88
#' `LlmReporter` is used by default when tests are run by a coding agent.
9-
#' Currently we detect Claude Code, Cursor, and Gemini CLI.
9+
#' Currently we detect Claude Code, Codex, Cursor, and Gemini CLI.
1010
#' If using another tool, configure it to set env var `AGENT=1`.
1111
#'
1212
#' @export
@@ -91,5 +91,6 @@ is_llm <- function() {
9191
nzchar(Sys.getenv("AGENT")) ||
9292
nzchar(Sys.getenv("CLAUDECODE")) ||
9393
nzchar(Sys.getenv("GEMINI_CLI")) ||
94-
nzchar(Sys.getenv("CURSOR_AGENT"))
94+
nzchar(Sys.getenv("CURSOR_AGENT")) ||
95+
nzchar(Sys.getenv("CODEX_CI"))
9596
}

‎man/LlmReporter.Rd‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)