Skip to content

Instantly share code, notes, and snippets.

View ben-vargas's full-sized avatar

Ben Vargas ben-vargas

View GitHub Profile

Git Bare Repository Worktree Workflow for Claude Code

🚨 CRITICAL: Understanding My Project Structure

I use a bare Git repository approach with Git worktrees extensively. Every subdirectory in my projects represents a different git branch as a worktree.

When you see a project like /home/code/projects/my-app/:

  • my-app/ = project container (NOT a working tree)
  • my-app/.bare/ = actual Git repository database
  • my-app/.git = pointer file directing Git commands to .bare/

Subagent Token Tracking - Investigation Findings

Executive Summary

After thorough investigation of GitHub issue #313 regarding subagent token tracking, we discovered that the reported issue is more nuanced than initially described. While users are experiencing real problems with token limits, the root cause is not exactly what was initially documented. This report details our findings, corrections to initial assumptions, and the improvements we've implemented.

Initial Problem Report (Issue #313)

Users reported hitting 5-hour token limits while ccusage showed only 10-20% usage when using subagents (Task tool). The initial assessment suggested that:

Here's your complete statusline setup that you can replicate on another machine:
Status Line Configuration Details
Your setup uses an enhanced custom script (~/.claude/statusline-enhanced.sh) that displays:
- Time (12-hour with AM/PM)
- Current directory with color-coded Git status (blue=clean, orange=dirty)
- Model name (shortened)
- Token usage (~character count/4)
- Global 5-hour session timer with progress percentage
# Tetris Game - Product Requirements Document
## Overview
A classic Tetris game implementation that provides an engaging puzzle experience where players arrange falling blocks to create and clear complete horizontal lines.
## Core Features
### 1. Game Mechanics
- **Falling Tetrominoes**: 7 standard Tetris pieces (I, O, T, S, Z, J, L) that fall from top to bottom
- **Movement Controls**:

MoonshotAI Kimi K2 model not invoking tools despite listed support

Description

The moonshotai/kimi-k2 model is listed as supporting "Tools" and "Tool Choice" on the OpenRouter model page, but when making requests with tools defined, the model responds with regular text instead of invoking the requested tools.

Steps to Reproduce

  1. Make a request to moonshotai/kimi-k2 via OpenRouter API with tools defined
  2. Use the standard OpenAI-compatible tool/function format
╭────────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code! │
│ │
│ /help for help, /status for your current setup │
│ │
│ cwd: C:\Users\ben\Documents\git\unsynced\tetris │
╰────────────────────────────────────────────────────╯
Tips for getting started:
@ben-vargas
ben-vargas / task-master-website-prd-test-out.txt
Created June 30, 2025 21:47
Testing Output with Personal Website PRD in Task Master
_____ _ __ __ _ _ ___
|_ _|_ _ ___| | __ | \/ | __ _ ___| |_ ___ _ __ / \ |_ _|
| |/ _` / __| |/ / | |\/| |/ _` / __| __/ _ \ '__| / _ \ | |
| | (_| \__ \ < | | | | (_| \__ \ || __/ | / ___ \ | |
|_|\__,_|___/_|\_\ |_| |_|\__,_|___/\__\___|_| /_/ \_\___|
by https://x.com/eyaltoledano
╭───────────────────────────────────╮
│ │
│ Initializing your new project │
# Product Requirements Document (PRD)
# CloudCRM - Enterprise CRM SaaS Platform
## Document Information
- **Version**: 1.0
- **Date**: June 27, 2025
- **Status**: Draft
- **Author**: Product Management Team
- **Stakeholders**: Engineering, Sales, Marketing, Customer Success, Executive Team

🧠 Issue Summary

The complexity-report command fails with a require is not defined error when prompting the user to generate a new report. This occurs if the report file is missing at:

.taskmaster/reports/task-complexity-report.json

PRD: MCP Sampling as a Custom AI SDK Provider

1. Background

The initial implementation of the MCP (Model Context Protocol) Sampling provider was done as a custom, one-off solution. While functional, it did not align with the established architectural pattern for AI providers in this project, exemplified by the claude-code provider. The current standard is to encapsulate provider-specific logic within a custom AI SDK structure, which promotes modularity, maintainability, and consistency across the codebase.

The feedback on PR #863 highlighted the need to refactor the MCP Sampling provider to follow this established pattern. This document outlines the requirements for that re-implementation.

2. Objective