hooks must be an object identifies a container mismatch. Changing that container can expose the next useful diagnostic. A September 17, 2026 Muse integration experiment followed that path through three configurations for lifecycle hooks, commands run at application events. It then reached a separate question: whether the workspace was trusted to execute them.
For an engineer trying to establish a configuration contract, the useful detail is what each probe settled and what remained uncertain. I would keep that distinction beside every result. A disappearing warning can justify the next experiment without establishing that an integration works.
The first shape: an array of events
The initial configuration put a list under hooks. Each entry named an event and supplied a command as an array:
{
"hooks": [
{
"event": "SessionStart",
"command": ["sh", "capture.sh"]
}
]
}
These excerpts show the SessionStart entry. Each historical configuration also contained a Stop entry with the same structure. The path has been shortened to capture.sh; the original shapes are otherwise retained. They describe the experiment, not current installation instructions.
The probe used Muse's echo provider; its recorded response repeated the prompt with an echo: prefix. A separate script was intended to capture what a hook received. The displayed diagnostic included:
MalformedConfig: hooks must be an object
The output reported zero runnable hooks. It also reported an untrusted workspace, and the capture directory was empty.
The parser had supplied a specific constraint: the value of hooks could not be that array. It had not established the correct handler structure or shown that any command had run. Changing the container was the next testable step.
The second shape: event keys with a direct command
The next recorded configuration used an object keyed by event name:
{
"hooks": {
"SessionStart": [
{"command": ["sh", "capture.sh"]}
]
}
}
This produced a different diagnostic. The client identified command as an unknown field in a matcher group and said the group would be skipped:
UnsupportedHandler: D66: unknown matcher-group field `command` may narrow execution, so this group is skipped
A matcher group holds matching criteria and a list of handlers. The error now identified a field at that group level. The event-keyed object had moved the experiment far enough to expose this next constraint, but there were still zero runnable hooks and no capture files.
That change in diagnostic is useful evidence. It narrows the next edit from the outer container to the entries inside it. It does not establish that the command value itself is accepted.
The third shape: a group containing handlers
The third configuration supplied a matcher and nested the command in a hooks list:
{
"hooks": {
"SessionStart": [
{
"matcher": "*",
"hooks": [
{"type": "command", "command": "sh capture.sh"}
]
}
]
}
}
Several things changed together: the nesting, the matcher, the explicit handler type, and the command's representation as a string. This was not an experiment that isolated the effect of one field. It found a structure worth testing further; it could not tell us the independent contribution of each change.
The displayed output no longer included the previous hook warning. Other diagnostics remained, including that the workspace was untrusted, and the capture directory was still empty. The commands had filtered and shortened their output, so this record supports a comparison of the displayed diagnostics, not a claim that the full run had no warnings.
At this point, another schema rewrite would need a new reason. The recorded trust state supplied a different question to resolve.
Trust and a usable capture
The later run reported a trusted workspace with user-config provenance. It listed two newly created capture files. Raw reads of those files showed embedded input strings identifying SessionStart and Stop.
The capture mechanism had its own defect. A JSON parser rejected both files because the surrounding wrapper was malformed. Reading the raw bytes recovered the embedded input strings, which could be decoded separately. The evidence supports those two event payloads; it does not support calling the original capture files valid JSON documents.
| Observation | What it establishes in this record |
|---|---|
| The container diagnostic changes | The next configuration reached a different validation check |
| The previous hook warning is absent from the displayed third run | That particular diagnostic no longer appears in the retained slice |
| The workspace reports trusted and capture files appear | The trusted probe produced observable hook effects |
| Raw input strings identify SessionStart and Stop | The captures contain evidence for those two events |
| The outer files fail JSON parsing | The recorder still needs repair before its output can be consumed as JSON |
Trust is an authorization decision about executing code from a workspace. A plausible configuration is insufficient reason to grant it. Review the command and its context through the client's trust process before running it. A historical trust decision for this probe grants no permission to another workspace or package.
A synthetic model of the separation
The accompanying Python example models the three structures in memory. It uses the same event and handler arrangement with normalized paths. Its recognizer accepts only the limited shape needed for this example, and a separate Boolean input represents trust. It never executes a command string.
The measured output of that teaching program is:
| Input | Shape recognized by the toy model | Trusted input | Simulated event labels |
|---|---|---|---|
| Array of event entries | No | No | None |
| Event map with a direct command | No | No | None |
| Event map with nested handlers | Yes | No | None |
| The same nested-handler map | Yes | Yes | SessionStart, Stop |
Those labels are computed data in a newly written model. They are not evidence of real hook execution. The example makes the logical separation inspectable without installing Muse, recreating an old environment, or changing current configuration. The historical evidence remains the preserved native output.
Choose the next probe from the unresolved question
I would record a configuration experiment in four fields: the question, the exact input, the observation and the next decision. In this case, the questions moved from the outer container to handler placement, then to execution eligibility and capture validity. Each required different evidence.
Use the least machinery that can settle the current question. The echo run exercised this configuration-and-hook path without making a model's prose answer the test result. It did not test the model's reasoning or the complete project workflow. An experiment's narrowness is useful when its result is interpreted at the same scope.
Capture full outputs and individual return codes before producing a shorter display. Several historical commands used head, filters and compound shell sequences; an overall zero status therefore cannot certify every preceding command. Keeping the actual input and result makes it possible to distinguish a parser correction, a permission decision and a measurement defect without reconstructing the experiment from memory.
The five-plane conformance model puts these observations in a wider release process. For a recorder like this one, include a test that parses the entire saved document and checks the expected event fields. Observing that a file appeared would have missed the malformed wrapper in this capture.
Case sources: preserved native command outputs from September 17, 2026. The operational transcript is not published here. The excerpts normalize the capture-script path, and the synthetic program is a teaching aid rather than a current Muse validator.