Skip to content

Conversation

@newhook
Copy link
Owner

@newhook newhook commented Jan 10, 2026

Summary

This PR replaces direct Claude CLI invocation with zellij-based execution to provide proper terminal UI display when running Claude Code.

Key Changes

  • Zellij session management: Uses a dedicated autoclaude zellij session to run Claude instances
  • Named panes: Each bead gets its own named pane, allowing for easy identification and resumption
  • Proper prompt delivery: Sends prompts via zellij action write-chars for proper terminal input handling
  • Completion detection: Claude creates a temp file when done, which is monitored to detect completion
  • Graceful branch handling: Existing git branches are checked out instead of failing
  • Session resumption: Skips pane creation if a pane for the bead already exists

How it works

  1. Ensures the autoclaude zellij session exists (creates if needed)
  2. Creates a new pane named after the bead ID running Claude Code
  3. Sends the prompt to the pane via zellij actions
  4. Monitors for a completion file that Claude creates when done
  5. Sends /exit to Claude when complete

Dependencies

  • Requires zellij to be installed

Test plan

  • Run ac run <bead-id> with zellij installed
  • Verify Claude appears in the autoclaude zellij session
  • Verify prompt is delivered and Claude responds
  • Verify completion detection works and Claude exits

🤖 Generated with Claude Code

newhook and others added 2 commits January 9, 2026 21:52
Replace direct Claude CLI invocation with zellij-based execution for
proper terminal UI display. Key changes:

- Run Claude in named zellij panes within 'autoclaude' session
- Send prompts via zellij action write-chars for proper input handling
- Monitor completion via temp file creation instead of screen scraping
- Skip pane creation if bead pane already exists (for resumption)
- Handle existing git branches gracefully (checkout instead of fail)
- Update prompt to check for existing work on branch

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace direct Claude CLI invocation with zellij-based execution for
proper terminal UI display. Key changes:

- Run Claude in named zellij panes within 'autoclaude' session
- Send prompts via zellij action write-chars for proper input handling
- Monitor completion via temp file creation instead of screen scraping
- Skip pane creation if bead pane already exists (for resumption)
- Handle existing git branches gracefully (checkout instead of fail)
- Update prompt to check for existing work on branch
- Claude now handles PR creation, bead closing, and PR merging

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@newhook newhook force-pushed the zellij-integration branch from 0bcd83f to 8b3888d Compare January 10, 2026 02:57
@newhook newhook merged commit eaf1134 into main Jan 10, 2026
@newhook newhook deleted the zellij-integration branch January 10, 2026 15:05
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