From ebd14cde7d35bccaa69519d1a48e2a18410af617 Mon Sep 17 00:00:00 2001 From: Lidang-Jiang Date: Sat, 28 Mar 2026 11:37:36 +0800 Subject: [PATCH] fix(codex): allow leading whitespace in persistent_instructions regex The rg pattern anchored at line start (^persistent_instructions) would miss indented TOML entries. Use ^\s* prefix to match both top-level and indented configurations. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Lidang-Jiang --- scripts/codex/check-codex-global-state.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/codex/check-codex-global-state.sh b/scripts/codex/check-codex-global-state.sh index c5291c87..20734875 100755 --- a/scripts/codex/check-codex-global-state.sh +++ b/scripts/codex/check-codex-global-state.sh @@ -91,7 +91,7 @@ if [[ -f "$CONFIG_FILE" ]]; then check_config_absent '^\s*collab\s*=' "deprecated collab flag is absent" # persistent_instructions is recommended but optional; warn instead of fail # so users who rely on AGENTS.md alone are not blocked (#967). - if rg -n '^persistent_instructions\s*=' "$CONFIG_FILE" >/dev/null 2>&1; then + if rg -n '^\s*persistent_instructions\s*=' "$CONFIG_FILE" >/dev/null 2>&1; then ok "persistent_instructions is configured" else warn "persistent_instructions is not set (recommended but optional)"