Fixes#76957.
Restores the Control UI /new hook lifecycle through an explicit sessions.create emitCommandHooks opt-in, preserving hook-free defaults for programmatic parent-session creates.
Validation:
- pnpm protocol:check
- pnpm test src/gateway/server.sessions.reset-hooks.test.ts ui/src/ui/app-render.helpers.node.test.ts
- pnpm exec oxlint on touched TS files
- pnpm exec oxfmt --check --threads=1 on touched files
- git diff --check
- OPENCLAW_LOCAL_CHECK=1 OPENCLAW_LOCAL_CHECK_MODE=throttled env NODE_OPTIONS=--max-old-space-size=4096 pnpm check:changed
- GitHub PR checks green on 3a446ec78e
- ClawSweeper re-review completed with no blocking findings and security cleared
Duplicate triage:
- #77376, #77004, and #76967 were superseded closed attempts for #76957
- #77562 is a closed duplicate issue
- #77880 mentions #76957 but is not a duplicate of this hook fix
Replaced 112 typography characters (curly quotes, apostrophes, em/en
dashes, non-breaking hyphens) with ASCII equivalents per
docs/CLAUDE.md heading and content hygiene rules.
- docs/help/gpt55-codex-agentic-parity.md: 22 chars; removed the
duplicate '# GPT-5.5 / Codex Agentic Parity in OpenClaw' H1 (Mintlify
renders the title from frontmatter; the in-body H1 with the slash
produced a brittle anchor).
- docs/platforms/mac/menu-bar.md: 21 chars; removed the duplicate
'# Menu Bar Status Logic' H1.
- docs/tools/acp-agents.md: 23 chars
- docs/concepts/qa-matrix.md: 23 chars
- docs/concepts/qa-e2e-automation.md: 23 chars
Replaced 138 typography characters (curly quotes, apostrophes, em/en
dashes, non-breaking hyphens) with ASCII equivalents per
docs/CLAUDE.md heading and content hygiene rules so grep, copy-paste,
and Mintlify search hit clean tokens.
- docs/reference/AGENTS.default.md: 29 chars, plus removed the
duplicate '# AGENTS.md - OpenClaw Personal Assistant (default)' H1
(Mintlify renders title from frontmatter; the in-body H1 with
parens and a bare hyphen produced a brittle anchor).
- docs/help/testing-live.md: 29 chars
- docs/tools/image-generation.md: 28 chars
- docs/channels/index.md: 27 chars
- docs/tools/video-generation.md: 25 chars
docs/install/macos-vm.md: removed the duplicate '# OpenClaw on macOS
VMs (Sandboxing)' H1 (Mintlify renders title from frontmatter; the
in-body H1 plus parens produced a brittle anchor).
docs/install/development-channels.md: removed the duplicate
'# Development channels' H1.
docs/install/index.md: replaced 3 typography characters (curly quotes
and en-dash) with ASCII equivalents.
docs/concepts/delegate-architecture.md: replaced 10 typography
characters (curly quotes, apostrophes, em/en dashes) with ASCII
equivalents.
docs/install/clawdock.md: renamed '## Related pages' to '## Related'
for consistency with sibling install docs and converted the 3-bullet
list into a CardGroup linking docker, docker-vm-runtime, and updating.
docs/install/nix.md: replaced 2 typography characters with ASCII
equivalents and converted the 3-bullet Related list into a CardGroup,
adding an Updating card so readers wiring nix-openclaw next to a
managed install see the upgrade path.
docs/concepts/features.md: converted the 2-bullet Related list into a
CardGroup, adding cross-links to channels and plugins so the page now
points readers at both deeper concepts (experimental features, agent
runtime) and direct surfaces (channels, plugins).
docs/tools/pdf.md: replaced 2 typography characters with ASCII
equivalents.
docs/install/gcp.md: removed the duplicate '# OpenClaw on GCP Compute
Engine (Docker, Production VPS Guide)' H1 plus its redundant '## Goal'
header. Mintlify renders the title from frontmatter, so the body H1
created a brittle anchor and the prose now starts directly with the
goal sentence.
docs/install/node.md: replaced 8 typography characters (curly quotes
and non-breaking hyphens) with ASCII equivalents.
docs/tools/duckduckgo-search.md: replaced 9 typography characters with
ASCII equivalents.
docs/tools/browser-login.md: removed the duplicate '# Browser login +
X/Twitter posting' H1 (Mintlify renders title from frontmatter; the
'+' would also have produced a brittle anchor). Replaced 2 typography
characters with ASCII equivalents.
docs/concepts/context.md: replaced 12 curly quote and italic-marker
typography characters with ASCII equivalents so grep, copy-paste, and
Mintlify search hit clean tokens. Converted the 4-bullet Related list
into a CardGroup linking context-engine, compaction, system-prompt,
and agent-loop. Verified all four targets exist.
docs/concepts/soul.md: replaced 7 typography characters (curly
apostrophe in 'agent's' and similar) with ASCII equivalents. Renamed
'## Related docs' to '## Related' for consistency with sibling pages
and converted the 3-bullet list into a CardGroup linking
agent-workspace, system-prompt, and the SOUL.md template.
docs/tools/perplexity-search.md: removed the duplicate
'# Perplexity Search API' H1 (Mintlify renders title from frontmatter).
Replaced 2 typography characters and converted the 4-bullet Related
list into a CardGroup; verified web/brave-search/exa-search targets.
docs/tools/apply-patch.md: converted the 3-bullet Related list into a
CardGroup linking diffs, exec, and code-execution.