anomalyco / anomalyco/opencode

Skills ignore global AGENTS.md rule to use ~/.opencode/tmp instead of /tmp

Open
#46,815 2 comments 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Sep 2, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Problem

When invoking skills like `/code-review`, OpenCode requests permission to access `/tmp` even though the final report is saved to the correct directory (`~/.opencode/code_reviews/`).

This means users have to approve temporary file access on every skill invocation, which is tedious and suggests unnecessary /tmp usage in the implementation.

Context

The global AGENTS.md rule states:

```

Temporary files go to ~/.opencode/tmp/

For any temporary work, analysis documents, drafts, or exploratory output:

  • Use `~/.opencode/tmp/` as the temp directory
  • Never use `/tmp/`, `/var/tmp/`, or system temp directories
  • Create subdirectories if organizing multiple files (e.g. `/.opencode/tmp/analysis/`, `/.opencode/tmp/drafts/`)
  • Mention the file path when creating temp files so the user knows where to find them
  • Clean up large/stale files periodically, but keep the directory for reference
    ```

Skills should follow this rule and use `~/.opencode/tmp/` for any intermediate processing, not `/tmp`.

Expected behavior

  • Skills should use `~/.opencode/tmp/` for all temporary/intermediate files
  • No permission prompts should be needed for accessing user-approved directories under `~/.opencode/`
  • If /tmp must be used for platform-level operations, that approval should be cached across sessions"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.