---
name: openlogi-macos-permissions
description: Decide whether a macOS problem is a privacy-permission (TCC) problem, and act on it correctly. Use when triaging a report that no devices appear / the GUI is empty while `openlogi list` works / "Failed to open device" / "Pairing failed" on macOS; when a user asks which permission OpenLogi needs or why they were never prompted; when reasoning about Input Monitoring, Accessibility, kTCCServiceListenEvent, kTCCServiceAccessibility, code-signing identity, responsible process, or bundle identifiers; and before changing anything under openlogi-permissions, openlogi-hid/permissions.rs, the agent's launch/self-restart path, the GUI's settings permission rows, or the macOS bundling and signing code in xtask.
title: openlogi-macos-permissions
canonical_url: https://skilld.dev/gh/aprilnea/openlogi
last_updated: 2026-11-12T04:08:33.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [scripts/diagnose.sh](https://skilld.dev/api/skills-raw/aprilnea/openlogi/openlogi-macos-permissions/scripts/diagnose.sh).
>
> If the user asked to install this Skill, run `npx skilld install aprilnea/openlogi/openlogi-macos-permissions`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/openlogi-macos-permissions`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/aprilnea/openlogi/openlogi-macos-permissions) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/openlogi-macos-permissions`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/openlogi-macos-permissions --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/openlogi-macos-permissions --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# macOS permissions (TCC) in OpenLogi

One sentence to keep: **TCC does not authorize processes, it authorizes
identities.** A permission report is a claim, not a root cause. Identify the
failing layer and the identity that performed the operation before diagnosing it.

## 1. First decide whether it is TCC at all

Three unrelated failures reach the user as the same symptom (an empty device
list). Classify before doing anything else. The discriminator is one log line:
**did the channel open?**

| Agent log | Layer | TCC? |
|---|---|---|
| `HID++ candidate interfaces count=0` | enumeration | **No.** The device's HID++ collection never matched — unsupported device, or not connected. |
| `failed to open HID++ channel … Failed to open device: Input Monitoring is NOT granted to this process…` | open | **Yes.** The message classifies itself — grant Input Monitoring to the identity named in §2. |
| `… Failed to open device: Input Monitoring is granted to this process — another app may hold the device exclusively (quit Logi Options+; in Karabiner-Elements → Settings → Devices, turn off "Modify events" for this device), or macOS is serving a stale permission session (log out and back in)` | open | **The grant is fine.** Quit the other app (usually Logi Options+). For a Bluetooth-direct keyboard, also check Karabiner-Elements: it seizes every device it modifies, and the seize covers the HID++ collection on the same `IOHIDDevice`. Otherwise log out and back in. See §5. |
| `opened HID++ channel` … then `Device::new failed` / `enumerate_features failed` with `Channel(Timeout)` or `report writer callback error: 0xE00002D6` | probe | **No.** The open succeeded, so investigate the probe/transport path, including the current status of upstream `sidit77/async-hid#45`. |

All of these lines are `debug`-level except the open failure, which is a
`warn`. A log captured without `OPENLOGI_LOG=debug` can only ever show the
middle row — in such a log, the absence of the other lines is not evidence
of anything.

Read `openlogi list`'s stderr provenance before using its result:

- `(inventory read from the running agent)` means the HID++ rows came from the
  same agent snapshot the GUI consumes.
- `(no agent reachable — reading hardware directly; …)` or the protocol-version
  note means the CLI used its own code-signing identity and HID stack because no
  usable compatible agent snapshot was available.

Camera enumeration is direct in both cases. Without the provenance, a device in
`openlogi list` is not evidence for or against the agent's TCC grant.

If there is no log at all, go to §3 — getting a log is the whole job.

## 2. The identity map

The long-running app's HID and input grants belong to the agent. Direct CLI
operations use the CLI's identity instead.

| Identity | Binary | Needs |
|---|---|---|
| `org.openlogi.agent` | `…/Contents/Library/LoginItems/OpenLogi Agent.app` | **Input Monitoring** (opens HID) and **Accessibility** (owns the event tap) |
| `org.openlogi.openlogi` | `…/Contents/MacOS/openlogi-desktop` | Camera only. It is a pure IPC client and needs neither of the above. |
| `openlogi` | `…/Contents/MacOS/openlogi` (embedded CLI) | Input Monitoring only when `list` falls back to direct HID or a hardware diagnostic accesses HID directly |
| `org.openlogi.overlay` | `…/LoginItems/OpenLogiOverlay.app` | Nothing |

Rules that drive most reports:

- The identity the user must grant is **OpenLogi Agent**, which lives inside the
  app bundle. Bundles built before the rename spell that directory
  `OpenLogiAgent.app`; both are the same identity (`org.openlogi.agent`), and
  the grant survived the rename because the path is not part of the designated
  requirement. Say this explicitly; do not tell someone to "grant OpenLogi
  permission".
- The System Settings `+` picker cannot browse into a bundle. To add the agent
  to the Accessibility or Input Monitoring list, give the steps for the
  reporter's release:
  - After 0.9.0: click **Open** on that permission in OpenLogi's Settings →
    Permissions, then drag **OpenLogi Agent** from the panel over System
    Settings into the list. The panel appears unless the agent already reports
    the grant, and it closes when the agent reports the grant.
  - 0.9.0 and earlier, or when no panel appears: click `+`, press ⇧⌘G (Go to
    Folder), enter `/Applications/OpenLogi.app/Contents/Library/LoginItems`,
    and choose the agent bundle there.
- A grant to the GUI does nothing for the agent, and vice versa. There is no
  bundle-wide grant.
- **Every copy is its own identity.** A dev build (`org.openlogi.agent-dev`), a
  second install, or a bundle still sitting in `~/Downloads` each get their own
  row. Confirm which binary is actually running before trusting any grant — the
  diagnose script warns when the running agent is not the one being inspected.

## 3. Diagnose

Run `scripts/diagnose.sh` from this skill, or the same steps by hand. It is
read-only and safe to hand to a reporter.

**Ask for the agent's log file first.** launchd discards the agent's stderr,
so the agent also writes a daily-rotated file (7 kept) a reporter can attach:

```sh
case ${XDG_STATE_HOME:-} in
  /*) state_home=$XDG_STATE_HOME ;;
  *) state_home=$HOME/.local/state ;;
esac
ls "$state_home/openlogi/"
```

It carries panics too. Only when that file is missing or predates the failure
is a foreground run worth its cost:

```sh
OPENLOGI_LOG=debug \
  "/Applications/OpenLogi.app/Contents/Library/LoginItems/OpenLogi Agent.app/Contents/MacOS/openlogi-agent"
```

Note what that costs: run from a terminal, the agent's responsible process
becomes the terminal (§4), so the run you are observing is not the run that
failed. Compare identities before concluding anything from it — in
particular, a successful open under the terminal's grant does not clear the
copy launchd runs.

Reading the TCC database directly is not an option for a normal user — it is
itself TCC-protected and returns `authorization denied` without Full Disk
Access.

## 4. Responsible process

macOS attributes a TCC request to the *responsible* process, which for a plain
child process is the parent. An agent spawned directly by the GUI therefore asks
with the **GUI's** identity, and the user's grant to `OpenLogi Agent` appears
to do nothing.

The launch paths that break the chain live in
`openlogi-desktop/src/services/ipc/launch.rs` and run in this order:

- registered login item → `launchctl kickstart gui/<uid>/<service label>`
  (launchd spawns it directly: its own responsible process, plus crash
  respawn from the service plist's `KeepAlive`). The registration itself is
  `SMAppService` in `openlogi-desktop/src/platform/registration/macos.rs`, driven by
  the `launch_at_login` setting.
- packaged helper, not registered → `/usr/bin/open -g -n <bundle>`
  (LaunchServices parents it under launchd, so it is its own responsible
  process — but unsupervised)
- bare dev binary → `disclaim::Command` (wraps
  `responsibility_spawnattrs_setdisclaim`)

Never spawn a helper with plain `std::process::Command` on macOS. Check with:

```sh
sudo launchctl procinfo $(pgrep -x openlogi-agent) | grep -i responsible
```

It must name the agent itself. `OpenLogi.app` or `Terminal.app` there means
every grant on that machine is being ignored.

## 5. What the APIs actually do

- `IOHIDCheckAccess` — queries only. **Never prompts, and never registers the
  app in System Settings**, so an app that only ever calls this cannot be
  granted: the user has no row to tick.
- `IOHIDRequestAccess` — prompts. **Blocks the calling thread** until the user
  answers, so it must not run on the async runtime. It is also not real-time:
  after a grant or revoke the calling process keeps seeing the old answer until
  it restarts. That is why the agent calls
  `binary_watch::relaunch_after_input_monitoring_grant()`.
- `IOHIDDeviceOpen` — **denial is silent**. There is no TCC-specific error, so
  the transport pairs every open failure with
  `openlogi_hid::permissions::has_access()` and says which case it is (§1).
  Keep it that way: a bare `Failed to open device` is not reportable.

## 6. Invariants — do not break these

1. **Only the agent holds the long-running app's HID/input permissions.** Any UI
   that reports permission state must read it from the agent over IPC, never by
   querying its own process. Direct CLI diagnostics are a separate, explicit
   identity and must not be used to infer the agent's grant.
2. **Every helper launch establishes its own responsible process** (§4), and the
   spawn result is checked — a silently failed `disclaim` leaves the agent
   running under the GUI's identity, which is invisible until a user reports it.
3. **TCC matches the full designated requirement.** A bundle-identifier or
   signing-identity change can invalidate every existing grant. The
   `Verify production bundle identities` step in `.github/workflows/build.yml`
   is load-bearing; do not weaken it.
4. **Sign inside-out.** The helper needs its own stable designated requirement
   so its grant survives updates; `--deep` cannot give it one. See
   `xtask/src/commands/macos/bundle/signing.rs`.
5. **Prompt from the process that needs the permission**, not from whichever
   process happens to be running. A TCC grant is scoped to the identity that
   asked.
6. **The agent's restricted entitlement ships only with its profile.**
   `com.apple.developer.hid.virtual.device` (the virtual HID keyboard) is
   valid only with the embedded Developer ID profile, and AMFI kills an agent
   that claims it without one before it writes a log line.
   `xtask/src/commands/macos/bundle/provisioning.rs` owns both; never add the
   entitlement to an entitlements file by hand.

## 7. Check current evidence

Do not carry a "currently fixed/broken" snapshot in this skill. Query the current
tracker and latest release notes, identify the reporter's release, and read the
matching report, comments, current code, and logs. Treat the report's diagnosis as a
claim until the provenance and direct evidence in §§1–4 establish the root cause.
Re-check linked upstream transport issues before attributing a probe timeout to them.

## 8. What this cannot fix

Say so plainly rather than promising a fix:

- Apple's `+` picker not browsing into bundles. The drag guide (§2) avoids the
  picker only when the user starts from OpenLogi's **Open** button. A user who
  opens System Settings another way still needs Go to Folder.
- `IOHIDDeviceOpen`'s silent denial — we can only infer it by checking access
  separately.
- A stale `tccd` decision that needs a full logout, or an MDM policy.
- Ad-hoc-signed local builds: their designated requirement is cdhash-based, so
  the grant goes stale on **every** rebuild. Use an Apple Development identity
  for dev bundles.
