Skip to content

feat(hooks): pass Qoder rewakeMessage and rewakeSummary through - #3645

Merged
dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3421-qoder-rewake-fields
Oct 26, 2026
Merged

dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3421-qoder-rewake-fields

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Qoder's hooks reference documents two command-hook fields that go with asyncRewake:

  • rewakeMessage: overrides the prefix of the system message injected when the hook exits with code 2.
  • rewakeSummary: overrides the one-line summary, capped at 300 characters.

Both are in the command-hook schema of @qoder-ai/qodercli 1.1.78, but rulesync dropped them on generate. Because the hooks block is rewritten, a hand-added value was lost too.

Changes

  • src/types/hooks.ts: add optional rewakeMessage / rewakeSummary (safeString) to the canonical hook definition.
  • src/features/hooks/tool-hooks-converter.ts: allow these two as string passthrough fields, and add an optional maxLength to string passthrough specs. A longer value is still emitted, with a warning on generate that the tool will shorten it.
  • src/features/hooks/qoder-hooks.ts: forward both on command hooks (dropped with a warning on other handler types), with maxLength: 300 on rewakeSummary. Import round-trips them.
  • Docs: docs/reference/file-formats.md (and the regenerated docs-content.ts).
  • Tests: emit, the over-cap warning (and no warning at exactly 300), the drop on non-command hooks, and the import round-trip.

The upstream CLI truncates the summary instead of rejecting it ("Whitespace collapsed, capped at 300 chars" in its bundled hook-config skill), so rulesync warns rather than failing.

Refs #3421

🤖 Generated with Claude Code

https://claude.ai/code/session_0179ZomNiDQHCzgoxeRVmfth

dyoshikawa and others added 3 commits October 25, 2026 23:48
Qoder documents two command-hook strings that go with `asyncRewake`:
`rewakeMessage` overrides the prefix of the injected system message and
`rewakeSummary` overrides the one-line summary (capped at 300 characters).
Both were dropped on generate, so a hand-added value was lost too.

Add them as canonical fields, forward them on Qoder command hooks in both
directions, and warn on generate when `rewakeSummary` exceeds the cap.

Refs #3421

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179ZomNiDQHCzgoxeRVmfth
…der-rewake-fields

# Conflicts:
#	src/generated/docs-content.ts
@dyoshikawa
dyoshikawa merged commit 7b6c166 into main Oct 26, 2026
9 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-3421-qoder-rewake-fields branch October 26, 2026 08:30
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.

1 participant