Skip to content

feat: add trusted project instructions mode#102

Open
caseysilver-oai wants to merge 1 commit into
openai:mainfrom
caseysilver-oai:caseysilver/trusted-project-instructions-mode
Open

feat: add trusted project instructions mode#102
caseysilver-oai wants to merge 1 commit into
openai:mainfrom
caseysilver-oai:caseysilver/trusted-project-instructions-mode

Conversation

@caseysilver-oai
Copy link
Copy Markdown

@caseysilver-oai caseysilver-oai commented May 11, 2026

Summary

  • add opt-in project-instructions-mode: default-branch while preserving the existing workspace behavior when the input is omitted
  • fetch trusted default-branch AGENTS.override.md / AGENTS.md files for the path to working-directory, write them into CODEX_HOME, and suppress checked-out project-doc discovery for that Codex run
  • force projects={} in the opt-in safe mode so project-local .codex/config.toml is not loaded even if a reused Codex home previously trusted the repo
  • reject codex-home values inside the GitHub workspace in the opt-in safe mode so PR-controlled repository files cannot become Codex user config
  • preserve existing global Codex instructions when trusted project instructions are injected

Why

When codex-action evaluates pull request-controlled repository contents, branch-local project instruction files can become part of the model-visible instruction channel. Project-local Codex config can do the same when the checkout is considered trusted. This change adds a hardened opt-in mode for workflows that want trusted default-branch instructions, while keeping existing action behavior unchanged unless users explicitly enable it.

Validation

  • pnpm run check
  • pnpm test

@caseysilver-oai caseysilver-oai force-pushed the caseysilver/trusted-project-instructions-mode branch from 679468d to 81ab153 Compare May 11, 2026 21:08
@caseysilver-oai caseysilver-oai force-pushed the caseysilver/trusted-project-instructions-mode branch from 81ab153 to 387fd74 Compare May 11, 2026 21:24
@caseysilver-oai caseysilver-oai marked this pull request as ready for review May 11, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant