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

Open
opened 2026-02-16 18:11:54 -05:00 by yindo · 5 comments
Owner

Originally created by @jcubic on GitHub (Feb 12, 2026).

Originally assigned to: @rekram1-node on GitHub.

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

Originally created by @jcubic on GitHub (Feb 12, 2026). Originally assigned to: @rekram1-node on GitHub. ### 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_
yindo added the bug label 2026-02-16 18:11:54 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 12, 2026):

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

  • #5386: Allow writes to /tmp by default without permission prompt
  • #4743: [FEATURE]: allow /tmp or $TMPDIR folder access option
  • #5175: /tmp does not allow execution of .so (Ubuntu-specific)
  • #6523: opencode creates identical temp files everytime it runs
  • #10034: [ROOT CAUSE ANALYSIS] tmp_pack Leak - Complete Code Analysis

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.

@github-actions[bot] commented on GitHub (Feb 12, 2026): This issue might be a duplicate of or related to existing issues. Please check: - #5386: Allow writes to /tmp by default without permission prompt - #4743: [FEATURE]: allow /tmp or $TMPDIR folder access option - #5175: /tmp does not allow execution of .so (Ubuntu-specific) - #6523: opencode creates identical temp files everytime it runs - #10034: [ROOT CAUSE ANALYSIS] tmp_pack Leak - Complete Code Analysis 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.
Author
Owner

@rekram1-node commented on GitHub (Feb 12, 2026):

can u send ur session perhaps?

can u share:

opencode debug config

@rekram1-node commented on GitHub (Feb 12, 2026): can u send ur session perhaps? can u share: `opencode debug config`
Author
Owner

@jcubic commented on GitHub (Feb 12, 2026):

{
  "$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.

@jcubic commented on GitHub (Feb 12, 2026): ``` { "$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.
Author
Owner

@rekram1-node commented on GitHub (Feb 12, 2026):

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

@rekram1-node commented on GitHub (Feb 12, 2026): Hm yeah I havent seen this behavior before, maybe something in ur context of that convo confused it
Author
Owner

@jcubic commented on GitHub (Feb 12, 2026):

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.

@jcubic commented on GitHub (Feb 12, 2026): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9205