From b8ce2ecf1366d860f5ca3240eff5184d2325a6ee Mon Sep 17 00:00:00 2001 From: Liang Jiaqing Date: Fri, 20 Feb 2026 12:54:29 +0800 Subject: [PATCH] fix: move input outside try block to allow Ctrl+C exit --- agentmain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agentmain.py b/agentmain.py index bfca596..f5c1579 100644 --- a/agentmain.py +++ b/agentmain.py @@ -152,9 +152,9 @@ if __name__ == '__main__': else: agent.inc_out = True while True: + q = input('> ').strip() + if not q: continue try: - q = input('> ').strip() - if not q: continue dq = agent.put_task(q, source='user') while True: item = dq.get()