ProductsCode and review
Editor
Code together. From anywhere.
A shared browser workspace for developers and AI agents.
feat/retry-budget
CodeGraphAtlasTasksJobs
AS
2retry.go×
budget.go×
retry_test.go×
1
2
3⌄
4
5
6
7
8
9⌄
10⌄
11
12
13⌄
14
15
16
17
18
19
20⌄
21
22
23
24
25
26
27
28
29⌄
30
31
package checkout
import (
"context"
"math/rand/v2"
"time"
)
func (b Budget) Wait(ctx context.Context, attempt int) error {
if attempt >= b.Attempts {
return ErrBudgetSpent
}
if err := ctx.Err(); err != nil {
return err
}
base := b.Base
delay := base * time.Duration(attempt)
t := time.NewTimer(delay)
defer t.Stop()
select {
case <-ctx.Done():
return ctx.Err()
case <-t.C:
return nil
}
}
// jitter spreads retries so callers do not stampede.
func jitter(d time.Duration, frac float64) time.Duration {
return d - time.Duration(rand.Float64()*frac*float64(d))
}
services/checkout/retry.goLSP✦ AICollab2utf-8Code toolsFormat
Terminal 1×
^CClear
~/checkout (feat/retry-budget) $ rbs build //services/checkout:server
✅ Successfully built //services/checkout:server
~/checkout (feat/retry-budget) $
RBSReadyUTF-8GO✦ Completions On◇ Show AIHide Activity Bar◀ Hide Explorer⫿ Split🔍 Search● ⎇ Git (1)Hide Terminal
For developers and agents on the same codebase
A new laptop takes a day to set up, and an agent’s environment never quite matches yours.
How ReasonOS fixes it
01
Runs on the branch
Code, language servers, terminal and running services live on the branch server. Nothing to install.
02
Agents in the same files
Coding agents edit, run tests and open reviews in the workspace you have open.
03
Join with a link
Teammates open the same branch and see the same processes, files and terminal.
Coming soona debugger · notebooks
Try it on your next branch.
Your team and your agents join with a link.