coherence-authority-handoff

Implements authority request, orphan adoption, and occupancy patterns for shared coherence networked objects.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/cmitchellVFS/Scrabble --skill coherence-authority-handoff-cmitchellvfs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coherence-authority-handoff
Source: https://github.com/cmitchellVFS/Scrabble/tree/main/.claude/skills/coherence-authority-handoff
Command: npx skills add https://github.com/cmitchellVFS/Scrabble --skill coherence-authority-handoff-cmitchellvfs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Shared networked objects in coherence multiplayer games break when two clients grab the same item simultaneously or when the owning player disconnects, leaving objects duplicated, stuck, or frozen with no authority. ## Core Features & Use Cases - Authority Request Flow: Implements the RequestAuthorityAsync → OnAuthorityRequest callback pattern with atomic synced occupancy flags to eliminate race conditions. - Orphan Adoption: Recovers entities whose owner disconnected using IsOrphaned checks, Adopt(), and simulator-based adoption strategies. - Disconnect Recovery for Carried Items: Covers the four required settings (Preserve Children, Persistent lifetime, Auto-adopt Orphan, resume callback) so held items survive carrier disconnects. - Use Case: A player picks up a tool, another player tries to take it, and the first player then disconnects — the skill's patterns ensure the request is rejected while occupied and the item is adopted and resumes physics after the disconnect. ## Quick Start Ask the AI to implement authority handoff for a shared pickup object in coherence using the request, occupancy flag, and orphan adoption patterns.

Frequently Asked Questions about coherence-authority-handoff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle two players grabbing the same object in coherence?▼

Use the RequestAuthorityAsync flow with a synced occupancy flag set atomically by the new authority on the same frame authority is granted. The current owner's OnAuthorityRequest callback rejects requests while the flag is set, eliminating the race window.

How do I recover a networked object when its owner disconnects in coherence?▼

Check IsOrphaned and call Adopt() to take authority over the orphaned entity, typically from a designated simulator or the nearest client. For carried items, also enable Preserve Children on the parent, Persistent lifetime on the item, and Auto-adopt Orphan.

Why is my synced bool not updating when I set it in coherence?▼

Synced fields can only be mutated by the state authority; writes from non-authority clients are silently dropped. Request authority first with RequestAuthorityAsync and set the flag only after the request is granted.

Does OnAuthorityRequest fire on the requesting client in coherence?▼

No, OnAuthorityRequest fires on the current authority, which decides to accept or reject. The requester should instead await the RequestAuthorityAsync task result, using its implicit bool conversion to check for success.

When should I not use authority transfer for a shared object?▼

Avoid it for objects that change owners rapidly, like a ball in a sports game, since authority transfer has latency. Use a single permanent owner such as the simulator and replicate player input instead.