Skip to content

fix: stop stack trace when a shell session times out - #638

Merged
scotwells merged 1 commit into
mainfrom
claude/project-thread-xqo539
Nov 11, 2026
Merged

scotwells merged 1 commit into
mainfrom
claude/project-thread-xqo539

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

Requested by Scot Schuchert-Wells · project thread

When a datumctl compute exec session reaches its time limit, users see a Go stack trace printed before the expiry message. The trace is controller-runtime warning that no logger was ever set, which it only does when a client is built more than 30 seconds after the process starts, as the session cleanup does. The plugin now sets a discard logger at startup, so the warning never fires and the user just sees the expiry message. The plugin writes all user-facing output itself, so nothing else is lost.

Fixes #617

Test plan

  • Plugin builds and go vet passes
  • Standalone repro that builds a controller-runtime client after 31 seconds prints the warning and stack trace without the logger
  • Same repro with the discard logger prints nothing
  • Let an exec session expire with the new build and confirm only the expiry message appears

Generated by Claude Code

The CLI never sets a controller-runtime logger. When a client is built more
than 30 seconds after start, as happens when an exec session ends on its
time limit, controller-runtime prints a "log.SetLogger was never called"
warning with a full goroutine stack trace to the user's terminal.

Key changes:
- set a discard logger at plugin startup so the warning never fires
@scotwells
scotwells requested a review from a team as a code owner November 11, 2026 14:57
@scotwells scotwells self-assigned this Nov 11, 2026

@kevwilliams kevwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the CLI plugin writes all output itself and never logs through controller-runtime, so the discard logger hides nothing users need.

@scotwells
scotwells merged commit 1f19272 into main Nov 11, 2026
12 checks passed
@scotwells
scotwells deleted the claude/project-thread-xqo539 branch November 11, 2026 15:26
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.

Shell session reached time limit. Go stack trace is printed out before shutdown

2 participants