fix: surface swallowed errors across crates and emit turn failures to activity log#628
Merged
Merged
Conversation
Application-class errors (IdleTimeout, HardTimeout, Json, etc.) were logged at debug level without the error value, making them invisible at the default sprout_acp=info log level. Transport errors had the right level but also dropped the error content.
tlongwell-block
approved these changes
May 20, 2026
Errors across sprout-acp, sprout-relay, and sprout-media were logged at debug level or silently discarded, making failures invisible at the default info log level. Upgrades critical error paths to warn/info and adds error values where they were missing. Introduces turn_error and agent_panic observer events so prompt failures and agent crashes appear as red lifecycle entries in the Agent Activity Log panel, closing the gap where failed turns simply vanished from the UI timeline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a systemic pattern of swallowed or under-logged errors across
sprout-acp,sprout-relay, andsprout-media, and introduceturn_error/agent_panicobserver events so agent failures appear in the Activity Log UI.The original trigger was Jim agent silently dead-lettering every batch dispatch because
PromptOutcome::Errorwas logged atdebugwithout the error value — completely invisible at the defaultsprout_acp=infolog level. An audit revealed the same pattern across multiple crates: errors discarded withlet _ =, logged atdebugin critical paths, or logged without the actual error content.Error logging fixes:
sprout-acp: upgradeAgentExited/Timeoutand relay observer publish failures fromdebug!→warn!; adderror = %eto error logs that omitted itsprout-acp: upgrade reaction sign/build failures fromdebug!→warn!(code bugs, not transient network errors)sprout-relay: upgrade channel reconciliation failures fromdebug!→warn!; replace silentlet _ =on DB andgit configoperations with logged errors; fix.unwrap_or_default()that hid DB query failures; capture discarded enforcement error in auth handlersprout-relay: upgrade NIP-OA auth tag validation failures fromdebug!→info!for security auditabilitysprout-media: add missingerror = %eto upload metadatawarn!Activity log integration:
turn_errorobserver event when a prompt fails (PromptOutcome::Error,AgentExited,Timeout) so failures appear as red lifecycle entries in the Agent Activity Log panelagent_panicobserver event when an agent task panics, with theJoinErrormessageagentSessionTranscript.tsrenders both aslifecycleitems with error-flagged titles, which the existingLifecycleItemcomponent styles intext-destructive