Function hooks: agent.offer doc comment and example say `offered`, AgentOfferResult declares `isOffered` (2.1.263 /plugin-types)
Status Open
Reported on v2.1.263
Maintainer reply None cached
Activity 0 comments · opened Sep 6, 2026
Summary
In the declarations /plugin-types writes (claude-code.d.ts, Claude Code 2.1.263, CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1), the agent.offer doc comment and its example describe the result as { offered }, while the result type AgentOfferResult declares isOffered.
Lines in the generated file
EngineEventOf['agent.offer']doc comment: "Return{ offered: false }to keep the type out of the listing and refuse its dispatch."- Its
@example:on("agent.offer", { agent: "advisor" }, () => ({ offered: false })) EngineResultOf['agent.offer']doc comment: "{ offered }."- The type:
export type AgentOfferResult = { isOffered: boolean; };
Effect
A hook written from the doc comment or the example returns { offered: false }, which fails to typecheck against AgentOfferResult and, at run time, is not the shape the engine reads. A hook written from the type returns { isOffered: false } and compiles.
Expected
The doc comment, the example, and the type name one field.
Reproduction
claude -p "/plugin-types .claude/types"
rg -n 'offered' .claude/types/claude-code.d.ts