tea comment: Heredoc syntax causes command to fail silently #10

Closed
opened 2025-12-31 16:30:00 +00:00 by HugoNijhuis · 0 comments
Owner

Context

Discovered during auto-review of PR #9. The code-reviewer agent's comment was never posted.

Problem

When using heredoc syntax with tea comment, the command gets automatically backgrounded and fails silently:

# Fails - gets backgrounded, no output, comment not posted
tea comment 9 "$(cat <<'EOF'
## Review
Content here
EOF
)"
# Works - runs synchronously, comment posts successfully
tea comment 9 "## Review

Content here"

Root Cause

The heredoc $(cat <<'EOF'...EOF) syntax triggers the Bash tool to run in background mode. When backgrounded:

  1. Shell substitution $(...) doesn't execute properly
  2. Command produces no output
  3. Comment is never posted to Gitea

Suggested Fix

Update skills/gitea/SKILL.md Comments section to:

  1. Remove the heredoc example
  2. Add a warning about avoiding heredocs with tea comment
  3. Show multiline comments using simple quoted strings with literal newlines

Affected Files

  • skills/gitea/SKILL.md (Comments section, lines 117-129)
## Context Discovered during auto-review of PR #9. The code-reviewer agent's comment was never posted. ## Problem When using heredoc syntax with `tea comment`, the command gets automatically backgrounded and fails silently: ```bash # Fails - gets backgrounded, no output, comment not posted tea comment 9 "$(cat <<'EOF' ## Review Content here EOF )" ``` ```bash # Works - runs synchronously, comment posts successfully tea comment 9 "## Review Content here" ``` ## Root Cause The heredoc `$(cat <<'EOF'...EOF)` syntax triggers the Bash tool to run in background mode. When backgrounded: 1. Shell substitution `$(...)` doesn't execute properly 2. Command produces no output 3. Comment is never posted to Gitea ## Suggested Fix Update `skills/gitea/SKILL.md` Comments section to: 1. Remove the heredoc example 2. Add a warning about avoiding heredocs with `tea comment` 3. Show multiline comments using simple quoted strings with literal newlines ## Affected Files - skills/gitea/SKILL.md (Comments section, lines 117-129)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: flowmade-one/architecture#10