Skip to content
Merged
31 changes: 31 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,37 @@ on Linux, Windows, and macOS.

Do not rerun passing checks on unchanged code merely for additional confidence.

## Minimal containers and agent sandboxes

Fresh dev containers and agent sandboxes (Cursor Cloud, devcontainers, CI
images) often ship Node but not Bun. Install it first:

```bash
curl -fsSL https://bun.sh/install | bash # installs ~/.bun/bin/bun
export PATH="$HOME/.bun/bin:$PATH"
bun install && (cd gui && bun install)
```

Run the proxy with `bun run src/cli/index.ts start --port <port>`. `/healthz`
reports status, `/` serves the dashboard, and the management API requires the
admin token the server writes to `$OPENCODEX_HOME/admin-api-token` at startup.
Comment on lines +216 to +218

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the default admin-token path

In the fresh-container scenario described here, OPENCODEX_HOME is normally unset, while getConfigDir() falls back to ~/.opencodex. An agent following this text literally will therefore look for /admin-api-token after shell expansion instead of the actual ~/.opencodex/admin-api-token and will be unable to authenticate direct management API requests. State both the default path and the environment-variable override.

Useful? React with 👍 / 👎.


`bun run test` has five known environment-only failures in such containers.
They are not regressions; do not re-investigate them:

- `service diagnostics > status summary exposes the service log path`,
`CLI subcommand help > status prints diagnostics without starting the proxy`,
and `CLI subcommand help > invalid service and codex-shim usage include
remove alias` require a running systemd init; in a container PID 1 is
typically `tini` or another minimal init, so service commands report
"systemd not found".
- `package tree integrity > an in-place rewrite of the same byte length is
still a replacement` and `Codex Log Guard inspection > repeat inspection is
memoized and invalidated by a write` rely on filesystem mtime granularity
that some container filesystems do not provide.
Comment on lines +229 to +232

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not dismiss guard failures as container-only

On filesystems whose modification timestamp does not advance for these writes, the failures demonstrate real runtime behavior rather than harmless test flakiness: createPackageTreeIntegrityGuard cannot detect a same-size in-place package replacement, and the Codex log inspection cache can return stale metrics after a database write. Telling agents not to investigate these failures can therefore hide broken integrity and cache-invalidation guarantees; fix or explicitly disable the unsupported runtime behavior instead of treating the tests as known-safe failures.

AGENTS.md reference: AGENTS.md:L325-L327

Useful? React with 👍 / 👎.


Everything else passes (15480 pass / 16 skip / 5 fail as of 2.35.0).

## Issues and pull requests (agents)

Agent-created issues and PRs must use the repository templates. The gates
Expand Down
Loading