Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

fix(backtests): a timed-out run leaves no record, so My Agents says "No backtests yet"

Open
#524 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

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_runs row, 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Open-Finance-Lab/AgenticTrading

All issues in Open-Finance-Lab/AgenticTrading

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.