-
Notifications
You must be signed in to change notification settings - Fork 6
Add max session length/turns limit #4
Copy link
Copy link
Open
Description
Summary
Limit how long Claude sessions can run or how many turns they can take to prevent runaway costs.
Implementation Options
- Max turns - Count messages in a thread, stop responding after N turns
- Max duration - Track session start time, stop after X minutes
- Token budget - Track approximate token usage (harder to implement)
Suggested Behavior
MAX_TURNS_PER_SESSION=50- After 50 back-and-forth messages, warn then stopMAX_SESSION_DURATION_MS=3600000- 1 hour max- Send warning message before hitting limit
Priority
Lower - Claude Code already has its own context limits, this is a secondary safeguard
Related
- Independent of other safety features
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels