Skip to content

Quietly truncate extra default prompts #30262

Open

Description

@MadKangYu

Verified fix branch

I prepared a tested fix branch here:

main...MadKangYu:codex:lazycodex/defaultprompt-truncate-quietly

The branch changes codex-rs/core-plugins/src/manifest.rs so interface.defaultPrompt arrays are still truncated to three prompts, but an otherwise valid fourth prompt no longer emits:

ignoring interface.defaultPrompt: maximum of 3 prompts is supported

Invalid prompt entries still warn and are ignored.

Reproduction

Failing-before test added on 2026-06-27:

just test -p codex-core-plugins plugin_interface_truncates_default_prompt_array_without_warning

Before the fix, that test failed because the fourth valid prompt caused the warning above.

Verification

  • just fmt
  • just fix -p codex-core-plugins
  • just test -p codex-core-plugins plugin_interface_truncates_default_prompt_array_without_warning
  • just test -p codex-core-plugins plugin_interface_normalizes_default_prompt_array
  • just test -p codex-core-plugins does_not_reload_marketplace_per_plugin
  • HOME=/tmp/lazycodex-clean-home-TfSVLP CODEX_HOME=/tmp/lazycodex-clean-home-TfSVLP/.codex just test -p codex-core-plugins

The clean-home crate run passed all 298 tests.

Note: I attempted to open the PR directly against openai/codex, but GitHub rejected both the GraphQL and REST PR creation paths for this account. The branch is pushed and ready for PR creation from the compare URL above.

Tag: lazycodex-generated

Activity

  1. added
    bug
    skills
    on Jun 26, 2026
  2. Nicolas0315 commented on Jun 26, 2026

    @Nicolas0315

    I also put up an equivalent candidate branch from current main:

    https://github.com/openai/codex/compare/main...Nicolas0315:codex/default-prompt-quiet-truncate?expand=1

    What changed:

    • interface.defaultPrompt arrays still retain only the first three valid prompts.
    • Extra valid prompts after the cap are ignored quietly instead of emitting maximum of 3 prompts is supported.
    • Invalid prompt entries still go through the existing validation/warning path.
    • Added a regression test with four valid prompts that asserts the retained prompts are the first three and the old cap warning is absent.

    Local verification on rtx4090 at commit 36f57494c:

    • just fmt
    • git diff --check
    • cargo test --manifest-path codex-rs\Cargo.toml -p codex-core-plugins plugin_interface_truncates_default_prompt_array_without_warning -- --nocapture
    • cargo test --manifest-path codex-rs\Cargo.toml -p codex-core-plugins plugin_interface_normalizes_default_prompt_array -- --nocapture
    • cargo test --manifest-path codex-rs\Cargo.toml -p codex-core-plugins does_not_reload_marketplace_per_plugin -- --nocapture
    • cargo check --manifest-path codex-rs\Cargo.toml -p codex-core-plugins

    I also tried the full crate run locally. It failed in manager::tests::skills_service_reuses_skills_parsed_during_plugin_load because this Codex Desktop session exposes local Foundry/Lottie skills into the test snapshot; the same failure reproduced with clean HOME/CODEX_HOME, so I treated that as ambient to this environment and used the focused tests above for this patch.

    SSH validation:

    • cyberagent-mac-m5max: fetched 36f57494c; DIFF_CHECK_OK; three focused tests passed; CARGO_CHECK_OK.
    • nicolas2025: fetched 36f57494c; DIFF_CHECK_OK; three focused tests passed; CARGO_CHECK_OK; no lingering cargo/rustc/link processes.
    • nicolas-macbook-pro: fetched 36f57494c; DIFF_CHECK_OK; Cargo unavailable on that host, so this was diff-only.
    • rtx5060ti: fetched 36f57494c; DIFF_CHECK_OK; Cargo blocked by the host's known linker setup issue (link: extra operand ..., exit 101) before crate code compiles; no lingering cargo/rustc/link processes.

    After validation, upstream main advanced to 6509f3148; git merge-tree --write-tree origin/main HEAD is clean, so I left the SSH-validated commit unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugskills

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions