-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathagent.config
More file actions
70 lines (54 loc) · 3.81 KB
/
agent.config
File metadata and controls
70 lines (54 loc) · 3.81 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
65
66
67
68
69
70
# Agent runtime configuration.
# Source this file before running the agent, or copy these to your shell rc.
#
# All values can be overridden by environment variables of the same name.
# Which agent runtime to use.
# Options: claude, gemini, junie, codex, custom
# See agents/<runtime>.sh for what each one does.
AGENT_RUNTIME="${AGENT_RUNTIME:-claude}"
# Model to use within that runtime. Each runtime maps this to its own model names.
# Recommended for autonomous coding work:
# claude -> claude-opus-4-7 (or claude-sonnet-4-6 for cheap+fast)
# gemini -> gemini-2.5-pro
# junie -> (whatever Junie uses; currently a single model)
# codex -> gpt-5-codex
AGENT_MODEL="${AGENT_MODEL:-default}"
# How long to sleep between cycles when the queue is empty.
# The launcher only sleeps if there's no ready-for-agent issues and no
# agent-please-fix PRs. When there's work, cycles run back-to-back (burst mode).
# Set to 0 to disable idle sleep entirely (poll constantly — uses more API quota).
AGENT_IDLE_SLEEP="${AGENT_IDLE_SLEEP:-600}"
# Max minutes a single cycle can run before being interrupted.
# 0 = no limit. Useful guard if a runtime hangs.
AGENT_CYCLE_TIMEOUT="${AGENT_CYCLE_TIMEOUT:-0}"
# --- Cost controls ---------------------------------------------------------
# All in USD. Set to 0 (or leave unset) to disable a cap.
# Stop the loop when today's spend reaches this. Reset at midnight local time.
AGENT_MAX_DAILY_USD="${AGENT_MAX_DAILY_USD:-0}"
# Stop the agent (with a warning) after this many merges in one day.
# 0 = unlimited. Useful guard against a "ship 50 PRs an hour" runaway.
AGENT_MAX_PRS_PER_DAY="${AGENT_MAX_PRS_PER_DAY:-0}"
# When a single PR's accumulated cost exceeds this, the agent labels it
# `high-cost` and posts a one-time warning comment with options for the
# human (let it continue / take over / abandon / re-scope). Set to 0 to
# disable. Recommended starting value: 2 (most PRs cost less than this).
AGENT_PR_COST_WARN_USD="${AGENT_PR_COST_WARN_USD:-0}"
# The standard prompt every runtime gets. Defined here so all runtimes
# behave identically. Don't edit unless you know why.
#
# Design: one cycle = one work package. Pick the highest-priority work item,
# complete it end-to-end (or stop with needs-decision), then exit. The
# launcher loop will restart you for the next item. This keeps context small
# per cycle, makes cost-per-PR meaningful, and isolates failures.
AGENT_PROMPT='Read CLAUDE.md and docs/unattended-rules.md in full. The .claude/unattended marker is set — you are in unattended mode.
ONE CYCLE = ONE WORK PACKAGE. Do exactly one of the following, then exit:
(A) If any open PR has agent-please-fix label or @agent comments or CHANGES_REQUESTED reviews: pick the oldest such PR, address it end-to-end (push fixes, get CI green, self-merge or hand off), then exit.
(B) Otherwise, if there are ready-for-agent issues: pick the highest-priority one, branch, plan, write tests, implement, push, open PR, get CI green, self-merge, log progress, then exit.
CRITICAL: One issue = one focused change. If the issue description lists multiple features or touches multiple modules, your PR should address ONLY the core ask. Do not bundle:
- Refactoring unrelated code you noticed while working
- "While I'\''m here" improvements to nearby files
- Preemptive changes for future features
- Documentation updates beyond the module you changed
If you spot valuable refactoring or improvements, file them as separate agent-proposed issues for future cycles. Keep this PR atomic.
(C) Otherwise (queue empty, no PR feedback): run a brief self-audit, file at most ONE agent-proposed issue if you spot a real gap, then exit.
Do not chain multiple work packages in one cycle. The launcher restarts you immediately if more work is pending; otherwise it sleeps. Keep this session focused on one item.'