pub fn write_agent_sock(sock_val: &str)
Write the agent socket address to the state file so other processes can find it. File is restricted to owner-only on Unix (it contains the session token).