惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Security Archives - TechRepublic
Security Archives - TechRepublic
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
Scott Helme
Scott Helme
NISL@THU
NISL@THU
Cisco Talos Blog
Cisco Talos Blog
C
Cybersecurity and Infrastructure Security Agency CISA
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
J
Java Code Geeks
U
Unit 42
The GitHub Blog
The GitHub Blog
H
Help Net Security
T
Tenable Blog
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
Spread Privacy
Spread Privacy
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
L
Lohrmann on Cybersecurity
T
Threatpost
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
I
InfoQ
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
L
LINUX DO - 最新话题
K
Kaspersky official blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Threat Research - Cisco Blogs
C
Check Point Blog
T
The Blog of Author Tim Ferriss
有赞技术团队
有赞技术团队
宝玉的分享
宝玉的分享
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
Y
Y Combinator Blog
N
News | PayPal Newsroom
M
MIT News - Artificial intelligence
Latest news
Latest news
H
Hacker News: Front Page
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
I
Intezer
爱范儿
爱范儿
F
Fortinet All Blogs
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
How I Make Claude Code's 5-Hour Usage Window Last Longer on Claude Pro
Teruo Kunihiro · 2026-05-27 · via DEV Community

When using Claude Code with Claude Pro, one problem you will almost certainly run into is the Usage Limit.

The actual usage depends on many things: message length, attached files, conversation history, the model you are using, and the features you enable. Claude Pro has a session-based limit that resets every five hours, as well as a weekly usage limit. (Claude Help Center)

I use Claude Pro with the assumption that I will eventually hit the limit. Because of that, I try to avoid carrying unnecessary context, control when I start heavy work, and move important information out of the conversation and into files.

Use /clear

When I start a new task or switch models, I usually run /clear first.

/clear starts a new conversation with an empty context. The previous conversation is still available through /resume, so this does not mean throwing away the work entirely. I use it to separate the current task from old context that is no longer needed. (Claude Code)

The two cases I pay the most attention to are model switching and long idle periods.

In Claude Code, each model has its own prompt cache. Because of that, when you switch models with /model, the next request will reread the entire conversation history without a cache hit, even if the conversation itself has not changed. If you switch models while carrying a long conversation, the first request after the switch can consume a large amount of your usage limit. (Claude Code)

Long idle periods across sessions are also worth watching. For Claude subscriptions, Claude Code uses a one-hour TTL prompt cache for the main conversation. If the conversation is idle for a long time, the cache can expire. For example, if you wait more than an hour for a reset and then resume, the next input may reprocess the long history. (Claude Code)

New Claude Code sessions can also change the cache prefix. The working directory, OS, shell, and git status snapshot can all affect the prefix. The official docs explain that sequential sessions can share the cache only when they are on the same machine and directory, and when the git status snapshot at startup matches. In other words, it is better to think of session resumes as situations where cache misses can easily happen because of TTL expiration or prefix differences. (Claude Code)

For that reason, before switching models or leaving work idle for a long time, I save the necessary information as a plan or spec file and then run /clear. I want to avoid starting a new session with the first prompt already carrying a huge old conversation history.

If I want to continue the same task, I use /compact instead of /clear. /compact replaces the conversation history with a summary, so the conversation-layer cache is rebuilt. However, the next turn can rebuild the cache from a much shorter summary. Used at a natural stopping point, it helps both with usage and with keeping the model focused. (Claude Code)

Start the session early with /schedule

Claude Pro has a session limit that resets every five hours. If I start working at 6 a.m., I can expect resets around 11 a.m. and 4 p.m. during the workday. Of course, the exact remaining usage and reset time should be checked in the Usage screen or with /usage, but the timing of when you start heavy work matters a lot. (Claude Help Center)

Recently, the limits have become more generous, so once you clear each five-hour session, you can use a fairly large amount of tokens. On May 6, 2026, Anthropic announced that it doubled Claude Code's five-hour rate limits for Pro, Max, Team, and Enterprise users, and removed peak-hours limit reductions for Pro and Max users. Claude Code weekly limits were also increased by 50% through July 13. (Anthropic, ClaudeDevs, Business Insider)

Even so, if you use Claude Code heavily on Pro, you can burn through a five-hour session very quickly. A temporary increase in the weekly limit does not prevent you from hitting the session limit if you pack too much heavy work into a short period.

I want to maximize the number of useful resets during my daytime working hours, so I use /schedule to run a routine early in the morning. /schedule creates, updates, and runs Claude Code routines, and those routines run on Anthropic-managed cloud infrastructure. By scheduling something simple, such as a small hello command, I can start the session early and plan the day around the five-hour windows. (Claude Code)

For my schedule, simply controlling when the session starts can turn two useful reset windows into three.

Write plans and specs to files

For larger Claude Code tasks, I try not to keep plans and specs only inside the conversation. I write them out to files.

This is very important. If the working state exists only in the conversation history, running /clear removes the context. But if the plan or spec is saved as a Markdown file, I can simply ask the next session to read that file and continue.

I sometimes use Superpowers skills such as writing-plan and writing-spec. The Superpowers brainstorming skill stores design specs under docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md, and the writing-plans skill stores implementation plans under docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md. (GitHub, GitHub)

The tool itself does not have to be Superpowers. The important point is this: do not use the conversation as the only place where the working state lives.

I keep only "what to do now" in the conversation. Specs, plans, test procedures, and reasons for decisions go into files. That way, I can run /clear without losing productivity.

Use cheaper models when possible

Not every task needs Opus.

The official Claude Code cost management docs say that Sonnet can handle many coding tasks well and is cheaper than Opus. Opus is better reserved for complex architecture decisions and multi-step reasoning. (Claude Code)

To be honest, I do not always optimize this perfectly. But when using Superpowers skills or subagents, simple subtasks are sometimes routed toward Sonnet, which feels like it saves usage. The official docs also mention that simple subagent tasks can be configured to use Haiku. (Claude Code)

On the other hand, for tasks that involve orchestrating multiple subagents or making high-level design decisions, Opus feels more stable to me. If I try too hard to save usage there, I often pay for it later with retries and corrections.

So the pattern I usually follow is similar to the Superpowers SKILL.md: use Sonnet for simple implementation, research, test fixes, and file-level work; use Opus for design decisions, complex debugging, subagent orchestration, and reviewing long plans.

Conclusion

If you use Claude Code on Claude Pro, it is better to assume that you will eventually hit the usage limit.

The most important thing is to avoid carrying unnecessary context. Use /clear when starting a new task or switching models. Use /compact when continuing the same task while cleaning up the context. Do not keep all working state inside a long conversation; write plans and specs to files.

Also, pay attention to when your five-hour session starts. Starting early in the morning makes it easier to take advantage of multiple resets during the day. With /schedule, you can control the start timing of routine work to some extent.

For models, use Sonnet for everyday work and reserve Opus for heavy design decisions and complex orchestration. The goal is not simply to use the cheapest model. The goal is to choose the model that fails the least within your available usage limit.

In the end, saving Claude Code usage is not really about being stingy. It is about managing working state. Keep the session light, move important information into files, and avoid making the model carry everything in the conversation.