Skip to main content

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

IDSolutionCategory
S1Motia FrameworkExternal framework
S2File-based JSON ManifestCustom (zero-dep)
S3SQLite Pub/Sub (sessions.db)Custom (zero-dep)
S4Redis Pub/SubExternal infrastructure
S5Unix Domain SocketsCustom daemon
S6NATS.ioExternal infrastructure
S7Claude Code Agent TeamsPlatform-native

Scoring: 1 = Poor, 2 = Below Average, 3 = Adequate, 4 = Good, 5 = Excellent


Sub-Table 1: Technical Fit (Weight: 30%)

AttributeS1: MotiaS2: File JSONS3: SQLiteS4: RedisS5: Unix SockS6: NATSS7: Agent Teams
Cross-process pub/sub1235452
LLM-agnostic (Claude+Codex+Gemini+Kimi)3555551
Python integration quality3555431
TypeScript integration quality4445451
Message latency (local)3345551
Crash recovery / fault tolerance2253342
Concurrent session support (5-10)2355553
File conflict detection capability1454441
Sub-Total19283637343612
Normalized (out of 40)47.5%70.0%90.0%92.5%85.0%90.0%30.0%

Sub-Table 2: Operational (Weight: 25%)

AttributeS1: MotiaS2: File JSONS3: SQLiteS4: RedisS5: Unix SockS6: NATSS7: Agent Teams
New dependencies required2552525
Setup complexity2553235
Infrastructure overhead (daemon/server)2553235
Idle resource consumption2554445
Debuggability / observability3543232
Maintenance burden2453231
Implementation effort (LOC)2443235
Existing CODITECT stack alignment1452323
Sub-Total16373823222331
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%)

AttributeS1: MotiaS2: File JSONS3: SQLiteS4: RedisS5: Unix SockS6: NATSS7: Agent Teams
License compatibility (commercial use)2553553
Vendor lock-in risk2554541
Industry pattern alignment1453334
CODITECT product differentiation2353332
Customer installation simplicity1552234
Cloud-tier upgrade path3245352
Sub-Total11242920212316
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 FactorS1: MotiaS2: File JSONS3: SQLiteS4: RedisS5: Unix SockS6: NATSS7: Agent Teams
API stability / breaking changes1554551
License change risk1552553
Maintainer / bus factor risk2554543
Platform rewrite risk1555552
Over-engineering risk1452223
Data loss / message loss risk2353333
Sub-Total8273020252415
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%)

AttributeS1: MotiaS2: File JSONS3: SQLiteS4: RedisS5: Unix SockS6: NATSS7: Agent Teams
Scalability ceiling3245452
Community / ecosystem growth3155344
Reuse across CODITECT features1354332
Knowledge transferability2554432
Sub-Total9111918141510
Normalized (out of 20)45.0%55.0%95.0%90.0%70.0%75.0%50.0%

Master Grade Summary

Sub-TableWeightS1: MotiaS2: File JSONS3: SQLiteS4: RedisS5: Unix SockS6: NATSS7: Agent Teams
1. Technical Fit30%47.5%70.0%90.0%92.5%85.0%90.0%30.0%
2. Operational25%40.0%92.5%95.0%57.5%55.0%57.5%77.5%
3. Strategic Fit20%36.7%80.0%96.7%66.7%70.0%76.7%53.3%
4. Risk Assessment15%26.7%90.0%100.0%66.7%83.3%80.0%50.0%
5. Long-Term Value10%45.0%55.0%95.0%90.0%70.0%75.0%50.0%

Weighted Final Scores

SolutionCalculationFinal ScoreRank
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

RankSolutionScoreVerdict
1SQLite Pub/Sub (sessions.db)94.6%Clear winner -- zero new deps, ACID, aligns with ADR-118
2File-based JSON Manifest79.6%Strong runner-up -- simplest possible, Claude Agent Teams pattern
3NATS.io76.2%Best "real" messaging -- overkill for 5-10 sessions
4Redis Pub/Sub73.9%Excellent technically -- license instability, infra overhead
5Unix Domain Sockets73.8%Best latency -- daemon management too complex
6Claude Code Agent Teams51.5%Claude-only -- disqualified for multi-LLM requirement
7Motia Framework40.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:

  1. Claude Opus 4.6 -- Technical Architecture & Risk Assessment
  2. Kimi k2.5 -- Systems Engineering & Integration Fit
  3. 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