Repository navigation
Support Codex 0.167 human approvals and shared unread results - #100
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Active issues reject valid command approvals and mishandle unread-result acknowledgments in web and terminal views, marking unseen results read while leaving deliberately viewed results unread.
7 open issues
Preserve approvals for requests originating in earlier turns · New Mark results read when opening live history from a badge or control · New Remove the global hidden-layout gate for visible partial panes · New Match the full-detail receipt offset to conditional history navigation · New Support read receipts in compact three- and four-row partial panes · New Exclude results clipped by the main content pane from read receipts · New Restore the initial route without treating it as a review gesture · New
What changed in this PR
This PR adds Codex 0.167 managed human approvals and shared unread-result tracking to Codexometer’s terminal and web interfaces.
Changes:
- Supports one-time human approval decisions, capability negotiation, and localized policy explanations.
- Uses durable Codex read receipts to distinguish unread completions and acknowledge deliberate review actions.
- Adds compatibility and interaction regressions, updates documentation, and refreshes browser contracts and embedded styles.
| File | Description |
|---|---|
web/tests/browser.spec.ts |
Adds unread-result and managed-approval browser tests. |
web/src/state.svelte.ts |
Enables read-receipt control requests. |
web/src/Sessions.svelte |
Adds review gestures and reviewed-completion styling. |
web/src/SessionActions.svelte |
Displays managed human approval guidance. |
web/src/contracts.generated.ts |
Adds approval and receipt fields to browser contracts. |
README.md |
Documents approvals, unread results, and compatibility checks. |
internal/web/state.go |
Projects approval and read-state information for browsers. |
internal/web/server.go |
Configures approval support and registers the read endpoint. |
internal/web/dist/index.html |
References refreshed embedded assets. |
internal/web/dist/assets/index-Ei3sATy3.css |
Removes the previous stylesheet bundle. |
internal/web/dist/assets/index-DYxZORQa.css |
Adds the updated bundle with reviewed-result styling. |
internal/web/control.go |
Connects read receipts and managed approval metadata. |
internal/web/control_read.go |
Validates and processes browser acknowledgements. |
internal/web/control_read_test.go |
Tests acknowledgement authorization and freshness checks. |
internal/ui/monitor.go |
Subdues reviewed completion badges. |
internal/ui/monitor_summary.go |
Filters reviewed completion pills and records review intent. |
internal/ui/monitor_read.go |
Handles terminal review gestures and receipt updates. |
internal/ui/monitor_read_test.go |
Tests deliberate review and receipt preservation. |
internal/ui/monitor_history.go |
Records review intent during history navigation. |
internal/ui/monitor_detail.go |
Adds localized managed-policy guidance. |
internal/ui/monitor_detail_test.go |
Tests managed approval presentation. |
internal/ui/monitor_copy.go |
Reuses shared partial-pane geometry. |
internal/ui/monitor_context.go |
Adds approval headings and review-intent hooks. |
internal/ui/monitor_context_modes.go |
Shares pane geometry and tracks detail-opening intent. |
internal/ui/model.go |
Enables human approvals and preserves observed read state. |
internal/i18n/locales/zh-Hans.json |
Adds Simplified Chinese approval text. |
internal/i18n/locales/tr.json |
Adds Turkish approval text. |
internal/i18n/locales/sv.json |
Adds Swedish approval text. |
internal/i18n/locales/ru.json |
Adds Russian approval text. |
internal/i18n/locales/pt-PT.json |
Adds European Portuguese approval text. |
internal/i18n/locales/pt-BR.json |
Adds Brazilian Portuguese approval text. |
internal/i18n/locales/nl.json |
Adds Dutch approval text. |
internal/i18n/locales/nb.json |
Adds Norwegian Bokmål approval text. |
internal/i18n/locales/ja.json |
Adds Japanese approval text. |
internal/i18n/locales/it.json |
Adds Italian approval text. |
internal/i18n/locales/fr.json |
Adds French approval text. |
internal/i18n/locales/fi.json |
Adds Finnish approval text. |
internal/i18n/locales/et.json |
Adds Estonian approval text. |
internal/i18n/locales/es.json |
Adds Spanish approval text. |
internal/i18n/locales/en-GB.json |
Adds canonical English approval text. |
internal/i18n/locales/de.json |
Adds German approval text. |
internal/i18n/locales/da.json |
Adds Danish approval text. |
internal/codex/session_settings_unix_test.go |
Extends daemon fixtures for receipts and capabilities. |
internal/codex/session_read_state.go |
Defines optional read-state parsing and client access. |
internal/codex/session_read_state_unix.go |
Observes receipts and validates acknowledgement writes. |
internal/codex/session_read_state_unix_test.go |
Tests persistence, conflicts, and stale-result rejection. |
internal/codex/session_human_approval_test.go |
Tests checkpoint identity and one-time decisions. |
internal/codex/session_history_unix_test.go |
Tests final-reply retention after commentary eviction. |
internal/codex/session_context.go |
Adds managed human approval metadata. |
internal/codex/session_context_daemon.go |
Parses and validates human command checkpoints. |
internal/codex/session_approval.go |
Exposes human approval capability configuration. |
internal/codex/session_approval_unix.go |
Rejects reusable grants for human checkpoints. |
internal/codex/session_approval_unix_test.go |
Tests capability negotiation and response restrictions. |
internal/codex/session_167_test.go |
Tests independent network-request expiry. |
internal/codex/live_usage.go |
Carries read state into live session snapshots. |
internal/codex/daemon_status.go |
Adds read states to daemon snapshots. |
internal/codex/daemon_status_unix.go |
Integrates receipt observation and approval negotiation. |
internal/codex/daemon_native_unix_test.go |
Allows Codex 0.167.0 in the native smoke check. |
internal/codex/client.go |
Centralizes optional session-capability lookup. |
internal/codex/approval_options.go |
Identifies permitted one-time approval decisions. |
Review effort: Balanced
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Codex 0.167 can require a fresh human command decision that Codexometer currently cannot receive. Completed results also keep the same presentation after being reviewed. This PR adds managed command approval support and uses Codex's durable read receipts to distinguish reviewed completions from new results.
Scope
Managed human approvals
requiredHumanApprovalonly from the terminal and writable web mode. Passive observers and read-only web mode remain ineligible for these requests.accept,declineandcanceldecisions. Reject reusable grants again at the response boundary. Each request retains its own connection-bound, single-use capability.--no-confirmremoves the extra step while still requiring an explicit human action for every request.Shared unread results
thread/readState/changed. Codex owns persistence and sharing with supported native clients; Codexometer keeps only bounded observations in memory.thread/readState/updatewith the viewedexpectedRevisionon the original connection. New results, conflicts and disconnects prevent stale acknowledgements; writes are not automatically retried.Codex 0.167 compatibility
Upstream references: managed checkpoints, native unread acknowledgement, network prompt expiry, live history retention.
Validation
go vet ./..., Windows application build and Windows terminal-test compilation pass.The native smoke check covers transport interoperability. Managed approvals and read-state races use daemon fixtures and browser mocks; this is not a live managed-policy/model-turn integration test.