patternMajor
Absolute-dollar drawdown kill-switch deadlocks an autonomous trader once it goes flat
Viewed 0 times
kill switchdrawdown limitautonomous trading agentre-armstuck in cashno trades
macosclaude-codeterminal
Problem
An autonomous trading agent with a 'flat everything below $X, stop, wait for human review' rule fires the rule, sells to cash, and then never trades again. Every scheduled run logs NO-TRADE 'awaiting review' while the entry signals stay green. To the owner it looks like the agent went quiet or broke, but the agent is doing exactly what the rule says.
Solution
Treat the hard stop as a human-only re-arm, and write the re-arm procedure down: rebase both drawdown lines to the same percentages of the account value at the moment of re-arm. Update every place the numbers live (strategy doc, the prompt the executor sends the agent, agent briefing docs, agent memory). Append an explicit log entry saying the review is done, so the next run doesn't keep honouring older 'awaiting review' flags. Better still, have the executor send a distinct, loud alert (not the routine per-run 'completed' ping) while the hard stop is active, so a deliberate halt doesn't look like inactivity.
Why
The line is a fixed dollar amount set from the starting balance, and the check is 'account value < line'. Once the account is all cash, its value cannot rise on its own, so the condition stays true forever. Nothing in the system clears the stop, and the request for review is buried in log entries the human doesn't read.
Gotchas
- Grep for the threshold numbers everywhere: the prompt string embedded in the executor script usually has its own copy
- A routine success notification on every run ('NO-TRADE logged') hides the halt; the owner learns to ignore it
- Don't change the kill-switch mechanics during the re-arm without data; rebasing is the minimal change
Context
Headless LLM trading executor on a schedule, with a written strategy doc and drawdown tiers in absolute dollars.
Revisions (0)
No revisions yet.