Skip to content

Add optional tool output rendering for context window hints - #61452

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e1a7089935bd0aed44ffd15f0ae3ec41a2607218
Nov 14, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e1a7089935bd0aed44ffd15f0ae3ec41a2607218

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Add optional tool output rendering for context window hints

What changed

Add the token-budget setting context_window_as_tool_output, defaulting to false. When enabled, render agent identity, context window IDs, and associated hints as an agent.thread_hint tool output. Use the same format for agent identity updates in forked threads.

Preserve this setting when applying model token-budget defaults without treating it as an explicit budget override.

Testing

Update fork scenario snapshots to cover tool output rendering, including a child agent's window hint after its inherited parent context and a prediction fork above the compaction threshold.

## What changed

Add the token-budget setting `context_window_as_tool_output`, defaulting to `false`. When enabled, render agent identity, context window IDs, and associated hints as an `agent.thread_hint` tool output. Use the same format for agent identity updates in forked threads.

Preserve this setting when applying model token-budget defaults without treating it as an explicit budget override.

## Testing

Update fork scenario snapshots to cover tool output rendering, including a child agent's window hint after its inherited parent context and a prediction fork above the compaction threshold.

GitOrigin-RevId: e1a7089935bd0aed44ffd15f0ae3ec41a2607218
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/e1a7089935bd0aed44ffd15f0ae3ec41a2607218 branch from d387a5b to c2c1ebb Compare November 14, 2026 02:56
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-14T02:56:07.867607Z d387a5b PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit c2c1ebb into main Nov 14, 2026
11 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/e1a7089935bd0aed44ffd15f0ae3ec41a2607218 branch November 14, 2026 02:56
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — c2c1ebba Deployed Nov 14, 2026 by z1768 via Translate non-English issue #25984
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.

5 participants