Skip to content
Pi · gpt-5.2-codexfeatureCLI & tooling4 files · +536 −33

Add terminal tab title status extension for Pi coding agent

Session from pi-extensions-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk

55msession
2interventions
GOAL

Show whether Pi is busy or done replying in the terminal tab title, mirroring the developer's existing codex-tab tool, and package the extension into a shareable repo.

  1. Prompt · +0
    Can we see in the terminal tab when Pi is done replying?
  2. Agent did · +0m
    Explored Pi's extension docs and examples to find setTitle/setStatus APIs for turn/agent lifecycle events.
  3. Agent did · +1m
    Wrote a tab-status.ts extension using ctx.ui.setTitle, toggling title on agent_start/agent_end, and enabled it in settings.json.
  4. Break · 1h 28m away, not counted
  5. Prompt · +11m
    Match the behaviour of ~/codex-tab/ (a Swift CLI tool) and add the /snake extension too.
  6. Agent did · +11m
    Located the actual codex-tab repo (public GitHub project), read its Swift source (Titles.swift, main.swift) to understand the new/running/done/no_commit/timeout state machine.
  7. Intervention · +13m
    Clarified the real requirement: just append :new/:running/etc tags to whatever the existing Pi status line already shows, not reimplement the whole tool.
    Why: I wanted to scope it down to appending tags to Pi's own status line rather than porting the whole codex-tab tool.
  8. Agent did · +16m
    Rewrote tab-status.ts to mirror codex-tab's state machine (new/running/done/no_commit/timeout) via ctx.ui.setStatus, and copied snake.ts example extension in.
  9. Intervention · +17m
    Corrected the output target: the tags should only appear in the terminal tab title, not in the footer status line.
    Why: The tags ended up in the footer status instead of the tab title, which wasn't what I asked for.
  10. Agent did · +18m
    Rewrote the extension to use setTitle only, added codex-tab emojis (✅/🚧/🛑), fixed the pi:[status] - [cwd] format, renamed states to camelCase (doneCommitted/doneNoCommit) to match Mario's conventions, and added a docstring.
  11. Agent did · +53m
    Created a public GitHub repo (pi-extensions), moved tab-status.ts into it with a README, kept snake local, updated settings.json to point at the new repo path, and added an MIT license.
  12. Break · 43m away, not counted
  13. Outcome · +55m
    Extension pushed to public repo github.com/tmustier/pi-extensions with README and MIT license; tab title now shows pi:[status] - [cwd] with emoji states, snake extension kept locally.
VERDICT

Next time I'd state upfront that I just wanted the status tags appended to Pi's existing UI, not a full reimplementation of my separate codex-tab tool — that ambiguity cost a chunk of back-and-forth. The correction that mattered was clarifying it should live in the terminal tab title only, not the footer status line, which is what made the final version actually match what I wanted.

I tried this · 0

Discussion · 0

How Builds work