Skip to content

Fix three ways Ember blamed the user for its own failures - #121

Merged
arancool3000 merged 1 commit into
mainfrom
claude/ember-advanced-data-protection-tks64w
Aug 10, 2026
Merged

arancool3000 merged 1 commit into
mainfrom
claude/ember-advanced-data-protection-tks64w

Conversation

@arancool3000

Copy link
Copy Markdown
Owner

1. "it won't control my mouse as apparently i am moving it"

The takeover monitor compared the cursor only against where Ember last wrote it. A cursor that never moved — because Ember had no permission to move it, the usual macOS Accessibility case — looked identical to one being dragged away by a hand. Removing detached mode made every move run through this check, which is why it surfaced now.

A takeover means the cursor is off-target AND still moving between samples. Off-target and frozen means Ember's writes are going nowhere. TakeoverMonitor now distinguishes the two and sets stalled for the second; tools.py surfaces the actual fix — Accessibility on macOS, running as administrator on Windows, the Wayland restriction on Linux — instead of telling the user to let go of a mouse they were not touching.

2. "No working microphone backend" for a microphone that worked

audio_backend._record_sounddevice used sd.rec(), which returns a NumPy array and therefore needs NumPy. Ember.spec deliberately excludes NumPy to keep the bundle small, so recording failed inside Ember.app while the mic itself opened fine — audio_level uses RawInputStream, which has no such dependency. Hence the exact wording: "Mic opened but capture failed".

_record_sounddevice now uses RawInputStream too. Tests assert sd.rec() stays out of that path and that NumPy stays excluded, so the pairing explains itself if anyone reaches for sd.rec() again.

The message was also impossible to act on:

"/Applications/Ember.app/Contents/MacOS/Ember" -m pip install sounddevice

sys.executable inside the bundle is the Ember binary, not a Python anything can be installed into. The frozen build now says it's a packaging fault and points at running from source meanwhile.

3. "i cannot interrupt ember in voice mode"

Stop cancelled the agent turn but never stopped speech, and left an orb conversation running — so Ember kept talking and kept listening for the next turn. The mic is deliberately closed while Ember speaks, so there was no voice route either. The one control that should have worked did not.

_on_stop now silences TTS and ends the conversation before stopping the turn.

Results

1353 passed, same 23 pre-existing environment failures.

The mouse and mic fixes are verified against stubs that reproduce the exact failure — a pyautogui that accepts moves and never moves anything, and a sounddevice with no NumPy. Neither has been run on a real Mac.

Note on #3: this makes the Stop button work. It does not restore voice barge-in — the mic stays closed while Ember speaks, so "stop" spoken aloud still won't be heard. Keeping the mic live during TTS risks Ember hearing itself; that's a real design decision rather than a bug fix, and I haven't made it.


Generated by Claude Code

1. "it won't control my mouse as apparently i am moving it"

The takeover monitor compared the cursor only against where Ember last WROTE
it, so a cursor that never moved — because Ember had no permission to move it,
the usual macOS Accessibility case — looked identical to one being dragged away
by a hand. Removing detached mode made every move run through this check, which
is why it started showing up now.

A takeover means the cursor is off-target AND still moving between samples. A
cursor that is off-target and frozen means Ember's writes are going nowhere.
TakeoverMonitor now distinguishes the two and sets `stalled` for the second;
move() reports it separately and tools.py surfaces the actual fix — the
Accessibility permission on macOS, running as administrator on Windows, the
Wayland restriction on Linux — instead of telling the user to let go of a mouse
they were not touching.

2. Mic test: "No working microphone backend" for a microphone that worked

audio_backend._record_sounddevice used sd.rec(), which returns a NumPy array and
therefore needs NumPy. Ember.spec deliberately EXCLUDES NumPy to keep the bundle
small, so recording failed inside Ember.app while the mic itself opened fine —
audio_level uses RawInputStream, which has no such dependency. Hence "Mic opened
but capture failed".

_record_sounddevice now uses RawInputStream too. Tests assert sd.rec() stays out
of that path and that NumPy stays excluded, so the pairing is self-explaining if
anyone reaches for sd.rec() again.

The failure message was also impossible to act on: it told the user to run
  "/Applications/Ember.app/Contents/MacOS/Ember" -m pip install sounddevice
sys.executable inside the bundle is the Ember binary, not a Python anything can
be installed into. The frozen build now says it is a packaging fault and points
at running from source meanwhile.

3. "i cannot interrupt ember in voice mode"

Stop cancelled the agent turn but never stopped speech and left an orb
conversation running, so Ember kept talking and kept listening for the next turn.
The mic is deliberately closed while Ember speaks, so there was no voice route
either — the one control that should have worked did not. _on_stop now silences
TTS and ends the conversation before stopping the turn.

Full suite 1353 passed, same 23 pre-existing environment failures.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WebHeGmZb12sW6ZUuyUNix
@arancool3000
arancool3000 merged commit 7fcda09 into main Aug 10, 2026
4 of 6 checks passed
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.

2 participants