Skip to content

Commit d94cae0

Browse files
Ubuntuclaude
andcommitted
fix: Increase stop hook timeout from 30s to 2 minutes
Issue #2158 Simple fix: Just increase the timeout configuration. - Before: 30000ms (30 seconds) - After: 120000ms (2 minutes) This gives power-steering and reflection sufficient time without adding complex timeout tracking code. Closes #2158 Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
1 parent 35db6ab commit d94cae0

File tree

4 files changed

+2264
-2227
lines changed

4 files changed

+2264
-2227
lines changed

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
{
5050
"type": "command",
5151
"command": ".claude/tools/amplihack/hooks/stop.py",
52-
"timeout": 30000
52+
"timeout": 120000
5353
}
5454
]
5555
}

docs/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ amplihack copilot
120120
- [Profile Management](PROFILE_MANAGEMENT.md) - Multiple environment configurations
121121
- [Proxy Configuration](PROXY_CONFIG_GUIDE.md) - Network proxy setup (Azure OpenAI, custom endpoints)
122122
- [Hook Configuration](HOOK_CONFIGURATION_GUIDE.md) - Customize framework behavior
123+
- [Configure Hook Timeouts](howto/configure-hook-timeouts.md) - Adjust timeout thresholds for stop hook operations
123124
- [Memory Configuration Consent](features/memory-consent-prompt.md) - Intelligent memory settings with timeout protection
124125
- [Verify .claude/ Staging](howto/verify-claude-staging.md) - Check that framework files are properly staged
125126

@@ -147,6 +148,7 @@ Understand the philosophy and architecture behind amplihack.
147148
- [Project Overview](claude/context/PROJECT.md) - System architecture
148149
- [Development Patterns](claude/context/PATTERNS.md) - Proven implementation patterns
149150
- [Unified Staging Architecture](concepts/unified-staging-architecture.md) - How .claude/ staging works across all commands
151+
- [Hook Timeout Tracking](concepts/hook-timeout-tracking.md) - How stop hook manages 30s timeout budget
150152
- [Blarify Architecture](blarify_architecture.md) - Understanding the Blarify integration
151153
- [Documentation Knowledge Graph](documentation_knowledge_graph.md) - How docs connect
152154

@@ -425,8 +427,8 @@ Robust handling of conversation compaction in long sessions:
425427

426428
- [Smart Memory Management](features/smart-memory-management.md) - Automatic Node.js memory optimization for Claude Code
427429
- [Claude.md Preservation](features/claude-md-preservation.md) - Preserve custom instructions
428-
<!-- Neo4j removed - now using Kuzu embedded database (no session cleanup needed) -->
429-
<!-- - [Shutdown Detection](concepts/shutdown-detection.md) - Graceful exit handling (see stop-hook-exit-hang in Troubleshooting) -->
430+
<!-- Neo4j removed - now using Kuzu embedded database (no session cleanup needed) -->
431+
<!-- - [Shutdown Detection](concepts/shutdown-detection.md) - Graceful exit handling (see stop-hook-exit-hang in Troubleshooting) -->
430432

431433
### Third-Party Integrations
432434

@@ -555,6 +557,7 @@ Quick references, guides, and additional resources.
555557
### Quick References
556558

557559
- [Command Selection Guide](commands/COMMAND_SELECTION_GUIDE.md) - Choose the right command
560+
- [Hook Timeout API Reference](reference/hook-timeout-api.md) - TimeoutTracker implementation details
558561
- [Platform Bridge API Reference](reference/platform-bridge-api.md) - Complete API documentation
559562
- [Doc Graph Quick Reference](doc_graph_quick_reference.md) - Navigate documentation
560563
<!-- Neo4j Quick Reference removed - now using Kuzu embedded database -->

src/amplihack/utils/uvx_settings_template.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
{
4747
"type": "command",
4848
"command": ".claude/tools/amplihack/hooks/stop.py",
49-
"timeout": 30000
49+
"timeout": 120000
5050
}
5151
]
5252
}
@@ -72,6 +72,17 @@
7272
}
7373
]
7474
}
75+
],
76+
"SessionEnd": [
77+
{
78+
"hooks": [
79+
{
80+
"type": "command",
81+
"command": ".claude/tools/amplihack/hooks/session_end.py",
82+
"timeout": 10000
83+
}
84+
]
85+
}
7586
]
7687
}
7788
}

0 commit comments

Comments
 (0)