Git index file becomes corrupted: ".git/index: index file smaller than expected"
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Type: Bug
## Steps to Reproduce
1. Open an existing Git repository in Visual Studio Code.
2. Make sure the repository is working normally and Git operations such as `git status`, `git add`, and `git commit` work correctly.
3. Use the Antigravity extension to perform a vibe-coding session, where the extension/AI agent makes changes to multiple files in the repository.
4. After the vibe-coding session finishes, try to use Git through Visual Studio Code's Source Control integration or run Git commands from the integrated terminal.
5. Git fails with:
`fatal: .git/index: index file smaller than expected`
6. The issue can be temporarily recovered by deleting `.git/index` and running:
`git reset`
7. However, the issue happens again after another Antigravity vibe-coding session.
## Actual Result
After an Antigravity vibe-coding session completes, the Git index (`.git/index`) can become corrupted or truncated.
Git operations such as:
`git status`
`git add .`
`git commit`
may fail with:
`fatal: .git/index: index file smaller than expected`
This happens consistently after using Antigravity for vibe coding.
The problem does not appear during normal development when Antigravity is not being used.
Deleting `.git/index` and running `git reset` temporarily restores the repository, but the problem can occur again after another Antigravity session.
## Expected Result
The Git index should remain valid and intact while an extension or AI coding agent modifies files in the repository.
Using Antigravity should not cause `.git/index` to become corrupted, truncated, locked, or otherwise unreadable.
## Additional Information
- OS: Windows
- Visual Studio Code: 1.136.1
- Architecture: x64
- Git repository is located on an SSD.
- The issue started after updating Visual Studio Code.
- The issue is reproducible after using the Antigravity extension for vibe coding.
- Antivirus software is installed and running on the system.
This may indicate a possible interaction between the Antigravity extension, VS Code's Git integration, file watchers, concurrent file operations, file locking, or antivirus software.
VS Code version: Code 1.136.1 (a44adf7f53e00964ab890f9f8758a334f1fc15bc, 2026-09-03T05:06:41Z)
OS version: Windows_NT x64 10.0.26200
Modes:
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz (8 x 2496)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x9bc4 [Intel(R) UHD Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=27.20.100.9664 *ACTIVE*
GPU1: VENDOR= 0x10de, DEVICE=0x1f99 [NVIDIA GeForce GTX 1650], DRIVER_VERSION=31.0.15.1700
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8972
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.87GB (1.09GB free)|
|Process Argv|--crash-reporter-id 24f60526-02a0-4821-9606-a019152c6eb5|
|Screen Reader|no|
|VM|0%|
Extensions (21)
Name|Identifier|Author|Version
---|---|---|---
Claude Code for VS Code|anthropic.claude-code|Anthropic|2.1.263
Go|golang.go|golang|0.56.1
Google Antigravity|google.google-antigravity|google|1.2.0
LeetCode|leetcode.vscode-leetcode|LeetCode|0.18.4
Container Tools|ms-azuretools.vscode-containers|ms-azuretools|2.5.0
C# Dev Kit|ms-dotnettools.csdevkit|ms-dotnettools|3.20.199
C#|ms-dotnettools.csharp|ms-dotnettools|2.140.9
.NET Install Tool|ms-dotnettools.vscode-dotnet-runtime|ms-dotnettools|3.1.0
Python Debugger|ms-python.debugpy|ms-python|2026.6.0
Python|ms-python.python|ms-python|2026.4.0
Pylance|ms-python.vscode-pylance|ms-python|2026.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.36.0
CMake Tools|ms-vscode.cmake-tools|ms-vscode|1.23.52
C/C++ DevTools|ms-vscode.cpp-devtools|ms-vscode|0.6.18
C/C++|ms-vscode.cpptools|ms-vscode|1.33.8
Makefile Tools|ms-vscode.makefile-tools|ms-vscode|0.12.17
Codex – OpenAI’s coding agent|openai.chatgpt|openai|26.901.22334
Protobuf (Protocol Buffers)|pbkit.vscode-pbkit|pbkit|0.0.8
YAML|redhat.vscode-yaml|redhat|1.24.0
Live Server|ritwickdey.liveserver|ritwickdey|5.7.10
Unity|visualstudiotoolsforunity.vstuc|visualstudiotoolsforunity|1.3.1
A/B Experiments
```
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
82j33506:31327384
envsactivate1:31551504
gh487529:31544284
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ddidt:31399633
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
8hhj4413:31478653
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
46204921:31447328
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
h08i8180:31475369
ddid_c:31478207
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
a1ije391_t:31540920
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
gf14b233:31526830
ahp-both-windows:31556933
ihg5j128:31534457
9gg7f176:31542112
nes-ex-cf-euporie-03:31542868
enable_editor_pane_layout:31569726
allow-none:31555437
36h42362:31564511
c7c27ce7:31554789
1h923230:31564177
1532g621_copy:31554320
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
maidictation:31565333
0c1h4866:31566224
session-archive:31558132
5b8j3302:31564601
mangle-name-treatment:31572634
multiv2:31574985
2bfb8b39:31576696
permission_prompt_treatment:1332566
ccr_pr_nudge_adoption:1319471
vsc_wsm_c:1340633
jidc7660:1370295
auto_mode_treatment:1367907
14b85561:1348997
1g5a5742:1379227
```
Contributor guide
Assessment
This issue has not been assessed yet.