← Back to PRs

#6778: feat(typing): add configurable typingTtlSeconds option

by rahultappetla open 2026-02-02 01:54 View on GitHub →
docs
## Problem The typing indicator TTL is currently hardcoded to 2 minutes (120 seconds). For long-running LLM operations—such as complex tool chains, slow model responses, or rate limit fallbacks—the typing indicator stops prematurely, making the bot appear unresponsive even though it's still actively processing. **Real-world scenario:** When using model fallback chains (e.g., primary → backup → CLI), a single request can take 5-10+ minutes. Users see the typing indicator stop after 2 minutes and assume the bot has crashed. ## Solution Add `typingTtlSeconds` as a configurable option in both agent defaults and session config, following the exact pattern established by `typingIntervalSeconds`. ### Key points: - **Default remains 120 seconds** — no breaking changes for existing installations - **Configurable at agent level** via `agents.defaults.typingTtlSeconds` - **Overridable per session** via `session.typingTtlSeconds` - **Priority chain:** Agent config → Session config → Default (120s) ## Related Issues This PR helps address: - **#7192** - Typing indicator stops prematurely for slow models. Users can now configure `typingTtlSeconds` to extend the indicator duration for long-running inference. - **#5637** - Typing indicator stops before TTS completes. Increasing `typingTtlSeconds` keeps the indicator active through longer dispatch phases. Closes #7192 Helps mitigate #5637 ## Changes | File | Change | |------|--------| | `zod-schema.agent-defaults.ts` | Add Zod schema validation | | `zod-schema.session.ts` | Add Zod schema validation | | `types.agent-defaults.ts` | Add TypeScript type with JSDoc | | `types.base.ts` | Add TypeScript type with JSDoc | | `get-reply.ts` | Wire config value to typing controller | | `typing.test.ts` | Add test coverage for TTL behavior | | `docs/concepts/typing-indicators.md` | Document the new option | ## Usage ```json5 { agents: { defaults: { ...

Most Similar PRs