TUI compile break: missing AppCommand::add_to_history

Resolved 💬 1 comment Opened May 6, 2026 by misrtjakub Closed May 7, 2026

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

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗