Skip to content

set readonly and not ignore permissions #3055

Closed

Description

@wojons

When using opencode with things you would not want in a repo you would add to .gitignore but if you want to use @ to flag a file it will not let you having a file if its just .opencodenotignore or a more complex config file would allow for users still not have the file sent to the code repo but still be able to reference it when using opencode.

A readonly permission to allow the model to read important docs specs etc but not be allowed to edit them

Activity

  1. github-actions commented on Oct 9, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Oct 9, 2025

    @rekram1-node
    Contributor

    @wojons opencode uses ripgrep so you can make a:

    .ignore
    .rgignore

    and specify the rules you want opencode to respect.

    Example:

    local.txt is in gitignore but I want to be able to @ reference it

    in .ignore or .rgignore put:
    !local.txt

    and then it will respect that

  3. self-assigned this
    on Oct 9, 2025
  4. wojons commented on Oct 9, 2025

    @wojons
    Author

    This is great :) it worked exactly how do we add this to the docs so that others can get access to this information

  5. rekram1-node commented on Oct 9, 2025

    @rekram1-node
    Contributor
  6. rekram1-node commented on Oct 14, 2025

    @rekram1-node
    Contributor

    going to close I think we solved your issue, if you want an agent to be able to only read files but not edit you can try using permissions: https://opencode.ai/docs/permissions/#_top

    The plan agent could prolly also get used out of the box for that as well

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

Metadata

Metadata

Assignees

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