Hello, thanks for the plugin. Super nice and handy.
I'm not sure if this fits within scope of the plugin, as it's a feature which directly modifies the behavior of opencode, so feel free to close it.
Pre-flight checks
OpenCode version reviewed
1.18.21
Problem statement
When you run out of tokens in opencode, it retries exponentially (1 second, 2 seconds, ... 1 hour, 2 hours..) until it fails with this message.

Proposed change
We already have the data for when the token limit will restart, just sleep for that amount! (e.g. my 5 hour cycle restarts in 1.5 hours, instead of spamming their api every few seconds and exponentially increasing the wait time, directly start with 1.5 hours, and maybe THEN can the current exponential behavior be applied)
Things to consider
Only depend on the 5 hour cycles or allow month/weeks as well? is sleeping for days a good idea? Do we consider adding auto-model switch based on available quota?
Hello, thanks for the plugin. Super nice and handy.
I'm not sure if this fits within scope of the plugin, as it's a feature which directly modifies the behavior of opencode, so feel free to close it.
Pre-flight checks
OpenCode version reviewed
1.18.21
Problem statement
When you run out of tokens in opencode, it retries exponentially (1 second, 2 seconds, ... 1 hour, 2 hours..) until it fails with this message.

Proposed change
We already have the data for when the token limit will restart, just sleep for that amount! (e.g. my 5 hour cycle restarts in 1.5 hours, instead of spamming their api every few seconds and exponentially increasing the wait time, directly start with 1.5 hours, and maybe THEN can the current exponential behavior be applied)
Things to consider
Only depend on the 5 hour cycles or allow month/weeks as well? is sleeping for days a good idea? Do we consider adding auto-model switch based on available quota?