Clamp the room for new chunks at 0, and test the held-items wording and the session option's target
This commit is contained in:
@@ -118,9 +118,8 @@ def start_chunks(loop_run: LoopRun, leaving: bool, paths: Paths, env: typing.Map
|
||||
if windows and (owned := tmux.owner(session, effects.tmux)) != loop_run.root:
|
||||
return Failure(f"the tmux session {session} runs the chunks of {owned or 'another checkout'}, whose key maps to the same session name; rename one of the two checkouts' folders")
|
||||
running = [window.name for window in windows if not window.dead and not (leaving and window.name == loop_run.chunk)]
|
||||
room = config.parallel_chunks - len(running)
|
||||
if room <= 0:
|
||||
return []
|
||||
# Below 0 where the config lowered parallel-chunks while more chunks ran.
|
||||
room = max(config.parallel_chunks - len(running), 0)
|
||||
# A loop that the human stopped, or that failed, keeps its window, dead, with its last lines and its items. Only the human's loop-claude <task> starts it again, before any other chunk.
|
||||
stopped = [window.name for window in windows if window.dead]
|
||||
chunks = [] if leaving else stopped[:room]
|
||||
|
||||
Reference in New Issue
Block a user