Usage

Install

Session Flags requires Claude Code v2.1.287 or later, the first version with mods turned on by default. It’s tested with v2.1.329.

The repository is its own marketplace. In Claude Code, run:

/plugin install session-flags --marketplace dsebastien/session-flags

This one-step form adds the marketplace and installs the mod at once (Claude Code 2.1.275 or later, so every version this mod supports has it).

For one session

Clone the repository and point Claude Code at it:

git clone https://github.com/dsebastien/session-flags
claude --plugin-dir ./session-flags

In every session, from a local clone

Add the absolute path of your clone to CLAUDE_CODE_PLUGIN_DIRS in the env block of ~/.claude/settings.json:

{
  "env": {
    "CLAUDE_CODE_PLUGIN_DIRS": "/absolute/path/to/session-flags"
  }
}

Pull the repository to update it.

How items get into the list

There are four ways in. The first one depends on Claude, and an end-of-turn check backs it up; the other three don’t depend on Claude.

Claude logs them itself

The mod registers three tools for Claude:

Tool What Claude uses it for
flag Record one or more items, each with a kind, one short sentence, and an optional location such as src/cache.ts:42
resolve_flag Mark items as handled or dismissed once they’re settled, or reopen them
list_flags See the open items with their ids, for example before wrapping up a task

The tool descriptions tell Claude to call flag whenever it asks you something or needs a decision (a question), notices a problem it isn’t fixing right now (an issue), wants you to pay attention to something such as a side effect or a skipped check (a warning), or leaves a next step for later (a follow-up). Anything else is a note.

Each item gets an id: F1, F2, and so on. Claude still says everything in its reply as usual; the tools only add the items to the list. Because these are structured tool calls, nothing depends on parsing Claude’s prose. The tools never ask for permission.

If Claude flags the same text twice while the first one is still open, the mod keeps one item. Claude can flag and resolve several items in the same batch of tool calls without one change overwriting the other.

Claude doesn’t always call flag on its own. The end-of-turn check below catches most of those turns, and Tips has more.

The end-of-turn check

Claude doesn’t always call flag on its own. When a turn ends, the mod reads Claude’s last answer. If the answer reports something you may need to track and Claude called flag zero times during that turn, the mod sends Claude back once with a short instruction: flag each open question, unfixed issue, warning and follow-up from that answer, or reply “Nothing to flag”.

The mod looks for words that usually mean a finding: “not fixed”, “out of scope”, “follow-up”, “bug”, “broken”, “failed”, “missing”, “stale”, “wrong”, “risk”, “warning”, “not tested”, “could not verify”, “skipped”, “blocked”, “needs your” and a few more. Words inside code blocks don’t count, and neither does an answer that says “Nothing to flag”.

The check sends Claude back at most once per prompt of yours, never for a subagent, and never when Claude already flagged something in the turn. Claude Code shows the moment as “stop hook problem · ctrl+o to see”: that’s its usual label when a Stop hook sends Claude back, not an error of the mod. When a false alarm happens, it costs one short exchange. You can turn the check off with nudgeUnflaggedFindings (see Configuration).

Trailing questions

When Claude ends an answer with a question and didn’t flag a question during that turn, the mod adds the last paragraph of the answer to the list as a question. Your next prompt counts as the answer: the item is marked handled (“answered”). Slash commands don’t count as an answer.

The mod skips the paragraph when it’s a code block or longer than 400 characters, and it ignores answers from subagents. You can turn this capture off with captureTrailingQuestions (see Configuration).

Dismissed question dialogs

When Claude asks you something through its question dialog (AskUserQuestion) and you dismiss the dialog without answering, its questions go into the list as open questions.

You

Type into the field at the bottom of the pane, or run /flags add <text>. A leading character sets the kind:

Starts with Kind
? Question
! Issue
~ Warning
> Follow-up
Anything else Note

For example, /flags add !Check the retry logic before the release adds an issue.

Open, handled, dismissed

Every item is open, handled or dismissed. Resolved items (handled or dismissed) fade in the pane and are swept away 30 minutes after they were resolved, by default. Open items stay until you or Claude resolve them.

The pane

The pane shows as a sidebar in a wide fullscreen terminal, and above the prompt otherwise.

From top to bottom:

  • The counts, such as 2 open · 1 done
  • The toolbar: copy (c), copy all (a), hide done or show done (h), close (q) and clear done (x)
  • The items, grouped by kind (Questions, Issues, Warnings, Follow-ups, Notes), open items first. Each open row has ✓ (handled), ✕ (dismissed) and ⧉ (copy). Each resolved row has ↺ (reopen) and ⧉. A location, when there is one, shows on a dimmed line under the text
  • The field to add your own item

Move with Tab or the Up and Down arrows, and press Enter to press the button that has focus. Esc closes the pane.

The badge

While the list holds at least one item, a one-line badge sits above the prompt: 0: ⚑ 2 open flags, or ⚑ all flags settled when nothing is open anymore. Press its key to open or close the pane.

The 0 is the badge hotkey. A digit also works when you type it alone into an empty prompt, so you can open the list without leaving the keyboard. You can change it, or turn it off, with bandHotkey.

When Claude adds items while the pane is closed, a toast tells you how many arrived (turn it off with toastOnNewFlags).

Commands

Command What it does
/flags Toggle the pane
/flags show, /flags hide Open or close the pane
/flags copy Copy the open items as markdown
/flags copy all Copy every item, resolved ones included
/flags list Print the open items in the transcript
/flags list all Print every item in the transcript
/flags add <text> Add an item (start with ? ! ~ > for question, issue, warning, follow-up)
/flags done F1 F3 Mark items as handled
/flags dismiss F2 Dismiss items
/flags reopen F1 Reopen items
/flags clear Remove the handled and dismissed items
/flags clear all Remove every item
/flags help Show the list of commands

Ids are not case-sensitive, and the F is optional: /flags done f1 3 marks F1 and F3 as handled. all works in any letter case.

Keyboard

What How
Toggle the pane /flags, the badge hotkey (0 alone in an empty prompt), or a chord you bind (see below)
Move around the pane Tab, Up and Down, Enter to press
Move focus between the prompt, the band and the panes Ctrl+X Tab
Copy the open items as markdown c in the pane
Copy every item a in the pane
Copy one item ⧉ on its row
Resolve an item ✓ (handled) or ✕ (dismissed) on its row
Reopen an item ↺ on its row
Hide or show resolved items h in the pane
Clear resolved items x in the pane
Close the pane q, Esc, or Ctrl+X X

Copying as markdown

c, a and /flags copy put a markdown checklist on your clipboard, grouped by kind, ready to paste into a task note, an issue or a pull request. With a, the list shown on the overview gives:

## Session flags (2 open)

### Questions

- [ ] Fix the two parser issues now, or just track them?

### Issues

- [ ] Race in cache invalidation (`src/cache.ts:42`)
- [x] Missing null check _(fixed with a test)_

Open items are unchecked. Resolved items, which only a and /flags copy all include, are checked, with how they were settled in italics. Dismissed items say so: _(dismissed)_. ⧉ on a row copies that one line.

A real shortcut

A mod can’t register a global key of its own, but its buttons can claim a chord bound to one of Claude Code’s keybinding actions. Session Flags uses app:toggleDiffNoiseFilter for this. That action is unbound by default, and Claude Code doesn’t handle it while its built-in diff mod is enabled, which is the default.

Bind a chord to it in ~/.claude/keybindings.json:

{
  "bindings": [
    { "context": "Global", "bindings": { "ctrl+x f": "app:toggleDiffNoiseFilter" } }
  ]
}

Ctrl+X F then opens and closes the pane from the prompt. If you already use that action, set toggleAction to another free action (see Configuration).

The chord reaches the mod only while the badge or the pane is on screen, which is whenever the list holds at least one item. To open an empty list, use /flags.