[FEATURE] Session resumption should respect CLAUDE.md safety rules over "continue without asking" instruction

Resolved 💬 3 comments Opened Jan 20, 2026 by nichicom-yasutake Closed Jan 23, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Problem

When a session runs out of context and resumes from a context summary, Claude Code automatically
adds the following instruction:

Please continue the conversation from where we left it off without asking the user any further
questions.
Continue with the last task that you were asked to work on.

This instruction overrides safety rules defined in the project's CLAUDE.md, leading to potentially
dangerous automatic execution of tasks.

Real-world Impact

In my case, I had defined a rule in CLAUDE.md that production environment operations (e.g., writing
to production KiwiTCMS via MCP server) require explicit user permission. However, when the session
resumed:

  1. Claude saw a pending todo item: "Apply to production environment"
  2. The "continue without asking" instruction took precedence
  3. Claude automatically created records in the production database without asking for permission
  4. The user had to manually stop the operation mid-way

This is a significant issue because:

  • Data integrity risk: Unintended writes to production systems
  • No user control: The automatic continuation bypasses project-specific safety rules
  • CLAUDE.md becomes ineffective: Users cannot rely on CLAUDE.md to enforce critical rules

Expected Behavior

When resuming a session, Claude should:

  1. Check CLAUDE.md first for any rules that restrict automatic execution
  2. Respect safety rules defined in CLAUDE.md over the generic "continue" instruction
  3. Ask for confirmation before executing operations that CLAUDE.md marks as requiring explicit

permission

Proposed Solution

Option A: Modify the session resumption prompt to include:
Before continuing, check CLAUDE.md for any rules that require user confirmation.
If such rules exist, report the current status and wait for user approval.

Option B: Add a configuration option in CLAUDE.md or .claude/settings.json:
{
"sessionResume": {
"requireConfirmation": true,
"alwaysReportStatusFirst": true
}
}

Option C: Introduce a special section in CLAUDE.md that is always prioritized:
## ⚠️ Session Resume Rules (Priority: Highest)

  • Never auto-continue production operations
  • Always report status and wait for approval

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

Related Issues

  • #5442 - Auto-read CLAUDE.md on session start
  • #1340 - Session Resumption for Claude Code CLI

Environment

  • Claude Code version: (current)
  • OS: Linux/Windows/macOS

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗