Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions cecli/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,11 @@ async def _run_parallel(self, with_message=None, preproc=True):
try:
if with_message:
self.io.user_input(with_message)
await self.run_one(with_message, preproc)
self.output_running = True
self.user_message = (
await self.preproc_user_input(with_message) if preproc else with_message
)
await self.output_task(preproc, single_run=True)
return self.partial_response_content

# Initialize state for task coordination
Expand Down Expand Up @@ -1576,7 +1580,7 @@ async def input_task(self, preproc):
if self.verbose or self.args.debug:
print(e)

async def output_task(self, preproc):
async def output_task(self, preproc, single_run=False):
"""
Handles output task generation and monitoring.
This task manages the output loop and coordinates with input_task.
Expand Down Expand Up @@ -1621,6 +1625,9 @@ async def output_task(self, preproc):
# And stop monitoring the output task
await self.io.stop_output_task()

if single_run:
break

await self.auto_save_session()
await asyncio.sleep(0.1) # Small yield to prevent tight loop

Expand Down
1 change: 1 addition & 0 deletions cecli/commands/spawn_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
class SpawnAgentCommand(BaseCommand):
NORM_NAME = "spawn-agent"
DESCRIPTION = "Spawn a sub-agent without a prompt (waits for user input)"
show_completion_notification = False

@classmethod
async def execute(cls, io, coder, args, **kwargs):
Expand Down
1 change: 1 addition & 0 deletions cecli/commands/switch_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
class SwitchAgentCommand(BaseCommand):
NORM_NAME = "switch-agent"
DESCRIPTION = "Switch to a specific agent by name"
show_completion_notification = False

@classmethod
async def execute(cls, io, coder, args, **kwargs):
Expand Down
Loading