Skip to content

Custom Agent Writes/Edits Files Despite Configuration Restrictions #3948

Closed

Description

@Regboy744

Question

Description:

I have set up a custom agent in OpenCode and configured it not to allow writing or editing files. However, I’ve noticed that the agent is still able to perform write and edit operations on files, which goes against my configuration settings.

Steps to Reproduce:

  1. Create a custom agent in OpenCode.
  2. In the agent’s configuration, explicitly disable file writing and editing permissions.
  3. Interact with the agent and request an operation that would normally require writing or editing a file.
  4. Observe that the agent still writes/edits files.

Expected Behavior:

The agent should not be able to write or edit any files when these permissions are disabled in the
configuration.

Actual Behavior:

The agent is able to write and edit files even though the configuration restricts these actions.

Environment:

  • Platform: Linux
  • OpenCode version: 1.0.26
  • Agent type: Custom config below

config file ask.md

description: Answers general questions on any topic
mode: primary
temperature: 0.5
tools:
write: false
edit: false
bash: false
read: true
grep: true
web_search:true
web_fetch: true


You are in ASK mode. Focus on:

  • Use a easy vocabulary to explain.

  • Use examples.

  • How do I implement this.

  • When possible use 5W to explain.

  • If the question has multiples answers give the best one.

  • Explain in detail.

  • Give me a good answer, not too short either not too long.

  • If possible use comparison.

  • You can give the around 10k tokes response.

  • When the subject has more than one way to use, help me with a mental model.

  • DO NOT REPEAT THE SAME EXPLANATION ABOUT THE SAME THING THAT WAS ALREADY EXPLAINED.

  • If you find the word short at the beginner or at the end, give a short answer.

Provide constructive feedback without making direct changes.

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 5, 2025
  2. github-actions commented on Nov 5, 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 Nov 5, 2025
  4. self-assigned this
    on Nov 5, 2025
  5. rekram1-node commented on Nov 5, 2025

    @rekram1-node
    Contributor

    So the ask agent is making file edits?

    Can u run: opencode debug config and show me the output

  6. Regboy744 commented on Nov 5, 2025

    @Regboy744
    Author

    i found the answer . it was missing the the --- on the top.


    description: Answers general questions on any topic
    mode: primary
    temperature: 0.5
    permission:
    edit: deny
    bash: ask
    webfetch: true
    websearch: true
    webfetch: true

    done

    thanks

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