Skip to content

settings.system.json: 'cd && <trusted tool>' is declared safe in autoMode.allow but has no deterministic permissions.allow rule #1721

Description

@xmasyx

Summary

LifeOS/install/settings.system.json declares that compound cd && <trusted tool> commands are safe, but that intent lives only in autoMode.allow (a natural-language list evaluated by a classifier). The deterministic permissions.allow list has no rule matching cd, so these commands fall through to a judgment call instead of a hard allow.

Result: intermittent permission prompts for commands the config itself calls safe.

Evidence (read from the repo at main)

LifeOS/install/settings.system.json, autoMode.allow:

"Compound commands chaining trusted tools (cd && bunx, cd && bun, cd && git, cd && wrangler) are safe — cd just changes directory before running an allowed command",

Same file, permissions.allow — 229 entries, 132 of them Bash(...):

  • Bash(bun:*), Bash(bunx:*), Bash(bun run:*) are present
  • zero entries begin with Bash(cd

Claude Code's deterministic matcher evaluates each segment of a compound command. In cd <dir> && bun <script>.ts the bun segment matches an allow rule; the cd segment matches nothing. With defaultMode: "auto" the decision then falls to the autoMode classifier, which is inherently non-deterministic — matching the reported symptom of prompts appearing sometimes rather than always for an identical command shape.

Impact

Any install using the shipped settings.system.json in auto mode gets sporadic prompts on the most common command shape in the system (cd <workdir> && bun <tool>.ts). Because the prompt renders the whole command, users read it as a prompt on bun, which is already fully allowed — so the cause is easy to misattribute.

Proposed fix

Add one entry to permissions.allow in LifeOS/install/settings.system.json:

"Bash(cd:*)",

This is low-risk: allowing cd does not allow the chained segment. Each segment is still matched independently, so cd X && rm -rf Y remains subject to the rm -rf rules, and permissions.deny still takes precedence over everything.

Alternative

If blanket-allowing cd is not desired, the opposite fix is equally valid: remove the autoMode.allow line above, so the config stops declaring an intent it does not enforce deterministically.

Either way the two layers should agree.

Note

The same file also appears at LifeOS/install/skills/LifeOS/install/settings.system.json, which looks like an unintended nested duplicate from packaging. Worth checking separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions