Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix(observer): anchor CWD to PROJECT_DIR before Claude invocation

Lidang-Jiang31af1adcc842
diff --git a/skills/continuous-learning-v2/agents/observer-loop.sh b/skills/continuous-learning-v2/agents/observer-loop.sh
index e4eb09724..a0c289b15 100755
--- a/skills/continuous-learning-v2/agents/observer-loop.sh
+++ b/skills/continuous-learning-v2/agents/observer-loop.sh
@@ -124,6 +124,10 @@ PROMPT
max_turns=10
fi
+ # Ensure CWD is PROJECT_DIR so the relative analysis_relpath resolves correctly
+ # on all platforms, not just when the observer happens to be launched from the project root.
+ cd "$PROJECT_DIR"
+
# Prevent observe.sh from recording this automated Haiku session as observations.
# Pass prompt via -p flag instead of stdin redirect for Windows compatibility (#842).
ECC_SKIP_OBSERVE=1 ECC_HOOK_PROFILE=minimal claude --model haiku --max-turns "$max_turns" --print \