fix(backtests): a timed-out run leaves no record, so My Agents says "No backtests yet"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by reading api/routers/backtests.py around _recent_slots (lines 990–996) and app.js around renderAgentCardBody (line 1452); compare the existing timeout outcome from issue #500 with the run record and empty-state behavior. Decide how terminal no-result outcomes will be persisted and surfaced on the agent card. Done means a timed-out run remains distinguishable from an agent that has never run after redeploy.
Written by the indexing model from the issue text.
Description
Reported symptom: an hour-long DeepSeek V4 Pro backtest ended and the agent's My Agents card reads "No backtests yet."
That copy is false, and it is the only thing left on the surface the user opened. A killed child never reaches the saving phase, so no agent_runs row is written — verified in prod: 0 rows for agent_20260922_202119_fc7bd724, and 0 rows for that agent's session. renderAgentCardBody falls through to the empty state whenever run_count / latest_run are absent (app.js:1452), which is also the state of an agent that has never run. The two are indistinguishable.
The explanation does exist — but only in _recent_slots, a process-local dict capped at 50 (api/routers/backtests.py:990-996), keyed by live_run_id, surfaced on the Backtest tab. GET /backtest/status still answers correctly today:
{"running":false,"timed_out":true,"elapsed_seconds":3605,
"message":"Backtest stopped at the time limit.",
"timeout":{"limit_seconds":3600,"billing_mode":"platform_credits",
"spent_micro":81130,"model_calls":38}}
It dies on the next redeploy, and reaching it requires holding the run id on the right tab. The browser polled once after the kill (21:22:21 UTC) and stopped.
So a run that spent an hour and 81,130 micro-credits is, on the page the user actually goes to, identical to never having happened.
- Persist a terminal outcome for a run that produced no results — a failed/timed-out
agent_runsrow, or a small run-outcome record — so the card can say what happened. - At minimum, make the empty state distinguish "never ran" from "no results to show".
#500 gave the timeout an outcome and copy. This is about that outcome surviving the tab it was shown on.
- Dominant language
- Python
- Stars
- 767
- Forks
- 156
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 67
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Open-Finance-Lab/AgenticTrading
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Open-Finance-Lab/AgenticTrading#663 ·
Maintainers usually reply within 1 day
-
fix(backtests): an LLM "sell 10" sells the whole positionPossibly taken @subidhkhanal claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Open-Finance-Lab/AgenticTrading#661 ·
Maintainers usually reply within 1 day
-
fix(llm): a non-ASCII execution handoff raises UnicodeEncodeError instead of ExecutionHandoffErrorPossibly taken @subidhkhanal claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Open-Finance-Lab/AgenticTrading#659 ·
Maintainers usually reply within 1 day
-
fix(backtests): an LLM action with trailing whitespace ("buy ") is silently droppedPossibly taken @subidhkhanal claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Open-Finance-Lab/AgenticTrading#658 ·
Maintainers usually reply within 1 day
-
fix(llm): Gemini adapter drops thinking tokens from the output countPossibly taken @subidhkhanal claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Open-Finance-Lab/AgenticTrading#657 ·
Maintainers usually reply within 1 day
All issues in Open-Finance-Lab/AgenticTrading
Similar issues
-
priority middle
Difficulty 1/5 Under an hour Newbie friendliness 62/100
KATO-Hiro/AtCoderClans#12940 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
huggingface/huggingface_hub#5283 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
bug example
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day