claude-code - 💡(How to fix) Fix ClaudePatcher: 72-command domain CLI for Minecraft mods as agent reference case [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#53004Fetched 2026-04-25 06:14:59
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

Error Message

  • During a real session we found and fixed 6 real bugs in it that were silently giving wrong answers to Claude: e.g. srg command only searched client-*-srg.jar, missing private methods in fmlcore-*.jar — Claude got "not found" for ModLoader.dispatchAndHandleError which cost two iterations before we decompiled the Sponge Mixin MixinPlatformAgentDefault to find the real registration path was MANIFEST.MF, not mods.toml. Plus methodExistsByNameInHierarchy BFS opaque at MC classes (~30–50 false WARN per modpack), ref-check missed supertype/descriptor/InvokeDynamic refs, event-scan only read visibleAnnotations (missed CLASS-retention Kotlin/Proguard builds), isInsideTryCatch was O(N²) on InsnList (~3 billion indexOf calls on a 350-mod pack).

Fix Action

Fix / Workaround

I maintain an open-source tool called ClaudePatcher — a fat-jar (~14,000 lines, single-file, ASM-based) that has effectively become a CLI API through which Claude (in agent mode) patches jars, analyzes bytecode, resolves SRG obfuscation names, and validates Forge Minecraft modpacks.

72 commands total, including: ref-check, mixin-check, null-scan, tag-audit, mega-audit, lang-patch, entity-dims, scan-method, api, event-scan, accessor-audit, jar-merge, registry-trace, recompute-frames, try-wrap, checkcast-guard, inject-point-validate, rewire-call, remove-call, add-field, boxing-scan, mixin-audit, and more.

  • It's a concrete, non-trivial example of an agent-friendly CLI: every command has deterministic stdout, colorized but grep-parseable output, exit codes, --flags, and a single-file 130 KB CLAUDE.md documenting every command with examples.
  • During a real session we found and fixed 6 real bugs in it that were silently giving wrong answers to Claude: e.g. srg command only searched client-*-srg.jar, missing private methods in fmlcore-*.jar — Claude got "not found" for ModLoader.dispatchAndHandleError which cost two iterations before we decompiled the Sponge Mixin MixinPlatformAgentDefault to find the real registration path was MANIFEST.MF, not mods.toml. Plus methodExistsByNameInHierarchy BFS opaque at MC classes (~30–50 false WARN per modpack), ref-check missed supertype/descriptor/InvokeDynamic refs, event-scan only read visibleAnnotations (missed CLASS-retention Kotlin/Proguard builds), isInsideTryCatch was O(N²) on InsnList (~3 billion indexOf calls on a 350-mod pack).
  • These are the kind of subtle correctness/perf bugs that specifically hurt agent workflows — an agent can't easily tell if a tool is lying vs. really returning no hits.
RAW_BUFFERClick to expand / collapse

Context

I maintain an open-source tool called ClaudePatcher — a fat-jar (~14,000 lines, single-file, ASM-based) that has effectively become a CLI API through which Claude (in agent mode) patches jars, analyzes bytecode, resolves SRG obfuscation names, and validates Forge Minecraft modpacks.

72 commands total, including: ref-check, mixin-check, null-scan, tag-audit, mega-audit, lang-patch, entity-dims, scan-method, api, event-scan, accessor-audit, jar-merge, registry-trace, recompute-frames, try-wrap, checkcast-guard, inject-point-validate, rewire-call, remove-call, add-field, boxing-scan, mixin-audit, and more.

Why it's interesting for the Claude Code team

  • It's a concrete, non-trivial example of an agent-friendly CLI: every command has deterministic stdout, colorized but grep-parseable output, exit codes, --flags, and a single-file 130 KB CLAUDE.md documenting every command with examples.
  • During a real session we found and fixed 6 real bugs in it that were silently giving wrong answers to Claude: e.g. srg command only searched client-*-srg.jar, missing private methods in fmlcore-*.jar — Claude got "not found" for ModLoader.dispatchAndHandleError which cost two iterations before we decompiled the Sponge Mixin MixinPlatformAgentDefault to find the real registration path was MANIFEST.MF, not mods.toml. Plus methodExistsByNameInHierarchy BFS opaque at MC classes (~30–50 false WARN per modpack), ref-check missed supertype/descriptor/InvokeDynamic refs, event-scan only read visibleAnnotations (missed CLASS-retention Kotlin/Proguard builds), isInsideTryCatch was O(N²) on InsnList (~3 billion indexOf calls on a 350-mod pack).
  • These are the kind of subtle correctness/perf bugs that specifically hurt agent workflows — an agent can't easily tell if a tool is lying vs. really returning no hits.

Requests (low → high commitment)

  1. Consider linking it as a community example of "how to build an expert CLI for Claude Code / Agent SDK." Happy to write a blog post / guide.
  2. Consider upstream contributions / feedback on agent-CLI design patterns that emerge from it.
  3. Open to licensing / relocating to a more visible home if that's useful.

Not a bug — a suggestion. Happy to follow up via any channel Follow-up to #41927 (3 weeks ago, still open)

extent analysis

TL;DR

Consider reviewing and integrating the ClaudePatcher tool as a community example for building expert CLIs for Claude Code/Agent SDK to improve its visibility and utility.

Guidance

  • Review the ClaudePatcher tool's documentation (CLAUDE.md) to understand its capabilities and commands.
  • Evaluate the tool's potential as a community example for building expert CLIs, considering its deterministic stdout, colorized output, and extensive documentation.
  • Discuss potential upstream contributions or feedback on agent-CLI design patterns that emerge from the tool.
  • Consider the licensing and relocation options for the tool to increase its visibility and adoption.

Notes

The issue lacks specific technical details about the tool's implementation or bugs, so a thorough analysis is not possible. However, the provided context suggests that the tool has been extensively tested and refined, making it a valuable resource for the community.

Recommendation

Apply workaround: Utilize the ClaudePatcher tool as a community example and explore opportunities for collaboration and knowledge sharing. This can help improve the tool's visibility and utility while also providing a valuable resource for the Claude Code/Agent SDK community.

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