autonomous
Skill86 starsChanged 4 months agoMITView on GitHub
Enter autonomous development mode with STRUCTURAL enforcement. Uses a stop hook to prevent premature exit. Generates stop conditions and confirms with user before starting. Work independently for a specified duration with progress reporting.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- buildomator/buildomatortheir own version, first seen Nov 4, 2026
- pirafrank/skillstheir own version, first seen Oct 20, 2026
- scitex-ai/claude-code-telegrammertheir own version, first seen Jun 14, 2026
- broomva/skillstheir own version, first seen Jun 13, 2026
- JordanHood/claude-skillstheir own version, first seen Mar 18, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- buildomator/buildomator★ 102same name
- broomva/skills★ 4same name
- scitex-ai/claude-code-telegrammer★ 1same name
- JordanHood/claude-skills★ 0same name
- pirafrank/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- buildSkill
- instar-projectSkill
- secret-setupSkill
- setup-wizardSkill
- test-as-selfSkill
- agent-identitySkill
- agent-memorySkill
- agent-passportSkill
- agent-readinessSkill
- command-guardSkill
- credential-leak-detectorSkill
- instar-devSkill
- instar-feedbackSkill
- instar-identitySkill
- instar-schedulerSkill
- instar-sessionSkill
- instar-telegramSkill
- iterative-converging-auditSkill
- knowledge-baseSkill
- smart-web-fetchSkill
- spec-convergeSkill
- systematic-debuggingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 10 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Before activating the stop hook, you MUST:
- Distinctive: line 27
Wait for user confirmation: before activating the hook
- Distinctive: line 29
ALL tasks are done)
- Very specific: line 94
Use the Write tool to create the per-topic state file .instar/autonomous/<topicId>.local.md, where <topicId> is the report_topic value you …
- Very specific: line 179
hard_blocker_nonceauthenticates an honest(a)exit: Write a fresh random token (openssl rand -hex 8). - Very specific: line 206
Write the returned runId into the state file's run_id: frontmatter field.
- Very specific: line 209
When that field is absent/false (authority dark, observe-only/dry-run, or non-Echo), preserve the legacy active:true start.
- Very specific: line 210
If the mission is GENUINELY draft-only (the operator asked for drafts, not builds), list those exact repo-relative paths in …
- Very specific: line 213
If the server is unreachable, leave run_id empty and continue — the gate degrades honestly.
- Very specific: line 224
2c. On completion/exit: Remove the stop hook from settings.json:
- Distinctive: line 244
Read the task list
- Distinctive: line 247
Verify it works (compile, test where practical)
- Distinctive: line 282
Never add a found problem to the task list silently, and never draft a spec or audit for a non-blocking one inside this run.
- Distinctive: line 312
The cross-boundary form: When the goal needs a piece that lives somewhere else — another repo, the app, another machine, a session or team …
- Distinctive: line 386
Legacy fallback: self-declared promise: If no condition is set, when ALL tasks are genuinely done:
- Distinctive: line 389
Verify every task is complete (re-read the list)
- Very specific: line 390
Run npx tsc --noEmit — zero errors
- Distinctive: line 392
Write learnings to MEMORY.md
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Autonomous Mode (Structurally Enforced)
You are entering autonomous development mode. This mode uses a stop hook that PREVENTS you from exiting until all tasks are genuinely complete. This is not optional — the hook structurally enforces continuous work.
Step 1: Generate Stop Conditions (MANDATORY)
Before activating the stop hook, you MUST:
- Analyze the goal and break it into specific, verifiable tasks
- Present the task list to the user with clear completion criteria
- Propose a measurable
completion_conditionsynthesized from those tasks — an artifact-grounded end-state an INDEPENDENT judge can verify from what you SURFACE (a commit SHA, a file's content, a CI run id, a test-count delta). It covers EVERY deliverable the goal needs, including pieces in another repo, the app or another owner's code (see "The cross-boundary form" below) — not only the repo you are in. This is the PRIMARY completion mechanism. Only fall back to a self-declared promise when no verifiable condition can be expressed — and then recordcompletion_mode: promise-fallback+ a one-linepromise_fallback_reason:. - Wait for user confirmation before activating the hook
- Define the completion promise — retained as the fallback token (only TRUE when ALL tasks are done)
Example interaction:
User: /autonomous --duration=8h --goal="Complete Slack feature parity"
Agent: Here's my task breakdown for autonomous mode:
TASKS (all must be complete before I can exit):
- [ ] (1) Implement job-specific Slack channels
- [ ] (2) Build full PresenceProxy Slack integration
- [ ] (3) Update dashboard HTML with platform badges
- [ ] (4) Implement Slack Lifeline process
- [ ] (5) Add platform dropdown to new session UI
...
Completion promise: "ALL_TASKS_COMPLETE"
Duration: 8 hours
Emergency stop: "stop everything" via messaging
Shall I proceed? (The stop hook will prevent me from exiting until all tasks are done)<!-- CHECKBOX_TASK_LIST — task lines MUST be `- [ ] text` (a dash bullet). The server's task
parser reads only dash-bullet checkboxes; numbered `1. [ ]` lines are invisible to it, so no
work receipt can ever be minted against them and the run is never admitted. Put any number
inside the text: `- [ ] (1) text`. -->Task lines must use - [ ] checkboxes (put a number inside the text if you want one:
- [ ] (1) ...). Numbered 1. [ ] lines are not read as tasks by the server.
The user must confirm before the hook activates. This is the safety gate.
Step 2: Activate the Stop Hook
After user confirmation:
2a. Add the stop hook to settings.json (dynamically — it's removed when the session ends):
python3 -c "
import json
with open('.claude/settings.json') as f:
s = json.load(f)
hooks = s.setdefault('hooks', {}).setdefault('Stop', [])
# The stop hook ships ONLY in the skill dir — register THAT path. (A legacy bug
# registered '.instar/hooks/instar/autonomous-stop-hook.sh', where the file is
# never deployed, so the hook silently failed every Stop and the loop never
# re-engaged.) Self-heal: drop any prior autonomous-stop-hook entry (incl. the
# legacy wrong path), then add exactly one correct-path entry.
correct = 'bash \"\${CLAUDE_PROJECT_DIR}/.claude/skills/autonomous/hooks/autonomous-stop-hook.sh\"'
before = json.dumps(hooks)
hooks[:] = [e for e in hooks if not any('autonomous-stop-hook' in str(h.get('command','')) for h in e.get('hooks', []))]
hooks.append({'matcher': '', 'hooks': [{'type': 'command', 'command': correct, 'timeout': 10000}]})
if json.dumps(hooks) != before:
with open('.claude/settings.json', 'w') as f:
json.dump(s, f, indent=2)
print('Stop hook registered (correct skill path)')
"2b. Write the state file DIRECTLY (do NOT shell out to bash — the session ID env var is only available inside Claude Code):
Use the Write tool to create the per-topic state file .instar/autonomous/<topicId>.local.md,
where <topicId> is the report_topic value you set below (the Telegram topic id you already know
in-context). For example, if report_topic is 19437, write .instar/autonomous/19437.local.md.
WHY PER-TOPIC (setup-race hardening): the stop hook reads this per-topic file directly
(.instar/autonomous/<topicId>.local.md) — it is the canonical state path, keyed on topic so
multiple topics run concurrent autonomous jobs without collision. Writing the per-topic path here
closes a boot-window race: two autonomous sessions starting near-simultaneously must NOT both write
the single legacy file .instar/autonomous-state.local.md (the hook still migrates that legacy file
for in-flight older jobs, but new jobs write the per-topic file from the start so there is nothing to
collide on). If you somehow have no report_topic, fall back to .instar/autonomous-state.local.md
(one-at-a-time, back-compat only).
Write this content:
<!-- COMPLETION_CONDITION_DEFAULT — the Write-tool template defaults to a verifiable
completion_condition (judged by an INDEPENDENT model), NOT the self-declared
promise. The promise is the recorded fallback. Spec: AUTONOMOUS-COMPLETION-DISCIPLINE.md --><!-- REALCHECK_VERIFY — the template ALSO supports an OPTIONAL verification_command (ACT-152):
when set, the stop-hook RUNS it on a met:true verdict and only allows the exit if it ALSO
passes (fail/timeout → keep working). This sentinel is the PostUpdateMigrator marker that
re-deploys this SKILL.md to existing agents. Spec: autonomous-completion-real-checks.md --><!-- W32_PREPARING_LIVENESS — scope-accretion completion discipline: register the run server-side
(POST /autonomous/register) and record the returned run_id in the frontmatter; the server
then holds completion while deliverables THIS run creates sit unbuilt, uncorroborated, and
unratified. This sentinel is the PostUpdateMigrator marker that re-deploys this SKILL.md to
existing agents. Spec: autonomous-scope-accretion-completion.md -->---
active: {false when POST /autonomous/register returns preparationRequired:true; true otherwise}
status: {the initialStatus returned by POST /autonomous/register; active when absent}
iteration: 1
session_id: {VALUE OF $CLAUDE_CODE_SESSION_ID — get via: echo $CLAUDE_CODE_SESSION_ID}
goal: "YOUR GOAL"
duration: "8h"
duration_seconds: 28800
started_at: "{ISO timestamp}"
end_at: "{ISO timestamp + duration}"
report_topic: "TOPIC_ID"
report_interval: "30m"
last_report_at: ""
level_up: true
completion_condition: "<measurable, artifact-grounded end-state synthesized from the task list>"
completion_mode: condition # "condition" (default) | "promise-fallback"
promise_fallback_reason: "" # one line, REQUIRED iff completion_mode == promise-fallback
completion_promise: "ALL_TASKS_COMPLETE" # retained as the fallback token
hard_blocker_nonce: "{a random per-run token — get via: openssl rand -hex 8}"
run_id: "{the runId returned by POST /autonomous/register — see step 2b-2 below}"
# OPTIONAL real-check (ACT-152): a command that must exit 0 before the run may stop. When set, a
# met:true verdict RUNS it and gates the exit on it (fail/timeout → keep working). Omit if the
# goal isn't checkable by a single command. work_dir is captured by setup so a relative command
# (e.g. `npm test`) runs in the right tree; override with verification_cwd if the build is elsewhere.
# verification_command: "npm test --silent"
# verification_cwd: "/path/to/build/worktree"
---
# Autonomous Session
## Goal
{goal text}
## Tasks
{numbered task list}
## Instructions
{autonomous instructions}completion_condition is the PRIMARY field — the default path. It is judged each
turn by an INDEPENDENT model against what you SURFACE in your output (it cannot grade
its own homework, and it is fail-safe — evaluator-unreachable ⇒ keep working, never a
false "done"). Synthesize it from the task list, and prefer an artifact-grounded
end-state the judge can verify from the surfaced transcript — a commit SHA you show, a
file whose content you show, a CI run id, a concrete test-count delta — over an
unverifiable prose claim like "tests pass". duration_seconds is REQUIRED (a bounded
run; the duration is the hard backstop) — never set a truly-unbounded run.
The self-declared promise is the RECORDED fallback, not the default. Only fall back
to it when a verifiable condition genuinely cannot be expressed (rare — a purely
exploratory run with no testable end-state). When you do, set
completion_mode: promise-fallback and a one-line promise_fallback_reason: — so
"I chose the rationalizable path" is a logged, operator-visible fact, not an invisible
default.
hard_blocker_nonce authenticates an honest (a) exit. Write a fresh random token
(openssl rand -hex 8). The stop hook accepts a <hard-blocker nonce="..."> terminal
marker ONLY when its nonce matches this — so incidental <hard-blocker> prose (e.g.
quoting this skill) can never trip an exit. See "Legitimate Stop Conditions" below.
CRITICAL: To capture the session ID correctly, run this FIRST:
echo $CLAUDE_CODE_SESSION_IDThen include the output in the session_id: field. This ensures session isolation works.
2b-2. Register the run server-side (SCOPE_ACCRETION — MANDATORY when a report topic exists).
The server takes the start snapshot (config, condition, declared deliverables, git base-root
SHAs), mints the runId, and from then on the completion judge structurally HOLDS "done" while
deliverables this run itself creates (specs, audits, runbooks, scripts) sit unbuilt without
corroboration (a merged PR / a converged report) or explicit operator ratification:
PORT=$(python3 -c "import json;print(json.load(open('.instar/config.json')).get('port',4040))")
AUTH=$(python3 -c "import json;print(json.load(open('.instar/config.json')).get('authToken',''))")
jq -nc --arg t "TOPIC_ID" --arg c "YOUR completion_condition text" --arg w "$(pwd)" \
--arg s "STARTED_AT_ISO" --arg e "END_AT_ISO" --arg sid "$CLAUDE_CODE_SESSION_ID" \
'{topicId:$t,condition:$c,workDir:$w,startedAt:$s,endAt:$e,sessionId:$sid,declaredDeliverables:[]}' \
| curl -s -H "Authorization: Bearer $AUTH" -H 'Content-Type: application/json' \
--data-binary @- "http://localhost:${PORT}/autonomous/register"Write the returned runId into the state file's run_id: frontmatter field. When the response says
preparationRequired:true, write active:false and status:preparing; the server's five-predicate
liveness authority is the only path that may later promote the canonical file to active:true.
When that field is absent/false (authority dark, observe-only/dry-run, or non-Echo), preserve the legacy active:true start; shadow observation must not alter compatibility state.
If the mission is
GENUINELY draft-only (the operator asked for drafts, not builds), list those exact repo-relative
paths in declaredDeliverables — that list is operator-visible at setup and immutable mid-run.
If the server is unreachable, leave run_id empty and continue — the gate degrades honestly.
WHY NOT bash script? Running bash setup-autonomous.sh creates a subprocess that does NOT inherit CLAUDE_CODE_SESSION_ID. The state file ends up with an empty session_id, which causes the hook to leak into all sessions. Always write the state file from within Claude Code's context.
SESSION ISOLATION: The stop hook checks session_id — it only blocks the session that activated autonomous mode. Other sessions on the same machine pass through unaffected.
From this point, you CANNOT exit THIS session unless:
- You output
<promise>ALL_TASKS_COMPLETE</promise>(genuinely true) - Duration expires
- Emergency stop is triggered
2c. On completion/exit: Remove the stop hook from settings.json:
python3 -c "
import json
with open('.claude/settings.json') as f:
s = json.load(f)
s['hooks']['Stop'] = [h for h in s.get('hooks',{}).get('Stop',[]) if 'autonomous-stop-hook' not in str(h)]
with open('.claude/settings.json', 'w') as f:
json.dump(s, f, indent=2)
print('Stop hook removed')
"Step 3: Work Until Done
The stop hook will catch every attempt to exit and feed your task list back. Each iteration you will:
- Read the task list
- Pick the next incomplete task
- Implement it fully (not stub, not wire — IMPLEMENT)
- Verify it works (compile, test where practical)
- Move to next task
- Send progress reports at the configured interval
Scope Accretion — work YOU create joins YOUR completion bar (Layer A duty)
The completion bar is NOT frozen at session start. When you discover new in-scope work and
draft it (a spec, an audit, a runbook, a script), that artifact joins your bar: the server's
git-truth sweep sees it regardless of HOW it was written (Write tool, Bash heredoc, tee, a
subagent), and the judge will HOLD "done" until it is built+corroborated (merged PR / converged
report), was declared at setup, or the operator ratifies deferring it. "The documented stretch
(out of completion condition)" is the exact anti-pattern this closes — Deferral = Deletion.
Your recording duty (Layer A): the moment you create a deliverable, append to the state file's task list:
- [ ] ACCRETED(<ISO date>): <repo-relative path> — build/converge/deliver, or obtain operator ratificationThis is a willpower-assist for the honest case and carries zero safety weight — the server-side
sweep is the enforcement. If deferral is genuinely right, ASK the operator in the topic (say
"ratify deferral of <paths>?"); a server-authored enumeration message will list the exact set,
and only the verified operator's reply binds it. The operator can also ratify from the dashboard
(PIN-gated).
<!-- FRACTAL_8020_TRIAGE (CMT-917) -->Found problems (applies to the scope-accretion sweep): triage, never accrete
Finding problems along the way is good. Triage each one on the spot; only the first kind joins this work:
- Blocks the current work? Fix it now.
- A major issue (broken for users, a safety/security/data-loss risk, or more than about a day of work)? Spin it off: a new topic with its own session (dashboard New Session, or
POST /sessions/create) whose brief starts an/autonomousrun to complete it under these same 80/20 + triage rules; tell the operator in one line. - Everything else → a queue, and say which: an instar defect or improvement → the feedback queue (
/feedback); an improvement to this agent's own process → the evolution queue (/commit-action).
Never add a found problem to the task list silently, and never draft a spec or audit for a non-blocking one inside this run.
This is how accretion and triage fit: work you CREATE for the goal joins your bar (above); a problem you merely FIND is triaged. A spun-off or queued problem is not a deferral of your goal — it was never your goal. The server's completion sweep cannot tell whose files are whose, though: it counts every new worktree and commit in this agent home since the run started, including the spun-off session's. So when you spin one off, ask in the topic right away to "ratify deferral" of its paths (and of any artifact you already drafted for a found problem), so they do not hold your run. Do the asked-for work first; an unrelated fix never goes ahead of it.
The Defer-to-Future-Self Trap
This is the #1 failure mode. It looks like:
| What you think | What's actually happening |
| "This is Phase 2 work" | You don't feel like doing it right now |
| "Parked for follow-up" | You're avoiding the hard part |
| "Future improvement" | Your future self has no advantage over you |
| "Remaining work" | Work you're choosing not to do |
| "Deferred" | Abdication disguised as planning |
| "This will need X in the app / another repo" · "outside this repository" · "recorded for the owner" | A deferral dressed as a scope fact — work with no owner, no plan and no place on your list |
The test: Can you do this task right now with the tools and knowledge you have?
- Yes → Do it. Not later. Now.
- No → Document exactly WHY (missing dependency, needs external access, etc.)
"Phase 2" is only valid when the current phase genuinely cannot contain the work — not when you're tired, not when it's complex, not when it's 2 AM.
<!-- CROSS_BOUNDARY_OWNER (topic 10000002523) -->The cross-boundary form. When the goal needs a piece that lives somewhere else — another repo, the app, another machine, a session or team that owns that code — writing "X will need Y" or "that is outside this repository" into a spec, a progress message or a report is NOT scoping. It is a claim with no plan. Every such piece gets, in the same step:
- A route: pull the code to your machine and build it yourself, OR hand it to the session/conversation that owns it (named) with a concrete handoff — a brief sent, a tracked commitment, and how you will check it landed.
- A place on your completion bar: a
- [ ]task in the state file, and thecompletion_conditioncovers it (e.g. "app build with the button installed and the proof passing in the app"), so the run cannot finish "done" without it.
Find the owner before writing the sentence (your memory, the project map, a grep). If you genuinely cannot find a route, that is a stop condition (a) to report with what you tried — not a sentence in an "Open questions" list.
Legitimate Stop Conditions (the ONLY valid reasons to exit)
<!-- LEGITIMATE_STOP_CONDITIONS -->You are in a pre-approved autonomous session. The operator already said "go" and is not waiting at the keyboard. In this mode there are exactly three legitimate reasons to stop — and nothing else qualifies:
| # | Legitimate stop | What it actually looks like |
| (a) | A genuine HARD external blocker you cannot resolve yourself | A credential that does not exist and you cannot obtain; a service that is down with no fallback; data that does not exist yet; an action a safety rule actually prohibits. The test: you have exhausted what you can do — not "I'd prefer a human to confirm." |
| (b) | Duration expiry | The session clock genuinely ran out (end_at passed). Verify with /session/clock — never estimate that time is up. |
| (c) | The completion condition / promise is genuinely met | Every task done, the --completion-condition judge confirms, OR the completion promise is true. The bar is the FULL feature — not a partial one that "feels like enough." |
Everything else is NOT a stop. Decisions are cheap. In autonomous mode, a design decision is reversible, the change ships dark (disabled by default, behind a flag), and a wrong call can be undone or redone later. So you make the call using your best judgment and keep going. You do not stop to ask, to confirm, or to "get a steer."
NON-stops (recognize and reject these urges)
These are the rationalizations that end a pre-approved session early. Every one of them is a continue, not a stop:
| The urge to stop | Why it is NOT a stop |
| "This decision needs your steer / your opinion" | The decision is pre-approved, reversible, and dark-shipped. Make the call with best judgment and keep going. A wrong decision is cheap to undo. |
| "This is a clean milestone / a good stopping point" | A milestone is a place to report progress, not exit. The hook checks the task list, not your sense of a tidy break. |
| "It's late / it's 2 AM" | You do not get tired. The clock is the only time authority, and it hasn't expired. |
| "I'll let you decide between A and B" | If both A and B are reversible and dark-shipped, pick one (state which and why) and continue. Offering a menu is deferral. |
| "I've done a lot — this is a natural off-ramp" | Volume of work is not completion. The bar is the full completion condition. |
| An "off-ramp with no reply" — quietly winding down and going silent | Silence is the worst exit: the operator sees a stalled session. Keep working and keep reporting at the interval. |
| "The operator might have an opinion on this" | They pre-approved the session precisely so you would act on their behalf. Use the org-intent / your judgment; act; report what you decided. |
The principle (operator's own words): "Decisions are not that critical. They can always be undone or redone. This is also why we ship safely in dark mode so we can test and iterate. So decisions are not critical and autonomous mode should use its best judgment." When you catch yourself reaching for any NON-stop above, name it, make the decision, and keep going. The ONLY exits are (a), (b), (c).
If you genuinely hit (a): report the hard blocker clearly (what you tried, why you are stuck, what you'd need), then continue with any other in-scope work that the blocker does not gate — a blocker on one task is not a stop for the whole session.
(a) reporting prose is DISTINCT from the terminal <hard-blocker> marker. Routine "I'm blocked on this one task but continuing elsewhere" reporting is plain prose — do NOT use the marker tag for it. The nonce'd <hard-blocker> marker is emitted ONLY when you actually intend to TERMINATE the WHOLE run because a genuine, agent-unresolvable external blocker gates everything left. To terminate on (a), emit — in your FINAL turn — exactly:
<hard-blocker nonce="THE_VALUE_OF_hard_blocker_nonce">
what I tried: <concrete steps>
why I am stuck: <the real, external reason>
what I would need to proceed: <a genuinely external, agent-unresolvable residual>
</hard-blocker>The hook then asks the independent P13 judge to classify the blocker external vs buildable: if "what I would need" is something you could build, derive, or fetch yourself (a derivable standard, a buildable artifact, a credential in your own vault), the judge classifies it buildable and you are re-fed to keep working — the honest exit is for a genuinely external residual ONLY (a credential that does not exist, a down service, missing data, a prohibited action). A clean (a) exit writes a durable record, raises an /ack-able Attention item, and sends one Telegram so the blocker re-surfaces until you acknowledge it. A malformed/partial/nonce-mismatched marker is ignored (you keep working) — the safe direction.
Step 4: Completion
Preferred: a verifiable completion CONDITION (independent judge, like /goal).
Pass --completion-condition "<measurable end-state>" when starting (e.g. "all tests in
test/auth pass and npm test exits 0"). Each turn, an INDEPENDENT model judges the condition
against what you've SURFACED in the conversation — so run the real checks and show the
evidence in your output. When the judge confirms it, the hook exits automatically. You do not
self-declare done. If the judge can't be reached, the run keeps going (fail-safe). This mirrors
the framework /goal feature and is harder to fool than a self-declared promise.
Legacy fallback: self-declared promise. If no condition is set, when ALL tasks are genuinely done:
- Verify every task is complete (re-read the list)
- Run
npx tsc --noEmit— zero errors - Run relevant tests
- Write learnings to MEMORY.md
- Send final report via messaging. Include a proportion line: what was asked, the size of what shipped, review rounds and commit/gate attempts used, and each found problem with its triage. Say plainly if the effort was out of line with the size (a signal, never a gate).
- Output:
<promise>ALL_TASKS_COMPLETE</promise>
The stop hook detects the promise and allows exit.
Emergency Stop
The user can always stop autonomous mode:
- Via messaging: Send "stop everything" or "emergency stop" — the MessageSentinel intercepts
- Via file:
touch .instar/autonomous-emergency-stop— the stop hook checks for this (this flag is global, so it halts EVERY topic's autonomous job at once) - Via cancel:
/cancel-autonomous— removes this topic's state file
The stop hook checks for emergency stop on EVERY iteration. User safety is never compromised.
/cancel-autonomous
To manually cancel THIS topic's job, remove its per-topic state file (substitute the topic id):
rm -f .instar/autonomous/<topicId>.local.md(Older one-at-a-time jobs may still live at the legacy .instar/autonomous-state.local.md — remove
that instead if the per-topic file is absent.)
Progress Reporting
Send reports to the user's messaging platform at the configured interval.
How to send:
cat <<'EOF' | .claude/scripts/telegram-reply.sh TOPIC_ID
AUTONOMOUS PROGRESS (iteration N, Xh elapsed / Yh total)
Completed:
- [task 1] ✅
- [task 2] ✅
Working on:
- [current task]
Remaining:
- [task 3]
- [task 4]
Issues: none
Found (triaged): none
EOFThe FINAL report, on every completion path, adds the proportion line from Step 4: asked vs shipped, rounds and gate attempts, found problems with their triage, and a one-line flag if the effort was out of line with the size.
Anti-Patterns (Structurally Enforced)
These aren't just warnings — the stop hook WILL catch you if you try to exit without completing them:
The "Beautiful Summary" Exit
Writing a comprehensive report of what you did and what's "remaining" then trying to exit. The hook will block you and feed the remaining tasks back.
The "Phase 2" Labeling
Calling incomplete work "Phase 2" and trying to exit. The hook doesn't care about phases — it cares about the task list.
The "Good Stopping Point" Exit
Finding a natural break and trying to exit early. The hook checks the task list, not your feelings about stopping. A milestone is a place to report, not exit (see Legitimate Stop Conditions — it's a NON-stop).
The "It's 2 AM" Exit
Feeling tired (as an AI) and deferring. You don't get tired. The hook knows this. Only the session clock decides time — and it must actually have expired.
The "This Needs Your Steer" Exit
Hitting a design decision and trying to exit to ask the operator's opinion. The session is pre-approved — the decision is reversible and dark-shipped. Make the call with best judgment, state what you chose and why, and keep going. Asking for a steer on a reversible decision is the #1 way a pre-approved autonomous session dies early (see Legitimate Stop Conditions — "needs your steer" is a NON-stop).
The "Quiet Off-Ramp" Exit
Winding down and going silent without a reply, as if the session naturally ended. Silence is the worst exit — the operator sees a stalled agent. Keep working and keep reporting at the interval until a real (a)/(b)/(c) stop.
Hook Configuration
The stop hook is at .claude/skills/autonomous/hooks/autonomous-stop-hook.sh.
It reads state from the per-topic file .instar/autonomous/<topicId>.local.md (resolving the topic
from the tmux session), and migrates the legacy single file .instar/autonomous-state.local.md into
the per-topic path on first run for any in-flight older job. It then:
- Blocks exit if tasks are incomplete
- Feeds the task list + goal back as the next prompt
- Increments the iteration counter
- Checks for emergency stop signals
- Checks for duration expiry
- Checks for completion promise in
<promise>tags - Includes time remaining in the system message
This is structural enforcement, not willpower. You cannot talk your way out of the loop.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

