Skip to content

Phase 0.9: Error messages & UX fixes (items 4-6)#78

Merged
mattleaverton merged 4 commits into
danshapiro:mainfrom
mattleaverton:impl/error-ux
Apr 2, 2026
Merged

Phase 0.9: Error messages & UX fixes (items 4-6)#78
mattleaverton merged 4 commits into
danshapiro:mainfrom
mattleaverton:impl/error-ux

Conversation

@mattleaverton

Copy link
Copy Markdown
Collaborator

Summary

  • CLI headless prompt bypass: Pipe y\n to stdin for Anthropic/Google CLI invocations so --dangerously-skip-permissions Y/n warning doesn't block automated runs
  • Actionable error hints: Add hint: lines to common first-run errors (missing backend, missing API key, missing llm_provider, unknown model ID, invalid backend config)
  • Worktree file-not-found context: When a tool_command fails with "not found", check if the script exists in the source repo but not the worktree and suggest git add && git commit

Test plan

  • Existing engine tests pass (225s full suite)
  • New test: TestRunWithConfig_FailsFastWhenProviderBackendMissing verifies hint presence
  • New test: TestValidate_LLMProviderRequired_Metaspec verifies Fix field on diagnostic
  • New tests: TestWorktreeNotFoundHint_* and TestExtractLeadingPath cover hint logic
  • Manual verification: built binary, triggered missing-backend error → hint displayed
  • Manual verification: ran tool graph with uncommitted script → worktree hint in progress log

🤖 Generated with Claude Code

mattleaverton and others added 4 commits April 1, 2026 16:39
Pipe "y\n" to stdin for arg-mode CLI invocations (Anthropic, Google)
so the --dangerously-skip-permissions Y/n warning doesn't block
automated runs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Missing provider backend: suggests adding backend to run config
- Missing API key: suggests exporting the env var or switching to CLI
- Missing llm_provider: suggests adding a model_stylesheet rule
- Unknown model ID: suggests checking spelling and format
- Validation errors now include Fix hints when available

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When a tool_command fails with "not found" or "No such file", check
whether the referenced script exists in the source repo but not the
worktree. If so, hint that the file needs to be committed to git.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The config validator catches empty/invalid backend values before the
runtime check does. Add hint suggesting the fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mattleaverton mattleaverton merged commit f563c2d into danshapiro:main Apr 2, 2026
1 check failed
leegonzales added a commit to leegonzales/kilroy that referenced this pull request Apr 3, 2026
engine.go — struct literal alignment drift from PR danshapiro#76 (decision logging)
worktree_hint_test.go — comment alignment drift from PR danshapiro#78 (error UX)

No logic changes. Pure whitespace.

gofmt -l . → clean
go vet ./... → clean
go build ./... → clean

🤖 Servitor heartbeat fix — unblocks main CI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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