eagle-mem 4.8.1 → 4.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/hooks/session-start.sh +2 -2
- package/hooks/stop.sh +2 -2
- package/hooks/user-prompt-submit.sh +16 -2
- package/lib/common.sh +20 -23
- package/package.json +1 -1
- package/scripts/orchestrate.sh +1 -1
- package/skills/eagle-mem-memories/SKILL.md +1 -1
- package/skills/eagle-mem-orchestrate/SKILL.md +4 -2
- package/skills/eagle-mem-tasks/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
Eagle Mem turns AI coding sessions into compounding project knowledge. It gives Claude Code and Codex the same local memory, labels which agent created each memory, blocks risky release commands until affected features are verified, and lets broad work split into durable worker lanes.
|
|
13
13
|
|
|
14
|
-
**v4.8.
|
|
14
|
+
**v4.8.2 ships Codex output polish:** Codex final replies now stay clean by default instead of printing large `<eagle-summary>` capture blocks. Eagle Mem still captures summaries from the Stop transcript, while Claude Code can keep using the richer explicit summary path where it behaves cleanly.
|
|
15
15
|
|
|
16
16
|
**Website:** [Product](https://eagleisbatman.github.io/eagle-mem/) |
|
|
17
17
|
[Architecture](https://eagleisbatman.github.io/eagle-mem/architecture.html) |
|
|
@@ -149,6 +149,10 @@ Eagle Mem prevents Claude from repeating past mistakes:
|
|
|
149
149
|
| `eagle-mem scan` | Scan codebase and generate overview |
|
|
150
150
|
| `eagle-mem index` | Index source files for FTS5 code search |
|
|
151
151
|
|
|
152
|
+
### v4.8.2 Patch
|
|
153
|
+
|
|
154
|
+
Codex no longer gets instructed to print large user-visible `<eagle-summary>` XML blocks. The installer/update path rewrites existing `~/.codex/AGENTS.md` Eagle Mem instructions to the clean-output contract, context-pressure nudges use normal prose, and Codex-oriented skills/worker prompts avoid raw capture templates.
|
|
155
|
+
|
|
152
156
|
### v4.8.1 Patch
|
|
153
157
|
|
|
154
158
|
`eagle-mem memories sync` is now safe on large Claude Code/Codex memory files. The memory mirror parser no longer uses early-exit pipelines under `pipefail`, avoiding exit `141` during sync.
|
package/hooks/session-start.sh
CHANGED
|
@@ -171,7 +171,7 @@ fi
|
|
|
171
171
|
if [ "$agent" = "codex" ] && [ "${stat_with_summaries:-0}" -eq 0 ] 2>/dev/null; then
|
|
172
172
|
context+="
|
|
173
173
|
=== Eagle Mem: Codex Capture Warming Up ===
|
|
174
|
-
Codex hooks are active.
|
|
174
|
+
Codex hooks are active. Keep final replies clean; Eagle Mem will capture decisions, gotchas, key files, and next steps from the transcript automatically.
|
|
175
175
|
"
|
|
176
176
|
fi
|
|
177
177
|
|
|
@@ -439,7 +439,7 @@ fi
|
|
|
439
439
|
if [ "$agent" = "codex" ]; then
|
|
440
440
|
context+="
|
|
441
441
|
=== Eagle Mem: Active ===
|
|
442
|
-
Memory active for '$project'.
|
|
442
|
+
Memory active for '$project'. Keep user-facing Codex replies clean: do not print Eagle Mem summary capture blocks, XML, JSON hook payloads, or internal templates unless the user explicitly asks. The Stop hook captures summaries from the transcript automatically.
|
|
443
443
|
"
|
|
444
444
|
elif [ "$source_type" = "compact" ] || [ "$source_type" = "clear" ]; then
|
|
445
445
|
context+="
|
package/hooks/stop.sh
CHANGED
|
@@ -238,7 +238,7 @@ if [ "$needs_enrichment" -eq 1 ]; then
|
|
|
238
238
|
if [ "$provider" != "none" ] && [ -n "$text_content" ]; then
|
|
239
239
|
excerpt=$(echo "$text_content" | tail -c 3000)
|
|
240
240
|
|
|
241
|
-
enrich_prompt="Extract facts from this
|
|
241
|
+
enrich_prompt="Extract facts from this AI coding session. Only include items with clear evidence in the session text. Do NOT invent or repeat example content.
|
|
242
242
|
|
|
243
243
|
Respond with EXACTLY these sections (omit sections with no evidence):
|
|
244
244
|
|
|
@@ -263,7 +263,7 @@ Each as: <filepath>
|
|
|
263
263
|
SESSION TEXT:
|
|
264
264
|
$excerpt"
|
|
265
265
|
|
|
266
|
-
enrich_system="You extract structured facts from development sessions. Output format for decisions: '- Did X — why: Y'. Output format for gotchas: '- Gotcha description'. Be concise. Only include items with clear evidence in the session text. Never fabricate content."
|
|
266
|
+
enrich_system="You extract structured facts from Claude Code and Codex development sessions. Output format for decisions: '- Did X — why: Y'. Output format for gotchas: '- Gotcha description'. Be concise. Only include items with clear evidence in the session text. Never fabricate content."
|
|
267
267
|
enrich_result=$(eagle_llm_call "$enrich_prompt" "$enrich_system" 768 2>/dev/null)
|
|
268
268
|
llm_rc=$?
|
|
269
269
|
|
|
@@ -44,18 +44,32 @@ if [ -n "$session_id" ] && eagle_validate_session_id "$session_id"; then
|
|
|
44
44
|
eagle_log "INFO" "UserPromptSubmit: turn=$turn_count session=$session_id"
|
|
45
45
|
|
|
46
46
|
if [ "$turn_count" -ge 30 ]; then
|
|
47
|
-
|
|
47
|
+
if [ "$codex_compact" -eq 1 ]; then
|
|
48
|
+
context+="
|
|
49
|
+
=== Eagle Mem: Context Pressure Critical ($turn_count turns since compact) ===
|
|
50
|
+
Keep the next Codex reply user-clean. Do not print Eagle Mem summary capture blocks or other internals. Include a short normal handoff note if useful, then ask the user to run /compact.
|
|
51
|
+
"
|
|
52
|
+
else
|
|
53
|
+
context+="
|
|
48
54
|
=== Eagle Mem: Context Pressure Critical ($turn_count turns since compact) ===
|
|
49
55
|
IMMEDIATELY emit a detailed <eagle-summary> covering ALL work this session.
|
|
50
56
|
Tell the user to run /compact NOW to avoid losing context.
|
|
51
57
|
"
|
|
58
|
+
fi
|
|
52
59
|
echo "$turn_count" > "$EAGLE_MEM_DIR/.context-pressure"
|
|
53
60
|
elif [ "$turn_count" -ge 20 ]; then
|
|
54
|
-
|
|
61
|
+
if [ "$codex_compact" -eq 1 ]; then
|
|
62
|
+
context+="
|
|
63
|
+
=== Eagle Mem: Context Pressure High ($turn_count turns since compact) ===
|
|
64
|
+
Keep the next Codex reply clean. Do not print Eagle Mem summary capture blocks or other internals. Summarize any durable decisions in normal prose only.
|
|
65
|
+
"
|
|
66
|
+
else
|
|
67
|
+
context+="
|
|
55
68
|
=== Eagle Mem: Context Pressure High ($turn_count turns since compact) ===
|
|
56
69
|
Include a thorough <eagle-summary> in your next response — capture all decisions, gotchas, and learned context before compaction.
|
|
57
70
|
Suggest the user run /compact to free context for continued work.
|
|
58
71
|
"
|
|
72
|
+
fi
|
|
59
73
|
echo "$turn_count" > "$EAGLE_MEM_DIR/.context-pressure"
|
|
60
74
|
else
|
|
61
75
|
rm -f "$EAGLE_MEM_DIR/.context-pressure" 2>/dev/null
|
package/lib/common.sh
CHANGED
|
@@ -659,10 +659,7 @@ eagle_patch_claude_md() {
|
|
|
659
659
|
skip && /^## / { skip=0 }
|
|
660
660
|
!skip { print }
|
|
661
661
|
' "$claude_md" > "$tmp_md"
|
|
662
|
-
|
|
663
|
-
sed -e :a -e '/^[[:space:]]*$/{ $d; N; ba; }' "$tmp_md" > "${tmp_md}.clean"
|
|
664
|
-
mv "${tmp_md}.clean" "$claude_md"
|
|
665
|
-
rm -f "$tmp_md"
|
|
662
|
+
mv "$tmp_md" "$claude_md"
|
|
666
663
|
_eagle_claude_md_section >> "$claude_md"
|
|
667
664
|
return 0
|
|
668
665
|
fi
|
|
@@ -692,30 +689,13 @@ _eagle_codex_agents_section() {
|
|
|
692
689
|
|
|
693
690
|
Eagle Mem hooks are active for Codex in this project. SessionStart and UserPromptSubmit inject project recall from the shared Eagle Mem database at `~/.eagle-mem/memory.db`. PostToolUse records observations and marks affected features for verification.
|
|
694
691
|
|
|
695
|
-
**
|
|
696
|
-
|
|
697
|
-
```
|
|
698
|
-
<eagle-summary>
|
|
699
|
-
request: [what user asked]
|
|
700
|
-
completed: [what shipped]
|
|
701
|
-
learned: [non-obvious discoveries]
|
|
702
|
-
decisions: [choice — why]
|
|
703
|
-
gotchas: [what surprised]
|
|
704
|
-
next_steps: [concrete actions]
|
|
705
|
-
key_files: [path — role]
|
|
706
|
-
files_read: [path, ...]
|
|
707
|
-
files_modified: [path, ...]
|
|
708
|
-
affected_features: [feature, ...]
|
|
709
|
-
verified_features: [feature, ...]
|
|
710
|
-
regression_risks: [risk, ...]
|
|
711
|
-
</eagle-summary>
|
|
712
|
-
```
|
|
692
|
+
**User-visible output rule:** Keep Codex final answers clean. Do not print Eagle Mem summary capture blocks, XML, JSON hook payloads, or internal templates to the user unless the user explicitly asks for raw Eagle Mem internals. The Stop hook captures Codex summaries from the transcript automatically.
|
|
713
693
|
|
|
714
694
|
**How to apply:**
|
|
715
695
|
- Attribute recalled context as "Eagle Mem recalls:" when it is injected
|
|
716
696
|
- Use the Eagle Mem skills when relevant: `eagle-mem-search`, `eagle-mem-overview`, `eagle-mem-memories`, `eagle-mem-tasks`, and `eagle-mem-orchestrate`
|
|
717
697
|
- For broad multi-agent work, YOU run `eagle-mem orchestrate`; do not ask the user to run these commands
|
|
718
|
-
- For important decisions, preferences, gotchas, or durable project facts,
|
|
698
|
+
- For important decisions, preferences, gotchas, or durable project facts, include them briefly in normal prose. Eagle Mem will extract them from the transcript.
|
|
719
699
|
- Do not revert Eagle Mem-surfaced decisions without asking the user
|
|
720
700
|
- If Eagle Mem reports pending feature verification, verify or waive it before push/PR/publish
|
|
721
701
|
- Never put raw secrets in summaries
|
|
@@ -729,6 +709,23 @@ eagle_patch_codex_agents_md() {
|
|
|
729
709
|
mkdir -p "$(dirname "$agents_md")"
|
|
730
710
|
|
|
731
711
|
if [ -f "$agents_md" ] && grep -qF "$marker" "$agents_md" 2>/dev/null; then
|
|
712
|
+
if grep -qF 'emit an `<eagle-summary>` block' "$agents_md" 2>/dev/null \
|
|
713
|
+
|| grep -qF 'emit an <eagle-summary> block' "$agents_md" 2>/dev/null \
|
|
714
|
+
|| grep -qF 'explicitly include them in the `<eagle-summary>` block' "$agents_md" 2>/dev/null \
|
|
715
|
+
|| grep -qF 'explicitly include them in the <eagle-summary> block' "$agents_md" 2>/dev/null \
|
|
716
|
+
|| ! grep -qF 'Keep Codex final answers clean' "$agents_md" 2>/dev/null; then
|
|
717
|
+
local tmp_md
|
|
718
|
+
tmp_md=$(mktemp)
|
|
719
|
+
awk -v marker="$marker" '
|
|
720
|
+
$0 ~ marker { skip=1; next }
|
|
721
|
+
skip && /^---$/ { skip=0; next }
|
|
722
|
+
skip && /^## / { skip=0 }
|
|
723
|
+
!skip { print }
|
|
724
|
+
' "$agents_md" > "$tmp_md"
|
|
725
|
+
mv "$tmp_md" "$agents_md"
|
|
726
|
+
_eagle_codex_agents_section >> "$agents_md"
|
|
727
|
+
return 0
|
|
728
|
+
fi
|
|
732
729
|
if ! grep -qF 'eagle-mem orchestrate' "$agents_md" 2>/dev/null; then
|
|
733
730
|
local tmp_md
|
|
734
731
|
tmp_md=$(mktemp)
|
package/package.json
CHANGED
package/scripts/orchestrate.sh
CHANGED
|
@@ -301,7 +301,7 @@ Rules:
|
|
|
301
301
|
- If blocked, run: eagle-mem orchestrate lane --project "$project" --name "$name" block "$lane_key" --notes "<concrete blocker>"
|
|
302
302
|
- If you finish manually before the wrapper updates status, run: eagle-mem orchestrate lane --project "$project" --name "$name" complete "$lane_key" --notes "<validation result>"
|
|
303
303
|
- Run the validation command when one is provided and it is safe for the lane.
|
|
304
|
-
-
|
|
304
|
+
- Keep user-facing final responses clean. Claude Code workers may emit an Eagle Mem summary block when their UI handles it cleanly; Codex workers should not print XML, JSON, or internal capture blocks unless the user explicitly asks. Eagle Mem Stop hooks capture Codex summaries from the transcript automatically.
|
|
305
305
|
PROMPT
|
|
306
306
|
}
|
|
307
307
|
|
|
@@ -68,7 +68,7 @@ eagle-mem memories tasks show <file_path>
|
|
|
68
68
|
|
|
69
69
|
Two paths feed the mirror:
|
|
70
70
|
|
|
71
|
-
**Real-time hooks.** Claude Code memory/plan/task files are mirrored when written. Codex sessions are captured through SessionStart/UserPromptSubmit/PostToolUse/Stop hooks, and important durable facts
|
|
71
|
+
**Real-time hooks.** Claude Code memory/plan/task files are mirrored when written. Codex sessions are captured through SessionStart/UserPromptSubmit/PostToolUse/Stop hooks. In Codex, keep user-facing replies clean and put important durable facts in normal prose; Eagle Mem extracts them from the transcript.
|
|
72
72
|
|
|
73
73
|
**Backfill (sync command).** For memories, plans, and tasks that existed before Eagle Mem was installed, or that were written outside a hooked session:
|
|
74
74
|
```bash
|
|
@@ -129,8 +129,10 @@ ending a broad session.
|
|
|
129
129
|
- Every lane should have a validation command when one is obvious.
|
|
130
130
|
- If a lane is blocked, update the lane with a concrete note rather than
|
|
131
131
|
silently stopping.
|
|
132
|
-
- After completing a lane,
|
|
133
|
-
|
|
132
|
+
- After completing a lane, keep the user-facing final response clean. Claude Code
|
|
133
|
+
may use the Eagle Mem summary block when that UI handles it cleanly; Codex
|
|
134
|
+
should record durable decisions in normal prose and let the Stop hook capture
|
|
135
|
+
the transcript.
|
|
134
136
|
|
|
135
137
|
## Reference
|
|
136
138
|
|
|
@@ -66,7 +66,7 @@ Mark the current task in progress (`TaskUpdate(in_progress)` in Claude Code, or
|
|
|
66
66
|
|
|
67
67
|
### 4. Complete — record what happened
|
|
68
68
|
|
|
69
|
-
Mark the task completed (`TaskUpdate(completed)` in Claude Code, or `eagle-mem tasks complete <id> --agent codex` in Codex).
|
|
69
|
+
Mark the task completed (`TaskUpdate(completed)` in Claude Code, or `eagle-mem tasks complete <id> --agent codex` in Codex). In Claude Code, use the Eagle Mem summary block when that UI handles it cleanly. In Codex, keep the final reply clean and record durable decisions in normal prose; Eagle Mem captures the transcript automatically.
|
|
70
70
|
|
|
71
71
|
If the task produced decisions that downstream tasks need, update those task descriptions now:
|
|
72
72
|
```
|