Skip to content

fix(claude-remote): suppress resume-summary modal to stop operator wedge - #385

Merged
mashkovd merged 1 commit into
mainfrom
fix/claude-remote-resume-modal-wedge
Jun 4, 2026
Merged

mashkovd merged 1 commit into
mainfrom
fix/claude-remote-resume-modal-wedge

Conversation

@mashkovd

@mashkovd mashkovd commented Jun 4, 2026

Copy link
Copy Markdown
Member

Phase 1 — env-only, no image release

The labs claude-remote operator device resumes a pinned session (RESUME_SESSION_ID) on every (re)launch. The headless --remote-control bridge has stdin=/dev/null, so the interactive "Resume from summary?" modal can never be answered. Once the resumed session crosses BOTH default gate thresholds (age > 70 min AND est. tokens > 100k) startup blocks on the modal → relay never connects (Remote Control failed to connect: /login) → silent TUI wedge (observed 2026-06-03, session stuck ~10h until a manual pod restart). Merge logic kept working via the steward-log scheduler ticks; only the interactive operator session wedged.

Change (3 env vars on base-service)

var value why
CLAUDE_CODE_RESUME_THRESHOLD_MINUTES 2000000000 raise the age half of the modal gate so it never fires
CLAUDE_CODE_RESUME_TOKEN_THRESHOLD 2000000000 raise the token half of the modal gate so it never fires
CLAUDE_CODE_AUTO_COMPACT_WINDOW 140000 auto-compact (summarise, thread kept) at ~70% of a 200k window so the long-lived session never chokes near the model max

Resume then loads the full transcript silently → the operator keeps its memory, and the wedge becomes impossible. Mirrors the proven Mac-bridge wrapper config (Claude Code 2.1.150, confirmed running in-pod).

Scope

  • Pure values/env change. No entrypoint.sh / image change, no release.
  • Does not touch the pr-steward scheduler, merge logic, or the RESUME_SESSION_ID pin.

Follow-up (Phase 2, separate release of mctl-claude-remote)

state-file session rotation (by 20MB transcript size) + retention prune (current + 3) + remove hard-pinned RESUME_SESSION_ID + persistent resumeReturnDismissed + a startup-wedge backstop (detect modal-block at startup → fresh session + Telegram alert), robust against future Claude Code env-key renames on the auto-updating binary.

🤖 Generated with Claude Code

The labs claude-remote operator device resumes a pinned session
(RESUME_SESSION_ID) on every (re)launch. Because the headless
--remote-control bridge has stdin=/dev/null, the interactive
'Resume from summary?' modal can never be answered: once the resumed
session crosses BOTH default gate thresholds (age > 70 min AND est.
tokens > 100k) startup blocks on the modal, the relay never connects
('Remote Control failed to connect: /login'), and the TUI wedges
silently (observed 2026-06-03, session stuck ~10h until a manual pod
restart).

Raise both resume thresholds so the modal never fires; --resume then
loads the full transcript silently and the operator keeps its memory.
Add CLAUDE_CODE_AUTO_COMPACT_WINDOW=140000 so the long-lived session
auto-compacts (summarises, thread preserved) at ~70% of the window
instead of choking near the model max. Mirrors the proven Mac-bridge
wrapper config.

Phase 1 (env-only, no image release). Phase 2 will add state-file
session rotation + retention prune + resumeReturnDismissed + a
startup-wedge backstop in entrypoint.sh.
@claude

claude Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Claude finished @mashkovd's task in 45s —— View job


Review: Trivial Config Change — Approved ✓

Reviewed platform-gitops/services/labs/claude-remote/values.yaml diff.

Summary: Pure environment variable addition + explanatory comment. No YAML errors, no security concerns, no operational risks.

Changes:

  • CLAUDE_CODE_RESUME_THRESHOLD_MINUTES: "2000000000" — raises age threshold to effectively infinity so resume modal never fires on startup
  • CLAUDE_CODE_RESUME_TOKEN_THRESHOLD: "2000000000" — same for token threshold
  • CLAUDE_CODE_AUTO_COMPACT_WINDOW: "140000" — auto-compact at ~70% of 200k window to prevent long-lived session from choking near model max

Assessment:

  • ✓ Valid YAML, correct indentation (2-space per CLAUDE.md)
  • ✓ Numeric values are conservative and intentional (2B min ≈ 3,800 years effectively disables the threshold)
  • ✓ Comment fully explains the issue (observed wedge 2026-06-03), the fix, and phase 1/2 roadmap
  • ✓ No secrets, no security issues
  • ✓ Narrowly scoped: env-only, no image/entrypoint changes, doesn't touch pr-steward or RESUME_SESSION_ID pin (as promised)

No P1/P2 findings, good to merge.


@mashkovd
mashkovd merged commit 5e750a9 into main Jun 4, 2026
@mashkovd
mashkovd deleted the fix/claude-remote-resume-modal-wedge branch June 4, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant