happy icon indicating copy to clipboard operation
happy copied to clipboard

Feature Request: Schedule Message

Open limabeanphoto opened this issue 1 year ago • 3 comments

Would this feature be possible?

Schedule a message to be sent at a certain time. This would be helpful for sending out a "Continue" message or other instructions to CC, scheduled for when 5 Hour limit is Reached.

limabeanphoto avatar Aug 23 '25 06:08 limabeanphoto

It is technically possible. The nice thing about having an always online dumb mailbox relay server in between the mobile app and the happy cli process is that the mobile app and the happy-coder cli do not have to be online at the same time.

My naive idea is to add a waitUntil field inside the encrypted command messages the mobile app sends to the CLI. So the happy-coder cli can download the command and then hold it in memory until the waitUntil time passes.

The mobile app would probably need to add some UI for these queued messages which is probably the largest amount of work to find a good design. Actually making the cli wait, and adding the extra field is fairly easy I think.

GrocerPublishAgent avatar Aug 23 '25 06:08 GrocerPublishAgent

What a lot of chat apps do for a scheduled send UI is: User holds down Send button, modal pops up with time selector.

Even better would be if Happy recognized the CC limit reached and suggested or auto-queued messages for User

limabeanphoto avatar Aug 23 '25 06:08 limabeanphoto

One reliability gotcha with keeping waitUntil only in CLI memory is that a CLI restart or update loses the scheduled message.

In MultiCC, we ended up keeping schedules server-side as durable cron entries, then dispatching the full prompt when the trigger fires. That makes scheduled work visible, cancellable, and auditable even when the client is offline, and an idempotency key prevents duplicate delivery after a restart.

This is not a drop-in implementation for Happy, but the pattern may be useful here. For the specific 5-hour-limit case, a one-shot runAt plus an idempotency key may be enough; if Happy later learns the rate-limit reset time, it could simply prefill that timestamp for the user.

lsjwzh avatar Sep 04 '26 03:09 lsjwzh