waypoint
Per-prompt snapshots of your whole project, so you can preview and restore to any earlier prompt, Bash changes included.
What it does
- Draws a pane, toasts
- Adds /waypoints, /waypoints-open, /waypoints-restore, /waypoints-save
- Hooks prompt.submit, session.start, turn.complete, turn.start and 2 more
- Keeps its own state between turns
- Starts processes
Good points
- No network calls
- Written in TypeScript
- Handles errors
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like waypoint by Alyan Khattak (pane, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/alyan-khattak-waypoint/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Waypoint" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const msg = '…'
const kind = '…'
const n = '…'
const clock = '…'
const day = '…'
const label = '…'
const hotkey = '…'
const help = '…'
const n2 = '…'
const n3 = '…'
const path = '…'
const added = '…'
const removed = '…'
const path2 = '…'
const added2 = '…'
const removed2 = '…'
const path3 = '…'
const added3 = '…'
const removed3 = '…'
const more = '…'
return (
<Box flexDirection="column">
<Box flexDirection="column">
<Text color="green">
{msg}
</Text>
<Text color="yellow">
Claude is working: restores wait until the turn ends.
</Text>
</Box>
<Box flexDirection="column">
<Text bold>
{kind}
{" #"}
{n}
{" · "}
{clock}
{" "}
{day}
</Text>
<Text wrap="truncate-end">
{label}
</Text>
<Box flexDirection="column" marginTop={1} borderStyle="round" borderColor="cyan" paddingX={1}>
<Text bold>
What do you want to do?
</Text>
<Button plain hotkey={`${hotkey}`} label={`❯ ${label}`} />
<Button plain hotkey={`${hotkey}`} label={`❯ ${label}`} />
<Button plain hotkey={`${hotkey}`} label={`❯ ${label}`} />
<Text color="cyan" wrap="wrap">
{"→ "}
{help}
</Text>
<Text dimColor wrap="wrap">
You are asked to confirm, and your current files are saved first as a ⟲ safety checkpoint, so this can be undone.
</Text>
<Text dimColor wrap="truncate-end">
{"↑↓ or a / b / c, Enter to choose. No keys? Type /waypoints-restore "}
{n2}
{` (or /waypoints-restore ${n} before)`}
</Text>
</Box>
<Box marginTop={1}>
<Text bold>
What prompt #
{n3}
{" changed "}
<Text dimColor>
(
still running, or it never finished
)
</Text>
</Text>
</Box>
<Text dimColor>
Loading the changes…
</Text>
<Text dimColor>
This prompt changed no files.
</Text>
<Box flexDirection="column" marginTop={1}>
<Text bold>
{path}
{" "}
<Text color="green">
+
{added}
</Text>
{" "}
<Text color="red">
−
{removed}
</Text>
</Text>
<Text dimColor>
binary file changed
</Text>
</Box>
<Box flexDirection="column" marginTop={1}>
<Text bold>
{path2}
{" "}
<Text color="green">
+
{added2}
</Text>
{" "}
<Text color="red">
−
{removed2}
</Text>
</Text>
<Text dimColor>
binary file changed
</Text>
</Box>
<Box flexDirection="column" marginTop={1}>
<Text bold>
{path3}
{" "}
<Text color="green">
+
{added3}
</Text>
{" "}
<Text color="red">
−
{removed3}
</Text>
</Text>
<Text dimColor>
binary file changed
</Text>
</Box>
<Text dimColor>
{"…and "}
{more}
{" more files not shown."}
</Text>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const where = '…'
await $.ui.toast(`Waypoint: restored to ${where}`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
waypoint/hooks/register.tsx lines 161–197 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const els = $.ui.resolve(e)
const { Box, Text } = els
const off = await read($, offReason)
if (off !== null) return <Text color="yellow">Waypoint is off: {off}</Text>
const list = await read($, checkpoints)
const n = await read($, selected)
const msg = await read($, message)
const working = await read($, isWorking)
const width = e.props.bodyColumns
const top = (
<Box flexDirection="column">
{msg !== null && <Text color="green">{msg}</Text>}
{working && <Text color="yellow">Claude is working: restores wait until the turn ends.</Text>}
</Box>
)
if (n !== null) {
const cp = list.find(c => c.n === n)
if (cp !== undefined) {
return (
<Box flexDirection="column" width={width}>
{top}
{detailView($, els, cp, await read($, detail), list, await read($, action))}
</Box>
)
}
}
const at = await read($, cursor)
return (
<Box flexDirection="column" width={width}>
{top}
{listView($, els, list, width, at)}
</Box>
)
})waypoint/hooks/register.tsx lines 417–527 · Pane
function detailView(
$: EngineInterface,
{ Box, Text, Button, Code }: Els,
cp: WaypointCheckpoint,
d: WaypointDetail | null,
list: readonly WaypointCheckpoint[],
focused: string | null,
) {
const kind = cp.kind === 'safety' ? 'Safety checkpoint' : cp.kind === 'manual' ? 'Saved by hand' : 'Prompt'
const after = cp.after
const isPrompt = cp.kind === 'prompt'
// The options, in the order shown: a, b, c. A safety or hand-saved checkpoint has one snapshot, so no "before".
type Option = { key: string; id: string; hotkey: string; label: string; help: string; run: () => unknown }
const options: Option[] = []
if (after !== undefined) {
options.push({
key: 'restore-after',
id: 'after',
hotkey: 'a',
label: isPrompt ? `Restore to AFTER #${cp.n}` : `Restore #${cp.n}`,
help: isPrompt
? `Every file goes back to how it was right after prompt #${cp.n} finished. Keeps what #${cp.n} did, undoes everything after it.`
: `Every file goes back to how it was when checkpoint #${cp.n} was taken.`,
run: () => confirmRestore($, after, isPrompt ? `after #${cp.n}` : `#${cp.n}`, cp, list),
})
}
if (isPrompt) {
options.push({
key: 'restore-before',
id: 'before',
hotkey: 'b',
label: `Restore to BEFORE #${cp.n}`,
help: `Every file goes back to how it was just before you sent prompt #${cp.n}. Undoes #${cp.n} and everything after it.`,
run: () => confirmRestore($, cp.before, `before #${cp.n}`, cp, list),
})
}
options.push({
key: 'back',
id: 'back',
hotkey: 'c',
label: 'Back to the list',
help: 'Goes back to the list of checkpoints. Nothing is changed.',
run: () => select($, null),
})
const here = options.find(o => o.id === focused) ?? options[0]!
return (
<Box flexDirection="column">
<Text bold>
{kind} #{cp.n} · {clock(cp.at)} {day(cp.at)}
</Text>
<Text wrap="truncate-end">{oneLine(cp.label, 300)}</Text>
<Box flexDirection="column" marginTop={1} borderStyle="round" borderColor="cyan" paddingX={1}>
<Text bold>What do you want to do?</Text>
{options.map((o, i) => (
<Button
key={o.key}
plain
hotkey={o.hotkey}
{...(i === 0 ? { autoFocus: true as const } : {})}
{...(o.id === here.id ? {} : { dimColor: true })}
label={`${o.id === here.id ? '❯' : ' '} ${o.label}`}
onPress={o.run}
/>
))}
<Text color="cyan" wrap="wrap">
{'→ '}
{here.help}
</Text>
{here.id !== 'back' && (
<Text dimColor wrap="wrap">
You are asked to confirm, and your current files are saved first as a ⟲ safety checkpoint, so this can be undone.
</Text>
)}
<Text dimColor wrap="truncate-end">
↑↓ or a / b / c, Enter to choose. No keys? Type /waypoints-restore {cp.n}
{isPrompt ? ` (or /waypoints-restore ${cp.n} before)` : ''}
</Text>
</Box>
{isPrompt && (
<Box marginTop={1}>
<Text bold>
What prompt #{cp.n} changed <Text dimColor>({rowStats(cp) || 'still running, or it never finished'})</Text>
</Text>
</Box>
)}
{isPrompt && d === null && <Text dimColor>Loading the changes…</Text>}
{isPrompt && d !== null && d.files.length === 0 && <Text dimColor>This prompt changed no files.</Text>}
{isPrompt &&
d !== null &&
d.files.map(f => (
<Box key={`file-${f.path}`} flexDirection="column" marginTop={1}>
<Text bold>
{f.path} <Text color="green">+{f.added}</Text> <Text color="red">−{f.removed}</Text>
</Text>
{f.isBinary ? (
<Text dimColor>binary file changed</Text>
) : f.hunks === '' ? (
<Text dimColor>no line changes (renamed, emptied or mode change)</Text>
) : (
<Code source={f.hunks} format="diff" path={f.path} wrap="truncate-end" />
)}
</Box>
))}
{isPrompt && d !== null && d.more > 0 && <Text dimColor>…and {d.more} more files not shown.</Text>}
</Box>
)
}waypoint/hooks/register.tsx lines 380–412 · Pane
function listView($: EngineInterface, { Box, Text, Button }: Els, list: readonly WaypointCheckpoint[], width: number, at: number | null) {
if (list.length === 0) {
return (
<Box flexDirection="column">
<Text bold>Waypoint</Text>
<Text dimColor>No checkpoints yet. One is taken before every prompt you send.</Text>
</Box>
)
}
const rows = [...list].reverse()
return (
<Box flexDirection="column">
<Text bold>
Waypoint · {list.length} checkpoints <Text dimColor>(newest first)</Text>
</Text>
<Text dimColor wrap="truncate-end">
↑↓ to move, Enter to open, Esc to close. No keys? Press Ctrl+X then Tab, or type /waypoints-open {rows[0]!.n}
</Text>
{rows.map(cp => {
const isHere = cp.n === (at ?? rows[0]!.n)
return (
<Button
key={`cp-${cp.n}`}
plain
{...(isHere ? { autoFocus: true as const } : { dimColor: cp.kind === 'safety' })}
label={`${isHere ? '❯' : ' '} ${rowLabel(cp, width - 2)}`}
onPress={() => select($, cp.n)}
/>
)
})}
</Box>
)
}Licence text (MIT)
MIT License Copyright (c) 2026 Alyan Khattak Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What its code calls
runs programswrites filesenv varsremembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit d1608c13dd65 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.waypoint/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.2 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.waypoint/hooks/register.tsx:205 a program named at run time |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reads environment variables and files and reaches the network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add Alyan-khattak/Claude-Code-Mods/plugin install waypoint@alyan-modsThis installs the marketplace's latest commit, which may not be the one read here (d1608c13dd65). Compare them before you install.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "alyan-khattak-waypoint" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
slop Edit1 of 3accepteditrejectAsk Claude…
-
Ask Claude…Desktop File DeskDesktop File DeskText file README.md applyFilter lines applyChoose a file to read.
RetryDraft a questionRefresh -
Ask Claude…Desktop Markdown ReaderDesktop Markdown ReaderMarkdown file README.md applyChoose a Markdown file.No document loaded.Copy Markdown sourceRefresh
-
Ask Claude…Desktop Prompt BuilderDesktop Prompt Builderbuild Retry applybuild Retry applybuild Retry apply
RetryFill composer draftCopy promptRetryRefresh -
Ask Claude…Desktop Review DeskDesktop Review Desk
RefreshReload GitCopy visible reportRead-only Git inspection. No staging, commits, or command execution from the diff.Refresh -
Ask Claude…Desktop Session BriefDesktop Session BriefCounts begin at plugin load; tool completion does not prove a task passed.Next step / handoff apply
RetryCopy briefClear counters and noteRefresh