inflearn logo

Running Claude Code Unattended as a Working Java Developer — Hooks, Skills, Scheduled Headless Execution, and Safeguards

When you run Claude Code unattended, the person who would normally approve and monitor it is gone. This shows how to fill those two roles with hooks, skills, headless `claude -p`, scheduled runs, permission allowlists, review gates, and usage budgets, using excerpts from operational files that run every day and examples of failures.

1 learners are taking this course

Level Intermediate

Course period Unlimited

claude
claude
AI Agent
AI Agent
Business Productivity
Business Productivity
Python
Python
claude
claude
AI Agent
AI Agent
Business Productivity
Business Productivity
Python
Python

What you will gain after the course

  • A complete blueprint for an unattended operations setup with three layers—supervisor loop + work queue + safety belt (allowlist → PreToolUse hook → independent review)

  • Permission settings for separating tool groups by task line, and how to count denial logs and update the allowlist

  • Display rules and a conflict-warning hook for multiple workers sharing the same to-do list

  • The sequence is: when an accident happens, write down the rules; if they aren’t followed, install a device; then deliberately trigger it to see whether it actually prevents the accident.

When you remove the person who was clicking the approval button in the chat window, what takes their place?

When using Claude Code in a chat window, a person is the safety mechanism. Every time it edits a file or runs a command, an approval dialog appears, and someone reads it and clicks. Unattended operation means removing that person. Then approval (is it okay to run this command?) and monitoring (is it running properly, or has it stopped?) both disappear at once. This course shows what fills those two roles by sharing excerpts from the operational files of a setup the author actually runs every day for personal automation. It covers hooks, skills, headless claude -p, scheduled execution, permission allowlists, review gates, multiple workers, usage budgets, and even the failures encountered along the way.

Recommended for

  • Developers who have tried using Claude Code interactively

  • People who want to “keep repetitive tasks running while they sleep”"

  • For those wondering how to prevent dangerous commands and false "completed" reports during unattended execution.

  • Those who want to add an unattended build, test, and reporting loop to a Java·Spring project.

Structure of a Lesson

  • Code excerpts from actual production files (with personal information removed)

  • Why the settings are configured that way and what incidents led to their creation

  • At the end of each chapter, an application note on applying it to a Java/Spring project (illustrative example)

Lesson List (10 Lessons)

Section 1. Getting Started - Lesson 1. The Big Picture — One Supervisor, Multiple Workstreams, Three Layers of Safety (Free Preview)

Section 2. Instructions, Hooks, and Skills - Lesson 2. Designing CLAUDE.md — files read every session should be short - Lesson 3. Practical use of hook events — SessionStart·PreToolUse·Stop·Notification - Lesson 4. Skills — turning procedures into files and calling them with slash commands

Section 3. Execution and Permissions - Lesson 5. Headless Execution and Scheduling — claude -p, stream-json, task schedulers - Lesson 6. Permissions — dontAsk and allowlists, why denials burn tokens

Section 4. Safeguards and Operations - Lesson 7. Guards and Review Gates — Blocking Dangerous Commands and False “Done” Reports - Lesson 8. Multiple Workers — When Editing the Same File at the Same Time - Lesson 9. Usage Budget — Spreading Your Subscription Limit Evenly Across the Week

Section 5. Summary - Lesson 10. Failure Cases and Lessons

What You’ll Take Away from the Course

  • A complete blueprint for an unattended operations setup built around a supervisor loop, task lanes, and three layers of safety (allowlist → PreToolUse hook → independent review).

  • Permission settings that assign tool bundles to each work queue, and a method for counting denial logs to update the allowlist.

  • Display rules and conflict-warning hooks for multiple workers sharing the same task list.

  • When something goes wrong, write down a one-line rule; if it isn’t followed, add a safeguard (such as a hook or timeout), then deliberately try to trigger it to verify that the safeguard actually blocks it.

Keep in mind.

  • This is not an official Anthropic course. It is a course that summarizes personal operational experience.

  • Reference: Claude Code v2.1.x, verified against the official documentation as of 2026-11. Behavior may change with future updates.

  • The example scripts are in PowerShell and Python, and are intended for Windows Task Scheduler (cron is mentioned only briefly in an example note on adapting the setup). No separate executable files are provided beyond the excerpts in the main text.

  • This does not cover installing Claude Code or its basic usage. Unattended execution does not guarantee increased profits or productivity.

  • The draft was written with the help of AI (Claude Code), the code excerpts were cross-checked against actual production files and programs, and the facts and wording were verified in a separate AI review before release.

Recommended for
these people

Who is this course right for?

  • A developer who has tried using Claude Code interactively

  • "For those who want repetitive tasks to keep running even while they sleep"

  • For anyone wondering how dangerous commands and false "completed" reports are prevented during unattended execution

  • For those who want to add an unattended build, test, and reporting loop to a Java/Spring project

Need to know before starting?

  • My Experience Using Claude Code Interactively (Installation and Basic Usage Not Covered)

  • Enough to read PowerShell and Python sample scripts (based on Windows Task Scheduler)

Hello
This is Hypothesis Lab

I’m a practicing Java and Spring backend developer. I build backtesting and workflow automation tools in Python, and run development task automation with Claude Code. I turn topics you can use right away in interviews and on the job into concise, easy-to-read text lessons with code.

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

Hypothesis Lab's other courses

Check out other courses by the instructor!

Similar courses

Explore other courses in the same field!

25% off for new members

$13.10

25%

$23.10