# update_status_line

update_status_line upserts custom key-value metadata into Claude Code session records. Useful for displaying custom task statuses or project flags in your status line.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 3990 repo stars
- Author: disler
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/disler/claude-code-hooks-mastery/tree/HEAD/.claude/commands/update_status_line.md
- Updated: 2026-03-04
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/update-status-line

## What it does

The command accepts three positional parameters: a session identifier, a target property name, and its new value. It looks up the target session record located under `.claude/data/sessions/{session_id}.json`.

It parses the existing record, initializes an `extras` dictionary if missing, and writes the specified key-value pair into it. Once written, the command returns a short summary containing the file path, modified key, prior value, and updated value.

The target session file must already exist at `.claude/data/sessions/{session_id}.json`, because the command only updates existing records rather than creating new session logs from scratch.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/update_status_line.md` — Call it with /update_status_line. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/update_status_line.md` — Call it with /prompts:update_status_line. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/update_status_line.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/update_status_line.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/disler/claude-code-hooks-mastery/tree/HEAD/.claude/commands/update_status_line.md

## When to use it
- store custom task flags in session metadata
- track active subproject names in status outputs
- inject arbitrary key-value pairs into session files
- inspect previous and updated values after an edit

## Example prompts
- /update_status_line 4c932bd7-ee06-46e3-b26b-f32f52cc0862 branch staging
- /update_status_line 4c932bd7-ee06-46e3-b26b-f32f52cc0862 phase migration

## Similar
- [sprint-status](https://affpapa.org/en/nevibecode/commands/sprint-status.md) — command · ★ 2966 repo stars
- [pac-update-status](https://affpapa.org/en/nevibecode/commands/pac-update-status.md) — command · 160 installs
- [CODE-1890-status-line-v2](https://affpapa.org/en/nevibecode/agents/code-1890-status-line-v2.md) — subagent · ★ 720 repo stars
- [workflow-threads-manager](https://affpapa.org/en/nevibecode/skills/workflow-threads-manager.md) — skill · 656 installs
- [cold-email-subject-line-tester](https://affpapa.org/en/nevibecode/skills/cold-email-subject-line-tester.md) — skill · 33300 installs
- [session-brain](https://affpapa.org/en/nevibecode/skills/session-brain.md) — skill · 364 installs

From the same set: [disler/claude-code-hooks-mastery](https://affpapa.org/en/nevibecode/by/disler/claude-code-hooks-mastery.md) — 25 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
