When all MCP servers fail to connect (e.g., network unreachable),
the agent loop would exit immediately, leaving the application in a
zombie state where the gateway is running but no messages can be
processed.
Changes:
- Downgrade MCP init failure from fatal error to warning in Run(),
ProcessDirectWithChannel(), ProcessHeartbeat(), and Continue()
- Add 30s timeout to HTTP client used for SSE/HTTP MCP transports
to prevent indefinite blocking on unreachable servers
The agent now continues operating without MCP tools when servers are
unavailable, rather than becoming completely unresponsive.
Add a context window usage indicator to the web chat UI and a /context
slash command that works across all channels.
Backend:
- Add computeContextUsage() estimating history + system + tool tokens
- Attach ContextUsage to outbound messages via the pico WebSocket protocol
- Add /context command showing context stats as formatted text
- Add EstimateSystemTokens() on ContextBuilder for system prompt estimation
Frontend:
- Add ContextUsageRing component (SVG ring + hover/tap popover)
- Show usage percentage, token counts, and compression threshold
- Hover on desktop (150ms leave delay), tap on mobile
- "View Details" sends /context with 1s cooldown
- i18n support (en/zh) for popover labels
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>