Skip to content

feat(mac): add opt-in reminders for native main-session attention - #768

Open
Danielweng0902 wants to merge 1 commit into
Louis-CFM:mainfrom
Danielweng0902:feat/main-session-attention
Open

Danielweng0902 wants to merge 1 commit into
Louis-CFM:mainfrom
Danielweng0902:feat/main-session-attention

Conversation

@Danielweng0902

Copy link
Copy Markdown

Codex Desktop's built-in questions and OpenCode 2's native permissions can wait for the user without producing a usable Coucou reminder. This adds an experimental, opt-in Mac reminder that shows the chat and reason, then opens the native app to respond. Main sessions only is the default; verified child sessions can be included explicitly. Coucou never answers or approves from this card.

The feature is off by default. When enabled, Codex PermissionRequest hooks immediately defer to native handling and become transcript-verified hints; progress/completion still use the existing pipeline. A stdlib Python reader observes local Codex transcripts and GET-only OpenCode loopback pending lists. It uses kqueue source events, bounded reads, active-session refreshes, expiring snapshots, deduplication and bounded restart backoff. Service authentication stays local and is never logged. The App Store target does not ship the reader.

Validation:

  • 31 reader tests, 10 real kqueue tests, Swift queue/policy assertions, plus existing approval, question, session-registry and auto-close suites passed.
  • NotchBuddy and CoucouAppStore Debug builds passed; project.yml was regenerated with XcodeGen. Regeneration also brings previously unlisted existing sources into the checked-in project; those sources are unchanged.
  • Isolated compiled app/socket: a real question in the main Codex Desktop chat appeared on the island; the user confirmed seeing it and responding cleared it. Back to chat opened the Codex URL and dismissed the card; exact destination selection was not inspected by automation.
  • Real OpenCode Desktop main-session Shell invocation: native Allow was pending, the request appeared in the compiled Swift queue, and it cleared after the user confirmed manually choosing Allow; printf completed. Open OpenCode was separately checked with an explicitly labelled UI fixture and opened the original app.
  • Headless compiled-app socket smoke passed, including immediate ask, dedup/clear and unchanged production socket inode. The vendor app/profile were not replaced.

Private-format compatibility is intentionally explicit: local Codex 0.162 / OpenCode 2.0.30. Codex Desktop human-approval reminders and newly spawned live child sessions remain unverified; the human reviewer hint is not proof that the final native UI is visible. See docs/NATIVE_ATTENTION.md for acceptance details, bounds and failure behavior.

Related work reviewed: #315 uses managed Codex chat / an explicit Desktop question plugin; this observes existing built-in Desktop questions. #638 answers OpenCode question.asked in Coucou; this only reminds for native permissions. #351/#442 are Windows approval controls. #691/#557 concern OpenCode plugin loading; this GET-only path does not require that plugin. Independent of #767's narrow auto-review relay fix; no duplicate approval-ownership setting from #309 is added.

Rendered component preview (fixture text, not native acceptance evidence):

Native attention card preview

@Danielweng0902
Danielweng0902 force-pushed the feat/main-session-attention branch from 4cc2f93 to 519d902 Compare October 16, 2026 10:47
@Danielweng0902
Danielweng0902 force-pushed the feat/main-session-attention branch from 519d902 to 43ff6ec Compare October 16, 2026 10:49

This branch has not been deployed

No deployments
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.

1 participant