How do I make sure a sprite goes to sleep?

hi folks.

How do I tell what is causing a sprite to keep running?

I get that sprites stop running once they are idle and after around 30 seconds of activity, but I can’t see where that shows up, because when I create sprites the only way I can seem to see a sprite as ‘cold’ (which I assume to mean “stored in object storage with minimal low billing”), is by creating a sprite.

Let’s say have these here:

sprite ls
Sprites in organization chris-adams-286:

┌────────────────┬───────┬───────┐
│      NAME      │STATUS │CREATED│
├────────────────┼───────┼───────┤
│short-lived-vm  │running│ 2h ago│
│short-lived-vm-1│cold   │ 1m ago│
│short-lived-vm-2│cold   │21s ago│
└────────────────┴───────┴───────┘

Total: 3 sprite(s)

And try creating a sprite:

sprite create -skip-console short-lived-vm-3 2>&1 > output.log

I’m passing in skip-console to return, and I’m redirecting the output with 2>&1 > output.log in the hope of capturing briefly shows on screen before it disappears

I can now see the new sprite in a cold / asleep state

sprite ls
Sprites in organization chris-adams-286:

┌────────────────┬───────┬───────┐
│      NAME      │STATUS │CREATED│
├────────────────┼───────┼───────┤
│short-lived-vm  │running│ 2h ago│
│short-lived-vm-1│running│ 9m ago│
│short-lived-vm-2│cold   │ 8m ago│
│short-lived-vm-3│cold   │20s ago│
└────────────────┴───────┴───────┘

Total: 4 sprite(s)

Thing is as soon as I try ANY command, it seems to wake the VM up, and I don’t see a way to get it back into a cold state.

Let’s try a super simple command invocation that you would expect to leave the machine ready to sleep when done

sprite exec --sprite short-lived-vm-3 -- pwd

# output was this:
/home/sprite

Now, for the rest of the life of that sprite it shows as running.

sprite ls
Sprites in organization chris-adams-286:

┌────────────────┬───────┬───────┐
│      NAME      │STATUS │CREATED│
├────────────────┼───────┼───────┤
│short-lived-vm  │running│ 3h ago│
│short-lived-vm-1│running│15m ago│
│short-lived-vm-2│cold   │13m ago│
│short-lived-vm-3│running│ 6m ago│
└────────────────┴───────┴───────┘

Total: 4 sprite(s)

Is this the expected behaviour?

Update: since writing this, post I’ve found the https://docs.sprites.dev sirte which at the time of writing is behind an password but last night for me, it wasn’t.

I was able to check out the repo here of the code:

And I can see the development is further ahead than the docs, so I’m assuming that it’s probably wisest to come back in a few days, after the docs and CLI have stabilised somewhat.

This is a really_ cool project though, I’m excited about using it later in 2026 :slight_smile:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.