Skip to content

Fix Terminal.app scanning on macOS 15 Sequoia#3

Open
davidacimovic wants to merge 1 commit intonjerschow:mainfrom
davidacimovic:fix/macos15-terminal-applescript
Open

Fix Terminal.app scanning on macOS 15 Sequoia#3
davidacimovic wants to merge 1 commit intonjerschow:mainfrom
davidacimovic:fix/macos15-terminal-applescript

Conversation

@davidacimovic
Copy link
Copy Markdown

Summary

  • Fixes "No terminals open" on macOS 15 Sequoia
  • Terminal.app's AppleScript bridge changed in macOS 15 — iterating windows with repeat with w in windows and accessing id of w throws error -1700 ("Can't make id of window into type text")
  • Fix uses bulk property fetch (name of every window) + index-based access (tab j of window i) which works on both macOS 14 and 15

Details

The root cause is a macOS 15 regression in Terminal.app's AppleEvent handling. Window iterators (repeat with w in windows) produce references that lose access to properties like id and name. However:

  • Bulk queries like name of every window still work
  • Index-based access like window i still works
  • Individual tab access like tab j of window i still works

Test plan

  • Verified on macOS 15.7.2 (Sequoia) — 8 terminal windows detected correctly
  • Should be verified on macOS 14 (Sonoma) for backwards compatibility

🤖 Generated with Claude Code

On macOS 15, Terminal.app's AppleScript bridge breaks when iterating
windows with `repeat with w in windows` — accessing `id of w` or
`name of w` throws error -1700. This causes the app to show
"No terminals open" despite Terminal.app running with open windows.

Fix by using bulk property fetch (`name of every window`) combined
with index-based access (`window i`, `tab j of window i`), which
works correctly on both macOS 14 and 15.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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