HKUDS/Vibe-Trading · error · ValueError
live trading or execution goals are not supported
Error message
live trading or execution goals are not supported
What it means
replace_goal in agent/src/goal/store.py re-raises the same 'live trading or execution goals are not supported' ValueError in two cases: the objective/criteria text matches the execution patterns (delegated to reject_live_execution_objective), or risk_tier is explicitly RiskTier.LIVE_TRADING_OR_EXECUTION. It is the store-level enforcement of the research-only policy.
Source
Thrown at agent/src/goal/store.py:299
ui_summary: Optional compact summary.
source: Source of goal creation.
protocol: Finance research protocol name.
risk_tier: Risk classification.
token_budget: Optional token budget.
turn_budget: Optional turn budget.
time_budget_seconds: Optional wall-clock budget.
Returns:
The newly active goal.
Raises:
ValueError: If objective or criteria are empty.
"""
session_id = normalize_required_text(session_id, "session_id")
objective = normalize_required_text(objective, "goal objective")
reject_live_execution_objective(objective)
if risk_tier is RiskTier.LIVE_TRADING_OR_EXECUTION:
raise ValueError("live trading or execution goals are not supported")
cleaned_criteria = [item.strip() for item in criteria if item.strip()]
if not cleaned_criteria:
raise ValueError("at least one goal criterion is required")
for criterion in cleaned_criteria:
reject_live_execution_objective(criterion)
budgets = {
"token_budget": token_budget,
"turn_budget": turn_budget,
"time_budget_seconds": time_budget_seconds,
}
for name, value in budgets.items():
if value is not None and value <= 0:
raise ValueError(f"{name} must be positive")
now = _now_iso()
goal_id = _id("goal")
summary = ui_summary.strip() or objective[:80]
current_values = [status.value for status in _CURRENT_STATUSES]View on GitHub (pinned to 80ffdda44c)
Solutions
- Use a research-appropriate risk_tier (e.g. the default/research tier) instead of LIVE_TRADING_OR_EXECUTION
- Rewrite objective and every criterion to describe analysis/backtesting, not order execution
- Add a UI-level check that greps objective text for buy/sell/execute words before calling the store
- If execution is the real requirement, route it to a system built for it — this store will keep rejecting it
Example fix
# before store.replace_goal(session_id="s1", objective="Run live momentum strategy", criteria=["Execute trades daily"], risk_tier=RiskTier.LIVE_TRADING_OR_EXECUTION) # after store.replace_goal(session_id="s1", objective="Backtest momentum strategy on SP500", criteria=["Sharpe > 1 over 5y"], risk_tier=RiskTier.RESEARCH)
Defensive patterns
Strategy: validation
Validate before calling
from agent.src.goal.policy import reject_live_execution_objective
if risk_tier is RiskTier.LIVE_TRADING_OR_EXECUTION:
raise ValueError('this app only supports research goals')
for text in [objective, *criteria]:
reject_live_execution_objective(text) # fail fast with context
store.replace_goal(session_id=sid, objective=objective, criteria=criteria, risk_tier=risk_tier) Type guard
def is_supported_goal(objective: str, criteria: list[str], risk_tier) -> bool:
from agent.src.goal.policy import _EXECUTION_PATTERNS
import re
texts_ok = not any(p.search(t) for t in [objective, *criteria] for p in _EXECUTION_PATTERNS)
return texts_ok and risk_tier is not RiskTier.LIVE_TRADING_OR_EXECUTION Try / catch
try:
store.replace_goal(session_id=sid, objective=obj, criteria=cs, risk_tier=tier)
except ValueError as e:
if 'not supported' in str(e):
raise UnsupportedGoalError('Rephrase as a research goal and use a research risk tier') from e
raise Prevention
- Never expose LIVE_TRADING_OR_EXECUTION in research UIs
- Sanitize both objective and every criterion for execution wording
- Pre-validate with reject_live_execution_objective to get errors at the right layer
When it happens
Trigger: Calling replace_goal with risk_tier=RiskTier.LIVE_TRADING_OR_EXECUTION, or with an objective/criterion containing execution-style wording ('place order', 'execute trades', 'live trading').
Common situations: Wiring an agent CLI (cmd_start) or research pipeline that forwards raw user intent; enum-driven UI exposing the LIVE_TRADING tier; criteria lists copied from trading checklists that include order language.
Related errors
- live trading or execution goals are not supported
- live trading or execution goals are not supported
- no MCP server configured for live broker {broker!r}
- live runner for {broker!r} does not define remote tool {oper
- live runner is not supported for {broker}
AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28).
Data as JSON: /api/errors/afd747e8278be72c.
Report an issue: GitHub.