Repository navigation
Conversation
connectors.py, nudge.py, auto.py, outputs.py, startup_plugins.py and trim_skills.py each spelled ~/.claude, ~/.claude.json, .mcp.json or the handoff note paths themselves. They now ask adapters/claude_paths.py, which the Claude Code adapter also uses. No change in behaviour. The paths sit in a leaf file beside claude_code.py rather than inside it: the hook commands run on every prompt, and importing the full adapter there took a hook from about 45 ms to about 134 ms. For the same reason the adapter registry is now built on first use (adapters/_registry.py). A test fails if one of the six modules spells such a path again, and if a hook command loads the adapters to find a path. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review item 6: Claude Code paths were spelled in
connectors.py,nudge.py,auto.py,outputs.py,startup_plugins.pyandtrim_skills.py.What changed
tokenstretch/adapters/claude_paths.pyholds every Claude Code path: config folder, settings files,~/.claude.json,.mcp.json, session logs, skills, plugins, handoff notes.adapters/claude_code.pyall read paths from it. No path literal is left in the six modules.adapters/__init__.pynow builds the registry on first use. The old body moved unchanged toadapters/_registry.py.One deviation from the review wording
The review said to move the paths into
adapters/claude_code.py. They are in a leaf file beside it instead. Reason:autoandnudgerun as hooks on every prompt, and importing the full adapter there took a hook run from about 45 ms to about 134 ms. With the leaf file, hook start time is unchanged. If you want them literally insideclaude_code.py, say so and I will move them and accept the slower hooks.Tests
tests/test_claude_paths.py, 12 tests: no Claude path piece in the six modules (reads the syntax tree), the layout values, adapter and hooks share the same note paths, the paths file imports nothing from the package, a hook command does not load the adapters, the lazy registry is the same list.sandbox-exec,deny network*): 552 passed, 6 skipped, 1 deselected.Notes
connectors.py. Whichever merges second needs a small rebase; I will do it.🤖 Generated with Claude Code