{"slug": "claude-code-unbiased", "title": "Claude Code unbiased", "summary": "A developer built /ccu, a Claude Code skill that runs prompts in an isolated, config-free Claude Code instance to get unbiased answers. The skill launches a fresh temporary directory with an empty home and environment via env -i, pre-grants tool permissions in settings.json, and marks the work folder trusted, since Claude Code otherwise leaks bias through CLAUDE.md, skills, MCP servers and account profile data. In testing, the clean instance dropped the developer's Drupal-influenced answer and recommended Payload instead.", "body_md": "I once asked Claude Code which CMS it would recommend. I wanted to see which one it's biased toward. It said Drupal. Didn't expect that at all. When I asked why, it said it saw my custom Drupal skill and assumed I work with Drupal and would be comfortable with it.\n\nFair enough. My instructions, skills and settings make my agent biased. For this question, I needed an unbiased one. A plain chatbot would do, but we don't look for easy ways, huh? 😁\n\nSo I looked for a way to run Claude Code without my config and found the `--safe-mode` flag. The description sounded perfect: no CLAUDE.md, no skills, plugins, hooks or MCP servers, my subscription as usual. A clean default Claude Code ✨\n\nI asked again.\n\nDrupal\n\n(╯°□°)╯︵ ┻━┻\n\nThis time the reasoning was: my email in the agent's context → amazee.io domain → a company known for Drupal hosting → the user works at a Drupal-centric company.\n\nSo much for a clean Claude Code.\n\nThat's how `/ccu` (Claude Code, Unbiased by me) came about: a skill that runs a prompt in a clean Claude Code instance.\n\nI could have made it a shell command that opens a full unbiased Claude Code session. But usually I don't need to work in one. I just need a quick check now and then. So it's a skill: my usual agent writes the prompt, copies the files the task needs into an empty folder, runs a clean instance there and brings back its answer.\n\nWhat does a clean instance know about me? Nothing. Out of the box, it only sees the OS, the shell, a temp path and today's date.\n\nHow the instance is isolated\n\nEach run gets a fresh temporary directory with two folders: `work`, the instance's working directory with the task files, and `home`, an empty home directory. Then, roughly:\n\n```\ncd <run dir>/work\nenv -i HOME=<run dir>/home PATH=$PATH CLAUDE_CODE_OAUTH_TOKEN=<token> \\\n  claude -p --model <model> < prompt\n```\n\n`env -i` starts from an empty environment, so nothing leaks from my shell. The home directory is empty: no config, skills, memory or history. The token is the one my current session uses; `/ccu` takes it from the macOS Keychain. Same subscription, but no email: Claude Code keeps the account profile in `.claude.json`, written at login, and this home has never seen a login.\n\nPermissions have to be granted up front\n\n`claude -p` denies every tool that needs approval: there's nobody to approve it. So the main agent lists the tools the task needs in `work/.claude/settings.json`, e.g. for a web task:\n\n```\n{\"permissions\": {\"allow\": [\"WebFetch\", \"WebSearch\", \"Bash(curl:*)\"]}}\n```\n\nClaude Code ignores these settings in a folder it doesn't trust, so `/ccu` also marks `work` as trusted in the home's `.claude.json`:\n\n```\n{\"projects\": {\"<run dir>/work\": {\"hasTrustDialogAccepted\": true}}}\n```\n\nThe transcript stays for me\n\nAfter the run, `/ccu` turns the raw session log into a readable `transcript.md`. The main agent relays the instance's answer but never reads the transcript. I can read it myself when I want to.\n\nHow I use it\n\nIn all sorts of ways. One of them: this blog's reviewer personas, like an editor or a colleague.\n\nAnd the CMS? Through `/ccu`, Claude Code recommended Payload.\n\n┬─┬ノ( º _ ºノ)", "url": "https://wpnews.pro/news/claude-code-unbiased", "canonical_source": "https://dev.to/leksat/claude-code-unbiased-24l3", "published_at": "2026-12-04 05:09:37+00:00", "updated_at": "2026-12-04 05:15:06.755596+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models"], "entities": ["Claude Code", "Anthropic", "Drupal", "Payload", "amazee.io"], "also_reported_by": [], "takeaway": "Running Claude Code with env -i, an empty HOME and a fresh work directory strips CLAUDE.md, skills, MCP servers and the account profile, but you must pre-allow tools in settings.json and mark the folder trusted or headless runs deny every tool.", "recommendation": {"advice": "When you need an unbiased model answer, run Claude Code in a temp dir with env -i and an empty HOME, pre-allowing needed tools in settings.json and marking the folder trusted.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/claude-code-unbiased", "markdown": "https://wpnews.pro/news/claude-code-unbiased.md", "text": "https://wpnews.pro/news/claude-code-unbiased.txt", "jsonld": "https://wpnews.pro/news/claude-code-unbiased.jsonld"}}