Option to include other platforms' observations in SessionStart context (Claude Code <-> Codex hand-off)
Before submitting
- I searched existing issues and confirmed this is not a duplicate
Is your feature request related to a problem? Please describe.
I run Claude Code and Codex CLI on the same project with one shared claude-mem worker and database, and I hand work off between them (a Claude Code session ends, a new Codex session continues the same task, or the reverse).
On v13.27.1 the SessionStart context is filtered to the current harness: the context hook sends platformSource (src/cli/handlers/context.ts), and ObservationCompiler applies WHERE (? IS NULL OR s.platform_source = ?). Measured on a real project: the Claude Code context held 50/50 Claude observations and the Codex context 50/50 Codex observations. After a Claude Code → Codex hand-off, Codex started with observations from four weeks earlier and nothing from the Claude Code session that had ended about 30 minutes before, so I had to point it to a saved terminal transcript to resume.
Search is already shared: /api/search/observations without a platform filter returns observations from both harnesses. Only the startup context is isolated.
Describe the solution you'd like
An opt-in setting, e.g. CLAUDE_MEM_CONTEXT_CROSS_PLATFORM=true (default false, so current behavior is unchanged), that makes the SessionStart context include the project's recent observations from all platforms, ideally with each entry labeled with its source platform.
Describe alternatives you've considered
- Asking the agent to run
mem-searchat startup: works, but depends on the agent remembering to do it and costs an extra round-trip every session. - Pasting the previous session's transcript manually: works, but defeats the purpose of automatic memory.
- Maintaining a local patch that drops the filter: possible, but a fork is costly to keep in sync with your release pace.
Additional context
Opt-in keeps per-harness isolation for users who rely on it. Happy to test a build on Windows (Claude Code 2.1.x, Codex CLI 0.157).
Source: thedotmack/claude-mem