Skip to content

feat(next-prompt): add suggestion engine [1 of 3]#24126

Open
fcoury-oai wants to merge 9 commits into
mainfrom
fcoury/next-suggestion-core
Open

feat(next-prompt): add suggestion engine [1 of 3]#24126
fcoury-oai wants to merge 9 commits into
mainfrom
fcoury/next-suggestion-core

Conversation

@fcoury-oai
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai commented May 22, 2026

Why

The next-prompt feature needs a small core-owned suggestion engine before any app-server API or TUI wiring can depend on it. Keeping this layer separate lets reviewers evaluate the prompt construction, suppression rules, and context extraction without schema or UI noise.

What changed

  • Add codex_core::next_prompt_suggestion for prompt construction, output filtering, and suppression of weak or unsafe suggestions.
  • Add lightweight loaded-history turn context helpers used by the suggestion engine.
  • Expose the core helper through CodexThread without adding app-server protocol or TUI behavior in this PR.

Testing

  • cargo test -p codex-core next_prompt_suggestion
  • CARGO_TARGET_DIR=/private/tmp/codex-next-suggestion-stack-target ./tools/argument-comment-lint/run.py -p codex-core -p codex-app-server-protocol -p codex-app-server -p codex-tui

Stack

  1. feat(next-prompt): add suggestion engine [1 of 3] #24126 next-prompt suggestion engine (this PR)
  2. #24127 next-prompt app-server RPC
  3. #23976 next-prompt TUI

Copy link
Copy Markdown
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: b05999569c

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
@fcoury-oai fcoury-oai changed the title feat(next-prompt): add suggestion engine feat(next-prompt): add suggestion engine [1 of 3] May 22, 2026
@fcoury-oai fcoury-oai force-pushed the fcoury/next-suggestion-core branch from b059995 to 67e04fa Compare May 22, 2026 19:25
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
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: 67e04fa8bd

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
@fcoury-oai fcoury-oai force-pushed the fcoury/next-suggestion-core branch from 67e04fa to 5ea7930 Compare May 22, 2026 20:16
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
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: 5ea7930ea5

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
@fcoury-oai fcoury-oai force-pushed the fcoury/next-suggestion-core branch from 5ea7930 to 6bde0ac Compare May 22, 2026 22:15
@fcoury
Copy link
Copy Markdown
Contributor

fcoury commented May 22, 2026

@codex review

Copy link
Copy Markdown
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: 6bde0aca71

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
@fcoury-oai fcoury-oai force-pushed the fcoury/next-suggestion-core branch 2 times, most recently from 87aa4e1 to d10d107 Compare May 22, 2026 22:57
@fcoury
Copy link
Copy Markdown
Contributor

fcoury commented May 22, 2026

@codex review

@fcoury-oai fcoury-oai force-pushed the fcoury/next-suggestion-core branch from d10d107 to a0d7b8e Compare May 22, 2026 23:01
Copy link
Copy Markdown
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: a0d7b8e4cd

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
@fcoury
Copy link
Copy Markdown
Contributor

fcoury commented May 22, 2026

@codex review

Copy link
Copy Markdown
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: 2da3ea1c10

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
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: 1c5aff3b82

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
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: 374560d16f

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
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: 3a7434cae4

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
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: e07878eda5

ℹ️ 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".

Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
Comment thread codex-rs/core/src/next_prompt_suggestion.rs Outdated
@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Security review completed. No security issues were found in this pull request.

View security finding report

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

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

ℹ️ 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".

@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
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: 4711e33215

ℹ️ 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".

Comment thread codex-rs/core/src/context/contextual_user_message.rs Outdated
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
Comment thread codex-rs/core/src/next_prompt_suggestion.rs
@fcoury-oai
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

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

ℹ️ 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".

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.

2 participants