anthropics / anthropics/claude-agent-sdk-typescript
SessionEnd: other - no clear exit reason/error for termination of session
- Dominant language
- Shell
- Stars
- 1.8k
- Forks
- 226
- PR merge metrics
- No merged PRs in 30d
Description
### Environment
- SDK: 0.1.55
- Host: E2B sandbox
### Problem
Long-running `query()` session terminates unexpectedly with `SessionEnd: other`.
Per [hook docs](https://code.claude.com/docs/en/hooks#hook-events), `other` means
"Other exit reasons" but doesn't specify what those are.
1. What conditions trigger `SessionEnd: other`?
2. I observed 4 successful auto-compactions, yet the session terminated with SessionEnd: other 16 minutes after the last compaction. What could cause this termination ?
.claude/debug
Logs:
```
2025-11-30T19:32:40.160Z [DEBUG] Matched 0 unique hooks for query "mcp__gmail__get_attachment" (0 before deduplication)
2025-11-30T19:32:40.176Z [DEBUG] executePreToolHooks called for tool: mcp__gmail__get_attachment
2025-11-30T19:32:40.177Z [DEBUG] Getting matching hook commands for PreToolUse with query: mcp__gmail__get_attachment
2025-11-30T19:32:40.177Z [DEBUG] Found 0 hook matchers in settings
2025-11-30T19:32:40.177Z [DEBUG] Matched 0 unique hooks for query "mcp__gmail__get_attachment" (0 before deduplication)
2025-11-30T19:32:40.177Z [DEBUG] MCP server "gmail": Calling MCP tool: get_attachment
2025-11-30T19:32:40.179Z [DEBUG] MCP server "gmail": No token data found
2025-11-30T19:32:40.631Z [DEBUG] MCP server "gmail": Tool 'get_attachment' completed successfully in 454ms
2025-11-30T19:32:40.634Z [DEBUG] Getting matching hook commands for PostToolUse with query: mcp__gmail__get_attachment
2025-11-30T19:32:40.634Z [DEBUG] Found 0 hook matchers in settings
2025-11-30T19:32:40.634Z [DEBUG] Matched 0 unique hooks for query "mcp__gmail__get_attachment" (0 before deduplication)
2025-11-30T19:32:40.656Z [DEBUG] Getting matching hook commands for SessionEnd with query: other
2025-11-30T19:32:40.656Z [DEBUG] Found 0 hook matchers in settings
2025-11-30T19:32:40.656Z [DEBUG] Matched 0 unique hooks for query "other" (0 before deduplication)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.