-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.toml
More file actions
64 lines (58 loc) · 3.39 KB
/
Copy pathconfig.example.toml
File metadata and controls
64 lines (58 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# SleeperAgent configuration.
# Copy to your OS config dir (e.g. ~/.config/sleeperagent/config.toml on Linux,
# %AppData%\sleeperagent\config.toml on Windows) and edit as needed.
# Any field you omit falls back to the built-in default.
poll_interval = "3s" # how often the pane is captured
reset_buffer = "60s" # added to every reset time to avoid racing the server clock
max_wait = "24h" # cap on a single wait; longer (weekly cap) -> notify + detach
[agents.claude]
launch_cmd = "claude"
# Patterns are Go regexes. Use named groups: (?P<time>...) for a clock time,
# (?P<ts>...) for a unix timestamp. The limit/idle strings are undocumented and
# can change on agent updates — fix them here, no reinstall needed.
limit_patterns = [
"(?i)Claude AI usage limit reached\\|(?P<ts>\\d+)",
"(?i)limit.*?reset[s]?\\s+in\\s+(?P<dur>[^\\r\\n.]+)",
"(?i)(?:usage|session|weekly|\\d+-?hour)\\s+limit\\s+reached.*?reset[s]?(?:\\s+at)?\\s+(?P<time>[^\\r\\n.]+)",
"(?i)hit your\\s+(?:usage|session|weekly)?\\s*limit.*?reset[s]?(?:\\s+at)?\\s+(?P<time>[^\\r\\n.]+)",
]
prompt_pattern = "(?ims)(?:^|\\n)(?:(?:[^\\n]*\\n){0,6}\\s*(?:[>\\x{276F}]\\s*)?1\\.\\s+\\S[^\\n]*\\n\\s*2\\.\\s+\\S[^\\n]*(?:\\n[^\\n]*){0,8}\\nEnter selection \\[[0-9]+-[0-9]+\\](?:, or Escape to cancel)?|y\\.\\s+Yes[^\\n]*\\nn\\.\\s+No[^\\n]*\\nEnter y/n:)"
inject_style = "esc-text-enter" # Esc, then text, then Enter
transcript_glob = "~/.claude/projects/*/*.jsonl"
# Appended to the launch command ONLY with the explicit --yolo opt-in (DANGEROUS:
# unattended tool calls with no permission prompts).
yolo_flag = "--dangerously-skip-permissions"
# Built-in by default: when Claude's rate-limit menu appears, SleeperAgent auto-
# selects "1. Stop and wait for the limit to reset" so you don't have to. It only
# presses a key once the verified stop-and-wait wording is on screen. Override or
# disable it here (set keys = "" to turn the key-press into a notify-only prompt).
[[agents.claude.auto_responses]]
pattern = "(?i)rate.?limit.?options|stop and wait for (?:(?:the|your) )?limit to reset"
keys = "1\r"
once = true
[agents.codex]
launch_cmd = "codex"
# (?P<time>...) clock time, (?P<dur>...) relative duration ("in 2h30m" / "in 45 minutes").
limit_patterns = [
"(?i)try again at (?P<time>.+)",
"(?i)try again in (?P<dur>.+)",
"(?i)rate limit.*reset[a-z ]*in (?P<dur>.+)",
]
inject_style = "text-enter" # text, then Enter
yolo_flag = "--dangerously-bypass-approvals-and-sandbox"
# Startup update check: on `run`/`attach-existing` from a real terminal,
# SleeperAgent asks GitHub (at most once a day) whether a newer release exists
# and offers to install it. Set check = false to disable, or set the
# SLEEPERAGENT_NO_UPDATE_CHECK env var. `sleeperagent update` always works.
[update]
check = true
# Local-LLM reprompt. Active only with `--reprompt ollama:<model>`; otherwise the
# static prompt is used. On any failure (server down, empty/over-long/denylisted
# output) SleeperAgent falls back to the static prompt.
[reprompt]
provider = "ollama"
model = "llama3.1" # used when --reprompt omits the model
base_url = "http://localhost:11434" # also honors $OLLAMA_HOST
max_prompt_chars = 600 # injected instruction length cap
tail_messages = 20 # transcript messages summarized for context
denylist = ["rm -rf", "force push", "--force", "drop table"]