Commit 793b5e5
feat: employee-scoped session_id for cross-channel memory coherence
All channels for the same employee now share one AgentCore session:
feis__ou_1a8a... + pt__emp-wjd... → emp__emp-wjd__dailyhash
This aligns with OpenClaw's original single-process Gateway design where
all channel sessions are managed in one process's memory. Benefits:
- Cross-channel MEMORY.md write conflicts eliminated (single container)
- Cross-channel context naturally preserved (same Gateway in-memory state)
- No OpenClaw code changes required (zero-invasion)
- Concurrent messages from same employee serialized (correct behavior)
Runtime routing still works: invoke_agent_runtime extracts emp_id from
tenant_id parts[1] and resolves the correct Runtime via DynamoDB routing config.
Unmapped users (no DDB mapping) fall back to channel__userId session (backward compat).
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent f77c4e2 commit 793b5e5
1 file changed
+12
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
| 507 | + | |
511 | 508 | | |
512 | | - | |
513 | 509 | | |
514 | 510 | | |
515 | | - | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
516 | 522 | | |
517 | 523 | | |
518 | 524 | | |
519 | 525 | | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | 526 | | |
524 | 527 | | |
525 | 528 | | |
| |||
0 commit comments