Skip to content

[codex] Warn clearly when code mode output is truncated#28467

Merged
aibrahim-oai merged 1 commit into
mainfrom
codex/warn-on-truncated-output
Jun 16, 2026
Merged

[codex] Warn clearly when code mode output is truncated#28467
aibrahim-oai merged 1 commit into
mainfrom
codex/warn-on-truncated-output

Conversation

@aibrahim-oai

@aibrahim-oai aibrahim-oai commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make formatted_truncate_text prepend Warning: truncated output (original token count: N) above the existing Total output lines header
  • update direct formatter, unified-exec, user-shell, and code-mode expectations
  • add core unit coverage that runs in Bazel without requiring the skipped V8-backed code-mode integration suite

Validation

  • cargo test -p codex-utils-output-truncation -- --nocapture (17 passed)
  • cargo test -p codex-core --lib truncated_text_output_starts_with_warning -- --nocapture
  • cargo test -p codex-core --test all clamps_model_requested_max_output_tokens_to_policy -- --nocapture (2 passed)
  • cargo test -p codex-core --test all unified_exec_formats_large_output_summary -- --nocapture
  • cargo test -p codex-core --test all user_shell_command_output_is_truncated_in_history -- --nocapture
  • Bazel CI exercises the shared formatter and downstream integration expectations

@aibrahim-oai
aibrahim-oai force-pushed the codex/warn-on-truncated-output branch from abfbc54 to e836c4a Compare June 16, 2026 06:44
@aibrahim-oai
aibrahim-oai changed the base branch from main to codex/fix-code-mode-output-budgets June 16, 2026 06:45
@aibrahim-oai
aibrahim-oai force-pushed the codex/warn-on-truncated-output branch from e836c4a to 7a2b050 Compare June 16, 2026 15:42
@aibrahim-oai
aibrahim-oai changed the base branch from codex/fix-code-mode-output-budgets to main June 16, 2026 15:42
@aibrahim-oai
aibrahim-oai force-pushed the codex/warn-on-truncated-output branch from 7a2b050 to f35b6f7 Compare June 16, 2026 15:48
@aibrahim-oai
aibrahim-oai marked this pull request as ready for review June 16, 2026 15:57
@aibrahim-oai
aibrahim-oai requested a review from a team as a code owner June 16, 2026 15:57
@aibrahim-oai
aibrahim-oai force-pushed the codex/warn-on-truncated-output branch from f35b6f7 to cd5d2e5 Compare June 16, 2026 16:03

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

Copy link
Copy Markdown
Contributor

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: f35b6f7dca

ℹ️ 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/utils/output-truncation/src/lib.rs Outdated
@aibrahim-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@aibrahim-oai
aibrahim-oai merged commit 9526563 into main Jun 16, 2026
31 checks passed
@aibrahim-oai
aibrahim-oai deleted the codex/warn-on-truncated-output branch June 16, 2026 17:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 16, 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