Skip to content

Will not read env even with config set #5484

Closed as not planned
Closed as not planned

Description

@PilotDevo

Description

There seems to be an issues with reading env files. i've written the config file to allow however there still is a block from allowing the agent into the file. any suggestions?

OpenCode version

1.0.152

Steps to reproduce

opencode
/session
any
"analyze our env files for any inconsistencies"
The user has blocked you from reading /home/devo/projects/aiq/v2/platform/.env, DO NOT make further attempts to read it

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 13, 2025
  2. github-actions commented on Dec 13, 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.

  3. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 13, 2025
  4. self-assigned this
    on Dec 13, 2025
  5. rekram1-node commented on Dec 13, 2025

    @rekram1-node
    Collaborator

    yeah rn it’s blocked ill make it configurable tho

    as a work around you can enter shell mode (type ! into prompt)

    and then do:

    cat .env

  6. PilotDevo commented on Dec 23, 2025

    @PilotDevo
    Author

    any updates? Still would be nice for sandboxed projects for our agents to be able to read the .env's. Still no joy with configs on the later updates. Thanks.

  7. rekram1-node commented on Dec 23, 2025

    @rekram1-node
    Collaborator

    waiting for the permission updates to ship, Dax has a branch he has been working on should land in next day or so

  8. PilotDevo commented on Dec 23, 2025

    @PilotDevo
    Author

    Thanks.

  9. dhruvkej9 commented on Dec 29, 2025

    @dhruvkej9

    any updates??

  10. dhruvkej9 commented on Dec 29, 2025

    @dhruvkej9

    yeah rn it’s blocked ill make it configurable tho

    as a work around you can enter shell mode (type ! into prompt)

    and then do:

    cat .env

    This method does not works

  11. PilotDevo commented on Dec 29, 2025

    @PilotDevo
    Author

    yeah rn it’s blocked ill make it configurable tho

    as a work around you can enter shell mode (type ! into prompt)

    and then do:

    cat .env

    This method does not works

    It does but it only allows the agent to read it in that single prompt. It doesn't persist. So it's basically useless.

  12. boxpositron commented on Jan 12, 2026

    @boxpositron

    yeah rn it’s blocked ill make it configurable tho
    as a work around you can enter shell mode (type ! into prompt)
    and then do:
    cat .env

    This method does not works

    It does but it only allows the agent to read it in that single prompt. It doesn't persist. So it's basically useless.

    I had a similar problem. I created a package https://github.com/boxpositron/envsitter and OpenCode plugin https://github.com/boxpositron/envsitter-guard that solves this exact problem. EnvSitter Provides privacy for .env files but gives agents enough information to perform and complete tasks.

  13. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions