hermes - ✅(Solved) Fix [Bug]: MacOS Voice issues with using sounddevice library - suggested fix included [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#20002Fetched 2026-05-06 06:39:19
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×4commented ×2cross-referenced ×1referenced ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fix / Workaround

2026-05-05 09:35:18,646 INFO gateway.run: Starting Hermes Gateway... 2026-05-05 09:35:18,646 INFO gateway.run: Session storage: /Users/trenzalore/.hermes/sessions 2026-05-05 09:35:18,647 INFO gateway.run: Agent budget: max_iterations=90 (agent.max_turns from config.yaml, or HERMES_MAX_ITERATIONS from .env, or default 90) 2026-05-05 09:35:18,656 WARNING gateway.run: No user allowlists configured. All unauthorized users will be denied. Set GATEWAY_ALLOW_ALL_USERS=true in ~/.hermes/.env to allow open access, or configure platform allowlists (e.g., TELEGRAM_ALLOWED_USERS=your_id). 2026-05-05 09:35:18,662 INFO gateway.run: Previous gateway exited cleanly — skipping session suspension 2026-05-05 09:35:18,713 INFO gateway.run: Connecting to api_server... 2026-05-05 09:35:18,732 WARNING gateway.platforms.api_server: [Api_Server] ⚠️ No API key configured (API_SERVER_KEY / platforms.api_server.key). All requests will be accepted without authentication. Set an API key for production deployments to prevent unauthorized access to sessions, responses, and cron jobs. 2026-05-05 09:35:18,734 INFO gateway.platforms.api_server: [Api_Server] API server listening on http://127.0.0.1:8642 (model: hermes-agent) 2026-05-05 09:35:18,741 INFO gateway.run: ✓ api_server connected 2026-05-05 09:35:18,749 INFO gateway.run: Gateway running with 1 platform(s) 2026-05-05 09:35:18,771 INFO gateway.run: Channel directory built: 1 target(s) 2026-05-05 09:35:19,773 INFO gateway.run: Press Ctrl+C to stop 2026-05-05 09:35:19,781 INFO gateway.run: Cron ticker started (interval=60s) 2026-05-05 09:35:24,779 INFO gateway.run: kanban dispatcher: embedded in gateway (interval=60.0s) 2026-05-05 09:39:55,132 INFO gateway.run: Received SIGTERM/SIGINT — initiating shutdown 2026-05-05 09:39:55,240 WARNING gateway.run: Shutdown diagnostic — other hermes processes running: trenzalore 6054 41.8 0.3 442244112 57216 ?? Ss 9:39AM 0:00.68 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python -m hermes_cli.main gateway restart trenzalore 5759 7.2 1.3 470195712 217584 s000 S+ 9:35AM 0:17.32 node /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.bin/../vite/bin/vite.js dev trenzalore 1235 0.3 0.2 444041200 30096 ?? S 8:06AM 0:28.81 /Applications/Antigravity.app/Contents/Resources/app/extensions/antigravity/bin/language_server_macos_arm --enable_lsp --csrf_token 5eff6f1b-aae6-40e1-9f94-8af114ff70cb --extension_server_port 49486 --extension_server_csrf_token 425aa98a-dda0-4224-8e61-81ce9b277e2c --workspace_id file_Users_trenzalore_AIAgents_Hermes_Workspace --cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com --app_data_dir antigravity --parent_pipe_path /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/server_9867517197054654 trenzalore 2303 0.2 0.2 443953024 32768 ?? S 8:07AM 0:26.16 /Applications/Antigravity.app/Contents/Resources/app/extensions/antigravity/bin/language_server_macos_arm --enable_lsp --csrf_token 5cc6bb36-f21f-4264-8e95-e444660f6c6e --extension_server_port 50163 --extension_server_csrf_token 28ee4d39-7386-4ef1-bcfb-95d6ffec56d2 --workspace_id file_Users_trenzalore_hermes --cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com --app_data_dir antigravity --parent_pipe_path /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/server_a45a3cb093782405 trenzalore 5440 0.1 0.3 442351584 42896 s001 S+ 9:28AM 0:07.68 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.local/bin/hermes dashboard trenzalore 5765 0.0 0.1 418742192 11312 s000 S+ 9:35AM 0:00.23 /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.27.4 --ping 2026-05-05 09:39:55,245 INFO gateway.run: Stopping gateway... 2026-05-05 09:39:55,260 INFO gateway.platforms.api_server: [Api_Server] API server stopped 2026-05-05 09:39:55,260 INFO gateway.run: ✓ api_server disconnected 2026-05-05 09:39:55,344 INFO gateway.run: Gateway stopped 2026-05-05 09:39:55,344 INFO gateway.run: Cron ticker stopped 2026-05-05 09:39:55,345 INFO gateway.run: Exiting with code 1 (signal-initiated shutdown without restart request) so systemd Restart=on-failure can revive the gateway. ┌─────────────────────────────────────────────────────────┐ │ ⚕ Hermes Gateway Starting... │ ├─────────────────────────────────────────────────────────┤ │ Messaging platforms + cron scheduler │ │ Press Ctrl+C to stop │ └─────────────────────────────────────────────────────────┘

2026-05-05 09:40:00,521 INFO gateway.run: Starting Hermes Gateway... 2026-05-05 09:40:00,522 INFO gateway.run: Session storage: /Users/trenzalore/.hermes/sessions 2026-05-05 09:40:00,522 INFO gateway.run: Agent budget: max_iterations=90 (agent.max_turns from config.yaml, or HERMES_MAX_ITERATIONS from .env, or default 90) 2026-05-05 09:40:00,531 WARNING gateway.run: No user allowlists configured. All unauthorized users will be denied. Set GATEWAY_ALLOW_ALL_USERS=true in ~/.hermes/.env to allow open access, or configure platform allowlists (e.g., TELEGRAM_ALLOWED_USERS=your_id). 2026-05-05 09:40:00,539 INFO gateway.run: Previous gateway exited cleanly — skipping session suspension 2026-05-05 09:40:00,589 INFO gateway.run: Connecting to api_server... 2026-05-05 09:40:00,609 WARNING gateway.platforms.api_server: [Api_Server] ⚠️ No API key configured (API_SERVER_KEY / platforms.api_server.key). All requests will be accepted without authentication. Set an API key for production deployments to prevent unauthorized access to sessions, responses, and cron jobs. 2026-05-05 09:40:00,609 INFO gateway.platforms.api_server: [Api_Server] API server listening on http://127.0.0.1:8642 (model: hermes-agent) 2026-05-05 09:40:00,618 INFO gateway.run: ✓ api_server connected 2026-05-05 09:40:00,625 INFO gateway.run: Gateway running with 1 platform(s) 2026-05-05 09:40:00,645 INFO gateway.run: Channel directory built: 1 target(s) 2026-05-05 09:40:01,647 INFO gateway.run: Press Ctrl+C to stop 2026-05-05 09:40:01,655 INFO gateway.run: Cron ticker started (interval=60s) 2026-05-05 09:40:06,654 INFO gateway.run: kanban dispatcher: embedded in gateway (interval=60.0s) 2026-05-05 10:19:52,369 INFO gateway.run: Received SIGTERM/SIGINT — initiating shutdown 2026-05-05 10:19:52,481 WARNING gateway.run: Shutdown diagnostic — other hermes processes running: trenzalore 12064 31.5 0.3 442231200 57504 ?? S 10:19AM 0:00.37 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.hermes/hermes-agent/venv/bin/hermes gateway restart trenzalore 7850 17.9 2.0 452058944 328560 s002 S+ 9:51AM 4:03.92 /usr/local/bin/node /Users/trenzalore/.hermes/hermes-agent/ui-tui/dist/entry.js trenzalore 1235 0.3 0.2 444041200 32000 ?? S 8:06AM 0:44.76 /Applications/Antigravity.app/Contents/Resources/app/extensions/antigravity/bin/language_server_macos_arm --enable_lsp --csrf_token 5eff6f1b-aae6-40e1-9f94-8af114ff70cb --extension_server_port 49486 --extension_server_csrf_token 425aa98a-dda0-4224-8e61-81ce9b277e2c --workspace_id file_Users_trenzalore_AIAgents_Hermes_Workspace --cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com --app_data_dir antigravity --parent_pipe_path /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/server_9867517197054654 trenzalore 5440 0.0 0.1 442389504 19136 s001 S+ 9:28AM 0:24.42 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.local/bin/hermes dashboard trenzalore 12060 0.0 0.0 442201408 2288 ?? Ss 10:19AM 0:00.01 /bin/bash -c source /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/hermes-snap-83ee199e085a.sh >/dev/null 2>&1 || true\012builtin cd -- /Users/trenzalore/.hermes/hermes-agent/venv/bin || exit 126\012eval 'cd ~/.hermes/hermes-agent && source venv/bin/activate && hermes gateway restart 2>&1 || echo "---" && hermes --help 2>&1 | grep -i gateway'\012__hermes_ec=$?\012export -p > /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/hermes-snap-83ee199e085a.sh 2>/dev/null || true\012pwd -P > /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/hermes-cwd-83ee199e085a.txt 2>/dev/null || true\012printf '\n__HERMES_CWD_83ee199e085a__%s__HERMES_CWD_83ee199e085a__\n' "$(pwd -P)"\012exit $__hermes_ec trenzalore 7865 0.0 0.1 442295456 15696 s002 S+ 9:51AM 0:01.02 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python -m tui_gateway.slash_worker --session-key 20260505_095153_c1ce0c --model deepseek-v4-flash trenzalore 7851 0.0 0.4 442510000 68928 s002 S+ 9:51AM 0:28.72 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python -m tui_gateway.entry trenzalore 7778 0.0 0.1 442293840 15968 s002 S+ 9:51AM 0:01.48 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.local/bin/hermes --tui trenzalore 6258 0.0 0.0 442183760 6288 s000 S+ 9:40AM 0:00.20 /opt/homebrew/Cellar/[email protected]/3.14.4/Frameworks/Python.framework/Versions/3.14/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/src/server/pty-helper.py /Users/trenzalore/.hermes 182 45 -- /bin/zsh trenzalore 5765 0.0 0.1 418756624 12832 s000 S+ 9:35AM 0:03.30 /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.27.4 --ping trenzalore 5759 0.0 0.4 470382752 66512 s000 S+ 9:35AM 0:53.58 node /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.bin/../vite/bin/vite.js dev 2026-05-05 10:19:52,487 INFO gateway.run: Stopping gateway... 2026-05-05 10:19:52,504 INFO gateway.platforms.api_server: [Api_Server] API server stopped 2026-05-05 10:19:52,504 INFO gateway.run: ✓ api_server disconnected 2026-05-05 10:19:52,591 INFO gateway.run: Gateway stopped 2026-05-05 10:19:52,591 INFO gateway.run: Cron ticker stopped 2026-05-05 10:19:52,592 INFO gateway.run: Exiting with code 1 (signal-initiated shutdown without restart request) so systemd Restart=on-failure can revive the gateway.

PR fix notes

PR #20119: fix(voice): strip sounddevice from playback paths to fix macOS segfault

Description (problem / solution / changelog)

What changed and why

The macOS crash (EXC_BAD_ACCESS at 0x4 on com.apple.audio.IOThread.client) was confirmed by the reporter's Python-2026-05-05-065550.ips crash report: the faulting frames are AdaptingOutputOnlyProcessAudioIOProc → CoreAudio IOThread — the sounddevice output path, not the recording input stream.

Root cause: when ElevenLabs TTS is active, tts_tool.stream_tts_to_speaker() opens a concurrent sd.OutputStream (24 kHz PCM) while AudioRecorder._ensure_stream() already holds an sd.InputStream for STT capture. The CFFI/PortAudio callbacks race in CoreAudio, producing a dangling-pointer dereference. The same race occurs when play_beep() or play_audio_file() call sd.play() alongside the live input stream.

Changes:

  • tools/voice_mode.py

    • play_beep(): synthesises the tone with numpy, writes a temp WAV, plays via play_audio_file() — no sd.play() or sd.stop()
    • play_audio_file(): removed the WAV-via-sounddevice primary path; subprocess players (afplay / ffplay / aplay) are now the only path
    • stop_playback(): removed the sd.stop() call; subprocess termination already handles interruption
  • tools/tts_tool.py

    • stream_tts_to_speaker(): removed the sd.OutputStream block; always uses the existing _play_via_tempfile() helper (writes PCM chunks to a temp WAV, plays via play_audio_file()). The output_stream variable and its finally cleanup are gone.
    • _import_sounddevice(): removed — dead code after the OutputStream block was deleted (no callers remain).

AudioRecorder._ensure_stream() and its sd.InputStream are untouched — the crash report confirms the fault was exclusively on the output side.

How to test

  1. pytest tests/tools/test_voice_mode.py tests/tools/test_tts_command_providers.py -q — all pass
  2. Manual: start a voice session with ElevenLabs TTS enabled, use tool calls during conversation — no segfault should occur
  3. Verify beep tones play via afplay on macOS (check Console.app for any process spawns)

What platforms tested on

  • macOS (target platform for the bug)
  • Linux subprocess fallback paths (afplay absent, ffplay/aplay used instead) are unchanged

Fixes #20002

<!-- autocontrib:worker-id=issue-followup-3337ac82 kind=pr-open -->

Changed files

  • tests/tools/test_voice_mode.py (modified, +59/-40)
  • tools/tts_tool.py (modified, +1/-40)
  • tools/voice_mode.py (modified, +26/-45)

Code Example

┌─────────────────────────────────────────────────────────┐
│           ⚕ Hermes Gateway Starting...├─────────────────────────────────────────────────────────┤
Messaging platforms + cron scheduler                    │
Press Ctrl+C to stop                                   │
└─────────────────────────────────────────────────────────┘

2026-05-05 09:35:18,646 INFO gateway.run: Starting Hermes Gateway...
2026-05-05 09:35:18,646 INFO gateway.run: Session storage: /Users/trenzalore/.hermes/sessions
2026-05-05 09:35:18,647 INFO gateway.run: Agent budget: max_iterations=90 (agent.max_turns from config.yaml, or HERMES_MAX_ITERATIONS from .env, or default 90)
2026-05-05 09:35:18,656 WARNING gateway.run: No user allowlists configured. All unauthorized users will be denied. Set GATEWAY_ALLOW_ALL_USERS=true in ~/.hermes/.env to allow open access, or configure platform allowlists (e.g., TELEGRAM_ALLOWED_USERS=your_id).
2026-05-05 09:35:18,662 INFO gateway.run: Previous gateway exited cleanly — skipping session suspension
2026-05-05 09:35:18,713 INFO gateway.run: Connecting to api_server...
2026-05-05 09:35:18,732 WARNING gateway.platforms.api_server: [Api_Server] ⚠️  No API key configured (API_SERVER_KEY / platforms.api_server.key). All requests will be accepted without authentication. Set an API key for production deployments to prevent unauthorized access to sessions, responses, and cron jobs.
2026-05-05 09:35:18,734 INFO gateway.platforms.api_server: [Api_Server] API server listening on http://127.0.0.1:8642 (model: hermes-agent)
2026-05-05 09:35:18,741 INFO gateway.run: ✓ api_server connected
2026-05-05 09:35:18,749 INFO gateway.run: Gateway running with 1 platform(s)
2026-05-05 09:35:18,771 INFO gateway.run: Channel directory built: 1 target(s)
2026-05-05 09:35:19,773 INFO gateway.run: Press Ctrl+C to stop
2026-05-05 09:35:19,781 INFO gateway.run: Cron ticker started (interval=60s)
2026-05-05 09:35:24,779 INFO gateway.run: kanban dispatcher: embedded in gateway (interval=60.0s)
2026-05-05 09:39:55,132 INFO gateway.run: Received SIGTERM/SIGINT — initiating shutdown
2026-05-05 09:39:55,240 WARNING gateway.run: Shutdown diagnostic — other hermes processes running:
  trenzalore        6054  41.8  0.3 442244112  57216   ??  Ss    9:39AM   0:00.68 /opt/homebrew/Cellar/python@3.11/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python -m hermes_cli.main gateway restart
  trenzalore        5759   7.2  1.3 470195712 217584 s000  S+    9:35AM   0:17.32 node /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.bin/../vite/bin/vite.js dev
  trenzalore        1235   0.3  0.2 444041200  30096   ??  S     8:06AM   0:28.81 /Applications/Antigravity.app/Contents/Resources/app/extensions/antigravity/bin/language_server_macos_arm --enable_lsp --csrf_token 5eff6f1b-aae6-40e1-9f94-8af114ff70cb --extension_server_port 49486 --extension_server_csrf_token 425aa98a-dda0-4224-8e61-81ce9b277e2c --workspace_id file_Users_trenzalore_AIAgents_Hermes_Workspace --cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com --app_data_dir antigravity --parent_pipe_path /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/server_9867517197054654
  trenzalore        2303   0.2  0.2 443953024  32768   ??  S     8:07AM   0:26.16 /Applications/Antigravity.app/Contents/Resources/app/extensions/antigravity/bin/language_server_macos_arm --enable_lsp --csrf_token 5cc6bb36-f21f-4264-8e95-e444660f6c6e --extension_server_port 50163 --extension_server_csrf_token 28ee4d39-7386-4ef1-bcfb-95d6ffec56d2 --workspace_id file_Users_trenzalore_hermes --cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com --app_data_dir antigravity --parent_pipe_path /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/server_a45a3cb093782405
  trenzalore        5440   0.1  0.3 442351584  42896 s001  S+    9:28AM   0:07.68 /opt/homebrew/Cellar/python@3.11/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.local/bin/hermes dashboard
  trenzalore        5765   0.0  0.1 418742192  11312 s000  S+    9:35AM   0:00.23 /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.pnpm/@esbuild+darwin-arm64@0.27.4/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.27.4 --ping
2026-05-05 09:39:55,245 INFO gateway.run: Stopping gateway...
2026-05-05 09:39:55,260 INFO gateway.platforms.api_server: [Api_Server] API server stopped
2026-05-05 09:39:55,260 INFO gateway.run: ✓ api_server disconnected
2026-05-05 09:39:55,344 INFO gateway.run: Gateway stopped
2026-05-05 09:39:55,344 INFO gateway.run: Cron ticker stopped
2026-05-05 09:39:55,345 INFO gateway.run: Exiting with code 1 (signal-initiated shutdown without restart request) so systemd Restart=on-failure can revive the gateway.
┌─────────────────────────────────────────────────────────┐
│           ⚕ Hermes Gateway Starting...├─────────────────────────────────────────────────────────┤
Messaging platforms + cron scheduler                    │
Press Ctrl+C to stop                                   │
└─────────────────────────────────────────────────────────┘

2026-05-05 09:40:00,521 INFO gateway.run: Starting Hermes Gateway...
2026-05-05 09:40:00,522 INFO gateway.run: Session storage: /Users/trenzalore/.hermes/sessions
2026-05-05 09:40:00,522 INFO gateway.run: Agent budget: max_iterations=90 (agent.max_turns from config.yaml, or HERMES_MAX_ITERATIONS from .env, or default 90)
2026-05-05 09:40:00,531 WARNING gateway.run: No user allowlists configured. All unauthorized users will be denied. Set GATEWAY_ALLOW_ALL_USERS=true in ~/.hermes/.env to allow open access, or configure platform allowlists (e.g., TELEGRAM_ALLOWED_USERS=your_id).
2026-05-05 09:40:00,539 INFO gateway.run: Previous gateway exited cleanly — skipping session suspension
2026-05-05 09:40:00,589 INFO gateway.run: Connecting to api_server...
2026-05-05 09:40:00,609 WARNING gateway.platforms.api_server: [Api_Server] ⚠️  No API key configured (API_SERVER_KEY / platforms.api_server.key). All requests will be accepted without authentication. Set an API key for production deployments to prevent unauthorized access to sessions, responses, and cron jobs.
2026-05-05 09:40:00,609 INFO gateway.platforms.api_server: [Api_Server] API server listening on http://127.0.0.1:8642 (model: hermes-agent)
2026-05-05 09:40:00,618 INFO gateway.run: ✓ api_server connected
2026-05-05 09:40:00,625 INFO gateway.run: Gateway running with 1 platform(s)
2026-05-05 09:40:00,645 INFO gateway.run: Channel directory built: 1 target(s)
2026-05-05 09:40:01,647 INFO gateway.run: Press Ctrl+C to stop
2026-05-05 09:40:01,655 INFO gateway.run: Cron ticker started (interval=60s)
2026-05-05 09:40:06,654 INFO gateway.run: kanban dispatcher: embedded in gateway (interval=60.0s)
2026-05-05 10:19:52,369 INFO gateway.run: Received SIGTERM/SIGINT — initiating shutdown
2026-05-05 10:19:52,481 WARNING gateway.run: Shutdown diagnostic — other hermes processes running:
  trenzalore       12064  31.5  0.3 442231200  57504   ??  S    10:19AM   0:00.37 /opt/homebrew/Cellar/python@3.11/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.hermes/hermes-agent/venv/bin/hermes gateway restart
  trenzalore        7850  17.9  2.0 452058944 328560 s002  S+    9:51AM   4:03.92 /usr/local/bin/node /Users/trenzalore/.hermes/hermes-agent/ui-tui/dist/entry.js
  trenzalore        1235   0.3  0.2 444041200  32000   ??  S     8:06AM   0:44.76 /Applications/Antigravity.app/Contents/Resources/app/extensions/antigravity/bin/language_server_macos_arm --enable_lsp --csrf_token 5eff6f1b-aae6-40e1-9f94-8af114ff70cb --extension_server_port 49486 --extension_server_csrf_token 425aa98a-dda0-4224-8e61-81ce9b277e2c --workspace_id file_Users_trenzalore_AIAgents_Hermes_Workspace --cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com --app_data_dir antigravity --parent_pipe_path /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/server_9867517197054654
  trenzalore        5440   0.0  0.1 442389504  19136 s001  S+    9:28AM   0:24.42 /opt/homebrew/Cellar/python@3.11/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.local/bin/hermes dashboard
  trenzalore       12060   0.0  0.0 442201408   2288   ??  Ss   10:19AM   0:00.01 /bin/bash -c source /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/hermes-snap-83ee199e085a.sh >/dev/null 2>&1 || true\012builtin cd -- /Users/trenzalore/.hermes/hermes-agent/venv/bin || exit 126\012eval 'cd ~/.hermes/hermes-agent && source venv/bin/activate && hermes gateway restart 2>&1 || echo "---" && hermes --help 2>&1 | grep -i gateway'\012__hermes_ec=$?\012export -p > /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/hermes-snap-83ee199e085a.sh 2>/dev/null || true\012pwd -P > /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/hermes-cwd-83ee199e085a.txt 2>/dev/null || true\012printf '\n__HERMES_CWD_83ee199e085a__%s__HERMES_CWD_83ee199e085a__\n' "$(pwd -P)"\012exit $__hermes_ec
  trenzalore        7865   0.0  0.1 442295456  15696 s002  S+    9:51AM   0:01.02 /opt/homebrew/Cellar/python@3.11/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python -m tui_gateway.slash_worker --session-key 20260505_095153_c1ce0c --model deepseek-v4-flash
  trenzalore        7851   0.0  0.4 442510000  68928 s002  S+    9:51AM   0:28.72 /opt/homebrew/Cellar/python@3.11/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python -m tui_gateway.entry
  trenzalore        7778   0.0  0.1 442293840  15968 s002  S+    9:51AM   0:01.48 /opt/homebrew/Cellar/python@3.11/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.local/bin/hermes --tui
  trenzalore        6258   0.0  0.0 442183760   6288 s000  S+    9:40AM   0:00.20 /opt/homebrew/Cellar/python@3.14/3.14.4/Frameworks/Python.framework/Versions/3.14/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/src/server/pty-helper.py /Users/trenzalore/.hermes 182 45 -- /bin/zsh
  trenzalore        5765   0.0  0.1 418756624  12832 s000  S+    9:35AM   0:03.30 /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.pnpm/@esbuild+darwin-arm64@0.27.4/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.27.4 --ping
  trenzalore        5759   0.0  0.4 470382752  66512 s000  S+    9:35AM   0:53.58 node /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.bin/../vite/bin/vite.js dev
2026-05-05 10:19:52,487 INFO gateway.run: Stopping gateway...
2026-05-05 10:19:52,504 INFO gateway.platforms.api_server: [Api_Server] API server stopped
2026-05-05 10:19:52,504 INFO gateway.run: ✓ api_server disconnected
2026-05-05 10:19:52,591 INFO gateway.run: Gateway stopped
2026-05-05 10:19:52,591 INFO gateway.run: Cron ticker stopped
2026-05-05 10:19:52,592 INFO gateway.run: Exiting with code 1 (signal-initiated shutdown without restart request) so systemd Restart=on-failure can revive the gateway.

---
RAW_BUFFERClick to expand / collapse

Bug Description

Python Sigfault

Steps to Reproduce

Use the voice to voice hermes interaction and include other tool use in the requests and it is not long before it generates a python sigfault crahing hermes agent.

Expected Behavior

smooth long running conversations

Actual Behavior

python Sigfault ans crash

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

┌─────────────────────────────────────────────────────────┐
│           ⚕ Hermes Gateway Starting...                 │
├─────────────────────────────────────────────────────────┤
│  Messaging platforms + cron scheduler                    │
│  Press Ctrl+C to stop                                   │
└─────────────────────────────────────────────────────────┘

2026-05-05 09:35:18,646 INFO gateway.run: Starting Hermes Gateway...
2026-05-05 09:35:18,646 INFO gateway.run: Session storage: /Users/trenzalore/.hermes/sessions
2026-05-05 09:35:18,647 INFO gateway.run: Agent budget: max_iterations=90 (agent.max_turns from config.yaml, or HERMES_MAX_ITERATIONS from .env, or default 90)
2026-05-05 09:35:18,656 WARNING gateway.run: No user allowlists configured. All unauthorized users will be denied. Set GATEWAY_ALLOW_ALL_USERS=true in ~/.hermes/.env to allow open access, or configure platform allowlists (e.g., TELEGRAM_ALLOWED_USERS=your_id).
2026-05-05 09:35:18,662 INFO gateway.run: Previous gateway exited cleanly — skipping session suspension
2026-05-05 09:35:18,713 INFO gateway.run: Connecting to api_server...
2026-05-05 09:35:18,732 WARNING gateway.platforms.api_server: [Api_Server] ⚠️  No API key configured (API_SERVER_KEY / platforms.api_server.key). All requests will be accepted without authentication. Set an API key for production deployments to prevent unauthorized access to sessions, responses, and cron jobs.
2026-05-05 09:35:18,734 INFO gateway.platforms.api_server: [Api_Server] API server listening on http://127.0.0.1:8642 (model: hermes-agent)
2026-05-05 09:35:18,741 INFO gateway.run: ✓ api_server connected
2026-05-05 09:35:18,749 INFO gateway.run: Gateway running with 1 platform(s)
2026-05-05 09:35:18,771 INFO gateway.run: Channel directory built: 1 target(s)
2026-05-05 09:35:19,773 INFO gateway.run: Press Ctrl+C to stop
2026-05-05 09:35:19,781 INFO gateway.run: Cron ticker started (interval=60s)
2026-05-05 09:35:24,779 INFO gateway.run: kanban dispatcher: embedded in gateway (interval=60.0s)
2026-05-05 09:39:55,132 INFO gateway.run: Received SIGTERM/SIGINT — initiating shutdown
2026-05-05 09:39:55,240 WARNING gateway.run: Shutdown diagnostic — other hermes processes running:
  trenzalore        6054  41.8  0.3 442244112  57216   ??  Ss    9:39AM   0:00.68 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python -m hermes_cli.main gateway restart
  trenzalore        5759   7.2  1.3 470195712 217584 s000  S+    9:35AM   0:17.32 node /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.bin/../vite/bin/vite.js dev
  trenzalore        1235   0.3  0.2 444041200  30096   ??  S     8:06AM   0:28.81 /Applications/Antigravity.app/Contents/Resources/app/extensions/antigravity/bin/language_server_macos_arm --enable_lsp --csrf_token 5eff6f1b-aae6-40e1-9f94-8af114ff70cb --extension_server_port 49486 --extension_server_csrf_token 425aa98a-dda0-4224-8e61-81ce9b277e2c --workspace_id file_Users_trenzalore_AIAgents_Hermes_Workspace --cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com --app_data_dir antigravity --parent_pipe_path /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/server_9867517197054654
  trenzalore        2303   0.2  0.2 443953024  32768   ??  S     8:07AM   0:26.16 /Applications/Antigravity.app/Contents/Resources/app/extensions/antigravity/bin/language_server_macos_arm --enable_lsp --csrf_token 5cc6bb36-f21f-4264-8e95-e444660f6c6e --extension_server_port 50163 --extension_server_csrf_token 28ee4d39-7386-4ef1-bcfb-95d6ffec56d2 --workspace_id file_Users_trenzalore_hermes --cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com --app_data_dir antigravity --parent_pipe_path /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/server_a45a3cb093782405
  trenzalore        5440   0.1  0.3 442351584  42896 s001  S+    9:28AM   0:07.68 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.local/bin/hermes dashboard
  trenzalore        5765   0.0  0.1 418742192  11312 s000  S+    9:35AM   0:00.23 /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.27.4 --ping
2026-05-05 09:39:55,245 INFO gateway.run: Stopping gateway...
2026-05-05 09:39:55,260 INFO gateway.platforms.api_server: [Api_Server] API server stopped
2026-05-05 09:39:55,260 INFO gateway.run: ✓ api_server disconnected
2026-05-05 09:39:55,344 INFO gateway.run: Gateway stopped
2026-05-05 09:39:55,344 INFO gateway.run: Cron ticker stopped
2026-05-05 09:39:55,345 INFO gateway.run: Exiting with code 1 (signal-initiated shutdown without restart request) so systemd Restart=on-failure can revive the gateway.
┌─────────────────────────────────────────────────────────┐
│           ⚕ Hermes Gateway Starting...                 │
├─────────────────────────────────────────────────────────┤
│  Messaging platforms + cron scheduler                    │
│  Press Ctrl+C to stop                                   │
└─────────────────────────────────────────────────────────┘

2026-05-05 09:40:00,521 INFO gateway.run: Starting Hermes Gateway...
2026-05-05 09:40:00,522 INFO gateway.run: Session storage: /Users/trenzalore/.hermes/sessions
2026-05-05 09:40:00,522 INFO gateway.run: Agent budget: max_iterations=90 (agent.max_turns from config.yaml, or HERMES_MAX_ITERATIONS from .env, or default 90)
2026-05-05 09:40:00,531 WARNING gateway.run: No user allowlists configured. All unauthorized users will be denied. Set GATEWAY_ALLOW_ALL_USERS=true in ~/.hermes/.env to allow open access, or configure platform allowlists (e.g., TELEGRAM_ALLOWED_USERS=your_id).
2026-05-05 09:40:00,539 INFO gateway.run: Previous gateway exited cleanly — skipping session suspension
2026-05-05 09:40:00,589 INFO gateway.run: Connecting to api_server...
2026-05-05 09:40:00,609 WARNING gateway.platforms.api_server: [Api_Server] ⚠️  No API key configured (API_SERVER_KEY / platforms.api_server.key). All requests will be accepted without authentication. Set an API key for production deployments to prevent unauthorized access to sessions, responses, and cron jobs.
2026-05-05 09:40:00,609 INFO gateway.platforms.api_server: [Api_Server] API server listening on http://127.0.0.1:8642 (model: hermes-agent)
2026-05-05 09:40:00,618 INFO gateway.run: ✓ api_server connected
2026-05-05 09:40:00,625 INFO gateway.run: Gateway running with 1 platform(s)
2026-05-05 09:40:00,645 INFO gateway.run: Channel directory built: 1 target(s)
2026-05-05 09:40:01,647 INFO gateway.run: Press Ctrl+C to stop
2026-05-05 09:40:01,655 INFO gateway.run: Cron ticker started (interval=60s)
2026-05-05 09:40:06,654 INFO gateway.run: kanban dispatcher: embedded in gateway (interval=60.0s)
2026-05-05 10:19:52,369 INFO gateway.run: Received SIGTERM/SIGINT — initiating shutdown
2026-05-05 10:19:52,481 WARNING gateway.run: Shutdown diagnostic — other hermes processes running:
  trenzalore       12064  31.5  0.3 442231200  57504   ??  S    10:19AM   0:00.37 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.hermes/hermes-agent/venv/bin/hermes gateway restart
  trenzalore        7850  17.9  2.0 452058944 328560 s002  S+    9:51AM   4:03.92 /usr/local/bin/node /Users/trenzalore/.hermes/hermes-agent/ui-tui/dist/entry.js
  trenzalore        1235   0.3  0.2 444041200  32000   ??  S     8:06AM   0:44.76 /Applications/Antigravity.app/Contents/Resources/app/extensions/antigravity/bin/language_server_macos_arm --enable_lsp --csrf_token 5eff6f1b-aae6-40e1-9f94-8af114ff70cb --extension_server_port 49486 --extension_server_csrf_token 425aa98a-dda0-4224-8e61-81ce9b277e2c --workspace_id file_Users_trenzalore_AIAgents_Hermes_Workspace --cloud_code_endpoint https://daily-cloudcode-pa.googleapis.com --app_data_dir antigravity --parent_pipe_path /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/server_9867517197054654
  trenzalore        5440   0.0  0.1 442389504  19136 s001  S+    9:28AM   0:24.42 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.local/bin/hermes dashboard
  trenzalore       12060   0.0  0.0 442201408   2288   ??  Ss   10:19AM   0:00.01 /bin/bash -c source /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/hermes-snap-83ee199e085a.sh >/dev/null 2>&1 || true\012builtin cd -- /Users/trenzalore/.hermes/hermes-agent/venv/bin || exit 126\012eval 'cd ~/.hermes/hermes-agent && source venv/bin/activate && hermes gateway restart 2>&1 || echo "---" && hermes --help 2>&1 | grep -i gateway'\012__hermes_ec=$?\012export -p > /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/hermes-snap-83ee199e085a.sh 2>/dev/null || true\012pwd -P > /var/folders/0h/mqhp6vbd5f56wqb0f5y_4mt00000gn/T/hermes-cwd-83ee199e085a.txt 2>/dev/null || true\012printf '\n__HERMES_CWD_83ee199e085a__%s__HERMES_CWD_83ee199e085a__\n' "$(pwd -P)"\012exit $__hermes_ec
  trenzalore        7865   0.0  0.1 442295456  15696 s002  S+    9:51AM   0:01.02 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python -m tui_gateway.slash_worker --session-key 20260505_095153_c1ce0c --model deepseek-v4-flash
  trenzalore        7851   0.0  0.4 442510000  68928 s002  S+    9:51AM   0:28.72 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python -m tui_gateway.entry
  trenzalore        7778   0.0  0.1 442293840  15968 s002  S+    9:51AM   0:01.48 /opt/homebrew/Cellar/[email protected]/3.11.15/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/.local/bin/hermes --tui
  trenzalore        6258   0.0  0.0 442183760   6288 s000  S+    9:40AM   0:00.20 /opt/homebrew/Cellar/[email protected]/3.14.4/Frameworks/Python.framework/Versions/3.14/Resources/Python.app/Contents/MacOS/Python /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/src/server/pty-helper.py /Users/trenzalore/.hermes 182 45 -- /bin/zsh
  trenzalore        5765   0.0  0.1 418756624  12832 s000  S+    9:35AM   0:03.30 /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.pnpm/@[email protected]/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.27.4 --ping
  trenzalore        5759   0.0  0.4 470382752  66512 s000  S+    9:35AM   0:53.58 node /Users/trenzalore/AIAgents/Hermes-Workspace/hermes-workspace/node_modules/.bin/../vite/bin/vite.js dev
2026-05-05 10:19:52,487 INFO gateway.run: Stopping gateway...
2026-05-05 10:19:52,504 INFO gateway.platforms.api_server: [Api_Server] API server stopped
2026-05-05 10:19:52,504 INFO gateway.run: ✓ api_server disconnected
2026-05-05 10:19:52,591 INFO gateway.run: Gateway stopped
2026-05-05 10:19:52,591 INFO gateway.run: Cron ticker stopped
2026-05-05 10:19:52,592 INFO gateway.run: Exiting with code 1 (signal-initiated shutdown without restart request) so systemd Restart=on-failure can revive the gateway.

Operating System

MacOs 26.41

Python Version

3.14.4

Hermes Version

Hermes Agent v0.12.0 (2026.4.30)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

voice chat then tool use tends to trigger it faster

Proposed Fix (optional)

Here's what was I fixed in my local version:

 File modified: ./hermes/hermes-agent/tools/voice_mode.py                                                                                   
                                                                                                                                                             
 The fix was a full migration from sounddevice to PyAudio for audio capture on macOS. Specifically:                                                          
                                                                                                                                                             
 1. Imports — replaced sounddevice with pyaudio and numpy imports. Removed sounddevice entirely.                                                             
 2. AudioRecorder._ensure_stream() — the core fix. Stream now uses pyaudio.PyAudio().open() with stream_callback. The PyAudio instance is kept alive for     
 the recorder's lifetime so CoreAudio never gets a dangling callback — that's what was causing the address 0x4 segfault.                                     
 3. detect_audio_environment() — replaced sd.query_devices() with p.get_device_count() / p.get_device_info_by_index() via a temporary PyAudio instance.      
 4. Beep and playback functions — stripped out all sounddevice fallback paths. Playback now goes through afplay (macOS) or ffplay/aplay exclusively.         
 5. stop_playback() — removed the sd.stop() call that could trigger the same cffi race.                                                                      
                                                                                                                                                             
 Supporting actions:                                                                                                                                         
 - brew install portaudio (system library PyAudio depends on)                                                                                                
 - pip install pyaudio                                                                                                                                       
 - pip uninstall sounddevice                                                                                                                                 
                                                                                                                                                             
 Separate file (minor): .hermes/hermes-agent/tools/tts_tool.py still has an unused _import_sounddevice() that's guarded with a             
 try/except ImportError — it's harmless and already gracefully falls back. Not worth touching unless it causes problems.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The proposed fix involves migrating from sounddevice to PyAudio for audio capture on macOS to resolve the Python sigfault issue.

Guidance

  1. Install required dependencies: Run brew install portaudio to install the system library PyAudio depends on.
  2. Update Python packages: Install PyAudio using pip install pyaudio and uninstall sounddevice using pip uninstall sounddevice.
  3. Apply the fix: Modify the voice_mode.py file as described in the proposed fix, replacing sounddevice with PyAudio and updating the audio capture and playback functions.
  4. Verify the fix: Test the voice chat and tool use functionality to ensure the sigfault issue is resolved.
  5. Review additional files: Check the tts_tool.py file for any unused sounddevice imports and consider removing them to avoid potential issues.

Example

No code snippet is provided as the fix involves modifying existing code and installing dependencies.

Notes

The proposed fix is specific to macOS and may not apply to other operating systems. Additionally, the fix involves modifying the voice_mode.py file, which may have unintended consequences if not done correctly.

Recommendation

Apply the workaround by migrating to PyAudio for audio capture on macOS, as it has been tested and verified to resolve the sigfault issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: MacOS Voice issues with using sounddevice library - suggested fix included [1 pull requests, 2 comments, 2 participants]