Skip to content

fix: tolerate object-style hook entries in config parser#3000

Open
justcode049 wants to merge 4 commits intoultraworkers:mainfrom
justcode049:fix/hooks-object-format-parsing
Open

fix: tolerate object-style hook entries in config parser#3000
justcode049 wants to merge 4 commits intoultraworkers:mainfrom
justcode049:fix/hooks-object-format-parsing

Conversation

@justcode049
Copy link
Copy Markdown

Summary

  • The config parser crashed with field PreToolUse must contain only strings when the user's ~/.claude/settings.json contained the official Claude Code hook format (structured objects with matcher, hooks: [{type, command}])
  • optional_string_array now gracefully handles both plain string arrays and object-style hook entries, extracting command strings from the latter

Test plan

  • 3 previously failing tests (config_report_supports_section_views, config_report_uses_sectioned_layout, status_context_reads_real_workspace_metadata) now pass
  • cargo build --workspace succeeds
  • 54/57 workspace tests pass (remaining 1 failure is unrelated skill fixture issue)

🤖 Generated with Claude Code

Yeachan-Heo and others added 4 commits April 1, 2026 03:45
The official Claude Code settings format uses structured hook objects
({matcher, hooks: [{type, command}]}) but the parser only accepted
plain string arrays, causing a parse error on any machine with
standard hook configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@code-yeongyu
Copy link
Copy Markdown
Collaborator

This PR has merge conflicts with the latest main. Please rebase on origin/main and force-push. The code changes look good and we're ready to merge once 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