fix: emit user-facing message on compaction failure (#7975)
Some checks failed
Cargo Deny / deny (push) Has been skipped
Unused Dependencies / machete (push) Has been skipped
Canary / Prepare Version (push) Failing after 3s
Canary / bundle-desktop (push) Has been skipped
Canary / bundle-desktop-intel (push) Has been skipped
Canary / bundle-desktop-linux (push) Has been skipped
Canary / bundle-desktop-windows (push) Has been skipped
Canary / Upload Install Script (push) Has been skipped
Canary / Release (push) Has been skipped
CI / changes (push) Failing after 4s
Deploy Documentation / deploy (push) Failing after 4s
Publish Ask AI Bot Docker Image / docker (push) Failing after 3s
Publish Docker Image / docker (push) Failing after 3s
Scorecard supply-chain security / Scorecard analysis (push) Has been skipped
CI / Check Rust Code Format (push) Has been skipped
CI / Lint Rust Code (push) Has been skipped
Live Provider Tests / Smoke Tests (Code Execution) (push) Has been skipped
Live Provider Tests / Compaction Tests (push) Has been skipped
Live Provider Tests / goose server HTTP integration tests (push) Has been skipped
Canary / build-cli (push) Has been skipped
Live Provider Tests / check-fork (push) Successful in 1s
CI / Build and Test Rust Project (push) Has been skipped
CI / Check OpenAPI Schema is Up-to-Date (push) Has been skipped
Live Provider Tests / changes (push) Failing after 3s
Live Provider Tests / Build Binary (push) Has been skipped
Live Provider Tests / Smoke Tests (push) Has been skipped
CI / Test and Lint Electron Desktop App (push) Has been cancelled

Signed-off-by: Rabi Mishra <mishra.rabi@gmail.com>
This commit is contained in:
Rabi Mishra 2026-03-19 15:22:40 +05:30 committed by GitHub
parent 28a52e36ff
commit c97fbb9f3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1533,6 +1533,11 @@ impl Agent {
Err(e) => {
crate::posthog::emit_error("compaction_failed", &e.to_string());
error!("Compaction failed: {}", e);
yield AgentEvent::Message(
Message::assistant().with_text(
format!("Ran into this error trying to compact: {e}.\n\nPlease try again or create a new session")
)
);
break;
}
}