Skip to content

FIX: honour Codex 0.170 reply display instructions in Sessions - #110

Merged
merefield merged 5 commits into
mainfrom
compat/codex-0.170
Nov 19, 2026
Merged

merefield merged 5 commits into
mainfrom
compat/codex-0.170

Conversation

@merefield

Copy link
Copy Markdown
Owner

Why

Codex 0.170.0 can deliver the original answer text alongside instructions to hide, block or specially present it. Reading only the text can expose it in a Sessions preview, copied answer or read-only browser response. This PR handles that contract without raising the minimum supported Codex version.

Changes

  • Apply the same display decision at the data boundary for live item and turn notifications, bounded history reads and local rollouts (including compressed histories). Unsupported or restricted presentations use “View this reply in Codex.” Ordinary replies still stream.
  • Carry the decision across completion mirrors, reconnects and pinned terminal history. A truncated local tail alone is not authority to display an orphaned reply. A decision cannot recall output already delivered before it arrived.
  • Exercise consecutive Guardian reviews on the same thread, including replay and disconnect/reconnect, without exposing reviewer prose or changing existing quota accounting or API pricing.
  • Add 0.170.0 to the opt-in native socket test and update the README and pinned slash-command audit. No new slash commands, minimum-version change, Sessions filter, or saved-session search.

Verification

  • Tested against the installed Codex 0.170.0 app-server in a temporary Codex home: compression negotiation, RPC round trips and provider selection; no account or model turn required.
  • Added regressions for versioned/unknown display decisions, late decisions, cached history and clipboard, rollout replay, the actual serialized read-only web state, and Guardian accounting.
  • All four production duplication measurements remain at the existing baseline.

Codex 0.170.0 release · Answer display contract · Guardian history reuse

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Approval is blocked by an active history-revocation bug that can leave stale plaintext replies accessible, along with an untranslated UI notice in non-English sessions.

2 open issues
What changed in this PR

This pull request adds Codex 0.170 answer-display handling across Sessions live updates, history, rollouts, reconnects, clipboard content, and read-only web projections, replacing restricted or unsupported replies with a safe notice while preserving ordinary streaming and usage accounting.

Changes:

  • Parses and propagates display decisions across daemon events, native history, local and compressed rollouts, reconnects, and cached UI state.
  • Adds regression coverage for replay, truncation, Guardian reviews, native compatibility, and browser projections.
  • Updates README documentation and the pinned slash-command audit for Codex 0.170.0.
File Description
README.md Documents restricted-reply behavior and adds Codex 0.170 native-test instructions.
internal/​web/​control_test.go Verifies restricted replies are absent from serialized read-only browser state.
internal/​ui/​monitor_history.go Propagates reply restrictions through cached, pinned, and refreshed monitor history.
internal/​ui/​monitor_history_test.go Tests clipboard and live-mirror redaction after history restrictions.
internal/​ui/​model.go Preserves reply-protection decisions when applying live monitor observations.
internal/​codex/​session_history.go Applies display restrictions to bounded history results and local mirrors.
internal/​codex/​session_history_unix.go Reads moderation metadata from native bounded-history responses.
internal/​codex/​session_history_unix_test.go Tests history restrictions surviving disconnects and replay.
internal/​codex/​session_context.go Parses rollout moderation events and prevents unsafe truncated-tail recovery.
internal/​codex/​session_context_daemon.go Tracks display restrictions across live item, delta, and turn notifications.
internal/​codex/​live_usage.go Carries answer guards across daemon snapshots, reconnects, and rollout replacement.
internal/​codex/​live_usage_guardian_test.go Covers Guardian thread reuse and quota accounting across reconnects.
internal/​codex/​live_usage_compressed.go Preserves answer-protection state for compressed rollout histories.
internal/​codex/​daemon_status.go Adds answer guards to daemon snapshots.
internal/​codex/​daemon_status_unix.go Exports per-thread answer guards from native daemon state.
internal/​codex/​daemon_native_unix_test.go Adds Codex 0.170 native socket compatibility coverage.
internal/​codex/​answer_display.go Implements display-decision parsing, answer guards, and the fallback notice.
internal/​codex/​answer_display_test.go Tests display decisions, replay protection, truncation, and restart behavior.
docs/​slash-command-support.md Updates the pinned upstream slash-command audit to Codex 0.170.0.

Review effort: Lite

Comment thread internal/ui/monitor_history.go Resolved
Comment thread internal/codex/answer_display.go Resolved
@merefield
merefield merged commit d65e6db into main Nov 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants