addyosmani / addyosmani/agent-skills

SessionStart hook exits with code 1 on native Windows Codex (bash/jq-only hook)

オープン
#475 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
93.8k
フォーク
10k
平均マージ
3日 15時間
マージ済み PR(30日)
23

説明

## Summary

The bundled `SessionStart` hook exits with code 1 when this plugin is used from Codex Desktop on native Windows.

The individual skills still load and remain usable, but Codex displays a plugin hook failure notification at session start and the `using-agent-skills` context is not injected.

## Current behavior

The current `hooks/hooks.json` only defines a POSIX `command`. It invokes `hooks/session-start.sh`, which requires Bash and `jq`, and resolves paths through Claude-specific environment variables.

There is no Windows-specific `commandWindows` handler.

## Reproduction

Environment:

- Codex Desktop on native Windows
- agent-skills plugin 0.6.6
- No working WSL distribution
- `bash` resolves to the Windows WSL launcher
- `jq` is not installed

Steps:

1. Enable the agent-skills plugin in Codex Desktop.
2. Start or resume a session.
3. Observe: `SessionStart plugin hook exited with code 1`.

A direct invocation of the resolved `bash.exe` also exits with code 1 because WSL cannot create a Linux instance.

## Expected behavior

Native Windows users should either:

- receive the same meta-skill context through a Windows-native hook; or
- have this optional hook skip cleanly without displaying a failure.

Installing WSL and `jq` should not be required merely to use the plugin from native Windows Codex.

## Suggested fix

Add a Windows-specific `commandWindows` handler, as supported by Codex hooks, using PowerShell without Bash or `jq`. Keep the existing POSIX command for macOS/Linux.

A Windows regression test would also prevent recurrence.

Codex hook reference: https://learn.chatgpt.com/docs/hooks

## Impact

Low severity but persistent UX issue:

- project work, builds, tests, and individual skills are unaffected;
- automatic `using-agent-skills` context injection fails;
- the warning appears at session start and looks more serious than the actual impact.

Editing the installed plugin cache is not a durable workaround because plugin updates or cache refreshes can overwrite it.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。