PulseAugur
EN
LIVE 07:12:20

Claude Code fails to write to /tmp in non-interactive mode

A user encountered an issue where Claude Code, when run non-interactively via a systemd timer, failed to write logs to the /tmp directory. The problem stemmed from Claude Code's file access being scoped by its working directory and explicit additions, rather than the user's UID, and the need for explicit permission prompts in interactive mode. When run without user interaction, these prompts are denied, causing the write operation to fail silently. Additionally, systemd's PrivateTmp=yes setting can create a private /tmp namespace for services, further isolating log files. The solution involved moving the log file destination out of /tmp to a user-accessible directory. AI

IMPACT Highlights potential issues when integrating LLMs into automated workflows and the importance of understanding their execution context.

RANK_REASON User-reported issue and solution for a specific AI tool's behavior in a particular environment.

Read on dev.to — Claude Code tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Claude Code fails to write to /tmp in non-interactive mode

How we ranked this

Signal score
0 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Tool
User-reported issue and solution for a specific AI tool's behavior in a particular environment.
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
product, infra
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
3 days old
Aged out of breaking-news scoring windows; ranking reflects the durable signal from the full source set.

Full methodology in our editorial standards.

COVERAGE [1]

  1. dev.to — Claude Code tag TIER_1 English(EN) · Guatu ·

    Claude Headless Sandboxing: Why /tmp Writes Fail in Non-Interactive Mode

    <p>A scheduled Claude Code job that writes its report to <code>/tmp/agent_log.md</code> works every time you run it by hand. Under a systemd timer with <code>claude -p</code>, it exits 0, the journal shows no errors, and the file is either missing or empty.</p> <p>That's the whol…