feat(kugetsu): set GIT_EDITOR=cat in kugetsu init for non-interactive git operations #70

Closed
opened 2026-04-01 10:46:45 +02:00 by shoko · 0 comments
Owner

Problem

When PM or dev agents run git rebase/conflict resolution in headless mode, git opens vim which requires TTY. This causes operations to hang waiting for input.

Example error:

Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal

Solution

In kugetsu init, set GIT_EDITOR=cat in the opencode session environment. This tells git to use cat as editor, which outputs to stdout and exits immediately instead of opening vim.

Implementation

In kugetsu init, when creating base session and pm-agent session, set environment:

export GIT_EDITOR=cat
export EDITOR=cat

This ensures all git operations (rebase, commit --amend, etc.) that might open an editor use cat instead.

Tasks

  1. Add GIT_EDITOR=cat and EDITOR=cat to kugetsu init
  2. Document that git operations will use non-interactive mode
  3. Verify rebase --continue works without TTY
## Problem When PM or dev agents run git rebase/conflict resolution in headless mode, git opens vim which requires TTY. This causes operations to hang waiting for input. Example error: ``` Vim: Warning: Output is not to a terminal Vim: Warning: Input is not from a terminal ``` ## Solution In kugetsu init, set `GIT_EDITOR=cat` in the opencode session environment. This tells git to use `cat` as editor, which outputs to stdout and exits immediately instead of opening vim. ## Implementation In kugetsu init, when creating base session and pm-agent session, set environment: ```bash export GIT_EDITOR=cat export EDITOR=cat ``` This ensures all git operations (rebase, commit --amend, etc.) that might open an editor use cat instead. ## Tasks 1. Add GIT_EDITOR=cat and EDITOR=cat to kugetsu init 2. Document that git operations will use non-interactive mode 3. Verify rebase --continue works without TTY
shoko closed this issue 2026-04-01 10:55:00 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#70