codex - 💡(How to fix) Fix TUI compile break: missing AppCommand::add_to_history [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21394Fetched 2026-05-07 03:40:42
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×3closed ×1commented ×1cross-referenced ×1

Current origin/main fails to compile codex-tui with Cargo because BottomPane::clear_composer_for_ctrl_c calls AppCommand::add_to_history(text), but AppCommand does not define an AddToHistory variant or constructor.

Error Message

error[E0599]: no variant or associated item named add_to_history found for enum app_command::AppCommand in the current scope

Root Cause

Current origin/main fails to compile codex-tui with Cargo because BottomPane::clear_composer_for_ctrl_c calls AppCommand::add_to_history(text), but AppCommand does not define an AddToHistory variant or constructor.

Fix Action

Fix / Workaround

Patch

I have a small patch here:

Code Example

cargo test -p codex-tui slash_clear_after_ctrl_c_keeps_stashed_draft_recallable

---

error[E0599]: no variant or associated item named `add_to_history` found for enum `app_command::AppCommand` in the current scope

---

cargo test -p codex-tui slash_clear_after_ctrl_c_keeps_stashed_draft_recallable
cargo fmt --check
git diff --check
RAW_BUFFERClick to expand / collapse

Summary

Current origin/main fails to compile codex-tui with Cargo because BottomPane::clear_composer_for_ctrl_c calls AppCommand::add_to_history(text), but AppCommand does not define an AddToHistory variant or constructor.

Reproduction

Checked against origin/main at 123ec8b035.

cargo test -p codex-tui slash_clear_after_ctrl_c_keeps_stashed_draft_recallable

The build fails with:

error[E0599]: no variant or associated item named `add_to_history` found for enum `app_command::AppCommand` in the current scope

Patch

I have a small patch here:

https://github.com/openai/codex/compare/main...misrtjakub:fix/tui-add-to-history-command?expand=1

It adds AppCommand::AddToHistory, the constructor used by the bottom pane, and handles the op by appending to local message history instead of falling through as an unsupported app-server operation.

Validation

cargo test -p codex-tui slash_clear_after_ctrl_c_keeps_stashed_draft_recallable
cargo fmt --check
git diff --check

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix TUI compile break: missing AppCommand::add_to_history [1 comments, 2 participants]