Skip to content

Releases: Digital-Process-Tools/claude-remember

v0.8.1 — Handoff survives context-preview truncation

19 Jun 20:25

Choose a tag to compare

[0.8.1] — Handoff survives context-preview truncation

Fixed

  • Last-session handoff was lost on every session start — the session-start hook emits a large block (identity + tiered memory + handoff), but the harness may deliver only a leading preview to the agent. The handoff was dumped inside the memory loop, landing well past the preview cutoff, so it never reached the model. The previous session's handoff is now emitted first, before identity/memory, under a === LAST HANDOFF === header, so it always lands in context. Read-once-then-clear semantics are preserved (the file is truncated immediately after emission).

v0.8.0 — CC 2.x save fix, Windows reliability, unified Haiku call

19 Jun 20:25
afb83cc

Choose a tag to compare

[0.8.0] — CC 2.x save fix, Windows reliability, unified Haiku call

Added

  • REMEMBER_BRANCH env var overridescripts/save-session.sh now honors $REMEMBER_BRANCH when computing the ## HH:MM | <branch> identity slot of each daily-log entry. Falls back to the existing git branch --show-current lookup, then the literal "unknown" if no git repo is present. Use case: running Claude Code from $HOME (or any non-git directory) collapses the identity slot to unknown on every entry, which makes log entries indistinguishable across instances. Export REMEMBER_BRANCH=laptop / cloud / staging / $HOSTNAME in your shell rc and the slot becomes a useful per-instance tag. Documented in README.md Configuration → Environment variables.

Fixed

  • --max-turns 1 broke the save on Claude Code 2.1.x (#98, #100) — CC 2.x counts prompt-delivery as turn 1, so the nested claude -p summarizer exited error_max_turns before the model replied; save-session.sh treated the non-zero exit as fatal and never wrote memory (and re-fired on nearly every tool call). --max-turns is now configurable via REMEMBER_MAX_TURNS (default 4, validated to [1, 20]); a user Stop hook eats an extra turn, hence the margin. Reported by @davidomisi and @NORSAIN-AI.

  • Single claude -p call site (#94) — the summarizer invocation lived in two drifted places (save-session.sh inlined it twice; pipeline/haiku.py had call_haiku). Unified on pipeline/haiku.py via a new pipeline.shell call-haiku subcommand; save-session.sh delegates both calls. Closes the drift where haiku.py was missing --mcp-config / --strict-mcp-config.

  • Summarizer subprocess flooded ~/.claude/projects/ (#87) — the nested claude -p now runs with --no-session-persistence and --exclude-dynamic-system-prompt-sections, so it no longer writes a resumable session record per call (hundreds/day on busy sessions). Community contribution by @sergeclaesen.

  • Consolidation wrote conversational replies as memory (#89) — a SKIP or non-conforming Haiku response is now rejected (ConsolidationSkipped) instead of being written to recent.md/archive.md and irreversibly retiring the staging files. Community contribution by @Buzzwoo-Ecom-Team.

  • Empty timezone resolved to UTC instead of system-local (#99) — date calls now route through the _remember_date helper, so an unset REMEMBER_TZ falls back to system-local rather than a bare TZ="" (UTC) for users west of UTC. Community contribution by @kristian-presso.

  • Windows: mojibake and lone-surrogate save crash (#91, #97) — the stdin pipe and the claude subprocess decoded with the locale codec (cp1252) instead of UTF-8, corrupting / into mojibake and crashing every autosave on lone surrogates. Audited every byte↔str boundary: explicit encoding="utf-8" on the stdin pipe and subprocess; errors="replace" on text writes and user-editable memory-file/transcript reads (never crash a save on a hand-edited byte); surrogatepass on the staging-paths filename encode; machine-written JSON (last-save.json) kept strict. Reported by @marketechniks and @DogmaLabsTech.

  • Windows external-mode data_dir path doubling (#79) — lib-memory-dir.sh only recognized /… and ~… as absolute when resolving REMEMBER_DIR from a data_dir, so a Windows drive path (C:/Users/…/mem/{slug}) fell through to the relative branch and was prepended to PROJECT_DIRREMEMBER_DIR became …/proj/C:/… and {slug} was never substituted (substitution lives only in the absolute branch). Drive-letter forms (C:/… and C:\…) are now recognized as absolute. Surfaced by re-enabling the Windows shell tests (#79).

Security

  • Nested claude -p leaked the parent Claude Code session env (#95) — the subprocess stripped only CLAUDECODE, so CLAUDE_JOB_DIR and the CLAUDE_CODE_* family (e.g. CLAUDE_CODE_SESSION_ID) were inherited, making the child look like the parent's resumable session to anything keying off those vars. _child_env() now strips CLAUDECODE, CLAUDE_JOB_DIR, and all CLAUDE_CODE_*. Reported by @FrankLedo.

Tests

  • New tests/test_save_session_branch_override.py — pins the four-case truth table for the BRANCH= line in save-session.sh: env-set + git-repo (env wins), env-unset + git-repo (git wins), env-unset + no-git (unknown fallback), env-set-to-empty + no-git (:- treats empty as unset, falls back to unknown). Snapshots the line out of the live save-session.sh rather than re-asserting a copy, so the test fails loudly if the line is ever edited without updating the test.
  • New tests/test_encoding_boundaries.py — exercises the real byte↔str boundaries under a forced non-UTF-8 locale (PYTHONUTF8=0 PYTHONCOERCECLOCALE=0 LC_ALL=C) so the mojibake/surrogate bugs reproduce on the Linux/macOS CI legs too — the boundary-blindness (every test mocked StringIO stdin / MagicMock subprocess) is why the green Windows matrix never caught them.
  • Re-enabled Windows shell-subprocess coverage (#79) — test_log_sh, test_migration, and test_security_fixes were skipif(win32). Three layers: (1) tests invoke bash by its explicit Git-for-Windows path — subprocess.run(["bash", …]) on Windows hits System32\bash.exe (the WSL launcher) first because CreateProcess searches System32 before PATH, so no PATH trick works; (2) Windows paths injected into bash scripts are normalized to forward-slash drive form (C:\xC:/x) and quoted — forward-slash works for both Git Bash and the Windows python3 the scripts invoke, where the MSYS /c/x form does not; (3) the real bug those tests caught (see Fixed → lib-memory-dir.sh). TestDispatchOwnershipChecks stays skipped on Windows (POSIX ownership/world-writable bits don't map to NTFS).

v0.7.2 — /remember Read+Write fix

13 May 15:38

Choose a tag to compare

Fixes

  • #51/remember skill failed on every save after the first because frontmatter declared allowed-tools: Write only. The Write tool's read-before-write check rejected overwrites without a prior Read. Frontmatter now declares Read, Write and the skill prompts an upfront Read. (thanks @bglong11)

Already fixed in main between v0.5.0 and v0.7.1 (closed as resolved)

  • #50, #52hooks.json 2>> stderr redirect to .remember/logs/hook-errors.log failed on first run before the directory existed. The redirect was dropped entirely in a previous release. (thanks @Sbavo, @skellenb, @ossaidqadri)

Marketplace

For more of our Claude Code tooling: https://github.com/Digital-Process-Tools/claude-marketplace (dpt-plugins).