Fix the trim-status-table hook path for sessions that start below the repository root #1755
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1755
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The status-table trim hook of this repository cannot find its script in a session that starts below the repository root. Each Edit or Write in that session writes a
hook_non_blocking_errorrecord, and the History table trim does not run.Observed
Counts from the transcripts under
~/.claude/projectson 2026-11-13: 553hook_non_blocking_errorrecords dated 2026-11-11 to 2026-11-13.20 of them have the hooks
PostToolUse:Write(13) andPostToolUse:Edit(7):This hook is not an os-sdlc hook.
plugins/os-sdlc/hooks/hooks.jsonhas noEditmatcher and does not name the script. The hook is in the project file.claude/settings.json, matcherEdit|Write, commandruby "$CLAUDE_PROJECT_DIR/bin/trim-status-table.rb". The script exists only at the repository root,bin/trim-status-table.rb. In a session that starts inplugins/os-sdlc,$CLAUDE_PROJECT_DIRisplugins/os-sdlc, and the path does not exist. Before 2026-11-11 the same shape occurs with worktree paths, for example.claude/worktrees/ticket-1393/bin/trim-status-table.rb(201 records in all transcripts).Reproduce
Start a session in
plugins/os-sdlcand edit a file. The transcript gets the error above.Approach
The trim hook command finds the script from each session directory of this repository, or does nothing when the edited file is not a status leaf of this repository.
Required work: none beyond the acceptance criteria.
Acceptance criteria
plugins/os-sdlc, when the session edits a file, then the trim hook writes no error.Non-goals
The os-sdlc
PostToolUse:Agenthook error. A separate ticket of 2026-11-13 covers it.Origin
VERDICT: CREATE (ticket-skeptic, 2026-11-13): observed recurring failure, 20 records; the skeptic split the draft into two tickets by mechanism.