Idea
Allow teams of coding agents (main agent + sub-agents) to share a read-only view of each other's compacted context. Currently each session has its own conversation in the same lcm.db, but sub-agents cannot query other sessions' summaries or understand what their teammates have done.
Use Case: Coding Team Orchestration
A main "chief of staff" agent spawns sub-agents for different tasks (testing, refactoring, documentation). Each sub-agent works independently but would benefit from knowing:
- What files other agents have modified (from their session summaries)
- What decisions were made in other sessions
- What the main agent's current priorities are
Currently this requires the main agent to explicitly relay context to each sub-agent, which wastes tokens and is lossy.
Possible Approaches
A. Cross-session lcm_grep
Extend lcm_grep to search across all conversations in the DB (not just the current session). Sub-agents could query lcm_grep("what has the testing agent done?") to pull summaries from other sessions.
B. Shared context assembly
Allow a sub-agent to include summaries from a designated "parent" session in its assembled context. The parent's high-level condensed summaries (depth 2+) provide team awareness without duplicating raw messages.
C. Separate team coordination DB
Create a lightweight secondary database that stores:
- Per-session activity summaries (auto-generated after each compaction)
- File modification logs
- Decision/outcome records
Sub-agents read from this DB for team context. Writes are append-only from each session's compaction lifecycle.
Considerations
- SQLite concurrent read support via WAL mode makes shared reading feasible
- The existing
statelessSessionPatterns config could gate which sessions participate
- The
ignoreSessionPatterns config already excludes cron sessions — similar filtering for team DBs
- Read-only access prevents sub-agents from corrupting each other's state
- Team context should use condensed summaries (depth 1+) to minimize token overhead
Related
Idea
Allow teams of coding agents (main agent + sub-agents) to share a read-only view of each other's compacted context. Currently each session has its own conversation in the same
lcm.db, but sub-agents cannot query other sessions' summaries or understand what their teammates have done.Use Case: Coding Team Orchestration
A main "chief of staff" agent spawns sub-agents for different tasks (testing, refactoring, documentation). Each sub-agent works independently but would benefit from knowing:
Currently this requires the main agent to explicitly relay context to each sub-agent, which wastes tokens and is lossy.
Possible Approaches
A. Cross-session
lcm_grepExtend
lcm_grepto search across all conversations in the DB (not just the current session). Sub-agents could querylcm_grep("what has the testing agent done?")to pull summaries from other sessions.B. Shared context assembly
Allow a sub-agent to include summaries from a designated "parent" session in its assembled context. The parent's high-level condensed summaries (depth 2+) provide team awareness without duplicating raw messages.
C. Separate team coordination DB
Create a lightweight secondary database that stores:
Sub-agents read from this DB for team context. Writes are append-only from each session's compaction lifecycle.
Considerations
statelessSessionPatternsconfig could gate which sessions participateignoreSessionPatternsconfig already excludes cron sessions — similar filtering for team DBsRelated