Skip to content

MCP presenter: public host ensure/handoff cannot enable presenter enforcement, so desktop cannot enroll #4247

Closed

Description

@code-yeongyu

S1 — Public host launch cannot select presenter enforcement

Blocking the normal desktop launch integration.

The pieces exist but do not join:

  1. host-command-args.ts:66-68 recognizes fd 4, but :90-119 rejects the separate --mcp-presenter-enforcement option.
  2. Ordinary agent CLI parsing recognizes that enforcement flag (packages/coding-agent/src/cli/args.ts:330-334).
  3. packages/coding-agent/src/modes/rpc/host-runner.ts:165-172,275-282 passes only spec.hostArgs and the bootstrap stream.
  4. Launch-spec resolution constructs only session-runtime and extension arguments (packages/coding-agent/src/modes/rpc/host-launch-spec.ts:29-42,94-104); it cannot carry the deployment enforcement option.
  5. Initial/successor launches forward --mcp-presenter-fd 4, but do not add enforcement (packages/coding-agent/src/modes/rpc/host-ensure-start.ts:79-103; packages/coding-agent/src/modes/rpc/host-successor.ts:108-140).
  6. The host explicitly requires both a bootstrap fd and mcpPresenterEnforcement === true, otherwise it destroys the bootstrap stream (packages/coding-agent/src/modes/rpc/multi-session-host.ts:361-374).

Therefore, the desktop cannot complete enrollment merely by adding fd 4 to its existing host ensure call. This conclusion is from the complete source path, not an executed process reproduction. An embedder supplying enforcement in hostArgs, or a directly launched enforcing multi-session host, can use the external protocol today; desktop must not bypass its engine-owned supervisor to do that.

Small engine PR: add an explicit deployment option to public ensure/handoff and carry it through initial, immediate successor and deferred idle successor launch. Keep it out of project settings, environment capability strings and secret-bearing launch-spec fields. Defaults remain off. Reusing a host must never enroll the caller or silently claim that enforcement is active. An unchanged runtime build is not evidence of the requested policy: packages/coding-agent/src/modes/rpc/protocol-identity.ts:47-59 hashes extensions/multi-session/runtime, not this option. Use actual protocol support/ownership and a coordinated migration, not a forced restart.

Exact files: packages/coding-agent/src/cli/host-command-args.ts, packages/coding-agent/src/cli/host-command.ts, packages/coding-agent/src/modes/rpc/host-runner.ts, host-ensure-types.ts, host-ensure-start.ts, host-successor.ts, host-handover-wire.ts, with focused existing host CLI/launch tests and test/mcp/presenter-bootstrap.test.ts. Preserve the supervisor import-budget boundary.

RED: host ensure reaches enrolled with explicit enforcement and fd 4; immediate and deferred handoff preserve enforcement and require fresh enrollment; reuse does not enroll or upgrade a foreign busy host. Today public parsing/launch cannot activate the required mode. Exercise the real public CLI, not only the existing relay fixture.

Related: #4197, #4210 (merged), sisyphuslabs/omo-desktop-app#4370. Found while planning the desktop presenter integration.

Activity

  1. code-yeongyu commented on Oct 26, 2026

    @code-yeongyu
    OwnerAuthor

    Fixed by #4252, merged as 44eccff.

    Evidence:

    • Review: FIX_FIRST at e268b6c on one MEDIUM (a fixed 5 s wait in the host-CLI presenter test harness); folded RED-first at 07d4c3b (the harness now fails a wait as soon as its connection closes and takes a per-peer deadline; new rpc-public-auth-peer-wait.test.ts failed before, passes now; presenter file 3/3 runs). Delta review CLEAR at 07d4c3b (Opus 5.5). LOWs tracked in Follow-up: #4252 review LOWs (FIFO reader on Node, re-exec flag parsing, older-host handover, parent fd 4) #4291.
    • Main merged into the branch (0438f41) with the PR's own lines unchanged (zero-context patch-id equal); merge gate MERGE_OK_DRY ... via=carry-forward 07d4c3b7ea->0438f41e07, code hash unchanged.
    • Static receipt at 0438f41: install, check, typecheck, changes, build, supervisor-import-graph all exit 0.
    • Behaviour: senpi host ensure / handoff take an explicit --mcp-presenter-enforcement deployment option with the presenter channel on fd 4; enforcement is never inferred from fd 4 alone, a reused foreign host is never enrolled or upgraded, and handoffs require fresh enrollment.
  2. added a commit that references this issue on Oct 26, 2026
    5a7698b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions