Skip to content

fix: exclude Chrome/CDP browser profiles from checkpoint snapshots - #68723

Open
Thomasp23 wants to merge 1 commit into
NousResearch:mainfrom
Thomasp23:fix/checkpoint-exclude-chrome-locks
Open

Thomasp23 wants to merge 1 commit into
NousResearch:mainfrom
Thomasp23:fix/checkpoint-exclude-chrome-locks

Conversation

@Thomasp23

Copy link
Copy Markdown

Problem

When checkpoints.enabled: true, every write_file triggers a git add -A in the working directory before creating a snapshot. On Windows, Chrome locks its profile files (Cookies, GPUPersistentCache/cache.db, etc.) while running. The git add -A blocks indefinitely on these locked files, freezing write_file for minutes.

Relevant logs:

Git command failed: git add -A (rc=128)
error: open("chrome_cdp_profile/GPUPersistentCache/DawnGraphiteCache/.../cache.db"): Permission denied
error: open("agent-browser-chrome-.../Default/Network/Cookies"): Permission denied

Fix

Add chrome_cdp_profile/ and agent-browser-chrome-*/ to DEFAULT_EXCLUDES in checkpoint_manager.py. These directories are created by the browser automation tool and should never be checkpointed.

Testing

  • Python syntax: OK
  • Existing checkpoint tests: not run (no pytest on this Windows install)
  • Manual verification: fix resolves the write_file freeze on a Windows machine with Chrome running and checkpoints.enabled: true

Chrome locks its profile files (Cookies, GPUPersistentCache, etc.) on
Windows.  When checkpoints are enabled, the pre-write git add -A blocks
indefinitely on these locked files, freezing every write_file call for
minutes.

Add 'chrome_cdp_profile/' and 'agent-browser-chrome-*/' to
DEFAULT_EXCLUDES so git add -A skips them.  These directories are
created by the browser automation tool (hermes-tools) and should never
be checkpointed.

Fixes: write_file freeze on Windows when checkpoints are enabled
@alt-glitch alt-glitch added type/bug Something isn't working tool/file File tools (read, write, patch, search) tool/browser Browser automation (CDP, Playwright) platform/windows Native Windows-specific behavior or breakage P2 Medium — degraded but workaround exists sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows labels Jul 21, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracing this Windows checkpoint failure to browser profile files.

Problems

  • tools/checkpoint_manager.py:438-439 returns for every existing shared checkpoint store before the only info/exclude write at tools/checkpoint_manager.py:482-484. The added defaults therefore affect new stores only, while affected existing installations retain the old exclude file.
  • Existing project checkpoints load their prior tree into a persistent index at tools/checkpoint_manager.py:1029-1034 before the git add -A at tools/checkpoint_manager.py:1048-1051. Ignore rules do not remove paths that were already tracked, so prior browser-profile snapshots need migration/cleanup too.

Suggested changes

  • Refresh the managed exclude file for existing stores and remove matching already-tracked profile paths before staging; add behavioral tests for both an existing store/index and the two patterns.
  • Please preserve LF line endings: the PR currently appears as +1678/-1675 for a three-line logical edit, which makes salvage unnecessarily risky.

Automated hermes-sweeper review.

"Thumbs.db",
# Logs
"*.log",
# Chrome / CDP browser profiles (locked files break git add -A on Windows)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These defaults are only written for a newly initialized store: _init_store() returns at current main tools/checkpoint_manager.py:438-439 when store/HEAD exists, before the info/exclude write at lines 482-484. Please add an idempotent existing-store update path, otherwise the Windows installations already experiencing this issue retain the old exclude file.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform area/profiles Multi-profile isolation, HERMES_HOME scoping labels Jul 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping P2 Medium — degraded but workaround exists platform/windows Native Windows-specific behavior or breakage sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows tool/browser Browser automation (CDP, Playwright) tool/file File tools (read, write, patch, search) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants