SessionStart: reduce curl call count and standardize flags #18

Closed
opened 2026-02-24 19:42:39 +00:00 by forgejo_admin · 0 comments
Contributor

Context

From PR #16 review (round 2, MEDIUM-1 and MEDIUM-2).

Problem

SessionStart hook now makes up to 7 sequential curl calls (SOPs, bugs, TODOs, projects, project page direct, project page fallback list, project page fallback fetch), each with --connect-timeout 3 --max-time 5. If pal-e-docs is unreachable, worst case is 21s+ in timeouts — may exceed Claude Code's hook timeout.

Also, old curl calls use -s while new calls use -sf — inconsistent error handling.

Suggested Fixes

  • Skip project detection if SOP fetch fails (pal-e-docs is unreachable)
  • Reduce --connect-timeout to 2s for project-detection calls
  • Standardize on -sf across all curl calls
  • Consider parallel curl with & + wait for independent calls (SOPs, bugs, TODOs)

Files

  • hooks/session-start-context.sh
## Context From PR #16 review (round 2, MEDIUM-1 and MEDIUM-2). ## Problem SessionStart hook now makes up to 7 sequential curl calls (SOPs, bugs, TODOs, projects, project page direct, project page fallback list, project page fallback fetch), each with `--connect-timeout 3 --max-time 5`. If pal-e-docs is unreachable, worst case is 21s+ in timeouts — may exceed Claude Code's hook timeout. Also, old curl calls use `-s` while new calls use `-sf` — inconsistent error handling. ## Suggested Fixes - Skip project detection if SOP fetch fails (pal-e-docs is unreachable) - Reduce `--connect-timeout` to 2s for project-detection calls - Standardize on `-sf` across all curl calls - Consider parallel curl with `&` + `wait` for independent calls (SOPs, bugs, TODOs) ## Files - `hooks/session-start-context.sh`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/claude-custom#18
No description provided.