v12.1.6

thedotmack/claude-memv12.1.6Apr 16, 2026by thedotmack

AI Summary

This is a critical regression fix for a bug that prevented observations and summaries from saving on Claude Code 2.1.109+. The issue was caused by the Agent SDK emitting an orphan `--setting-sources` flag that consumed the following `--permission-mode` as its value, causing all observation SDK spawns to crash with exit code 1.

Key Highlights

  • Critical regression fix resolving 100% observation/summary failure on Claude Code 2.1.109+
  • Root cause identified: Agent SDK emits `--setting-sources` with empty string that corrupts the following `--permission-mode` flag
  • Fix implemented in ProcessRegistry.createPidCapturingSpawn using a pair-aware filter
  • The filter now drops both the flag and its empty-string value together when they appear consecutively
  • SDK default behavior (no setting sources) is preserved by omitting the flag entirely

Full Release Notes

## Fix

**Critical regression fix (#2049): observations no longer save on Claude Code 2.1.109+**

Resolves 100% observation/summary failure on Claude Code 2.1.109+ caused by a latent bug in how the bundled Agent SDK emits the `--setting-sources` flag.

### Root cause

The Agent SDK emits `["--setting-sources", ""]` whenever `settingSources` defaults to `[]`. Our existing Bun-compat filter stripped the empty string but left an orphan `--setting-sources` flag, which then consumed the following `--permission-mode` as its value. Claude Code 2.1.109+ rejects this with:

```
Error processing --setting-sources:
  Invalid setting source: --permission-mode.
```

Every observation SDK spawn crashed with exit code 1 before any data could be written.

### Fix

`ProcessRegistry.createPidCapturingSpawn` now uses a pair-aware filter: when an empty-string arg follows a `--flag`, both are dropped together. The SDK default (no setting sources) is preserved by omission.

### Credits

Thanks to @GigiTiti-Kai for the detailed root-cause report in #2049.