Add worktree.enabled config flag to skip git worktree operations#61
Open
automatebrisbaneai wants to merge 17 commits intomrocklin:mainfrom
Open
Add worktree.enabled config flag to skip git worktree operations#61automatebrisbaneai wants to merge 17 commits intomrocklin:mainfrom
automatebrisbaneai wants to merge 17 commits intomrocklin:mainfrom
Conversation
When worktree.enabled is false in ~/.claude/.claudechic.yaml:
- Skips _populate_worktrees() on startup (no git worktree list call)
- Skips worktree branch autocomplete scanning (no blocking git calls)
- Adds EnterWorktree/ExitWorktree to disallowed_tools so subagents
run locally instead of creating isolated git worktrees
Solves significant UI hangs on Windows where git worktree operations
on large repos are slow (2-5s per subagent spawn). Users who don't
use the /worktree workflow get zero git overhead.
Enable/disable via ~/.claude/.claudechic.yaml:
worktree:
enabled: false # set true to restore default behaviour
- Paste raw clipboard images (Win+Shift+S screenshots) via PIL fallback - Fix Windows session path: replace ':' with '-' to match Claude Code's C--project-name format (was C-project-name, causing context bar to show zero and session history to fail) - Fix UnicodeDecodeError when loading session history on Windows (use UTF-8 instead of system default cp1252) - Add remote_port config key so HTTP server port can be set in .claudechic.yaml without needing --remote-port CLI flag every launch - Add /attach-image HTTP endpoint for external tool integration (e.g. ShareX) - Graceful fallback when remote port is already in use (warning instead of crash) - Disable worktree tools (EnterWorktree/ExitWorktree) when worktree.enabled: false Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All workers now use exit_on_error=False with a central on_worker_state_changed handler that shows the error message as a corner notification (severity=error, 10s timeout) and logs it. Previously any worker failure would crash the whole app and close the window. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ctx_execute and other mcp__plugin_context-mode__ tools are noisy sandbox utilities that don't need to be visible in the chat flow. Added prefix-based collapse rule so any tool whose name starts with mcp__plugin_context-mode starts collapsed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Users can override via collapse-tool-prefixes in .claudechic.yaml. Default list: mcp__plugin_context-mode, mcp__searxng. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MCP tools like mcp__searxng__searxng_web_search now display as 'Web Search: <query>' instead of the raw tool name. Explicit labels for context-mode, searxng, and qmd tools. Generic title-case fallback for any other mcp__ tool. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- qmd__query: show intent field (human-readable) not raw search array - ctx_execute: show language mode - ctx_execute_file: show filename + language - ctx_batch_execute: show command count - qmd__get: show filename not full path - searxng: show query (unchanged) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
config.setdefault stores None when key is absent; dict.get() returns the stored None rather than the default arg, causing tuple(None) to crash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous session often leaves port 9001 held after unclean exit. On OSError, find the PID via netstat and kill it, then retry binding. Falls back to warning notification only if retry also fails. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevents killing unrelated services or live sessions on the same port. tasklist check ensures we only reclaim ports from crashed Python instances. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ExitPlanMode was creating a Markdown widget eagerly, which spawns hundreds of child widgets for large plans and blocks Textual's layout thread. Also had a double-render path via _try_update_plan_content. Fixed by: - Using content_factory lazy loading for collapsed items (same as Edit) - Replacing Markdown with Static(markup=False) - instantaneous render - Fixing sync read_text() to use utf-8 encoding Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…shot paste grabclipboard() blocks the event loop on Windows while reading/converting large clipboard images. Moving it to asyncio.to_thread() keeps the UI responsive during paste operations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Auto-kill stale port process on startup (Python-only, safe for live sessions) - Clipboard paste freeze fix (asyncio.to_thread for PIL grabclipboard) - Plan review hang fix (Static instead of Markdown, lazy content_factory) - Startup crash fix (None-safe config fallback for collapse-tool-prefixes) - Desktop shortcut now launches ClaudeChic via python -m claudechic Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each session now displays a subtitle line showing the last thing you typed — making it easy to spot "which one was I just working in". Search also matches against the last message, not just the title. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
During streaming, Markdown.append() creates a new parser and does remove()+mount() DOM operations on every text chunk. For a chat with hundreds of tool widgets, each DOM op triggers a full layout pass over all widgets — causing the UI to freeze constantly while Claude types. Fix: new streaming messages start as Static (zero DOM cost per update). On flush(), Static is swapped to Markdown once (one acceptable render). History messages (non-empty initial content) still render as Markdown. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
On Windows (and likely slow-git repos generally), every subagent spawned with
isolation: \"worktree\"triggersgit worktree add+git worktree remove— each taking 2–5 seconds on a large repo. This causes noticeable UI hangs every time an agent is created.Additionally,
_populate_worktrees()and the worktree autocomplete scan both callgit worktree liston startup and on every autocomplete refresh, adding further overhead for users who don't use the/worktreeworkflow at all.Solution
Add a
worktree.enabledflag to~/.claude/.claudechic.yaml(defaultstrue, preserving existing behaviour).When set to
false:_populate_worktrees()returns immediately — no git call on startuplist_worktrees()callEnterWorktreeandExitWorktreeare added todisallowed_toolsinClaudeAgentOptions— subagents run locally in the current directory instead of creating isolated git worktreesUsage
Changes
claudechic/config.py— addsworktree.enableddefaultclaudechic/app.py— gates three worktree code paths on the config flagNo behaviour change for users who don't set the flag.