{"record":{"id":"f5872edb51e7a543","repo":"HKUDS/Vibe-Trading","slug":"live-runner-is-not-supported-for-broker","errorCode":null,"errorMessage":"live runner is not supported for {broker}","messagePattern":"live runner is not supported for (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"agent/src/api/live_routes.py","lineNumber":973,"sourceCode":"                    \"supported for direct-SDK profiles\"\n                ),\n            )\n\n        report = h._check_connector_status(profile_id, force=force)\n        return report\n\n    @app.post(\"/live/runner/start\", dependencies=[Depends(require_auth)])\n    async def start_runner_endpoint(payload: LiveRunnerControlRequest):\n        \"\"\"Start the persistent live runner for a broker (SPEC §7.5).\"\"\"\n        from src.live.halt import halt_flag_set\n        from src.trading.service import broker_supports_live_runner\n\n        broker = payload.broker.strip().lower()\n        if not broker:\n            raise HTTPException(status_code=400, detail=\"broker must not be blank\")\n\n        if not broker_supports_live_runner(broker):\n            raise HTTPException(\n                status_code=400,\n                detail=f\"live runner is not supported for {broker}\",\n            )\n\n        h = _host()\n        tasks = h._runner_tasks\n\n        existing = tasks.get(broker)\n        if existing is not None and not existing.done():\n            return {\"broker\": broker, \"started\": False, \"already_running\": True}\n\n        mandate = h._active_mandate_state(broker)\n        if mandate is None:\n            raise HTTPException(status_code=409, detail=f\"no committed mandate for {broker}\")\n        if mandate.expired:\n            raise HTTPException(status_code=409, detail=f\"mandate for {broker} has expired; re-authorize first\")\n        if halt_flag_set(broker=broker) or halt_flag_set(broker=None):\n            raise HTTPException(status_code=409, detail=\"kill switch is tripped; resume before starting the runner\")","sourceCodeStart":955,"sourceCodeEnd":991,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/api/live_routes.py#L955-L991","documentation":"Thrown by the live-runner start endpoint when the requested broker does not support a persistent live runner, as determined by broker_supports_live_runner() in src.trading.service. It is a 400-level client error: the broker name is syntactically valid but is not in the set of brokers with live-runner support (paper-only or unsupported venues).","triggerScenarios":"POST to the live runner start endpoint with payload.broker set to a broker that broker_supports_live_runner() returns False for (e.g. a paper-trading-only broker, a typo like 'ibkr' vs 'interactive_brokers', or a broker only wired for quote/portfolio data).","commonSituations":"Broker naming mismatch after a config or version change, using a paper broker expecting live execution, or deploying against a backend where the broker adapter exists but live-runner support was never enabled.","solutions":["Verify the exact broker identifier: check broker_supports_live_runner (src/trading/service.py) for the supported list and use one of those strings","Strip/lowercase the broker name client-side — the endpoint does broker.strip().lower() but the value must still match a supported key","If the broker should support live running, ensure the live runner adapter/credentials are configured and the broker is registered in the support map","Fall back to non-runner endpoints (one-shot order placement) if you only need occasional execution"],"exampleFix":"// before\n{\"broker\": \"Paper\"}\n// after\n{\"broker\": \"alpaca\"}","handlingStrategy":"validation","validationCode":"from src.trading.service import broker_supports_live_runner\nbroker = payload['broker'].strip().lower()\nif not broker_supports_live_runner(broker):\n    raise ValueError(f'unsupported broker for live runner: {broker}')","typeGuard":null,"tryCatchPattern":"catch HTTPException with status 400 and detail startswith 'live runner is not supported'; surface the supported broker list to the user instead of retrying","preventionTips":["Maintain a client-side constant of live-runner-capable broker keys sourced from broker_supports_live_runner","Normalize broker strings (strip+lower) before sending"],"tags":["live-trading","broker","validation","http-400"],"backgroundTag":"unsupported-broker","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}