Skip to content

fix(v0.6.1): more aggressive heartbeat (immediate + 5s) for flaky mobile tunnels#1075

Merged
Hashevolution merged 1 commit into
mainfrom
fix/v0.6.1-heartbeat-aggressive
Jun 26, 2026
Merged

fix(v0.6.1): more aggressive heartbeat (immediate + 5s) for flaky mobile tunnels#1075
Hashevolution merged 1 commit into
mainfrom
fix/v0.6.1-heartbeat-aggressive

Conversation

@Hashevolution

Copy link
Copy Markdown
Owner

Summary

#1073 streams correctly (verified locally: /query/ TTFB 0.005s, total 14.7s, Cache-Control: no-store, chunked), but a phone over a Tailscale/mobile tunnel still hit "Failed to fetch" on a long (~135s detailed) query. The 12s interval β€” and the 12s gap between headers and the first body byte β€” can exceed an aggressive idle-eviction window.

Fix: emit one heartbeat byte immediately (no initial idle gap) + beat every 5s (was 12s). Still JSON-insignificant whitespace β†’ no client change.

Note

Diagnosis confirmed the server runs #1073 (streaming + no-store header). The remaining failure is tunnel-side idle eviction; this tightens the keepalive. If long queries still drop, the durable fix is delivering the answer via /trace/poll (returns fast, no long-held request) β€” larger, deferred. Operators can also halve query time now with JAMES_DISABLE_COGNITIVE_STAGES=1 (skips planner/reflect/verify β€” ~60s of a 135s query).

Quality delta

Quality delta: exempt (label: fix) β€” transport keepalive timing; core/retrieval + core/graph traversal + core/reasoning 0 lines.

πŸ€– Generated with Claude Code

…terval

#1073 streams correctly (verified: /query/ TTFB 0.005s, total 14.7s,
Cache-Control: no-store, chunked), but a phone over a Tailscale/mobile
tunnel still saw "Failed to fetch" on a long (~135s detailed) query. The
12s interval β€” and especially the 12s gap between the headers and the
first body byte β€” can exceed an aggressive idle-eviction window.

Now: emit one heartbeat byte IMMEDIATELY (no initial idle gap) and beat
every 5s (was 12s). Still JSON-insignificant whitespace β†’ client r.json()
unchanged. core/retrieval + core/graph traversal + core/reasoning 0 lines.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B7gaaBkpM3xYTzxhYrGHnR
@Hashevolution
Hashevolution merged commit a4bb5d6 into main Jun 26, 2026
2 of 4 checks passed
@Hashevolution
Hashevolution deleted the fix/v0.6.1-heartbeat-aggressive branch June 26, 2026 06:16
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant