Skip to content
Source
Sign inSign up

Stack workspaces

Work with agents / Local workspaces

Stack workspaces

You want one agent to start from the work of another, for example to test a change that is not in your checkout yet. A stack keeps the child workspace on top of its parent when you accept or sync.

1 min read

1. Create a child workspace

src ws create api-tests --from api

api-tests is a child of api. To make a child of a checkpoint, give the checkpoint in the same way: --from api@cp-2.

2. See the stack

src ws list

list shows each child under its parent:

NAME         STATE  BASELINE             LAST CHECKPOINT  PROCESSES  PORTS        PATH
api          live   1a2b3c4d5e6f (HEAD)  cp-1             0          10240-10249  /code/.src-ws/app/ws-1
  api-tests  live   9f8e7d6c5b4a (api)   -                0          10250-10259  /code/.src-ws/app/ws-2
Pool: 2 ready

3. Accept or sync the stack

  • src ws accept api-tests also brings the changes of api. src says so before it applies anything.
  • src ws sync api --stack moves api onto the default branch, then moves api-tests onto the new state of api.
  • A child that you sync on its own moves onto the default branch with the changes of its parent, and leaves the stack.

Done

The second agent works on top of the first, and one accept brings the work of both into your checkout. See Review and accept agent work.