Codex CLI Adds OSC 777 Terminal Notifications and Clearer Approval Prompts

CodexView original changelog

Codex CLI 0.168.0 lets developers set tui.notification_method = "osc777" for terminal notifications. In the same change, approval notifications show longer command previews and now distinguish terminal input from network access requests.

Key Takeaways

  • tui.notification_method = "osc777" enables terminal notifications through the OSC 777 escape sequence.
  • Approval notifications show longer command previews, so commands are easier to judge before approving.
  • Approvals now distinguish terminal input requests from network access requests.
  • Developers can be notified when Codex needs them instead of watching the session.
  • The clearer prompts reduce the risk of approving something other than what was intended.
  • It shipped in pull request #59256 in Codex CLI 0.168.0.

OSC 777 notifications

Codex CLI 0.168.0 adds osc777 as a value for the tui.notification_method setting. OSC 777 is a widely supported terminal escape sequence for desktop notifications, so developers whose terminal speaks it can be notified when Codex needs them, rather than watching the session.

Clearer approval prompts

The same change improves the approval notifications themselves in two ways. They now show longer command previews, so a developer can see enough of a command to judge it instead of a truncated fragment. They also distinguish a request for terminal input from a request for network access, which are two very different things to approve.

Why it matters

Approvals are the main point at which an agent waits on a human, and they are the point where a misread prompt has consequences. A longer preview and an explicit distinction between input and network requests both reduce the chance of approving something other than what was intended. The work shipped in pull request #59256.