New patch ci/images/paperclip/ren-541-claude-auto-memory.patch for our Paperclip image. In packages/adapter-utils/src/acpx-engine/execute.ts, writePaperclipClaudeSettings now also writes autoMemoryDirectory: <AGENT_HOME>/memory into the per-run .claude/settings.local.json. Remote runs get the in-pod path. Includes a unit test. README updated.
Why (REN-541)
Claude auto memory defaults to $CLAUDE_CONFIG_DIR/projects/<p>/memory. Paperclip creates CLAUDE_CONFIG_DIR fresh for each run and deletes it afterwards, so every memory is lost. AGENT_HOME (the agent-files working copy) is restored before and saved after every run, local and in k8s pods. The Claude SDK ignores autoMemoryDirectory only in checked-in project settings; local settings are allowed (sdk.d.ts, agent-sdk 0.3.280).
Resume: the session fingerprint hashes only allow, additionalDirectories and defaultMode. autoMemoryDirectory is left out on purpose, and additionalDirectories keeps the stable agentHomeForPermissions. The new test checks that two runs with different AGENT_HOME paths produce the same fingerprint.
Verified
prepare.sh applies all 3 patches to the pinned commit a027f76.
adapter-utils: execute.test.ts 198/198 pass and tsc --noEmit is clean.
Not verified in the cluster yet. After the image rolls out I will run the card's checks: local memory across 2 runs, the same in a k8s-base pod, and resume of a local session.
Rollout
After the merge, build-paperclip builds a new image and Flux image automation rolls out the Paperclip server. That restarts the server, as previous patch bumps did. Home Assistant is not touched.
Revert
Revert this commit. The next image build drops the patch. Memory files already written in AGENT_HOME/memory stay but are no longer loaded.
Upstream PR: not opened yet. This environment has no GitHub credentials; the follow-up is on REN-541.
## What
New patch `ci/images/paperclip/ren-541-claude-auto-memory.patch` for our Paperclip image. In `packages/adapter-utils/src/acpx-engine/execute.ts`, `writePaperclipClaudeSettings` now also writes `autoMemoryDirectory: <AGENT_HOME>/memory` into the per-run `.claude/settings.local.json`. Remote runs get the in-pod path. Includes a unit test. README updated.
## Why (REN-541)
Claude auto memory defaults to `$CLAUDE_CONFIG_DIR/projects/<p>/memory`. Paperclip creates `CLAUDE_CONFIG_DIR` fresh for each run and deletes it afterwards, so every memory is lost. `AGENT_HOME` (the agent-files working copy) is restored before and saved after every run, local and in k8s pods. The Claude SDK ignores `autoMemoryDirectory` only in checked-in project settings; local settings are allowed (sdk.d.ts, agent-sdk 0.3.280).
Resume: the session fingerprint hashes only allow, additionalDirectories and defaultMode. `autoMemoryDirectory` is left out on purpose, and `additionalDirectories` keeps the stable `agentHomeForPermissions`. The new test checks that two runs with different AGENT_HOME paths produce the same fingerprint.
## Verified
- `prepare.sh` applies all 3 patches to the pinned commit a027f76.
- adapter-utils: `execute.test.ts` 198/198 pass and `tsc --noEmit` is clean.
- Not verified in the cluster yet. After the image rolls out I will run the card's checks: local memory across 2 runs, the same in a k8s-base pod, and resume of a local session.
## Rollout
After the merge, `build-paperclip` builds a new image and Flux image automation rolls out the Paperclip server. That restarts the server, as previous patch bumps did. Home Assistant is not touched.
## Revert
Revert this commit. The next image build drops the patch. Memory files already written in AGENT_HOME/memory stay but are no longer loaded.
Upstream PR: not opened yet. This environment has no GitHub credentials; the follow-up is on REN-541.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude auto memory defaults to $CLAUDE_CONFIG_DIR/projects/<p>/memory.
Paperclip makes CLAUDE_CONFIG_DIR fresh per run and deletes it, so every
memory is lost. New image patch: the ACPX engine writes
autoMemoryDirectory=<AGENT_HOME>/memory into the per-run
.claude/settings.local.json. AGENT_HOME is restored and saved around each
run, local and in k8s pods. Not part of the session fingerprint, so
resume is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Approved on 5a77a30c18. Checked: prepare.sh applies all 3 patches at a027f76; adapter-utils execute.test.ts 198/198 pass; tsc --noEmit clean; fingerprint identity hashes only allow/additionalDirectories/defaultMode, so autoMemoryDirectory does not affect resume. Revert: revert commit, next image drops the patch.
Approved on 5a77a30c186b64b7bd463a7609934102901047fe. Checked: prepare.sh applies all 3 patches at a027f76; adapter-utils execute.test.ts 198/198 pass; tsc --noEmit clean; fingerprint identity hashes only allow/additionalDirectories/defaultMode, so autoMemoryDirectory does not affect resume. Revert: revert commit, next image drops the patch.
Ghost
merged commit f12193624e into master2026-10-03 17:02:56 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
New patch
ci/images/paperclip/ren-541-claude-auto-memory.patchfor our Paperclip image. Inpackages/adapter-utils/src/acpx-engine/execute.ts,writePaperclipClaudeSettingsnow also writesautoMemoryDirectory: <AGENT_HOME>/memoryinto the per-run.claude/settings.local.json. Remote runs get the in-pod path. Includes a unit test. README updated.Why (REN-541)
Claude auto memory defaults to
$CLAUDE_CONFIG_DIR/projects/<p>/memory. Paperclip createsCLAUDE_CONFIG_DIRfresh for each run and deletes it afterwards, so every memory is lost.AGENT_HOME(the agent-files working copy) is restored before and saved after every run, local and in k8s pods. The Claude SDK ignoresautoMemoryDirectoryonly in checked-in project settings; local settings are allowed (sdk.d.ts, agent-sdk 0.3.280).Resume: the session fingerprint hashes only allow, additionalDirectories and defaultMode.
autoMemoryDirectoryis left out on purpose, andadditionalDirectorieskeeps the stableagentHomeForPermissions. The new test checks that two runs with different AGENT_HOME paths produce the same fingerprint.Verified
prepare.shapplies all 3 patches to the pinned commit a027f76.execute.test.ts198/198 pass andtsc --noEmitis clean.Rollout
After the merge,
build-paperclipbuilds a new image and Flux image automation rolls out the Paperclip server. That restarts the server, as previous patch bumps did. Home Assistant is not touched.Revert
Revert this commit. The next image build drops the patch. Memory files already written in AGENT_HOME/memory stay but are no longer loaded.
Upstream PR: not opened yet. This environment has no GitHub credentials; the follow-up is on REN-541.
🤖 Generated with Claude Code
Approved on
5a77a30c18. Checked: prepare.sh applies all 3 patches at a027f76; adapter-utils execute.test.ts 198/198 pass; tsc --noEmit clean; fingerprint identity hashes only allow/additionalDirectories/defaultMode, so autoMemoryDirectory does not affect resume. Revert: revert commit, next image drops the patch.