Skip to content

Use workspace requirements for guardian prompt override#14727

Merged
charley-oai merged 1 commit intomainfrom
ccunningham/guardian-model-prompt-override
Mar 18, 2026
Merged

Use workspace requirements for guardian prompt override#14727
charley-oai merged 1 commit intomainfrom
ccunningham/guardian-model-prompt-override

Conversation

@charley-oai
Copy link
Collaborator

@charley-oai charley-oai commented Mar 15, 2026

Summary

  • move guardian_developer_instructions from managed config into workspace-managed requirements.toml
  • have guardian continue using the override when present and otherwise fall back to the bundled local guardian prompt
  • keep the generalized prompt-quality improvements in the shared guardian default prompt
  • update requirements parsing, layering, schema, and tests for the new source of truth

Context

This replaces the earlier managed-config / MDM rollout plan.

The intended rollout path is workspace-managed requirements, including cloud enterprise policies, rather than backend model metadata, Statsig, or Jamf-managed config. That keeps the default/fallback behavior local to codex-rs while allowing faster policy updates through the enterprise requirements plane.

This is intentionally an admin-managed policy input, not a user preference: the guardian prompt should come either from the bundled codex-rs default or from enterprise-managed requirements.toml, and normal user/project/session config should not override it.

Updating The OpenAI Prompt

After this lands, the OpenAI-specific guardian prompt should be updated through the workspace Policies UI at /codex/settings/policies rather than through Jamf or codex-backend model metadata.

Operationally:

  • open the workspace Policies editor as a Codex admin
  • edit the default requirements.toml policy, or a higher-precedence group-scoped override if we ever want different behavior for a subset of users
  • set guardian_developer_instructions = """...""" to the full OpenAI-specific guardian prompt text
  • save the policy; codex-backend stores the raw TOML and codex-rs fetches the effective requirements file from /wham/config/requirements

When updating the OpenAI-specific prompt, keep it aligned with the shared default guardian policy in codex-rs except for intentional OpenAI-only additions.

Testing

  • cargo check --tests -p codex-core -p codex-config -p codex-cloud-requirements --message-format short
  • cargo run -p codex-core --bin codex-write-config-schema
  • cargo fmt
  • git diff --check

@charley-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai changed the title Use model-provided guardian prompt overrides Use managed config for guardian prompt overrides Mar 15, 2026
@charley-oai
Copy link
Collaborator Author

@codex review this

1 similar comment
@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40497fe276

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b09018e8e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai force-pushed the ccunningham/guardian-model-prompt-override branch from b01f0f4 to 669c355 Compare March 16, 2026 06:28
@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 669c355e3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai changed the title Use managed config for guardian prompt overrides Use workspace requirements for guardian prompt override Mar 16, 2026
@charley-oai charley-oai force-pushed the ccunningham/guardian-model-prompt-override branch from daaf0a7 to c118813 Compare March 16, 2026 20:30
@charley-oai
Copy link
Collaborator Author

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c118813b93

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai force-pushed the ccunningham/guardian-model-prompt-override branch 2 times, most recently from 2dbd71e to ad34a47 Compare March 18, 2026 01:09
Move guardian_developer_instructions into enterprise-managed requirements.toml,
keep the bundled guardian policy as the default fallback, treat blank
overrides as absent during merge, and keep the guardian prompt sync note
enterprise-generic.

Co-authored-by: Codex <noreply@openai.com>
@charley-oai charley-oai force-pushed the ccunningham/guardian-model-prompt-override branch from 9e815ed to c830857 Compare March 18, 2026 01:57
@charley-oai
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai merged commit 226241f into main Mar 18, 2026
33 checks passed
@charley-oai charley-oai deleted the ccunningham/guardian-model-prompt-override branch March 18, 2026 05:05
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants