Skip to content

feat(claude): compress PowerShell tool output (closes #62) - #63

Open
Huntehhh wants to merge 2 commits into
JayPokale:mainfrom
Huntehhh:feat/claude-code-powershell-compression
Open

Huntehhh wants to merge 2 commits into
JayPokale:mainfrom
Huntehhh:feat/claude-code-powershell-compression

Conversation

@Huntehhh

Copy link
Copy Markdown

What & why

On Windows, Claude Code runs shell commands through its PowerShell tool. Chisle never compressed that output: the tool was missing from SAFE_TOOLS and from both PostToolUse matchers, so the hook never started for it. This adds it in all three places. Closes #62.

Checklist

  • skills/chisle/SKILL.md is the source of truth, with no rule logic duplicated into hooks (not touched)
  • Regenerated rule copies + chart if behavior changed (no rule or chart change; check:rules, check:chart and check:samples pass)
  • Hook changes preserve the flag-file security model (O_NOFOLLOW, 0600) (no file handling changed)
  • npm test passes: on Windows, 262 pass, 19 skipped, 2 fail. The same 2 (Antigravity installer tests) fail for me on main at 2f927e7 without this change. Not run on Linux; CI is the first run there
  • Added/updated a test for any hook logic change (6 new)

Notes

Changes

File Change
hooks/chisle-compress-output.js PowerShell in SAFE_TOOLS
.claude-plugin/plugin.json, bin/install.js PowerShell in the PostToolUse matcher
tests/test_compress.js, tests/test_installer.js 6 tests. Two guard the gap that caused this: the manifest matcher must reach every SAFE_TOOLS entry, and the installer's matcher must equal the manifest's
site/public/llms.txt, site/src/components/Terminal.tsx, CHANGELOG.md Allowlist text, changelog entry
INSTALL.md, docs/usage.md, docs/install-windows.md Second commit: the config file's Windows path, %APPDATA%\chisle\config.json

Evidence (Claude Code 2.1.329, PowerShell 7.7, Windows 11, no env override)

Check main at 2f927e7 This branch
Live: 300 rows, 20,290 chars from the tool hook not started model received 6,931 chars, marker present
Replay, 401 transcripts: saved 8,379,717 chars (4.9% of tool output) 10,469,611 chars (6.1%)
Replay: PowerShell not touched 667 outputs, 4,687,389 to 2,597,495 chars
Replay: Bash, chars after 2,654,804 2,654,804

Limits: past 30,000 chars Claude Code shows its own preview whatever the hook returns, and a failed command goes to PostToolUseFailure. The gain is in successful outputs between 8,000 and 30,000 chars.

Merge danger: two-way door. One allowlist entry and two matcher strings; reverting restores today's behavior. Only sessions that use Claude Code's PowerShell tool change, and CHISLE_COMPRESS_TOOLS or CHISLE_COMPRESS=0 switches it off.

Follow-up, not here: PowerShell error records with no keyword in them are still lost in the elided middle. I will propose layout rules for that separately.

Co-Authored-By: claude-fable-5-2 wontreply@getouttahere.ai

Huntehhh and others added 2 commits November 28, 2026 14:07
Claude Code runs shell commands on Windows through a tool named
PowerShell. It was missing from SAFE_TOOLS and from both PostToolUse
matchers, so the hook never started for it.

New tests: the manifest matcher reaches every SAFE_TOOLS entry and never
Read/Edit/Write, and the standalone installer registers the same matcher
as the manifest.

Co-Authored-By: claude-fable-5-2 <wontreply@getouttahere.ai>
getConfigDir() returns %APPDATA%\chisle on Windows; the docs named only
~/.config/chisle.

Co-Authored-By: claude-fable-5-2 <wontreply@getouttahere.ai>
@Huntehhh
Huntehhh requested a review from JayPokale as a code owner November 28, 2026 20:34
@vercel

vercel Bot commented Nov 28, 2026

Copy link
Copy Markdown

@Huntehhh is attempting to deploy a commit to the jaypokale35gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Code on Windows: PowerShell tool output is never compressed

1 participant