• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ywcjxf1515
V2EX  ›  程序员

windows 上用 claude code,使用是 git bash 报错

  •  
  •   ywcjxf1515 · Jul 21 · 1913 views
    This topic created in 113 days ago, the information mentioned may be changed or developed.
    你们在 windows 上用 claude code ,使用的是 git bash
    会不会经常报 Error: Exit code 5
    0 [main] bash (6336) C:\Program Files\Git\bin\..\usr\bin\bash.exe: *** fatal error - add_item
    ("\??\C:\Program Files\Git", "/", ...) failed, errno 1


    已经把 hook 都改走 powershell
    还是会有 我怀疑是 statusline 不断调用 git bash 的问题
    Supplement 1  ·  Jul 21
    我现在是 agent 写了一个 c# exe ,里面是进程锁,相当于让 git bash 串行了
    10 replies  •  2026-07-21 17:45:25 +08:00
    YanSeven
    YanSeven
    Jul 21
    1
    让 claude code 自己原地诊断
    ywcjxf1515
    ywcjxf1515
    OP
    Jul 21 via Android
    2
    试了 其中一个版本说是起太多 git bash 进程的问题
    leihaibo1992
    3
    windows 上还是 powershell7 比较稳,或者上 wsl ,Git Bash 非常垃圾
    leihaibo1992
    4
    这些大厂的 agent 产品都优先考虑 mac 用户,windows 体验做到很烂,请体验一下我做的 octo-agent ( https://v2ex.com/t/1228101 ),所有操作系统都是第一公民,windows 小白用户都能立刻上手
    yidinghe
    yidinghe
    PRO
    Jul 21
    5
    一定要用 bash 的话,就在 WSL 里面用吧
    zuosiruan
    zuosiruan
    Jul 21
    6
    上面说的对,上 powershell7 ,巨稳定
    ywcjxf1515
    ywcjxf1515
    OP
    Jul 21
    7
    @zuosiruan claude code 不会一堆重试 为了跑对 powershell 命令
    WashFreshFresh
    8
    换个思路 我是在 git bash 里切到项目路径 然后气动的 claude 目前命令使用的都正常
    ywcjxf1515
    ywcjxf1515
    OP
    Jul 21
    9
    @WashFreshFresh 原理是?
    ywcjxf1515
    ywcjxf1515
    OP
    Jul 21
    10
    我现在是 agent 写了一个 c# exe ,里面是进程锁,相当于让 git bash 串行了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   949 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 19:41 · PVG 03:41 · LAX 11:41 · JFK 14:41
    ♥ Do have faith in what you're doing.