Skip to content

Commit d285ba5

Browse files
authored
fix: weave-validate.sh hangs in nested Claude sessions (#161)
claude plugin validate produces no output and blocks when invoked from within a running Claude session. Detect CLAUDECODE=1 env var and skip the step. Added timeout 15 as safety net for CI runs.
1 parent e05ab7b commit d285ba5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
88

99
### Fixed
1010

11+
- **`weave-validate.sh`**: Skip `claude plugin validate` inside Claude sessions (`CLAUDECODE=1`) — prevents silent hang that swallows all output. Added `timeout 15` safety net for CI
1112
- **`qyl-continuation` (1.0.0 → 1.0.1)**: Fixed Python 3.14 regex crash — inline `(?i)` flags mid-pattern are now errors in Python 3.14. Moved all three regex patterns (`QUESTION_RX`, `COMPLETION_RX`, `NEXT_STEP_RX`) to use `re.IGNORECASE` flag parameter instead
1213

1314
### Added

tooling/scripts/weave-validate.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ elif [ -x "$HOME/.claude/bin/claude" ]; then
2929
CLAUDE_CMD="$HOME/.claude/bin/claude"
3030
fi
3131

32-
if [ -n "$CLAUDE_CMD" ]; then
32+
if [ -n "$CLAUDE_CMD" ] && [ -z "${CLAUDECODE:-}" ]; then
3333
echo "[1/5] Plugin validation (claude CLI)"
3434

35-
if ! "$CLAUDE_CMD" plugin validate . 2>&1; then
35+
if ! timeout 15 "$CLAUDE_CMD" plugin validate . 2>&1; then
3636
hard_fail "marketplace validation failed"
3737
fi
3838

3939
if [ -d "plugins" ]; then
4040
for d in plugins/*/; do
4141
[ -d "$d" ] || continue
42-
if ! "$CLAUDE_CMD" plugin validate "$d" 2>&1; then
42+
if ! timeout 15 "$CLAUDE_CMD" plugin validate "$d" 2>&1; then
4343
hard_fail "plugin validation failed: $d"
4444
fi
4545
done
@@ -56,6 +56,8 @@ if [ -n "$CLAUDE_CMD" ]; then
5656
fi
5757
done
5858
fi
59+
elif [ -n "${CLAUDECODE:-}" ]; then
60+
echo "[1/5] Plugin validation (SKIPPED — nested Claude session)"
5961
else
6062
echo "[1/5] Plugin validation (SKIPPED — claude CLI not found)"
6163
fi

0 commit comments

Comments
 (0)