Commit 699b0f2
Root cause: isAccessible(scope, undefined) used bypass mode (any valid scope
returns true), but getScopeFilter(undefined) returned only explicitly defined
scopes (["global"]), excluding implicit agent scopes like "agent:main". This
caused memory_update to reject accessible memories while recall/forget worked.
Changes:
- scopes.ts: getScopeFilter now returns undefined (full bypass) when agentId
is missing, matching isAccessible's existing bypass behavior
- tools.ts: memory_update uses runtimeContext.scopeManager instead of
context.scopeManager, consistent with recall/forget
- test: updated scope-access-undefined assertions to match new bypass semantics
Note: beta.10's resolveRuntimeAgentId already ensures agentId defaults to
"main" in normal operation. This fix is defensive — prevents the same bug
from recurring if any future code path passes undefined agentId.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 41c8f8c commit 699b0f2
3 files changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1069 | 1069 | | |
1070 | 1070 | | |
1071 | 1071 | | |
1072 | | - | |
| 1072 | + | |
1073 | 1073 | | |
1074 | 1074 | | |
1075 | 1075 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments