Skip to content

Claude Sonnet started to write logs and instructions to /tmp directory #13376

Closed

Description

@jcubic

Description

I'm nto sure what is happening but. I started using Open Code after a break.

It ask permission to access /tmp directory. First it write instructions using format:

cat > /tmp/note-switch-fix.md << 'EOF'

Markdown
EOF
cat /tmp/note-switch-fix.md

Which require permission, so the agent stops working.

When I asked it to not do that, after compression it do this again with log files from the app.

I don't have any instructions about using /tmp directory. Claude never do that before.

Is this a bug in system prompt?

Plugins

No response

OpenCode version

1.1.63

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Fedora 43

Terminal

No response

Activity

  1. github-actions commented on Feb 12, 2026

    @github-actions
    Contributor

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

    These issues address similar concerns about /tmp access, temporary file handling, and permission prompts. Your issue (#13376) appears to be a new manifestation where the AI model's behavior is triggering /tmp write requests. The underlying /tmp permission friction may already be tracked in the issues above.

  2. rekram1-node commented on Feb 12, 2026

    @rekram1-node
    Contributor

    can u send ur session perhaps?

    can u share:

    opencode debug config

  3. jcubic commented on Feb 12, 2026

    @jcubic
    Author
    {
      "$schema": "https://opencode.ai/config.json",
      "keybinds": {
        "leader": "ctrl+x",
        "app_exit": "ctrl+c,ctrl+d,<leader>q",
        "editor_open": "<leader>e",
        "theme_list": "<leader>t",
        "sidebar_toggle": "<leader>b",
        "scrollbar_toggle": "none",
        "username_toggle": "none",
        "status_view": "<leader>s",
        "session_export": "<leader>x",
        "session_new": "<leader>n",
        "session_list": "<leader>l",
        "session_timeline": "<leader>g",
        "session_fork": "none",
        "session_rename": "ctrl+r",
        "session_delete": "ctrl+d",
        "stash_delete": "ctrl+d",
        "model_provider_list": "ctrl+a",
        "model_favorite_toggle": "ctrl+f",
        "session_share": "none",
        "session_unshare": "none",
        "session_interrupt": "escape",
        "session_compact": "<leader>c",
        "messages_page_up": "pageup,ctrl+alt+b",
        "messages_page_down": "pagedown,ctrl+alt+f",
        "messages_line_up": "ctrl+alt+y",
        "messages_line_down": "ctrl+alt+e",
        "messages_half_page_up": "ctrl+alt+u",
        "messages_half_page_down": "ctrl+alt+d",
        "messages_first": "ctrl+g,home",
        "messages_last": "ctrl+alt+g,end",
        "messages_next": "none",
        "messages_previous": "none",
        "messages_last_user": "none",
        "messages_copy": "<leader>y",
        "messages_undo": "<leader>u",
        "messages_redo": "<leader>r",
        "messages_toggle_conceal": "<leader>h",
        "tool_details": "none",
        "model_list": "<leader>m",
        "model_cycle_recent": "f2",
        "model_cycle_recent_reverse": "shift+f2",
        "model_cycle_favorite": "none",
        "model_cycle_favorite_reverse": "none",
        "command_list": "ctrl+p",
        "agent_list": "<leader>a",
        "agent_cycle": "tab",
        "agent_cycle_reverse": "shift+tab",
        "variant_cycle": "ctrl+t",
        "input_clear": "ctrl+c",
        "input_paste": "ctrl+v",
        "input_submit": "return",
        "input_newline": "Shift+Enter",
        "input_move_left": "left,ctrl+b",
        "input_move_right": "right,ctrl+f",
        "input_move_up": "up",
        "input_move_down": "down",
        "input_select_left": "shift+left",
        "input_select_right": "shift+right",
        "input_select_up": "shift+up",
        "input_select_down": "shift+down",
        "input_line_home": "ctrl+a",
        "input_line_end": "ctrl+e",
        "input_select_line_home": "ctrl+shift+a",
        "input_select_line_end": "ctrl+shift+e",
        "input_visual_line_home": "alt+a",
        "input_visual_line_end": "alt+e",
        "input_select_visual_line_home": "alt+shift+a",
        "input_select_visual_line_end": "alt+shift+e",
        "input_buffer_home": "home",
        "input_buffer_end": "end",
        "input_select_buffer_home": "shift+home",
        "input_select_buffer_end": "shift+end",
        "input_delete_line": "ctrl+shift+d",
        "input_delete_to_line_end": "ctrl+k",
        "input_delete_to_line_start": "ctrl+u",
        "input_backspace": "backspace,shift+backspace",
        "input_delete": "ctrl+d,delete,shift+delete",
        "input_undo": "ctrl+-,super+z",
        "input_redo": "ctrl+.,super+shift+z",
        "input_word_forward": "alt+f,alt+right,ctrl+right",
        "input_word_backward": "alt+b,alt+left,ctrl+left",
        "input_select_word_forward": "alt+shift+f,alt+shift+right",
        "input_select_word_backward": "alt+shift+b,alt+shift+left",
        "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete",
        "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace",
        "history_previous": "up",
        "history_next": "down",
        "session_child_cycle": "none",
        "session_child_cycle_reverse": "none",
        "session_parent": "<leader>up",
        "terminal_suspend": "ctrl+z",
        "terminal_title_toggle": "none",
        "tips_toggle": "<leader>h",
        "display_thinking": "none"
      },
      "plugin": [
        "opencode-skills"
      ],
      "mcp": {
        "context7": {
          "type": "remote",
          "url": "https://mcp.context7.com/mcp",
          "enabled": true,
          "headers": {
            "CONTEXT7_API_KEY": "ctx7sk-37e7f1db-ad21-4e1f-9b76-87f52248fed2"
          }
        },
        "DeepWiki": {
          "type": "remote",
          "url": "https://mcp.deepwiki.com/mcp",
          "enabled": true
        },
        "chrome-devtools": {
          "type": "local",
          "command": [
            "npx",
            "-y",
            "chrome-devtools-mcp@latest"
          ],
          "enabled": true
        },
        "Better Auth": {
          "type": "remote",
          "url": "https://mcp.chonkie.ai/better-auth/better-auth-builder/mcp",
          "enabled": true
        },
        "chakra-ui": {
          "type": "local",
          "command": [
            "npx",
            "-y",
            "@chakra-ui/react-mcp"
          ],
          "enabled": true
        },
        "playwright": {
          "type": "local",
          "command": [
            "npx",
            "-y",
            "@playwright/mcp@latest"
          ],
          "enabled": true
        },
        "github": {
          "type": "remote",
          "url": "https://api.githubcopilot.com/mcp/",
          "enabled": false
        },
        "10x-mvp-tracker": {
          "type": "local",
          "command": [
            "npx",
            "-y",
            "@przeprogramowani/10x-mvp-tracker"
          ],
          "enabled": false
        }
      },
      "permission": {
        "bash": {
          "*": "allow",
          "sudo *": "ask",
          "git *": "ask",
          "git checkout *": "allow",
          "git status*": "allow",
          "git diff*": "allow",
          "git log*": "allow",
          "git show*": "allow",
          "git branch*": "allow",
          "git remote -v *": "allow",
          "git ls-files*": "allow"
        }
      },
      "agent": {},
      "mode": {},
      "command": {},
      "username": "kuba"
    }
    

    I' have skill installed for OpenTUI.

  4. rekram1-node commented on Feb 13, 2026

    @rekram1-node
    Contributor

    Hm yeah I havent seen this behavior before, maybe something in ur context of that convo confused it

  5. jcubic commented on Feb 13, 2026

    @jcubic
    Author

    I don't see the beginning of the conversation in the instance that is running. The first message when scrolling to the top is:

    Good! Now let me verify there are no TypeScript errors:
    

    ANd below there is:

    # Start dev server in background
    $ npm run dev > /tmp/dev-server.log 2>&1 & echo $! > /tmp/dev-server.pid && sleep 8 && echo "Server started"
    Server started
    

    in AGENTS.md I have this info:

    **Agent Command**: `npm run test:e2e:docker 2>&1 | tee e2e.log` (saves log + displays output)
    **Long-running commands**: Always use `tee` to save output to a log file, then read the last N lines with `tail -n 100 logfile.log`. Never pipe directly to `tail` or `head` - you won't see output.
    

    But it never used the /tmp directory before. He only used a project directory.

  6. github-actions commented on Apr 14, 2026

    @github-actions
    Contributor

    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