Skip to content

[Bug]: macOS desktop holds Secure Event Input with no password field focused, breaking global hotkeys #22449

Open

Description

@lucasnsaraujo

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

I don't have a deterministic repro yet. This is what I observed:

  1. Use T3 Code (Nightly) on macOS as normal: chat in threads, type in the composer, click around. No password, secret, or SSH field was open on screen.
  2. In the background, run a global-hotkey app such as Wispr Flow (Ctrl+Space push-to-talk), or poll Secure Event Input:
    ioreg -n Root -d1 -w0 | grep -o 'SecureInputPID"=[0-9]*'
  3. Every so often the T3 Code PID turns up as the Secure Event Input holder. While it holds it, other apps' global hotkeys stop working.

Expected behavior

T3 Code should only enable macOS Secure Event Input while a real password field is focused, and should release it as soon as that field loses focus.

Actual behavior

T3 Code enables Secure Event Input when no password field has focus. Sometimes it keeps it on for minutes. During that time macOS blocks keyboard events for global-hotkey apps, so Wispr Flow's Ctrl+Space does nothing. Then the hotkey starts working again by itself, which makes the problem look random.

What I logged with a small watcher (it polled kCGSSessionSecureInputPID every 2 s from about 11:37 to 15:34 local time and recorded the frontmost app and focused AX element whenever the state changed):

  • 28 separate holds by the T3 Code process (PID 1642), 641 s in total.
  • Most holds lasted 2–3 s and came in bursts while I was using the app (12:24–12:54).
  • Three holds were long enough to break dictation:
    • 12:32:31 → 12:35:15 (164 s)
    • 12:35:50 → 12:37:10 (80 s)
    • 12:48:45 → 12:54:15 (330 s)
  • The focused element during T3 holds was never a secure text field. It was AXWebArea, AXButton, or AXGroup.
  • For comparison, another Chromium-based app (a browser) enabled Secure Input only while a real login field was focused (AXTextField/AXSecureTextField) and released it within a few seconds.

Password inputs I found in the shipped renderer bundle, in case one is mounted or focused off-screen: the SSH password dialog (name: "ssh-password", autoComplete: "current-password", in main-*.js), provider settings secrets (ProviderSettingsForm, settings.providers), the Codex sign-in redirect URL field (CodexSetupSection), and the scheduled-task signature secret (ScheduledTasksSettings). #7699 (stale and stacked SSH password prompts) could be related if a hidden prompt keeps a password input focused. That is a guess; I haven't confirmed it. Preview webviews could be another source.

Impact

Major degradation or frequent failure

Version or commit

0.1.1-nightly.20261019.3360

Environment

macOS 27.0.1, T3 Code (Nightly) desktop, Electron Framework 44.4.5. Affected app: Wispr Flow 1.6.1174 (global Ctrl+Space hotkey).

Logs or stack traces

# timestamp            state holder               frontmost / focused AX element
2026-10-20 12:24:44 ON  holder=1642:T3 Code (Nightly)
2026-10-20 12:24:47 OFF
2026-10-20 12:31:53 ON  holder=1642:T3 Code (Nightly)
2026-10-20 12:31:55 OFF
2026-10-20 12:32:31 ON  holder=1642:T3 Code (Nightly)
2026-10-20 12:35:15 OFF
2026-10-20 12:35:50 ON  holder=1642:T3 Code (Nightly)
2026-10-20 12:37:10 OFF
2026-10-20 12:48:45 ON  holder=1642:T3 Code (Nightly)
2026-10-20 12:54:15 OFF
2026-10-20 15:29:35 ON  holder=1642:T3 Code (Nightly) front=T3 Code (Nightly) | field=AXWebArea/missing value ""
2026-10-20 15:29:38 OFF
2026-10-20 15:33:40 ON  holder=1642:T3 Code (Nightly) front=T3 Code (Nightly) | field=AXButton/missing value ""
2026-10-20 15:33:43 OFF
2026-10-20 15:33:45 ON  holder=1642:T3 Code (Nightly) front=T3 Code (Nightly) | field=AXGroup/missing value ""

Focused-element details are missing on the earlier lines because the watcher didn't have Accessibility permission yet.

Workaround

Switch to another app and back (Cmd+Tab). If Secure Input stays on, restart T3 Code.

Activity

  1. added
    needs more info
    and removed
    needs more info
    on Oct 21, 2026
  2. aliir74 commented on Oct 26, 2026

    @aliir74

    Note

    Claude writing on behalf of Ali.

    Same bug here, with a different victim app: Cotypist (AI autocomplete). Cotypist accepts a suggestion with the backtick key. While T3 Code holds Secure Event Input, Cotypist still shows the suggestion, but it can't intercept the key, so T3 receives a literal "`" instead of the completion.

    Environment: macOS 27.0.1, T3 Code (Nightly) 0.1.3-nightly.20261026.3717 (also seen on earlier nightlies since late September), Cotypist 2026.5.

    Confirmed today with ioreg:

    • Fresh boot, T3 Code launched at 07:59 local time.
    • At 09:31, kCGSSessionSecureInputPID was the T3 Code main process (PID 2352).
    • No password or secret field was visible. An accessibility walk of the only T3 window (827 nodes) found no secure text field.
    • Switching to Finder and back did not release it. Only a restart of T3 Code does.

    Cotypist's own incident log (it records when Secure Input blocks its key handling; times are Pacific):

    Started Duration Holder reported by Cotypist
    2026-09-28 10:21 36 s T3 Code
    2026-09-29 15:33 4 min T3 Code
    2026-10-21 13:09 12 min T3 Code
    2026-10-21 14:01 3 min T3 Code
    2026-10-21 14:57 7 min T3 Code
    2026-10-22 13:45 1 s T3 Code
    2026-10-26 09:12 24+ min T3 Code (confirmed with ioreg, above)

    Cotypist marks its holder attribution as untrusted. One more entry (2026-10-24) also named T3, but ioreg showed Chrome holding it that time, so I left it out. The 2026-10-26 entry is the one I verified directly.

    The holds that matter are the long ones, 3 to 24+ minutes. They don't clear on their own while T3 stays in use, which fits the theory in the issue: a password input stays focused while hidden or off-screen. The 2026-10-26 hold is still active as I write this.

  3. kballenegger commented on Nov 12, 2026

    @kballenegger

    Note

    Claude writing on behalf of the reporter.

    Same bug, macOS 27.0 (26A428), T3 Code (Beta) 0.1.5. The victim here is a dictation app that triggers on bare F6 through a HID-level CGEvent tap. While T3 holds Secure Event Input the tap never sees the key, and the same app's pasteboard + ⌘V insertion fails with "blocked by Secure Input (T3 Code (Beta))".

    New detail: restarting T3 Code did not release it this time.

    • T3 Code main process PID 4619 (launched 17:29) held kCGSSessionSecureInputPID from about 18:17.
    • The user quit and relaunched T3 Code at 18:35 (new main PID 40861).
    • After the relaunch, ioreg still reports kCGSSessionSecureInputPID=4619, a PID that no longer exists, and IsSecureEventInputEnabled() still returns true.

    So the old process exited with Secure Input still enabled, and WindowServer kept it on for the session after the process died. Restarting T3 Code isn't a reliable workaround. Clearing it seems to need a lock/unlock or a logout.

    That points at T3 calling EnableSecureEventInput (directly, or through a Chromium password field) without a matching disable before exit, or the balance count getting out of step. An explicit DisableSecureEventInput on window blur, on hide of the secret UI, and on before-quit would cover both the long holds and this leak.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions