fix: support Gemini CLI 0.29.0 session path change and improve daemon reliability#87
Merged
bfly123 merged 2 commits intobfly123:mainfrom Feb 18, 2026
Conversation
Gemini CLI 0.29.0 changed session storage from SHA-256 hash to directory basename (~/.gemini/tmp/<basename>/ instead of ~/.gemini/tmp/<sha256>/). This caused CCB to hang indefinitely when polling for Gemini responses, as it only looked under the old SHA-256 path. Changes: - Add _compute_project_hashes() returning (basename, sha256) tuple - Update _get_project_hash() to prefer basename when its chats/ dir exists, fall back to SHA-256 for older Gemini CLI versions - Update _work_dirs_for_hash() to register both hash formats in cache so the watchdog can match session events from either format - Update GeminiLogReader to store _all_known_hashes set and scan all known hash directories in _scan_latest_session(), picking the newest session by mtime and auto-adopting the winning hash format This fix is backward compatible: projects using older Gemini CLI versions will continue to work via SHA-256 fallback.
- bin/ask: use daemon's work_dir from state file instead of cwd - bin/askd: add --work-dir parameter (also reads CCB_WORK_DIR env) - askd_server: write work_dir to state file for downstream consumers - askd/daemon: pass work_dir through to server - askd_client: add daemon work_dir as priority 3 in resolution chain - askd_runtime: add get_daemon_work_dir() helper - worker_pool: detect and replace dead worker threads - ccb-cleanup: new tool for cleaning zombie daemons and stale files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
directory basename, causing CCB to hang indefinitely when polling for
responses
bin/askuses caller's cwd as work_dir, which mismatches whencalled from subdirectories or scripts
failures
Fix
Gemini CLI 0.29.0 Compatibility
auto-adoption
Daemon Work Directory
bin/askdaccepts--work-dir/CCB_WORK_DIRto record projectroot
bin/askreads daemon's work_dir from state file instead of usingcwd
askd_clientadds daemon work_dir as resolution priority 3Robustness
ccb-cleanuptool for zombie daemon and stale file cleanupBackward Compatibility
GEMINI_PROJECT_HASHenv override still respected