feat(tui): show context used in plan implementation prompt#18573
Merged
fcoury-oai merged 3 commits intomainfrom Apr 19, 2026
Merged
feat(tui): show context used in plan implementation prompt#18573fcoury-oai merged 3 commits intomainfrom
fcoury-oai merged 3 commits intomainfrom
Conversation
Show context usage on the clear-context implementation option so users can see why starting fresh may help. Keep the prompt scoped to Plan mode and display used context instead of remaining context.
Explain why the plan implementation prompt reports context used while ambient footer status continues to report context remaining. Document that the popup builder only owns display copy, not token accounting.
Add parameter comments to the plan implementation context usage test so anonymous numeric literals satisfy the argument comment lint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a user finishes planning, the TUI asks whether to implement in the current conversation or start fresh with the approved plan. The clear-context choice is easier to evaluate when the prompt shows how much context has already been used, because the user can see when carrying the full prior conversation is likely to be less useful than preserving only the plan.
This PR adds that context signal directly to the clear-context option while keeping the copy compact enough for the Plan-mode selection popup.
What Changed
Yes, clear context and implement, where it informs the cleanup decision.Testing
cargo test -p codex-tui plan_implementationNotes
The footer continues to show context remaining as ambient status. The implementation prompt intentionally shows context used because the user is choosing whether to clean up the current thread before implementation.