vscode-sidebar-terminal: Command for Claude Code

.claude/commands/implement-fix-terminal-initialization-bugs.md

implement-fix-terminal-initialization-bugs is a command for Claude Code from s-hiraoku/vscode-sidebar-terminal. It costs 14 tokens per session (1,921 once invoked), scanned A, original, MIT.

A command that launches a prepared coding agent to fix terminal startup and message-routing bugs in a VS Code extension. It covers terminal initialization, the embedded terminal view, and shell startup.

In plain words
What is it for?
Use it to implement the OpenSpec change named fix-terminal-initialization-bugs, add diagnostic logging, and create unit and integration tests for terminal behavior.
Why use it?
It provides a defined workflow for investigating why terminal prompts are missing or the agent header is displayed incorrectly. It also includes validation and tests for the fix.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is s-hiraoku/vscode-sidebar-terminal's own configuration. It tells Claude Code how to work on vscode-sidebar-terminal itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything vscode-sidebar-terminal configures →

Reuse

Borrowing it

Nothing to install: this file belongs to s-hiraoku/vscode-sidebar-terminal. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/s-hiraoku/vscode-sidebar-terminal/main/.claude/commands/implement-fix-terminal-initialization-bugs.md
Clone the repo
git clone --depth 1 https://github.com/s-hiraoku/vscode-sidebar-terminal

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for implement-fix-terminal-initialization-bugs

README.md
[![agentmods](https://agentmods.dev/badge/commands/s-hiraoku/vscode-sidebar-terminal/implement-fix-terminal-initialization-bugs/github.svg)](https://agentmods.dev/commands/s-hiraoku/vscode-sidebar-terminal/implement-fix-terminal-initialization-bugs)
Your own site
<a href="https://agentmods.dev/commands/s-hiraoku/vscode-sidebar-terminal/implement-fix-terminal-initialization-bugs"><img src="https://agentmods.dev/badge/commands/s-hiraoku/vscode-sidebar-terminal/implement-fix-terminal-initialization-bugs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for implement-fix-terminal-initialization-bugs

Your own site · 80×15
<a href="https://agentmods.dev/commands/s-hiraoku/vscode-sidebar-terminal/implement-fix-terminal-initialization-bugs"><img src="https://agentmods.dev/badge/commands/s-hiraoku/vscode-sidebar-terminal/implement-fix-terminal-initialization-bugs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.01921
Opus 5 $0.00007 $0.00960
Sonnet 5 $0.00003 $0.00384
Haiku 4.5 $0.00001 $0.00192

Measured 7d ago against content hash 711dc2f882a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

implement-fix-terminal-initialization-bugs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/implement-fix-terminal-initialization-bugs.md · 257 lines

How it starts

The opening of the file, as written. The whole thing — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Implement: Fix Terminal Initialization Bugs

Execute the specialized implementation agent for OpenSpec change fix-terminal-initialization-bugs.

Quick Start

Simply invoke this command:

/implement-fix-terminal-initialization-bugs

This will launch the fix-terminal-initialization-bugs-implementer agent with pre-configured workflow.


What This Command Does

Launches: .claude/agents/fix-terminal-initialization-bugs-implementer.md

Workflow Phases:

  1. Research (30min): Gather VS Code patterns, codebase context, xterm.js lifecycle
  2. Implementation (1.5h): Fix message routing and shell initialization bugs
  3. Validation (30min): API validation, security audit
  4. Testing (1.5h): Unit/Integration test creation

Total Estimated Time: ~3.5h


OpenSpec Context

Change ID: fix-terminal-initialization-bugs Problem: Two critical bugs preventing terminal functionality:

  1. AI Agent header display corruption
  2. Terminal prompt not displayed (initialization message not routed to handler)

Solution: Fix message routing in MessageRoutingFacade and add diagnostic logging Scope: Terminal Lifecycle Management, WebView Message Routing, UI Rendering

Full Specification: openspec/changes/fix-terminal-initialization-bugs/

  • proposal.md - Problem statement and success criteria
  • tasks.md - Detailed implementation tasks (4 phases)
  • specs/terminal-header-display/spec.md - Header display requirements
  • specs/terminal-shell-initialization/spec.md - Shell initialization requirements

Execution Flow

When you run /implement-fix-terminal-initialization-bugs, the agent will:

1. Research Phase (Parallel - 30min)

  • Launch vscode-terminal-resolver → VS Code message routing patterns
  • Launch serena-semantic-search → Current codebase message handling
  • Launch xterm-info-analyzer → xterm.js initialization lifecycle

2. Implementation Phase (1.5h)

  • Launch terminal-implementer with research findings
  • Follow TDD: Red → Green → Refactor
  • Implement tasks from tasks.md:
    • Phase 1: Add diagnostic logging (TerminalCreationService, SecondaryTerminalProvider, TerminalManager)
    • Phase 2: Fix message routing (MessageRoutingFacade, handler registration)
    • Phase 3: Fix shell initialization (_handleTerminalInitializationComplete)

Read the full file on GitHub · 257 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 257 lines · 14 tokens per session scan A 711dc2f882a5

Subscribe to this mod's changes

implement-fix-terminal-initialization-bugs is a command published in the GitHub repository s-hiraoku/vscode-sidebar-terminal (21 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 1,921 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.