[Bug] execProcess in git tools lacks stdin closure, credentials timeout, and GIT_TERMINAL_PROMPT=0
Description
In source/tools/git/utils.ts, execProcess spawns git and gh processes with default inherited process environment variables and unmanaged stdin. If any git command triggers an interactive prompt (such as SSH passphrase prompt, Git credential helper login prompt, or GPG passphrase prompt during git_commit or git_pr), git blocks indefinitely waiting on stdin. Because execProcess sets no timeout, does not pass GIT_TERMINAL_PROMPT: '0', and does not close or ignore stdin, the entire nanocoder process hangs permanently and cannot recover without being SIGKILLed.
Environment
- OS: Linux / macOS / Windows
- Node version: v22.14.0
- Nanocoder version: 1.30.0
- Provider: Any
- Model: Any
Steps to Reproduce
- Configure a git repository with a remote requiring SSH key passphrase or credentials not cached in the environment.
- Have agent execute
git_pror a git operation requiring authentication. - Git prompts for credentials on stdin.
- Nanocoder hangs completely and stops responding.
Expected Behavior
Git commands should fail fast with a non-zero exit or error message when credentials cannot be acquired non-interactively, allowing the agent to inform the user.
Actual Behavior
Process hangs forever in the background; the UI freezes.
Logs/Screenshots
In source/tools/git/utils.ts:
function execProcess(
command: string,
args: string[],
label: string,
): Promise<string> {
return new Promise((resolve, reject) => {
// Missing env: { ...process.env, GIT_TERMINAL_PROMPT: '0' }
// Missing stdio: ['ignore', 'pipe', 'pipe'] or proc.stdin.end()
// Missing timeout / abort signal handling
const proc = spawn(command, args);
Contrast with source/skills/install.ts:255 where GIT_ENV = {...process.env, GIT_TERMINAL_PROMPT: '0'} is properly set.
Additional Context
- [x] I have searched existing issues to ensure this is not a duplicate
- [x] I can reproduce this issue consistently
- [x] This issue occurs with the latest version of nanocoder
@akramcodez can you assign this issue to me ?
working on this @akramcodez
@akramcodez fixed it , just assign and then i'll raise the pr in morning