# BUG fig: Error: Command failed: fig hook keyboard-focus-changed cursor 0

**URL:** <https://forum.cursor.com/t/bug-fig-error-command-failed-fig-hook-keyboard-focus-changed-cursor-0/87351>\
**Category:** Bug Reports\
**Created:** [May 7, 2025, 7:18am UTC](https://forum.cursor.com/t/bug-fig-error-command-failed-fig-hook-keyboard-focus-changed-cursor-0/87351 "2025-05-07T07:18:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![12121212](https://avatars.discourse-cdn.com/v4/letter/1/a3d4f5/32.png) [@12121212](https://forum.cursor.com/u/12121212)\
**Post date:** [May 7, 2025, 7:18am UTC](https://forum.cursor.com/t/bug-fig-error-command-failed-fig-hook-keyboard-focus-changed-cursor-0/87351/1 "2025-05-07T07:18:22Z")

</div>

[Extension Host] fig: Error: Command failed: fig hook keyboard-focus-changed cursor 0  
/bin/sh: fig: command not found

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [May 7, 2025, 7:22am UTC](https://forum.cursor.com/t/bug-fig-error-command-failed-fig-hook-keyboard-focus-changed-cursor-0/87351/2 "2025-05-07T07:22:17Z")

</div>

Hey, it seems the issue is related to the Fig extension. You need to remove it. If it’s not in the list of extensions, you can manually delete it from the extensions folder or use the solution from here:

> <https://github.com/withfig/fig/issues/2246>
>
> \### Checks
> 
> \- \[X\] I have searched \[github.com/withfig/fig/issues\](https://gith…ub.com/withfig/fig/issues?q=) and there are no duplicates of my issue
> \- \[X\] I have run \`fig doctor\` in the affected terminal session
> \- \[X\] I have run \`fig restart\` and replicated the issue again
> 
> \### Operating system
> 
> macOS 11.2.3 (20D91)
> 
> \### Expected behaviour
> 
> Although no behavior is expected, all extensions must run originally. However, as Fig goes down, all the extensions are also terminated.
> 
> \### Actual behaviour
> 
> \<img width="665" alt="Screen Shot 2023-01-20 at 2 29 16 PM" src="https://user-images.githubusercontent.com/59228569/213624047-09790e58-29a9-4758-9ec0-2dd599f9258d.png"\>
> 
> + Command failed: fig hook keyboard-focus-changed vscode 19180
> 
> However, if 'fig' enters a command, it works fine.
> 
> \### Steps to reproduce
> 
> Shortly after running Vscode, all extensions are terminated with a warning message \*\*'Extension host terminated unexpected 3 times with the last 5 minutes.'\*\*
> 
> \### Environment
> 
> \`\`\`yaml
> fig-details:
> - 2.12.0
> hardware-info:
> - model: 
> - model-id: 
> - chip-id: Apple M1
> - cores: 8
> - mem: 8.00 GB
> os-info:
> - macOS 11.2.3 (20D91)
> environment:
> - shell: /bin/zsh
> - terminal: vscode
> - cwd: /Users/jam/Desktop
> - exe-path: /Users/jam/.fig/bin/fig
> - install-method: unknown
> - env-vars:
> - FIGTERM\_SESSION\_ID: fe412bda-66f5-4ba2-9680-bef9f2ece6a7
> - FIG\_SET\_PARENT\_CHECK: 1
> - FIG\_TERM: 2.12.0
> - PATH: /Users/jam/.bun/bin:/Users/jam/.bun/bin:/Users/jam/.gem/bin:/Users/jam/.nvm/versions/node/v16.18.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Apple/usr/bin:/Users/jam/.cargo/bin:/Users/jam/.fig/bin:/Users/jam/.local/bin:/Users/jam/.local/share/fig/plugins/git-flow
> - SHELL: /bin/zsh
> - TERM: xterm-256color
> - ZDOTDIR: /Users/jam
> - \_\_CFBundleIdentifier: com.microsoft.VSCode
> - FIG\_PID: 5943
> - FIG\_SET\_PARENT: fe412bda-66f5-4ba2-9680-bef9f2ece6a7
> \`\`\`

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 6, 2025, 7:23am UTC](https://forum.cursor.com/t/bug-fig-error-command-failed-fig-hook-keyboard-focus-changed-cursor-0/87351/3 "2025-06-06T07:23:11Z")

</div>

Closed on June 6, 2025, 7:23am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
