Skip to content

fix(config): a project-root altimate-code.json is ignored, including its permission rules #1589

Open

Description

@sahrizvi

docs/docs/configure/config.md and docs/docs/configure/permissions.md say a project-root altimate-code.json is read. It isn't: config.ts calls ConfigPaths.files("opencode", …), which only looks for opencode.json(c) at the root. A root opencode.json and .altimate-code/altimate-code.json both load.

Repro on the 0.12.8 build: project-root altimate-code.json with {"permission":{"read":{"*secret.txt":"deny"}}}; debug config shows no permission, and the agent reads secret.txt. The same file under .altimate-code/ denies the read.

This matters because a user who follows the docs to add deny rules gets no protection and no warning. Either load the root altimate-code.json (with defined precedence against opencode.json), or fix the docs and warn when the file is present but ignored. In the code since v0.11.1 (cf46d65).

Found during the v0.12.8 release e2e. Not a regression in 0.12.8: the same behaviour is in 0.12.7.

Activity

  1. rahulsjha commented on Nov 20, 2026

    @rahulsjha

    Hi @sahrizvi, I'd like to fix this one.

    Plan:

    • Load a project-root altimate-code.json (and .jsonc) in config.ts next to opencode.json, with a defined precedence: .altimate-code/altimate-code.json over a root altimate-code.json over a root opencode.json, merged the same way the existing files are.
    • Show the loaded file in debug config, so it's clear which file a rule came from.
    • Tests: your repro (a root altimate-code.json deny on *secret.txt now denies the read), the precedence between the three files, and no change when only opencode.json is present.
    • Update config.md and permissions.md to spell out the precedence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions