fix(acp): overlay kind:40003 edits into agent thread context - #7033
fix(acp): overlay kind:40003 edits into agent thread context#7033avi-zloof wants to merge 1 commit into
Conversation
Desktop already shows the latest edit. ACP thread/DM context kept the original kind:9 body, so agents missed text added after send. After fetching context, query the latest kind:40003 per visible message and replace content. Use the edit event id so a later turn re-includes the new body instead of treating the original as already delivered. No relay change. Co-authored-by: Cursor <cursoragent@cursor.com>
🔐 Codex Security Review
|
|
One authorization edge case seems worth pinning before this lands: I'd either require exactly one valid edit target at ingest or validate every target independently, and add a negative test where |
Summary
Agents were reading the original
kind:9body, not laterkind:40003edits. Desktop already overlays edits; ACP thread/DM context did not.This is the Tamir/Atrium-Agent case: a message was edited to add point 7, the UI showed 7 points, the agent still swore there were only 6.
Change
kind:40003per visible message and replace content.crates/buzz-acp/src/pool.rs. No relay change.Test plan
cargo test -p buzz-acp --lib apply_latest_message_editscargo test -p buzz-acp --lib conversation_context_deltacargo test -p buzz-acp --lib test_fetch_thread_contextINT-1437
Made with Cursor