{"record":{"id":"9c8d2f766026a02e","repo":"zeroclaw-labs/zeroclaw","slug":"agentscopedmemory-refuses-to-forget-unattributed-r","errorCode":null,"errorMessage":"AgentScopedMemory refuses to forget unattributed row: legacy or backend without per-agent tracking; resolve via an admin Memory handle","messagePattern":"AgentScopedMemory refuses to forget unattributed row: legacy or backend without per-agent tracking; resolve via an admin Memory handle","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-memory/src/agent_scoped.rs","lineNumber":317,"sourceCode":"                            })),\n                        \"forget refused: row attributed to a different agent\"\n                    );\n                    anyhow::bail!(\n                        \"AgentScopedMemory refuses to forget cross-agent row: key attributed to agent other than the bound agent\"\n                    );\n                }\n                None => {\n                    ::zeroclaw_log::record!(\n                        WARN,\n                        ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Reject)\n                            .with_outcome(::zeroclaw_log::EventOutcome::Failure)\n                            .with_attrs(::serde_json::json!({\n                                \"key\": key,\n                                \"bound_agent\": self.agent_id,\n                            })),\n                        \"forget refused: row has no agent attribution\"\n                    );\n                    anyhow::bail!(\n                        \"AgentScopedMemory refuses to forget unattributed row: legacy or backend without per-agent tracking; resolve via an admin Memory handle\"\n                    );\n                }\n            },\n        }\n    }\n\n    async fn forget_for_agent(&self, key: &str, agent_id: &str) -> Result<bool> {\n        // Only the bound agent can delete its own row through the\n        // wrapper. Allowlist grants recall, never delete.\n        if agent_id != self.agent_id {\n            ::zeroclaw_log::record!(\n                WARN,\n                ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Reject)\n                    .with_outcome(::zeroclaw_log::EventOutcome::Failure)\n                    .with_attrs(::serde_json::json!({\n                        \"key\": key,\n                        \"row_agent\": agent_id,","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-memory/src/agent_scoped.rs#L299-L335","documentation":"Safety refusal in AgentScopedMemory::forget: the key exists but carries no agent attribution — a legacy row or one from a backend without per-agent tracking. Deleting an unattributed row could affect every agent sharing it, so the wrapper refuses and directs the caller to an admin Memory handle that is allowed to make that decision.","triggerScenarios":"Thrown at crates/zeroclaw-memory/src/agent_scoped.rs:317 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resolve the unattributed row via an admin Memory handle rather than an agent-scoped one."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","contentChangedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}