Skip to content

Conversation

@LadderChaos
Copy link

@LadderChaos LadderChaos commented Jan 13, 2026

Summary

  • Reorders chat.message hooks so autoSlashCommand runs first before claudeCodeHooks

Problem

Slash commands (e.g., /preflight, /frontend-dev) return empty content because:

  1. claudeCodeHooks runs first and prepends hook content to output.parts[idx].text
  2. The user's message changes from "/preflight" to "[hook content]\n\n/preflight"
  3. autoSlashCommand runs next and calls detectSlashCommand(text)
  4. trimmed.startsWith("/") returns false because text now starts with hook content
  5. Slash command is not detected, returns empty

Fix

Move autoSlashCommand to run before any hook that modifies the message content. This ensures slash commands are detected and replaced before content modification occurs.

Testing

  1. Before fix: Type /preflight → empty response
  2. After fix: Type /preflight → full skill content returned

Summary by cubic

Run autoSlashCommand before claudeCodeHooks so slash commands are detected correctly. Commands like /preflight now return the expected content instead of an empty response.

Written for commit 391c7dc. Summary will update on new commits.

… detection

When claudeCodeHooks runs first, it prepends hook content to the message,
causing the text to no longer start with '/'. This breaks slash command
detection since detectSlashCommand() checks if trimmed.startsWith('/').

By running autoSlashCommand first, slash commands are detected and replaced
before any content modification occurs.
@github-actions
Copy link
Contributor

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA).

To sign the CLA, please comment on this PR with:

I have read the CLA Document and I hereby sign the CLA

This is a one-time requirement. Once signed, all your future contributions will be automatically accepted.


I have read the CLA Document and I hereby sign the CLA


Daniel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@kdcokenny
Copy link
Collaborator

@LadderChaos Thanks for the PR. In order for us to merge, the conflicts need to be resolved and the CLA must be signed.

@LadderChaos
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@code-yeongyu
Copy link
Owner

Thank you for this PR! However, I'm closing it for now because:\n\n1. Merge conflicts: The PR has conflicts with the current dev branch.\n2. Not stale: The fix is still relevant and correct - this bug has NOT been fixed yet in dev.\n\nThe issue you identified is real and valid: slash commands are broken because runs before , prepending content that breaks the '/' detection.\n\nRecommendation: Please rebase this PR on the latest dev branch and resolve the conflicts, then we can review and merge it. This is a valuable bug fix that we want to incorporate.\n\nFeel free to reopen once the conflicts are resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants