From b09bf468f04ce6a2b859961d34e640e15cb00613 Mon Sep 17 00:00:00 2001 From: jared Date: Tue, 14 Jul 2026 15:06:16 -0400 Subject: [PATCH] vault: session notes 2026-07-14 --- journal/2026-07-14.md | 7 +++ reference/tea-cli-comment-blocks-on-stdin.md | 51 ++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 reference/tea-cli-comment-blocks-on-stdin.md diff --git a/journal/2026-07-14.md b/journal/2026-07-14.md index 50df71f..c2abf10 100644 --- a/journal/2026-07-14.md +++ b/journal/2026-07-14.md @@ -122,3 +122,10 @@ tags: [scope/global, type/log] **Vault notes touched:** /home/jared/Documents/SecondBrain/2026-06-08-graphify-installation-setup.md /home/jared/Documents/SecondBrain/2026-06-08-graphify-installation-setup.md + +## Session — 2026-07-14T18:59:29Z + +**Project:** /home/jared/dev/cc-plugins +**Reason:** prompt_input_exit +**Vault notes touched:** +(none) diff --git a/reference/tea-cli-comment-blocks-on-stdin.md b/reference/tea-cli-comment-blocks-on-stdin.md new file mode 100644 index 0000000..79113fd --- /dev/null +++ b/reference/tea-cli-comment-blocks-on-stdin.md @@ -0,0 +1,51 @@ +--- +summary: The tea CLI's `comment` subcommand hangs indefinitely unless stdin is closed, even when the comment body is passed as a positional argument. +tags: + - type/reference + - tool/tea + - tool/forgejo +scope: global +source: cc-os +date: 2026-07-14 +last_updated: 2026-07-14 +--- + +# tea CLI: `comment` blocks on stdin + +`tea comment --repo / ""` **hangs indefinitely** — it blocks reading +stdin even though the body was supplied as a positional argument. Observed as a 2-minute +timeout in an agent session; the request never reached the server (no comment was posted). + +The fix is to close stdin explicitly: + +```bash +tea comment 45 --repo jared/cc-os "$(cat body.md)" < /dev/null +``` + +The identical command with `< /dev/null` appended completed in seconds and posted correctly. + +## Scope of the behavior — do not over-generalize + +Only `tea comment` was observed hanging. In the same session, these ran **without** +`< /dev/null` and returned normally: + +- `tea issues list --repo ...` +- `tea issues --repo ...` (view) +- `tea issues edit --repo ... --add-assignees ` + +So this is **not** a blanket property of every `tea` subcommand. `tea issues create` and +`tea issues close` were never tested without the guard, so their behavior is unknown. + +Cheap defensive habit for any agent scripting tea: append `< /dev/null` to tea calls in +non-interactive contexts. It is harmless where it isn't needed, and it converts a silent +2-minute hang into a normal completion. + +## Why it matters + +An agent scripting Forgejo issue updates will appear to hang with no error and no output. +The cause is non-obvious (the body *was* provided, so there is no apparent reason to read +stdin) and the tea docs do not mention stdin behavior for `comment`. Without knowing this, +the natural next move is to retry the command — which hangs again. + +Evidence is one reproduction plus one successful retry differing only in the redirect; the +stdin hypothesis is strong but not proven against tea's source.