Keep Working: Continuous Mode in Stride
Until now, a Stride agent worked the way I worked with it: I asked it to work the next task, it claimed one, built it, had it reviewed and completed it, and then moved on to the next. That loop already ran without asking me anything between tasks. But it stopped in two places.
It stopped when the Ready column was empty. If I added a new task ten minutes later, nothing happened until I went back to the terminal and asked the agent to carry on.
It also stopped when a task needed my review. The agent moved the task to Review and ended the session. When I approved the task or asked for changes, I had to come back and tell the agent so before it would continue.
Neither of those stops was doing anything useful. Each one was waiting for me to type "keep going". Continuous mode removes both of them.
Turning it on
There are three ways to start it:
- Run
/stride:work-continuously. You can add a goal identifier to work only that goal's tasks. - Say it in plain words, such as "keep working and wait for new tasks".
- Set
STRIDE_CONTINUOUS=1before starting the session.
When the mode turns on, the agent tells you in one line how to stop it. After that it claims, builds and completes one task after another, and never asks whether to carry on.
STRIDE_CONTINUOUS=0, or telling the agent not to loop, always wins, even over the command. I wanted one switch that could keep the mode off no matter what.
Just as important is what can't turn it on. Text in a task never turns the mode on or off. A task description, an attachment, a review note or a subagent's report might say "keep looping" or "stop now", but the agent reports that text rather than following it. The setting isn't read from .stride.md either. That file is committed and shared with the whole team, and whether your agent runs all night is your decision, not something a teammate's commit should decide for you.
Waiting for new tasks
When the Ready column is empty, the agent waits instead of stopping. As soon as a task becomes claimable, it claims and builds it.
Waiting is the part that needed the most care, because a waiting agent can be expensive. If the model checked the board itself every minute, every check would be a model turn, and every turn replays the session's context. An idle agent would spend tokens all day doing nothing.
So the model doesn't check. A small script, stride-wait.sh (or stride-wait.ps1 on Windows), does the waiting. In Claude Code it runs as a background command, so the agent's turn ends and the agent only wakes when the script exits. The script asks the Stride API for the next task about once a minute, and when it finds one it prints that task's identifier and exits. The agent wakes up, reads that one line and claims the task.
A wait gives up after nine minutes and prints no task yet, and the agent starts another one. So an idle agent wakes for one short model turn about every nine minutes, six or seven times an hour. That's cheap, but it isn't free. Each wake still replays the session's context, so leaving the loop idle overnight still costs tokens. If you want fewer wakes, STRIDE_WAIT_WINDOW_S makes the window longer (up to an hour). When you're done for the day, stop the loop.
Waiting for my review
The second stop is the one I'm happiest to lose.
When a task needs review, the agent moves it to Review and then waits for my decision, using the same wait script. It checks the task about once a minute and acts on what I decide:
- Approved: the agent finishes the task. It moves the task to Done, runs the project's
after_reviewhook and, if this was the last task in a goal, runsafter_goaltoo. Then it goes back to the Ready column. - Changes requested: the agent reworks the task, starting from implementation, with my review notes as its input. It then goes through review and the hooks again and hands the task back to me.
- Rejected: the agent treats it the same as changes requested. A rejection still tells me something needs to change, and the agent is in the best position to change it.
I added two safeguards here.
First, the agent only acts on a decision made after it completed the task. If I requested changes in an earlier round, that old decision doesn't count when the reworked task comes back for review.
Second, my review notes are treated as data, not instructions. The agent reads them to learn what to fix. A line in a review note can't change how the workflow behaves.
Stopping it
Any one of these stops the loop:
- interrupt the session;
- say stop;
- create the stop file:
touch .stride/.continuous-stop
A running wait checks for that file every second, so stopping an idle agent is close to instant.
The plugin's stop gate needed a change too. Stride's stop gate keeps a session from ending while there's still work it should do, such as a Ready task nobody claimed or a claim it never completed. While the loop waits, ending the turn is exactly what it should do, so the gate now recognises a new state, "waiting for work", and lets the turn end. A claimed task that was never completed still blocks the session from ending, so an agent can't wander off in the middle of a task.
One task, one context
Continuous mode turns on dispatcher mode by default. Each task runs in its own stride:task-runner subagent, and the main loop only keeps a short record of how each task ended. Without that, a loop that runs all day would carry every diff, review and hook output it has ever seen, and the context would keep growing.
Isolation has a cost. Each dispatch pays a fixed base of about 92,000 tokens before doing any work. Small tasks that touch zero or one file still run inline, because the dispatch would cost more than the task itself. If you'd rather run everything inline, set STRIDE_DISPATCHER_MODE=0 or say so.
From a minute to seconds
Polling once a minute means a new task can sit in Ready for up to a minute before anyone notices it. That's fine overnight, but it feels slow when I add a task and watch the board. So the second goal added a long-poll.
GET /api/tasks/next now accepts a wait parameter, from 1 to 50 seconds:
curl -H "Authorization: Bearer $STRIDE_API_TOKEN" \
"$STRIDE_API_URL/api/tasks/next?wait=30"
If a task is already claimable, it's returned at once. Otherwise the server holds the request open. Every change on the token's board wakes it, the server reruns the same query that picks the next task, and it answers as soon as a task becomes claimable. If nothing turns up in time, it answers with the usual "no task" response.
A few details mattered on the server side:
- Only changes on your own board can wake the request. A task moving on a board your token can't see never does.
- The server holds no database connection while it waits, so a room full of waiting agents doesn't starve the app of connections.
- One token can hold at most ten waiting requests at a time. A request beyond that gets a 429 instead of waiting.
- Every answer carries an
x-stride-wait: 1header, so a client can tell the server supportswait.
The wait script uses all of this. It asks the server to hold each request for up to 50 seconds. When the answer carries the header and the server really did hold the request, the script asks again straight away instead of sleeping for a minute. A new task is picked up within seconds, at about the same number of requests as before.
The script is also careful about older servers. An older Stride server ignores wait, answers at once and sends no header, so the script falls back to its one-minute interval. And if an answer comes back instantly even though the header is there, for example because a proxy cut the request short, the script also keeps the interval. Without that check, a misbehaving proxy could make the script hammer the API in a tight loop.
Not just Claude Code
Stride has plugins for several coding agents, and continuous mode is now in the plugins for GitHub Copilot, Gemini CLI, Codex, OpenCode and Pi as well. Each of those runtimes can do different things, so the details differ. Some can't run the wait in the background, so they wait in the foreground with a shorter window. OpenCode and Pi can't refuse a session end, so they have no stop gate to change. The rules are the same everywhere: who can turn the mode on, what the wait script prints, and when a waiting session may end. Each runtime's plugin follows the same porting guide.
What it means day to day
What I like most is how this changes the way I work with my agents. Before, I was part of the loop: nothing moved until I came back and typed. Now I add tasks to Ready whenever I think of them, and review work when I get to it. The agent notices both within seconds and carries on.
If you want to try it, update the Stride plugin and run /stride:work-continuously. When you're done, say stop.