
Pi Coding Agent Configuration on Linux: Fix the Out-of-Place .pi Folder
Pi does not follow the XDG Base Directory specification on Linux. Its user configuration lives in ~/.pi/agent, and the only supported way to relocate it is the PI_CODING_AGENT_DIR environment variable. Set it to the agent directory — ~/.config/pi/agent, never ~/.config/pi — or authentication and model settings silently read as empty. This guide covers what is actually inside that folder, why the widely cited PI_CONFIG_DIR variable does nothing, the three layouts that fit real workflows, and the verification commands that prove the move worked. ...