Skip to content

Document TTY-detection limitation for goaccess, tqdm, etc.#427

Draft
asmacdo wants to merge 4 commits into
con:mainfrom
asmacdo:tty-troubleshooting-docs
Draft

Document TTY-detection limitation for goaccess, tqdm, etc.#427
asmacdo wants to merge 4 commits into
con:mainfrom
asmacdo:tty-troubleshooting-docs

Conversation

@asmacdo
Copy link
Copy Markdown
Member

@asmacdo asmacdo commented May 11, 2026

duct starts the wrapped command with start_new_session=True and pipes stdout/stderr instead of a PTY, so isatty() in the child is false. Programs that adapt their output to that signal (goaccess refusing to read piped stdin, tqdm switching to its rate-limited non-TTY path) appear broken under duct.

Add a FAQ entry that names the limitation, gives concrete workarounds for both tools, and shows the setsid recipe so users can reproduce and develop against the non-interactive path without duct.

Refs: #261, #426

duct starts the wrapped command with start_new_session=True and pipes
stdout/stderr instead of a PTY, so isatty() in the child is false.
Programs that adapt their output to that signal (goaccess refusing to
read piped stdin, tqdm switching to its rate-limited non-TTY path)
appear broken under duct.

Add a FAQ entry that names the limitation, gives concrete workarounds
for both tools, and shows the setsid recipe so users can reproduce
and develop against the non-interactive path without duct.

Refs: con#261, con#426

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 11, 2026 18:35
@asmacdo asmacdo added the semver-documentation Changes only affect the documentation label May 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.74%. Comparing base (aef263f) to head (b12a323).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #427   +/-   ##
=======================================
  Coverage   91.74%   91.74%           
=======================================
  Files          15       15           
  Lines        1127     1127           
  Branches      140      140           
=======================================
  Hits         1034     1034           
  Misses         70       70           
  Partials       23       23           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a README FAQ entry explaining that duct’s default execution mode can change TTY detection for wrapped commands, which can cause behavior differences in tools like goaccess and tqdm.

Changes:

  • Add a new FAQ section describing the “non-interactive / not-a-TTY” behavior when commands are run under duct.
  • Provide concrete workarounds for goaccess and tqdm behavior differences.
  • Provide a setsid command recipe to reproduce similar non-TTY conditions outside of duct.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
@asmacdo asmacdo marked this pull request as draft May 11, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-documentation Changes only affect the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants