Skip to content

Traceback on exit in fast-agent go (--watch/interactive) #596

@iqdoctor

Description

@iqdoctor

When running fast-agent go in interactive mode (e.g. --card agents --watch), typing exit raises PromptExitError and the CLI prints a full traceback instead of a clean exit.

Repro:

  1. uv run fast-agent go --card agents --watch
  2. Type exit

Observed stack trace (trimmed):

PromptExitError: User requested to exit fast-agent session
  File ".../fast_agent/cli/commands/go.py", line 584, in go
    run_async_agent(...)
  File ".../fast_agent/core/fastagent.py", line 1251, in run
    yield wrapper
  File ".../fast_agent/ui/enhanced_prompt.py", line 1587, in handle_special_commands
    raise PromptExitError("User requested to exit fast-agent session")

Expected: clean exit without traceback.

I have a fix in my fork that catches SystemExit in the CLI runner and suppresses the traceback for exit code 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions