Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)
Python
fix(cli): exit fcc-server cleanly on interrupt
Alishahryar125695077c47f
diff --git a/cli/entrypoints.py b/cli/entrypoints.pyindex fe2bdffc..3092d2d9 100644--- a/cli/entrypoints.py+++ b/cli/entrypoints.py@@ -45,11 +45,14 @@ def _load_env_template() -> str:def serve() -> None:"""Start the FastAPI server (registered as `fcc-server` script)."""try:- while True:- settings = get_settings()- if not _run_supervised_server(settings):- return- get_settings.cache_clear()+ try:+ while True:+ settings = get_settings()+ if not _run_supervised_server(settings):+ return+ get_settings.cache_clear()+ except KeyboardInterrupt:+ returnfinally:kill_all_best_effort()diff --git a/tests/cli/test_entrypoints.py b/tests/cli/test_entrypoints.pyindex 1b420b2c..2b81c8ad 100644--- a/tests/cli/test_entrypoints.py+++ b/tests/cli/test_entrypoints.py@@ -152,6 +152,28 @@ def test_serve_supervisor_restarts_when_app_requests_restart() -> None:kill_all.assert_called_once()+def test_serve_handles_keyboard_interrupt_without_traceback() -> None:+ from cli import entrypoints++ settings = _launcher_settings()+ get_settings = MagicMock(return_value=settings)+ get_settings.cache_clear = MagicMock()++ with (+ patch.object(entrypoints, "get_settings", get_settings),+ patch.object(+ entrypoints,+ "_run_supervised_server",+ side_effect=KeyboardInterrupt,+ ),+ patch.object(entrypoints, "kill_all_best_effort") as kill_all,+ ):+ entrypoints.serve()++ get_settings.cache_clear.assert_not_called()+ kill_all.assert_called_once()++def test_claude_child_env_targets_current_proxy_config() -> None:from cli.entrypoints import _claude_child_env