Inter-Session Messaging Architecture Evaluation Matrix
Task: H.13 - Inter-Session Communication Layer
Date: 2026-02-06
Author: Claude (Opus 4.6)
MoE Phase: 2 of 4 (Scoring Matrix)
Candidates Evaluated
| ID | Solution | Category |
|---|
| S1 | Motia Framework | External framework |
| S2 | File-based JSON Manifest | Custom (zero-dep) |
| S3 | SQLite Pub/Sub (sessions.db) | Custom (zero-dep) |
| S4 | Redis Pub/Sub | External infrastructure |
| S5 | Unix Domain Sockets | Custom daemon |
| S6 | NATS.io | External infrastructure |
| S7 | Claude Code Agent Teams | Platform-native |
Scoring: 1 = Poor, 2 = Below Average, 3 = Adequate, 4 = Good, 5 = Excellent
Sub-Table 1: Technical Fit (Weight: 30%)
| Attribute | S1: Motia | S2: File JSON | S3: SQLite | S4: Redis | S5: Unix Sock | S6: NATS | S7: Agent Teams |
|---|
| Cross-process pub/sub | 1 | 2 | 3 | 5 | 4 | 5 | 2 |
| LLM-agnostic (Claude+Codex+Gemini+Kimi) | 3 | 5 | 5 | 5 | 5 | 5 | 1 |
| Python integration quality | 3 | 5 | 5 | 5 | 4 | 3 | 1 |
| TypeScript integration quality | 4 | 4 | 4 | 5 | 4 | 5 | 1 |
| Message latency (local) | 3 | 3 | 4 | 5 | 5 | 5 | 1 |
| Crash recovery / fault tolerance | 2 | 2 | 5 | 3 | 3 | 4 | 2 |
| Concurrent session support (5-10) | 2 | 3 | 5 | 5 | 5 | 5 | 3 |
| File conflict detection capability | 1 | 4 | 5 | 4 | 4 | 4 | 1 |
| Sub-Total | 19 | 28 | 36 | 37 | 34 | 36 | 12 |
| Normalized (out of 40) | 47.5% | 70.0% | 90.0% | 92.5% | 85.0% | 90.0% | 30.0% |
Sub-Table 2: Operational (Weight: 25%)
| Attribute | S1: Motia | S2: File JSON | S3: SQLite | S4: Redis | S5: Unix Sock | S6: NATS | S7: Agent Teams |
|---|
| New dependencies required | 2 | 5 | 5 | 2 | 5 | 2 | 5 |
| Setup complexity | 2 | 5 | 5 | 3 | 2 | 3 | 5 |
| Infrastructure overhead (daemon/server) | 2 | 5 | 5 | 3 | 2 | 3 | 5 |
| Idle resource consumption | 2 | 5 | 5 | 4 | 4 | 4 | 5 |
| Debuggability / observability | 3 | 5 | 4 | 3 | 2 | 3 | 2 |
| Maintenance burden | 2 | 4 | 5 | 3 | 2 | 3 | 1 |
| Implementation effort (LOC) | 2 | 4 | 4 | 3 | 2 | 3 | 5 |
| Existing CODITECT stack alignment | 1 | 4 | 5 | 2 | 3 | 2 | 3 |
| Sub-Total | 16 | 37 | 38 | 23 | 22 | 23 | 31 |
| Normalized (out of 40) | 40.0% | 92.5% | 95.0% | 57.5% | 55.0% | 57.5% | 77.5% |
Sub-Table 3: Strategic Fit (Weight: 20%)
| Attribute | S1: Motia | S2: File JSON | S3: SQLite | S4: Redis | S5: Unix Sock | S6: NATS | S7: Agent Teams |
|---|
| License compatibility (commercial use) | 2 | 5 | 5 | 3 | 5 | 5 | 3 |
| Vendor lock-in risk | 2 | 5 | 5 | 4 | 5 | 4 | 1 |
| Industry pattern alignment | 1 | 4 | 5 | 3 | 3 | 3 | 4 |
| CODITECT product differentiation | 2 | 3 | 5 | 3 | 3 | 3 | 2 |
| Customer installation simplicity | 1 | 5 | 5 | 2 | 2 | 3 | 4 |
| Cloud-tier upgrade path | 3 | 2 | 4 | 5 | 3 | 5 | 2 |
| Sub-Total | 11 | 24 | 29 | 20 | 21 | 23 | 16 |
| Normalized (out of 30) | 36.7% | 80.0% | 96.7% | 66.7% | 70.0% | 76.7% | 53.3% |
Sub-Table 4: Risk Assessment (Weight: 15%)
Lower score = higher risk. 5 = lowest risk, 1 = highest risk.
| Risk Factor | S1: Motia | S2: File JSON | S3: SQLite | S4: Redis | S5: Unix Sock | S6: NATS | S7: Agent Teams |
|---|
| API stability / breaking changes | 1 | 5 | 5 | 4 | 5 | 5 | 1 |
| License change risk | 1 | 5 | 5 | 2 | 5 | 5 | 3 |
| Maintainer / bus factor risk | 2 | 5 | 5 | 4 | 5 | 4 | 3 |
| Platform rewrite risk | 1 | 5 | 5 | 5 | 5 | 5 | 2 |
| Over-engineering risk | 1 | 4 | 5 | 2 | 2 | 2 | 3 |
| Data loss / message loss risk | 2 | 3 | 5 | 3 | 3 | 3 | 3 |
| Sub-Total | 8 | 27 | 30 | 20 | 25 | 24 | 15 |
| Normalized (out of 30) | 26.7% | 90.0% | 100.0% | 66.7% | 83.3% | 80.0% | 50.0% |
Sub-Table 5: Long-Term Value (Weight: 10%)
| Attribute | S1: Motia | S2: File JSON | S3: SQLite | S4: Redis | S5: Unix Sock | S6: NATS | S7: Agent Teams |
|---|
| Scalability ceiling | 3 | 2 | 4 | 5 | 4 | 5 | 2 |
| Community / ecosystem growth | 3 | 1 | 5 | 5 | 3 | 4 | 4 |
| Reuse across CODITECT features | 1 | 3 | 5 | 4 | 3 | 3 | 2 |
| Knowledge transferability | 2 | 5 | 5 | 4 | 4 | 3 | 2 |
| Sub-Total | 9 | 11 | 19 | 18 | 14 | 15 | 10 |
| Normalized (out of 20) | 45.0% | 55.0% | 95.0% | 90.0% | 70.0% | 75.0% | 50.0% |
Master Grade Summary
| Sub-Table | Weight | S1: Motia | S2: File JSON | S3: SQLite | S4: Redis | S5: Unix Sock | S6: NATS | S7: Agent Teams |
|---|
| 1. Technical Fit | 30% | 47.5% | 70.0% | 90.0% | 92.5% | 85.0% | 90.0% | 30.0% |
| 2. Operational | 25% | 40.0% | 92.5% | 95.0% | 57.5% | 55.0% | 57.5% | 77.5% |
| 3. Strategic Fit | 20% | 36.7% | 80.0% | 96.7% | 66.7% | 70.0% | 76.7% | 53.3% |
| 4. Risk Assessment | 15% | 26.7% | 90.0% | 100.0% | 66.7% | 83.3% | 80.0% | 50.0% |
| 5. Long-Term Value | 10% | 45.0% | 55.0% | 95.0% | 90.0% | 70.0% | 75.0% | 50.0% |
Weighted Final Scores
| Solution | Calculation | Final Score | Rank |
|---|
| S3: SQLite Pub/Sub | (90.0x0.30)+(95.0x0.25)+(96.7x0.20)+(100.0x0.15)+(95.0x0.10) | 94.6% | 1st |
| S2: File-based JSON | (70.0x0.30)+(92.5x0.25)+(80.0x0.20)+(90.0x0.15)+(55.0x0.10) | 79.6% | 2nd |
| S5: Unix Domain Sockets | (85.0x0.30)+(55.0x0.25)+(70.0x0.20)+(83.3x0.15)+(70.0x0.10) | 73.8% | 3rd |
| S6: NATS.io | (90.0x0.30)+(57.5x0.25)+(76.7x0.20)+(80.0x0.15)+(75.0x0.10) | 76.2% | 4th |
| S4: Redis Pub/Sub | (92.5x0.30)+(57.5x0.25)+(66.7x0.20)+(66.7x0.15)+(90.0x0.10) | 73.9% | 5th |
| S7: Agent Teams | (30.0x0.30)+(77.5x0.25)+(53.3x0.20)+(50.0x0.15)+(50.0x0.10) | 51.5% | 6th |
| S1: Motia | (47.5x0.30)+(40.0x0.25)+(36.7x0.20)+(26.7x0.15)+(45.0x0.10) | 40.1% | 7th |
Ranking Summary
| Rank | Solution | Score | Verdict |
|---|
| 1 | SQLite Pub/Sub (sessions.db) | 94.6% | Clear winner -- zero new deps, ACID, aligns with ADR-118 |
| 2 | File-based JSON Manifest | 79.6% | Strong runner-up -- simplest possible, Claude Agent Teams pattern |
| 3 | NATS.io | 76.2% | Best "real" messaging -- overkill for 5-10 sessions |
| 4 | Redis Pub/Sub | 73.9% | Excellent technically -- license instability, infra overhead |
| 5 | Unix Domain Sockets | 73.8% | Best latency -- daemon management too complex |
| 6 | Claude Code Agent Teams | 51.5% | Claude-only -- disqualified for multi-LLM requirement |
| 7 | Motia Framework | 40.1% | Wrong architecture, ELv2 license, platform rewrite incoming |
Research Sources
Agent 1: Motia Deep-Dive (a82234f)
- Source code analysis of 15+ Motia core files
- License verification: ELv2 (changed from MIT, commit 8b93dcf4, Nov 2025)
- Activity: 1,011 commits in 2025, 13 in 2026; Rust/Go core rewrite in progress
- Architecture: In-process event bus, no external subscriber API
- Finding: NOT SUITABLE for inter-session communication (1.5/5 overall fit)
Agent 2: Alternatives Research (ae9242a)
- 6 alternatives profiled with code examples, performance benchmarks, license analysis
- SQLite WAL mode: 1000 writes/sec capacity, zero new dependencies
- Redis: ~0.1ms latency but AGPLv3 license instability (changed twice in 18 months)
- NATS: CNCF graduated, Apache 2.0, 10M+ msgs/sec -- overkill for ~2 msgs/sec use case
- Agent Teams: Claude-only, no programmatic API, experimental
- Finding: SQLite Pub/Sub is best fit, File JSON is fallback
Agent 3: Industry Landscape (af38c96)
- 8 competing tools analyzed (Cursor, Windsurf, Devin, OpenHands, SWE-agent, Aider, Copilot Workspace, Agent Teams)
- No leading AI coding tool uses a message broker for local multi-session coordination
- Pattern: File-based coordination dominates (Claude Agent Teams, Cursor, Aider)
- Windsurf uses Git worktrees for isolation, Devin uses intentional isolation
- MCP and A2A protocols do NOT address session-to-session coordination
- Finding: Industry consensus = file-based or SQLite, message brokers are over-engineering
Submitted for MoE Judge Panel Review
Judge Panel:
- Claude Opus 4.6 -- Technical Architecture & Risk Assessment
- Kimi k2.5 -- Systems Engineering & Integration Fit
- Gemini 2.5 Pro -- Industry Ecosystem & Long-term Longevity
Review Focus Areas:
- Scoring methodology and weight distribution fairness
- Any bias toward zero-dependency solutions
- Whether the 15-point gap between S3 (94.6%) and S2 (79.6%) is justified
- Risk of under-engineering (SQLite polling vs. push-based alternatives)
- Cloud upgrade path adequacy for future CODITECT Cloud product