update_status_line — Claude Code command: setup and usage
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.
no license ★ 3,990 updated 2026-03-04
.claude/commands/update_status_line.mdWhat update_status_line 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.
What it helps with
- 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 for the agent
- /update_status_line 4c932bd7-ee06-46e3-b26b-f32f52cc0862 branch staging
- /update_status_line 4c932bd7-ee06-46e3-b26b-f32f52cc0862 phase migration
How to install update_status_line
Manually: put the files in place
.claude/commands/update_status_line.mdCall it with /update_status_line. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/update_status_line.mdCall it with /prompts:update_status_line. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/update_status_line.prompt.mdManually: put the files in place
.gemini/commands/update_status_line.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about update_status_line
How to install update_status_line in Claude Code?
Place the command definition file at .claude/commands/update_status_line.md.
What does update_status_line do?
It inserts or overwrites custom attributes inside the extras mapping of a session JSON file.
Which file does update_status_line modify?
The command updates .claude/data/sessions/{session_id}.json using the provided identifier.