You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hooks you're hitting are the pre-0.25.0 entries: teamai ≤ 0.24.0 rendered ZCode hooks as a bare bash, which Windows resolves to System32's WSL launcher before any PATH entry — inside WSL there's no npm-global teamai, so every dispatch fails silently (your 800 hook.run.failed). This was fixed in #596: on Windows the hooks now launch through a hidden wscript VBS launcher (no console flash, STDIN preserved), and pull reconciles the entries on first run.
npm i -g teamai-cli@latest (v0.25.0) and run teamai pull once — the old bash entries get replaced automatically. Verified on a live Windows box: auto-pull on session start has been running daily without a single failure since the fix.
Activity
linezuhaichao-debug commentedon Sep 21, 2026
问题:windows系统使用zcode,开了新会话,teamai没有自动拉取最新的团队资源。
以下答案为glm5.3flash产出
结论先说:teamai 的自动拉取机制本身没坏,坏的是 ZCode 根本启动不了它的钩子进程——从 9-20 装上那天起,自动 pull 就一次都没成功过(ZCode 日志里两天累计 800 次 hook.run.failed)。
根因
teamai 给 ZCode 注入的钩子用的是裸命令名 bash,靠启动时的 PATH 解析。而 ZCode 桌面进程的 PATH 里只有 Git\cmd(没有 bash),bash 被解析到了 C:\Windows\system32\bash.exe——那是 WSL 的占位符,你机器上没装 WSL 发行版,所以钩子进程一启动就报错退出(~90ms)。之前手动测试一直正常,是因为在 Git Bash 终端里 bash 解析到的是 Git 自己的 bash——环境不同,测不出问题。
修了什么
钩子命令改为绝对路径:~/.zcode/cli/config.json 里 6 个 teamai 钩子的 command 从 bash 改成 C:/Program Files/Git/bin/bash.exe。
给 teamai CLI 打了补丁(防它自动 reconcile 时改回去):npm 全局包里 toZcodeEntry 现在读取 TEAMAI_BASH_PATH 环境变量生成钩子命令,托管识别逻辑也同步放宽。已验证 teamai pull 后钩子格式保持不变(幂等)。
持久化:setx TEAMAI_BASH_PATH "C:\Program Files\Git\bin\bash.exe" 写入了用户环境变量。
顺带把 hooks inject 重新写进 claude/codex 的死钩子又摘掉了(你之前手动清过,那个命令会绕过 enabledAgents)。
hc-tec commentedon Sep 24, 2026
The hooks you're hitting are the pre-0.25.0 entries: teamai ≤ 0.24.0 rendered ZCode hooks as a bare
bash, which Windows resolves to System32's WSL launcher before any PATH entry — inside WSL there's no npm-global teamai, so every dispatch fails silently (your 800hook.run.failed). This was fixed in #596: on Windows the hooks now launch through a hidden wscript VBS launcher (no console flash, STDIN preserved), andpullreconciles the entries on first run.npm i -g teamai-cli@latest(v0.25.0) and runteamai pullonce — the old bash entries get replaced automatically. Verified on a live Windows box: auto-pull on session start has been running daily without a single failure since the fix.