Skip to content

fix(system): use real newlines in Linear params; bare clone tracks origin/main#14

Merged
sethvoltz merged 1 commit intomainfrom
feature/prompt-newline-fix
May 3, 2026
Merged

fix(system): use real newlines in Linear params; bare clone tracks origin/main#14
sethvoltz merged 1 commit intomainfrom
feature/prompt-newline-fix

Conversation

@sethvoltz
Copy link
Copy Markdown
Owner

Summary

  • linear.md: Add ## String parameter formatting section near the top of the orchestrator protocol, with a clear before/after example. Root cause of FRI-50: the orchestrator over-escapes multi-line string params with \n instead of actual newlines, which appear literally in Linear.
  • linear-builder.md: Add the same one-line note for builders posting linear_createComment with multi-line bodies.
  • workspace.ts: Change ensureBareClone's cache-refresh fetch from git fetch --all to a two-refspec git fetch origin that also populates refs/remotes/origin/*. Before this, getDefaultBranch returned plain main for bare clones (no tracking ref existed); now it returns origin/main consistently for both local-repo and bare-clone paths.

Test plan

  • All 385 tests pass (pnpm test)
  • Daemon and CLI type checks pass (tsc --noEmit)
  • Verify orchestrator creates Linear tickets/comments with proper line breaks after deploy
  • Verify new builder worktrees from bare clones branch from origin/main

Closes FRI-50.

🤖 Generated with Claude Code

…hing from origin/main

linear.md and linear-builder.md: add explicit guidance to use actual
newline characters in description/body string params for Linear MCP tools.
The MCP layer passes strings verbatim — literal \n escape sequences appear
as-is in the Linear UI, breaking formatted ticket descriptions and comments.

workspace.ts: change ensureBareClone's fetch to populate
refs/remotes/origin/* in addition to refs/heads/*. Before this change,
getDefaultBranch fell through to the plain branch name for bare clones
because origin/<branch> didn't exist as a tracking ref. The two-refspec
fetch ensures origin/main is always present after a cache refresh, so
all new worktrees (both local-repo and bare-clone paths) start from the
remote tracking ref rather than a potentially stale local branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sethvoltz sethvoltz merged commit 43a73ab into main May 3, 2026
2 checks passed
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.

1 participant