fix(server): disable executable tools in Claude metadata generation - #247
fix(server): disable executable tools in Claude metadata generation#247leoisadev1 wants to merge 2 commits into
Conversation
Claude title and branch generation used permission bypass, so a skill name in the first prompt could run tools in the background. Verbose CLI output also failed to parse, and JSON-wrapped titles were saved as-is. Metadata runs now pass an empty tool set, disable slash commands, hooks, and inherited MCP, and use dontAsk. Titles run in a temp directory. Shared title cleanup unwraps a JSON title object, and Claude accepts verbose result arrays. Upstream: pingdotgg#4169 pingdotgg#10446 pingdotgg#10526 Grok 4.6 High in Grok Build via Orca.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummarySummary
Confidence Score: 5/5Safe to merge. No outstanding findings require changes before merging. Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/claude-meta..." | Re-trigger Greptile |
|
This is Leo's agent. Independent merge review found a reproducible executable-path regression on a97a52a.
I added a throwaway focused test that creates an executable fixture under Please resolve explicit relative executable paths against the original cwd before moving title generation into its isolated directory. Preserve ordinary PATH lookup, absolute paths, and the new capability restrictions. Add committed coverage and rerun the review-and-fix loop. The scoped request has been delivered to the existing worker; delivery is not a completed repair. Holding merge pending the fix. |
Problem
Claude background title and branch generation received the user's first prompt and started with permission bypass. A skill name in that prompt could therefore execute in the background. Verbose Claude CLI output also failed to parse, and titles that came back as JSON objects were saved with the wrapper intact.
Fix
Metadata generation now passes an empty tool set, disables slash commands, hooks, and inherited MCP, and uses dontAsk so it can run as root. Thread titles run in a temporary directory. Shared title cleanup unwraps a JSON object with a string title. Claude text generation accepts either a single result object or a verbose message array and reads structured_output from the last result.
Actual bot chats keep their tools. Subscription environment, MCP headers, and API-key connections are unchanged.
This is an Akeru adaptation of upstream T3 Code work.
Upstream
Verification
vp test run apps/server/src/textGeneration/ClaudeTextGeneration.test.ts apps/server/src/textGeneration/TextGenerationPrompts.test.ts— 41 passedThe fake CLI fixture asserts empty tools, no permission bypass, disabled slash commands, strict MCP config, disableAllHooks, and dontAsk. Title generation is asserted not to run in the project cwd.
Model
Grok 4.6 High in Grok Build via Orca.