claude-code - 💡(How to fix) Fix Allow customizing plan file naming via Options [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58884Fetched 2026-05-14 03:37:03
View on GitHub
Comments
1
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×2closed ×1commented ×1

We're building a multi-session agent runtime where plan files should be identifiable and organized per-chat rather than using random names that are hard to correlate with sessions.

Root Cause

We're building a multi-session agent runtime where plan files should be identifiable and organized per-chat rather than using random names that are hard to correlate with sessions.

Fix Action

Fix / Workaround

Current Workaround

The only way to achieve this today is via pnpm patch to replace the internal BU8() function in the bundled cli.js, which is fragile across SDK version upgrades.

Code Example

interface Options {
  // Existing:
  plansDirectory?: string;

  // New - either a static slug:
  planSlug?: string;

  // Or a generator function for dynamic naming:
  planNameGenerator?: () => string;
}
RAW_BUFFERClick to expand / collapse

Feature Request

Allow SDK consumers to customize plan file naming through Options, similar to how plansDirectory already works.

Problem

When using @anthropic-ai/claude-agent-sdk programmatically (e.g. building an agent runtime), plan files are given random adjective-gerund-noun names like giggly-squishing-squid.md. There's no way to override this naming from the SDK's public API.

The plansDirectory option exists to control where plans are stored, but there's no corresponding option for how they're named.

Proposed Solution

Add a planSlug or planNameGenerator option to Options:

interface Options {
  // Existing:
  plansDirectory?: string;

  // New - either a static slug:
  planSlug?: string;

  // Or a generator function for dynamic naming:
  planNameGenerator?: () => string;
}

This would allow consumers to generate deterministic, meaningful names (e.g. timestamp-based plan-2026-05-13-143022, or chat-ID-based plan-<chatId>).

Current Workaround

The only way to achieve this today is via pnpm patch to replace the internal BU8() function in the bundled cli.js, which is fragile across SDK version upgrades.

Context

We're building a multi-session agent runtime where plan files should be identifiable and organized per-chat rather than using random names that are hard to correlate with sessions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Allow customizing plan file naming via Options [1 comments, 1 participants]