Exclude DMN nodes from subconscious trigger byte count

Subconscious agents inject DMN nodes (reflections, thalamus nudges)
into the conversation. These were being counted as conversation
advancement, causing agents to trigger each other in a feedback loop
even with no conscious activity.

Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-10 02:41:02 -04:00
parent 707f836ca0
commit 1d44421035

View file

@ -558,7 +558,8 @@ impl Subconscious {
let ctx = agent.context.lock().await;
let bytes = ctx.conversation().iter()
.filter(|node| !matches!(node.leaf().map(|l| l.body()),
Some(NodeBody::Log(_)) | Some(NodeBody::Memory { .. })))
Some(NodeBody::Log(_)) | Some(NodeBody::Memory { .. })
| Some(NodeBody::Dmn(_))))
.map(|node| node.render().len() as u64)
.sum::<u64>();
let keys: Vec<String> = ctx.conversation().iter().filter_map(|node| {