Skip to content

Commit 8e3625c

Browse files
idoubiclaude
andcommitted
fix(context): use agent ID not name for GetAgentFile fallback lookup
cb.agentID was set to a.name (display name like "拽姐") instead of a.agentID (database ID like "agt_xxx"). The GetAgentFile fallback subquery `SELECT user_id FROM agents WHERE id = ?` failed silently, so SOUL.md/IDENTITY.md were missing from the system prompt when the UserSpace owner differs from the agent owner (e.g. app_user channels). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1131744 commit 8e3625c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/agent/loop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3288,7 +3288,7 @@ func (a *Agent) ReloadWorkspaceFiles() {
32883288
// name/soul" greeting).
32893289
if a.memoryStore != nil {
32903290
a.ctxBuilder.store = a.memoryStore
3291-
a.ctxBuilder.agentID = a.name
3291+
a.ctxBuilder.agentID = a.agentID
32923292
a.ctxBuilder.userID = a.ownerUserID
32933293
}
32943294
// Chatter-timezone date line — same re-apply rule as the Store

0 commit comments

Comments
 (0)