codex can not auto run go test with chromedp
Resolved 💬 3 comments Opened Jan 28, 2026 by bronze1man Closed Feb 6, 2026
What version of Codex is running?
codex-cli 0.92.0
What subscription do you have?
ChatGPT Business
Which model were you using?
gpt-5.2-codex
What platform is your computer?
Darwin 24.1.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
iTerm2
What issue are you seeing?
In a Codex CLI session running a Go test that uses chromedp, Chrome fails to start. A minimal chromedp smoke test in tests/chromedp_test fails with chromedp run
failed: chrome failed to start. In the same repo, go test -v -count=1 ./tests/reflect_test fails with a panic from chromedp startup.
What steps can reproduce the bug?
- Start Codex CLI in repo xxx.
- Ask Codex to run: go test -v -count=1 ./tests/chromedp_test.
- Observe failure: chromedp run failed: chrome failed to start.
content of tests/chromedp_test/chromedp_smoke_test.go
package chromedp_test
import (
"context"
"testing"
"time"
"github.com/chromedp/chromedp"
)
func TestChromeDpSmoke(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
defer cancel()
allocCtx, allocCancel := chromedp.NewExecAllocator(ctx, chromedp.DefaultExecAllocatorOptions[:]...)
defer allocCancel()
bctx, bcancel := chromedp.NewContext(allocCtx)
defer bcancel()
var title string
err := chromedp.Run(
bctx,
chromedp.Navigate("data:text/html,<html><head><title>ok</title></head><body>ok</body></html>"),
chromedp.Title(&title),
)
if err != nil {
t.Fatalf("chromedp run failed: %v", err)
}
if title != "ok" {
t.Fatalf("unexpected title: %q", title)
}
}
chromedp version. (part of go.mod)
github.com/chromedp/cdproto v0.0.0-20240202021202-6d0b6a386732 // indirect
github.com/chromedp/chromedp v0.9.5 // indirect
github.com/chromedp/sysutil v1.0.0 // indirect
What is the expected behavior?
Chromedp should launch Chrome and the smoke test should pass (title is ‘ok’). The test completes successfully when run outside of Codex on my machine.
Additional information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗