f7a65e153c
When GH_CONFIG_DIR is passed as a literal string like '$AGENT_HOME/.github' (unexpanded by the caller), the script now detects this, validates the path contains only safe characters, then uses eval to expand it to the real path. Also removes the AGENT_HOME fallback — when GH_CONFIG_DIR is not set, the script now lets gh use its default config directory (~/.config/gh) directly, rather than failing or writing to a non-standard location.