Windsurf (Cascade)
Windsurf's adapter is shipped and live-validated: the capture loop (native-transcript serialize, probe-hardened) has been tested end-to-end in real Windsurf use.
Install
daimon hooks install windsurf # copies daimon-windsurf-hooks.py, _daimon_hook_lib.py,
# and redact.py to ~/.daimon/hooks/, then prints the
# registration snippet for Cascade's hooks config
daimon hooks list # hosts with packaged hook scripts
daimon hooks install <host> ships redact.py alongside the hook script(s)
so the adapter scrubs secrets at every one of its own write sites (transcript
accumulation, checkpoint, event log) — redaction does not depend on the full
daimon package being importable from the hook. Re-run daimon hooks install windsurf after every daimon upgrade so the installed scripts stay in sync
with the installed CLI. To check whether they have drifted, run daimon hooks status — it reports each installed copy as CURRENT/STALE/MISSING against the
packaged version and exits non-zero on drift.
Point Windsurf's Cascade hooks config (user-level JSON — see
the Cascade hooks docs)
at the installed script for all three events: pre_user_prompt,
post_cascade_response, and post_cascade_response_with_transcript.
How the one script covers three events
One script, daimon-windsurf-hooks.py, is registered for three Cascade hook
events:
- Native transcript preferred: when
post_cascade_response_with_transcriptis registered and Cascade's native.jsonltranscript (~/.windsurf/transcripts/<trajectory_id>.jsonl) exists for the trajectory, it is serialized directly — no accumulation needed. - Accumulation fallback:
pre_user_prompt/post_cascade_responsecarry no transcript path, so the adapter appends each turn to its own~/.daimon/windsurf/transcripts/<trajectory_id>.mdin the same**role**:-marked shapedaimon serializealready parses. - Throttled serialize: both serialize-capable events fire every turn;
DAIMON_WINDSURF_MIN_SERIALIZE_INTERVAL(default 300s,0= every turn) gates the spawn per trajectory, sharing one marker so registering both events never double-spawns. - Debounced finalizer: every serialize-capable event also arms a detached
one-shot sleeper; after
DAIMON_WINDSURF_FINALIZER_QUIET_SECONDS(default 600s,0disables) with no further activity for the trajectory, the last turn's sleeper serializes the final transcript state — so a session whose last turns landed inside the throttle window still gets captured. - Self-probing: any payload shape the adapter can't handle is dumped to
~/.daimon/windsurf/unparsed-<event>-<stamp>.json(at most one dump per event name), so the next adapter iteration has real evidence to work from instead of another manual probe round. - No pre-action checks: a ruling's check reads
unsupportedon Windsurf. Cascade documents apre_run_commandevent, but nothing daimon has measured says what it does with a decision, so the column staysunsupportedrather than claiming an enforcement nobody has seen delivered. A check armed toenforceshowsunsupportedhere, notregistered. - No briefing injection: Cascade's hook set has no session-start-equivalent
event, so unlike Claude Code/Codex/Gemini the briefing is not injected as
context. This is a permanent host constraint, not a bug — the skill closes
the loop from the agent's side instead: it instructs Cascade to run
daimon brief --teamat session start (see Teach the agent the protocol). - Fail-open everywhere; kill switch
DAIMON_DISABLE=1.
Windsurf has no session-end event, so serialization runs on the throttle
above, with a debounced finalizer covering the session tail: a session whose
last turns land inside the throttle window is serialized once
DAIMON_WINDSURF_FINALIZER_QUIET_SECONDS (default 600) passes with no new
activity, instead of losing those turns. Set the knob to 0 to disable the
finalizer. DAIMON_WINDSURF_MIN_SERIALIZE_INTERVAL=0 remains the zero-delay
stopgap — it serializes every turn (one LLM call per turn), so nothing ever
waits on the quiet period. A knob worth setting for your first week:
echo 'DAIMON_MIN_MESSAGES=4' >> ~/.daimon/env # don't skip short first sessions
Importing past sessions
A Windsurf transcript records no project, so daimon import never discovers
one: pass it by path,
daimon import --project <dir> --transcript ~/.windsurf/transcripts/<trajectory_id>.jsonl
(or the .md daimon accumulates under ~/.daimon/windsurf/transcripts/),
with --project typed on the command line, since nothing in the file can
confirm the project. How a run plans, stops and resumes is in
Import past sessions,
and the refusals, the project check included, are in the
import guide.
MCP
daimon hooks install windsurf also prints an mcpServers snippet for
~/.codeium/windsurf/mcp_config.json alongside the hooks registration
snippet — see MCP server. Daimon does not write
Cascade's own config files, so paste it in by hand, same as the hooks
snippet above. Windsurf has no per-prompt recall hook, so the recall hint
has nowhere to render here yet.
Teach the agent the protocol
daimon skill install windsurf # ~/.codeium/windsurf/skills/daimon/SKILL.md
daimon skill install windsurf --project # .windsurf/rules/daimon.md
Install delivers two skills: daimon (the protocol) and daimon-end, the in-session /daimon-end checkpoint flow, written next to it as ~/.codeium/windsurf/skills/daimon-end/SKILL.md.
The project scope is a single rules file, so it carries the protocol alone. This is an explicit unsupported row, not an oversight: the project-level skills path has not been verified on a live machine, so daimon-end is not installed there.
On Windsurf the skill is not just protocol etiquette — it is the briefing
delivery path. Because Cascade has no session-start event to inject into,
the skill instructs the agent to run daimon brief --team in the terminal
before other work (teammates' briefings included when the project shares a
daimon team; identical to daimon brief without one), and to proceed
silently when daimon is not set up.
Re-run install after upgrading daimon to refresh the content.
Verify
daimon status
Briefings are read with daimon brief in a terminal — not injected — so
daimon status (rather than a session-start prompt) is the way to confirm a
checkpoint was written after your last session. With the skill installed the
agent runs the pull itself (daimon brief --team) at session start.