From fe9565118dbe2038348e8ac5c1fc0501172e598e Mon Sep 17 00:00:00 2001 From: octo-patch Date: Mon, 20 Apr 2026 11:31:31 +0800 Subject: [PATCH] fix: remove duplicate FINAL ANSWER output in CLI query (fixes #246) The query() method in each agent (deep_search, naive_rag, chain_of_rag) already prints the '==== FINAL ANSWER====' header and answer content as part of its execution. cli.py was printing it a second time after the call returned, causing duplicate output in the terminal. Remove the redundant print from cli.py; keep only the References section which is unique to the CLI. --- deepsearcher/cli.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/deepsearcher/cli.py b/deepsearcher/cli.py index b9bdcf19..79d2772d 100644 --- a/deepsearcher/cli.py +++ b/deepsearcher/cli.py @@ -89,8 +89,6 @@ def main(): args = parser.parse_args() if args.subcommand == "query": final_answer, refs, consumed_tokens = query(args.query, max_iter=args.max_iter) - log.color_print("\n==== FINAL ANSWER====\n") - log.color_print(final_answer) log.color_print("\n### References\n") for i, ref in enumerate(refs): log.color_print(f"{i + 1}. {ref.text[:60]}… {ref.reference}")