Skip to content

fix(channels): Propagate agent errors to channel users#479

Merged
edenreich merged 1 commit intomainfrom
fix/channel-error-propagation
Apr 30, 2026
Merged

fix(channels): Propagate agent errors to channel users#479
edenreich merged 1 commit intomainfrom
fix/channel-error-propagation

Conversation

@edenreich
Copy link
Copy Markdown
Contributor

@edenreich edenreich commented Apr 30, 2026

Summary

  • Closes [BUG] When an error occurs the channel doesn't see it #478. When the infer agent subprocess (spawned by infer channels-manager) failed - LLM 400 context-full, gateway down, panics - the failure was logged on the daemon host but never delivered to the channel user, who just waited in silence.
  • New AgentErrorMessage IPC type emitted on stdout via a named-return defer (with recover) in RunAgentCommand, so every error path is covered with no scattered changes.
  • Channel manager forwards structured errors as ❌ Error: … and adds a stderr-tail safety net (❌ Agent failed: …) for hard crashes that exit before emitting.

When the channels-manager subprocess for `infer agent` fails (e.g. LLM 400
on full context, gateway down), the error was logged on the daemon host but
never delivered to the user, leaving them waiting in silence. Add a new
`AgentErrorMessage` IPC type that the agent emits on stdout via a
named-return defer in `RunAgentCommand` (covering all error returns plus
panics). The channel manager forwards these as `❌ Error: …` messages and
includes a stderr-tail safety net `❌ Agent failed: …` for crashes that
exit before they can emit.

Closes #478
@edenreich edenreich merged commit aa229c7 into main Apr 30, 2026
5 checks passed
@edenreich edenreich deleted the fix/channel-error-propagation branch April 30, 2026 12:34
ig-semantic-release-bot Bot pushed a commit that referenced this pull request Apr 30, 2026
## [0.106.3](v0.106.2...v0.106.3) (2026-04-30)

### 🐛 Bug Fixes

* **channels:** Propagate agent errors to channel users ([#479](#479)) ([aa229c7](aa229c7))

### 🧹 Maintenance

* **nix:** Update package to v0.106.2 ([#477](#477)) ([1c821ed](1c821ed))
@ig-semantic-release-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.106.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] When an error occurs the channel doesn't see it

1 participant