File Descriptor Authentication for Enhanced Security #
What: Authentication tokens can now be passed via file descriptors instead of environment variables How to use:
# Pass token through file descriptor (more secure)
export CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR=3
exec 3< <(echo "your-token-here")
claude
# Traditional method still supported
export CLAUDE_CODE_SESSION_ACCESS_TOKEN="your-token-here"
claude
Details:
- Prevents tokens from appearing in process listings or environment dumps
- Reads token from
/proc/self/fd/<number>on Linux systems - Falls back to environment variable for backward compatibility
- Provides clear error messages for invalid file descriptors