Skip to content

fix: append < /dev/null to altimate-code run invocations (stdin-wedge workaround)#12

Open
sahrizvi wants to merge 1 commit into
mainfrom
fix/altimate-code-stdin-wedge-workaround
Open

fix: append < /dev/null to altimate-code run invocations (stdin-wedge workaround)#12
sahrizvi wants to merge 1 commit into
mainfrom
fix/altimate-code-stdin-wedge-workaround

Conversation

@sahrizvi

Copy link
Copy Markdown
Contributor

Summary

The altimate-code skill instructs invocations like:

altimate-code run "<task>" --yolo --output /tmp/altimate-result.md --dir "$(pwd)"

When the host (Claude Code's Bash tool, a CI runner, subprocess.run(..., stdin=None), a plugin spawn without stdio: "ignore") inherits stdin into the child without closing it, altimate-code run hangs at 0% CPU forever. Bun.stdin.text() waits for an EOF that never arrives — no session created, no log, no error, indistinguishable from a deadlock.

Full repro and root cause: AltimateAI/altimate-code#934.

This PR adds < /dev/null to every documented altimate-code run invocation in skills/altimate-code/SKILL.md as a transitional workaround that closes stdin from the caller side. Five invocations updated: minimal, recommended, and the three example patterns (expensive-queries, lineage, table-profile).

Why this is a workaround, not the final fix

The proper fix is at the source — AltimateAI/altimate-code#935 tightens the stdin-read guard in run.ts so the wedge cannot trigger regardless of caller-side stdin handling. That PR is out for review; once it ships in a tagged altimate-code release, the < /dev/null redirect here becomes redundant.

The cleanup is tracked as a separate issue with explicit action items: #11"Remove < /dev/null workaround once min altimate-code version includes stdin-wedge fix." When #935 ships, the followup PR will (a) replace each < /dev/null with a min-version prereq check in the existing "Prerequisite Check" section, and (b) remove the HTML comment added by this PR.

What this PR contains

  • 5 invocation patterns updated: < /dev/null appended (multi-line continuations get the redirect on a continuation line; single-line invocations get it inline).
  • 1 HTML comment placed next to the first occurrence, invisible in the rendered marketplace view, pointing at the tracking issue and #935. Visible to anyone who opens the raw markdown — the audience that matters when it's time to remove the workaround.

What this PR does NOT contain

  • No changes to other skills' SKILL.md files (only altimate-code calls altimate-code run as a subprocess).
  • No min-version prereq check yet — that lands in the followup PR once a release-with-#935 ships and we have a concrete version number.
  • No code changes — this is a SKILL.md change. SKILL.md is the instruction set the LLM reads when the skill fires, so behavioral correctness depends on this content matching the runtime; the diff is small but load-bearing.

Test plan

  • Local SKILL.md (with altimate-code-preview swap + this same < /dev/null pattern) has been in use against real workloads since 2026-06-04, no regressions observed.
  • Reviewer: from a non-TTY parent process, invoke altimate-code run "say hi" --yolo < /dev/null against the current unpatched altimate-code 0.8.7 binary — confirm it returns in ~1s instead of hanging.
  • Reviewer: confirm the < /dev/null doesn't break the pipe-only path (it doesn't — pipe-only invocations don't pass a positional message, and this PR only changes invocations that do pass a positional).

Links

`altimate-code run "<task>" --yolo` wedges silently on inherited
stdin when invoked as a subprocess (Claude Code's Bash tool, CI,
`subprocess.run(..., stdin=None)`, plugin hosts that don't pin
stdin to `/dev/null`). `Bun.stdin.text()` waits forever for an
EOF that never arrives, producing a 0% CPU hang with no session
created and no error.

Until the source-side fix in AltimateAI/altimate-code#935 lands
in a tagged release, every invocation pattern in this skill needs
`< /dev/null` to close stdin from the caller side. Otherwise any
Skill-fire from a non-TTY parent hangs.

Adds the redirect to all 5 documented invocations (minimal,
recommended, and the 3 example patterns). One HTML comment near
the first occurrence documents the lineage and points at the
tracking issue for the cleanup, so the next maintainer can lift
the workaround without spelunking git history.

Closes #11 will fire when the workaround is removed; this PR adds
the workaround in.
Comment on lines +44 to +48
<!-- DEPRECATED: remove `< /dev/null` once minimum supported altimate-code
contains AltimateAI/altimate-code#935 (stdin-wedge fix).
Tracked: https://github.com/AltimateAI/data-engineering-skills/issues/11
Applies to every `altimate-code run` invocation in this file. -->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nitpick
i think should not be part if it, If the goal is to release 935, let's skip this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay

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.

2 participants