Skip to content

Hook scripts don't initialize or share session state - memory and context externalization non-functional #4

@Promethean-Pty-Ltd

Description

@Promethean-Pty-Ltd

Summary

The plugin's hook scripts run as separate Python processes but don't initialize or persist session state between invocations. This means:

  1. Session state is never created
  2. Context is never tracked (conversation, files, tool outputs)
  3. PreCompact externalization fails
  4. Memory store is never populated during normal operation

Note: I also encountered hook errors on initial installation (which I understand is a known issue reported by others). These were resolved, but the problems below persist.

Evidence

1. init_rlm.py doesn't initialize session state

The SessionStart hook only creates config files and directories. It doesn't call persistence.init_session() or set up state for subsequent hooks.

2. Hooks run in isolated processes

Each hook runs as a subprocess. When externalize_context.py runs, persistence.current_state and persistence.current_context are both None.

3. PreCompact externalization fails

cd ~/.claude/plugins/cache/rlm-claude-code/rlm-claude-code/0.3.5
.venv/bin/python scripts/externalize_context.py
# Output: {"status": "error", "reason": "Extra data: line 14 column 2 (char 329)"}

The ~/.claude/rlm-externalized/ directory does not exist, confirming this hook has never succeeded.

4. Memory database is empty

The database exists but has no content from normal plugin operation.

5. Agent has no actual REPL

The agents/rlm-orchestrator.md describes Python functions like peek(), search(), recursive_query(), but the spawned agent only has standard Claude Code tools. Is the REPL functionality planned for a future release?

Environment

  • Plugin version: 0.3.5
  • Platform: macOS
  • Python: 3.13 (via plugin .venv)

Questions

  1. Is session state sharing between hooks intended to work currently?
  2. Is the REPL functionality documented in the agent file currently implemented, or is it planned?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions