Skip to content

feat: add interactive app server protocol - #190

Merged
oratis merged 17 commits into
mainfrom
codex/interactive-protocol
Aug 2, 2026
Merged

feat: add interactive app server protocol#190
oratis merged 17 commits into
mainfrom
codex/interactive-protocol

Conversation

@oratis

@oratis oratis commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • add versioned structured tool, usage, approval, and user-input protocol events
  • bind interaction responses to the active thread, turn, request id, and request kind
  • release pending interactions on interrupt/shutdown and reject stale responses
  • pass model, effort, and mode through the trusted RuntimeHost executor
  • persist completed approval and user-input outcomes while keeping live requests transient

Validation

  • pre-commit format, lint, typecheck, and all workspace tests passed
  • 951 TypeScript tests passed / 12 skipped
  • protocol recorder tests prove all interactive/tool/usage activity is excluded from durable replay
  • server contract tests cover approval, user input, stale responses, structured events, and interruption while waiting

Stack

Base: #189

@oratis
oratis force-pushed the codex/interactive-protocol branch from 8d0c7ac to 1ad4039 Compare August 1, 2026 07:05
@oratis
oratis force-pushed the codex/interactive-protocol branch from 1ad4039 to 580f9c8 Compare August 1, 2026 07:20
@oratis
oratis changed the base branch from codex/desktop-sidecar to main August 2, 2026 06:36
@oratis
oratis marked this pull request as ready for review August 2, 2026 06:40
@oratis

oratis commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Review: approved ✅

Interaction events are where a protocol usually grows races, and the binding rules here address the ones that matter.

What I checked

  • Responses are bound to thread + turn + request id + request kind. The kind component is the non-obvious one and it's the right call: id-only binding lets a stale approval response satisfy a different kind of pending request that happens to reuse an id. Requiring the kind to match makes that unrepresentable.
  • Pending interactions are released on interrupt and shutdown. Otherwise interrupt during a pending approval leaves a promise nobody will ever settle and a client waiting on a dialog that can never resolve.
  • Stale responses are rejected rather than applied late — the reconnect/double-click case.
  • Model, effort, and mode pass through the trusted RuntimeHost executor, not directly from client input. That keeps Runtime safety: mandatory policy and real cancellation #181's invariant intact: a client can express a preference, it cannot assert policy.
  • Completed approval and user-input outcomes persist; live requests stay transient. Consistent with feat: define experimental runtime protocol #186's persistence rule, and it means a resumed thread shows what was decided without resurrecting a dialog for a decision already made.

Versioning these as capability-negotiated structured events (rather than free-form payloads) is what lets #197/#203/#205 keep extending the protocol additively.

Validation: CI green; full suite green locally at the stack tip.

@oratis
oratis merged commit 0937444 into main Aug 2, 2026
4 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.

1 participant