slopus/happy · warning
⚠️ Warning: --settings is used internally by Happy for sess
Error message
⚠️ Warning: --settings is used internally by Happy for session tracking.
What it means
happy intercepts the `--settings` flag because it uses it internally for session hooks/tracking. When a user passes --settings (normally a Claude Code flag), happy warns that the flag is consumed and not forwarded to Claude. This first line is the headline of that multi-line warning.
Source
Thrown at packages/happy-cli/src/index.ts:683
const eqIndex = envArg.indexOf('=')
const key = envArg.substring(0, eqIndex)
const value = envArg.substring(eqIndex + 1)
options.claudeEnvVars = options.claudeEnvVars || {}
options.claudeEnvVars[key] = value
} else {
console.error(chalk.red(`Invalid --claude-env format: ${envArg}. Expected KEY=VALUE`))
process.exit(1)
}
} else if (arg === '--chrome') {
chromeOverride = true
// We'll add --chrome to claudeArgs after resolving settings default
} else if (arg === '--no-chrome') {
chromeOverride = false
// Happy-specific flag to disable chrome even if default is on
} else if (arg === '--settings') {
// Intercept --settings flag - Happy uses this internally for session hooks
const settingsValue = args[++i] // consume the value
console.warn(chalk.yellow(`⚠️ Warning: --settings is used internally by Happy for session tracking.`))
console.warn(chalk.yellow(` Your settings file "${settingsValue}" will be ignored.`))
console.warn(chalk.yellow(` To configure Claude, edit ~/.claude/settings.json instead.`))
// Don't pass through to claudeArgs
} else {
// Pass unknown arguments through to claude
unknownArgs.push(arg)
// Check if this arg expects a value (simplified check for common patterns)
if (i + 1 < args.length && !args[i + 1].startsWith('-')) {
unknownArgs.push(args[++i])
}
}
}
// Add unknown args to claudeArgs
if (unknownArgs.length > 0) {
options.claudeArgs = [...(options.claudeArgs || []), ...unknownArgs]
}
View on GitHub (pinned to b824cd0a46)
Solutions
- Remove --settings from the invocation; edit ~/.claude/settings.json directly instead.
- If you need per-invocation Claude settings, use environment variables or a wrapper that invokes the real claude CLI outside happy.
- Ignore the warning if you weren't intentionally passing --settings — behavior is otherwise unaffected.
Example fix
// before happy claude --settings ./my-claude-settings.json -p "do it" // after # move contents of my-claude-settings.json into ~/.claude/settings.json happy claude -p "do it"
Defensive patterns
Strategy: validation
Validate before calling
// before launching via happy, check args for intercepted flags
const intercepted = ['--settings'];
const bad = process.argv.filter(a => intercepted.includes(a));
if (bad.length) console.warn(`happy intercepts ${bad.join(' ')} — it will not reach Claude.`); Prevention
- Never pass Claude-specific flags through happy without checking happy's arg docs.
- Configure Claude via ~/.claude/settings.json, not per-invocation flags.
- Grep wrapper scripts for --settings before running them under happy.
- Read the warning output fully — happy explains the supported alternative.
When it happens
Trigger: Running `happy claude ... --settings <file>` (or any happy launch command that parses claude args) — the flag is matched in the arg loop and never added to claudeArgs.
Common situations: Users copying a Claude Code invocation containing --settings into happy, or scripts that pass Claude settings overrides expecting them to reach the Claude CLI.
Related errors
- Your settings file "${settingsValue}" will be ignored.
- To configure Claude, edit ~/.claude/settings.json instead
- No machine ID found in settings
- No machine ID found in settings
- No machine ID found in settings
AI-assisted analysis of slopus/happy@b824cd0a46 (2026-08-31).
Data as JSON: /api/errors/872e8c8f6b4fa857.
Report an issue: GitHub.