fix: symlink settings.json and plugins to isolated config dir#162
fix: symlink settings.json and plugins to isolated config dir#162D3OXY wants to merge 6 commits into21st-dev:mainfrom
Conversation
The Claude binary runs with CLAUDE_CONFIG_DIR set to an isolated directory per session. While skills/ and agents/ were symlinked from ~/.claude/, settings.json was not. This caused user settings (includeCoAuthoredBy, permissions, hooks, etc.) to be invisible to the Claude binary running inside 1Code. Now settings.json is symlinked alongside skills and agents, so the binary sees the user's global settings.
## What's New ### Features - **Claude Code 2.1.32** — Updated to Claude Code binary 2.1.32, SDK 0.2.32, added Opus 4.6 model support - **Thinking Stream UI** — Streaming thinking content with improved thinking tool visualization and elapsed time display - **Inbox Redesign** — Redesigned inbox pages with context menus, fork locally option, and sidebar improvements - **Automation Tracking** — Automation execution tracking in Linear start-agent with auto-save support ### Improvements & Fixes - **Auto-Retry on Policy Errors** — Silent retries with 3s/6s delays on false-positive USAGE_POLICY_VIOLATION errors, friendlier error messages - **Model Names** — Added version numbers to Sonnet 4.5 and Haiku 4.5 model names - **Sub-Chat Stability** — Fixed sub-chat loading race condition, hover prefetch, and chat timestamp bug - **Chat Image Persistence** — Persist chat images across sessions and prevent duplicate messages - **Chat Name Language** — Generate chat names in the same language as user's message - **Git Fixes** — Fixed git diff view, git widget, git selection state, and relative display paths - **Context Counter** — Fixed context counter display - **MCP Timeout** — Fixed MCP timeout handling - **Onboarding Token Fix** — Disabled CLI token import in onboarding (tokens expire in ~8 hours) - **Scroll-to-Bottom Button** — Responsive scroll-to-bottom with CSS variable sizing - **Sidebar Toggle** — Unified sidebar toggle button sizes in sub-chat selector - **Build Fix** — Pinned source-map to 0.7.4 to fix electron-builder packaging error
## What's New ### Features - **Git Activity Badges** — Show git activity badges on agent messages ### Improvements & Fixes - **Status Card** — Hide expand chevron when no files to show - **Git Modal** — Fixed crash after git modal close - **Git Pull** — Fixed git pull functionality - **Env Config** — Fixed missing comma in env assignment
## Features - **Context Menu for Images** — Copy and save options added to fullscreen image viewer - **Graduated from Beta** — Rollback, Kanban, and Tasks features now available to all users - **Version Tags in History** — Show version tags on commits in history view ## Improvements & Fixes - **Optimized Archive Popover** — Improved archive popover with UnarchiveIcon - **Web Search Simplification** — Simplified web search results to single-line without icons - **Pasted Text Label** — Show "Using pasted text" label instead of "selected text" for pasted content - **Theme-Consistent Toasts** — Ensure toasts follow user-selected theme colors - **Auto-Collapse Sub-Agent** — Auto-collapse sub-agent tool when task completes - **Auto-Scroll on Send** — Scroll to bottom when queued message is auto-sent - **Thinking Tool UX** — Auto-expand/collapse thinking tool and fix exploring group collapse ## Downloads - **macOS ARM64 (Apple Silicon)**: Download the `-arm64.dmg` file - **macOS Intel**: Download the `.dmg` file (without arm64) Auto-updates are enabled. Existing users will be notified automatically.
## What's New ### Features - Open pushed commits on GitHub - Enable extended thinking by default ### Improvements & Fixes - Fix history view remote link - Handle rebase when resolving commit hash for GitHub URL - Show thinking gradient only when content overflows - Improve thinking tool content visibility - Hide scrollbar in thinking tool during streaming - Display model version separately in model selector - Move rollback button to user message bubble and restore input content ## Downloads - **macOS ARM64 (Apple Silicon)**: Download the `-arm64.dmg` file - **macOS Intel**: Download the `.dmg` file (without arm64) Auto-updates are enabled. Existing users will be notified automatically.
Symlink ~/.claude/plugins to the isolated config dir so Claude binary can load user-installed plugins (e.g. CC Safety Net).
|
Updated this PR to also symlink the Why this matters1Code runs with bypass permissions by default — the agent has unrestricted access to shell commands, file writes, etc. Users who install safety plugins like CC Safety Net via Claude Code CLI expect those plugins to work everywhere Claude runs, including inside 1Code. Without this symlink, the Suggestion for the teamGiven that 1Code uses bypass permissions by default, it might be worth considering shipping a safety plugin (like CC Safety Net) as a built-in default. This would give all users a baseline safety net against destructive commands out of the box, without requiring them to discover and manually install a third-party plugin. |
|
@serafimcloud Hey! Would you be open to me adding CC Safety Net as a default plugin? Feels like a no-brainer since 1Code runs with bypass perms. Anything I should keep in mind before jumping in? |
Summary
The Claude binary runs with
CLAUDE_CONFIG_DIRset to an isolated directory per session. Whileskills/andagents/directories were already symlinked from~/.claude/, bothsettings.jsonandplugins/were missing.This caused:
includeCoAuthoredBy,permissions,hooks, etc.) to be invisible to the Claude binary running inside 1CodeChanges
~/.claude/settings.json→ isolated config dir (user's global settings)~/.claude/plugins/→ isolated config dir (user-installed plugins)Why plugins matter — Security consideration
1Code runs Claude with bypass permissions by default, giving the agent unrestricted access to commands (file writes, shell execution, etc.). This means there is no built-in guard against destructive operations like
rm -rf, force pushing,DROP TABLE, etc.Plugins like CC Safety Net exist specifically to block these destructive commands via hooks. But since the
plugins/directory wasn't being symlinked, these safety plugins were silently ignored when running through 1Code — defeating their purpose entirely.Test plan
settings.jsonsymlink: change a setting in~/.claude/settings.json(e.g.includeCoAuthoredBy: false), restart 1Code, and confirm it takes effectpluginssymlink: install a plugin viaclaude plugins add, restart 1Code, and confirm the plugin loads (check hooks/MCP output)~/.claude/plugins/or~/.claude/settings.jsonstill start normally