Skip to content

fix: symlink settings.json and plugins to isolated config dir#162

Open
D3OXY wants to merge 6 commits into21st-dev:mainfrom
D3OXY:fix/symlink-settings-json
Open

fix: symlink settings.json and plugins to isolated config dir#162
D3OXY wants to merge 6 commits into21st-dev:mainfrom
D3OXY:fix/symlink-settings-json

Conversation

@D3OXY
Copy link

@D3OXY D3OXY commented Feb 5, 2026

Summary

The Claude binary runs with CLAUDE_CONFIG_DIR set to an isolated directory per session. While skills/ and agents/ directories were already symlinked from ~/.claude/, both settings.json and plugins/ were missing.

This caused:

  • User settings (includeCoAuthoredBy, permissions, hooks, etc.) to be invisible to the Claude binary running inside 1Code
  • User-installed plugins (e.g. CC Safety Net) to not load at all

Changes

  • Symlink ~/.claude/settings.json → isolated config dir (user's global settings)
  • Symlink ~/.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.

Suggestion: Consider bundling CC Safety Net (or a similar guard) as a default plugin in 1Code, given that bypass permissions are enabled by default. This would provide a safety baseline for all users out of the box, not just those who manually install plugins via Claude Code CLI.

Test plan

  • Verify settings.json symlink: change a setting in ~/.claude/settings.json (e.g. includeCoAuthoredBy: false), restart 1Code, and confirm it takes effect
  • Verify plugins symlink: install a plugin via claude plugins add, restart 1Code, and confirm the plugin loads (check hooks/MCP output)
  • Verify no regression: sessions without ~/.claude/plugins/ or ~/.claude/settings.json still start normally

D3OXY and others added 6 commits February 5, 2026 22:13
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).
@D3OXY D3OXY changed the title fix: symlink settings.json to isolated config dir fix: symlink settings.json and plugins to isolated config dir Feb 7, 2026
@D3OXY
Copy link
Author

D3OXY commented Feb 7, 2026

Updated this PR to also symlink the ~/.claude/plugins/ directory to the isolated config dir.

Why this matters

1Code 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 plugins/ directory is invisible to the Claude binary in the isolated config dir, so safety hooks silently don't load. This effectively leaves users unprotected even if they've explicitly installed protection.

Suggestion for the team

Given 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.

@D3OXY
Copy link
Author

D3OXY commented Feb 7, 2026

@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?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants