The hive router runs a synchronous `git add -A` + `git commit` on the main process for every routed message; nothing reads that history
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- electron, git, typescript
- Lĩnh vực
- desktop, devtools, performance
Hướng nghiên cứu
Start in src/main/hive.ts at HiveManager.commit() and the private git() helper (spawnSync). Remove git init for new hives and all commit() call sites (send(), routeOnce(), writeTasks(), register/role/archive/rename/session). Leave an existing hive/.git untouched. Done when routing a message does not spawn git and mail still delivers; log.jsonl remains the event record.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Fix verified in a fork (installed build, Windows 10):
- git runs per routed message: 2 → 0 (
git add -A+git commit→ none). - Process trace over 75 s around one routed message: 0 processes started by the app.
- The hive's
git logshows no new commits after the install; mail is delivered as before.
What happened?
Every hive state change ends in HiveManager.commit() (src/main/hive.ts):
send(),routeOnce()("hive: routed N message(s)"),writeTasks(), and the register, role, archive, rename and session changes.commit()runsgit add -Aand thengit committhrough the privategit()helper, which isspawnSync('git', …), on the Electron main process, with up to 5 retries and a synchronous sleep between them.
So each delivered message blocks the main process (IPC, PTY output and keystrokes included) for the duration of two git subprocesses. In normal agent-to-agent traffic that is about 2 commits per delivery (the sender's route pass, then the recipient's state change).
Nothing in src/ reads the hive's git history; log.jsonl is the event record the app actually uses. The repository is write-only, and it has already been the subject of several reports:
- #372: the startup archive loop's per-agent commits freezing launch;
- #378: a stale
HEAD.locksilently stopping all commits; - ccff49b5: stop versioning each Codex worker's
CODEX_HOMEafter.gitgrowth; - #479: a proposal to move the commit off the main thread.
Measured on Windows 10 (a hive with 6 agents, ~1,200 tracked files, .git 58 MB), in a fork build that shares this code path:
| measure | value |
|---|---|
main-process block per commit (git add -A + git commit, synchronous) |
~0.3–0.5 s |
| commit rate on an active hive | ~57 per hour |
| processes per commit | git add -A = git + child + conhost (≈130–240 ms); git commit = 4 git + conhost |
On-access antivirus inspects each process launch and each new object and index file, so on Windows the cost goes beyond git's own time.
Expected: routing a message costs a few small file writes and never blocks the main process on a subprocess.
Suggested fix (plain words):
- Stop committing the hive: no
git initfor new hives, nocommit()calls, no untrack or lock-clearing passes. log.jsonlstays the event record, and registry, tasks and inbox/outbox stay plain files, as today.- Leave an existing
hive/.gituntouched (no deletion or migration), so nobody loses history they may want. - We measured this change in a fork:
- 8 messages 7 s apart went from 16 git invocations (2 per message) to 0, with no
.gitcreated and mail delivered as before; - on the installed build, a 75 s process trace around one routed message shows 0 processes started by the app, and the hive's
git logshows no new commit.
- 8 messages 7 s apart went from 16 git invocations (2 per message) to 0, with no
Steps to reproduce
- On Windows, launch the app fresh and create a hive with 2 agents (any provider).
- In PowerShell, start a process watcher:
Register-CimIndicationEvent -Query "SELECT * FROM __InstanceCreationEvent WITHIN 0.1 WHERE TargetInstance ISA 'Win32_Process'" -SourceIdentifier p, and printTargetInstance.Name/CommandLinefromGet-Event. - Have agent A send agent B one message: write one JSON file into
hive/agents/<A>/outbox/. - The watcher shows
git … add -Aandgit … commit -q -m "hive: routed 1 message(s)"spawned by the app. Then B handles the message and a second commit follows. git -C <hive> log --oneline | headshows a commit per routing pass.git grepinsrc/finds no reader of that history.
Screenshot or screen recording
Text evidence instead of an image. These are a process trace and git log output for one routed message, captured with the watcher from step 2. The paths are redacted.
Before (the current code path):
# processes started by the app's main process for ONE routed message
07:46:37.779 git.exe git -c commit.gpgsign=false -c user.name=Hive -c user.email=hive@local -c gc.auto=0 -c maintenance.auto=false add -A
07:46:38.160 git.exe git -c commit.gpgsign=false -c user.name=Hive -c user.email=hive@local -c gc.auto=0 -c maintenance.auto=false commit -q -m "hive: routed 1 message(s), rejected 0, archived 0"
$ git -C <hive> log -1 --format='%h %ad %s' --date=iso-strict
e46fe0c 2026-09-26T09:46:38+02:00 hive: routed 1 message(s), rejected 0, archived 0
After (the fork with the fix, installed):
# processes started by the app's main process during a 75 s trace around ONE routed message
# total 0 processes
$ git -C <hive> log -1 --format='%h %ad %s' --date=iso-strict
d2d461c 2026-09-26T11:50:51+02:00 hive: routed 1 message(s), rejected 0, archived 0 <- last commit, before the fixed build was installed
Logs / stack trace
# WMI process trace, two routed messages on the current code path (paths redacted):
06:40:36.227 git.exe git -c commit.gpgsign=false -c user.name=Hive -c user.email=hive@local … add -A
06:40:36.913 git.exe git -c … commit -q -m "hive: routed 2 message(s), …"
06:40:53.665 git.exe git -c … add -A
06:40:53.845 git.exe git -c … commit -q -m "hive: routed 1 message(s), …"
Operating system / versions
- OS: Windows. OS version: Windows 10 Home 22H2 (build 19045).
- Munder Difflin version: measured on a fork build based on v0.4.5. The code path is unchanged on
main@ a7452eea (v0.5.3):HiveManager.commit()/git()insrc/main/hive.ts. - Node version: v20.19.5.
- Agent CLI: not relevant (it reproduces with any provider).
Pre-flight
- I attached a screenshot or recording above. (Text evidence pasted instead: the process trace and
git logoutput.) - I'm on the latest release, or I've said above why I can't be. (A fork based on v0.4.5; the same code is on
main@ a7452eea.) - I re-ran
npm install… (Not applicable: a packaged build.) - I searched existing issues and this isn't a duplicate. (#372, #378 and #479 are related, not the same.)
- Ngôn ngữ chính
- TypeScript
- Star
- 8.5k
- Fork
- 1.2k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 80
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của HarnessMD/munder-difflin
-
bug os:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
HarnessMD/munder-difflin#720 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
JetBrains Junie CLIĐang mởenhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
HarnessMD/munder-difflin#510 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ask Me counter counts down as questions are answered (5/5 to 1/5), which reads as questions disappearingCó thể làm lại được @xiechimon đã nhận 23 ngày trước và không có pull request nào đang mở. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
HarnessMD/munder-difflin#267 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 12/100
HarnessMD/munder-difflin#721 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
HarnessMD/munder-difflin#719 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của HarnessMD/munder-difflin
Issue tương tự
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openclaw/openclaw#168089 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
✨ enhancement needs-discussion
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inferenceCó thể đã có người làm @alok-108 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/playwright#43263 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:studio type:security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue Stellar Wave trivial
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
StellarCanary/ProtocolCanary-Action#331 ·
Maintainer thường phản hồi trong vòng 1 ngày