-
-
Notifications
You must be signed in to change notification settings - Fork 69.8k
feat: Add maxAnnounceChars parameter to sessions_spawn #46785
Copy link
Copy link
Open
Description
Problem
Sub-agent completion messages that exceed Telegram's 4096 character limit are silently dropped (related to upstream issue #28851 — sendPayload bypasses chunker).
The current mitigation is a protocol-level instruction in sub-agent prompts limiting output to ~3500 chars, but LLMs cannot reliably count characters, so this fails occasionally.
Proposed Feature
Add a maxAnnounceChars parameter to sessions_spawn that:
- Truncates the announce message at the specified length
- Appends a marker like
[truncated — full output in transcript]so the recipient knows there is more
Example usage:
{ "maxAnnounceChars": 3500 }Why This Is Better Than Protocol-Level Mitigation
- Platform-level enforcement is deterministic; LLM instruction-following is not
- Removes the character-counting burden from the sub-agent prompt
- Consistent behavior regardless of model used
Priority
Low / nice-to-have. The protocol mitigation works but is fragile under complex outputs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.