Skip to content

do not set ENTIRE_TEST_TTY=0 for actual agent execution in E2E tests#579

Merged
gtrrz-victor merged 2 commits intomainfrom
soph/do-not-use-entire-test-tty-for-agent-execution
Mar 3, 2026
Merged

do not set ENTIRE_TEST_TTY=0 for actual agent execution in E2E tests#579
gtrrz-victor merged 2 commits intomainfrom
soph/do-not-use-entire-test-tty-for-agent-execution

Conversation

@Soph
Copy link
Collaborator

@Soph Soph commented Mar 2, 2026

This hides any issues with the agent doing inline commits and TTY or used env variables (like 'GEMINI_CLI=1orGIT_TERMINAL_PROMPT=0` changes or hides problems with new agent integrations.

So only set that when it's needed, for example when doing git commit -m "" for manual commits since then we want to hide the prompt.

@Soph Soph requested a review from a team as a code owner March 2, 2026 15:55
Copilot AI review requested due to automatic review settings March 2, 2026 15:55
@cursor
Copy link

cursor bot commented Mar 2, 2026

PR Summary

Medium Risk
Changes E2E agent execution environments and tmux session launch commands, which may expose previously-masked TTY/env-dependent behaviors and cause new test flakiness. Scope is limited to the E2E harness (no production code paths).

Overview
Stops forcing ENTIRE_TEST_TTY=0 when running E2E agents (claude, droid, gemini, opencode) so they execute with a more realistic environment and can surface TTY/env-related issues.

This removes ENTIRE_TEST_TTY=0 from both one-shot prompt execution envs and interactive NewTmuxSession startup commands, while keeping other agent-specific env settings (e.g. ACCESSIBLE=1, Claude’s config isolation) intact.

Written by Cursor Bugbot for commit 145bf93. Configure here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts E2E agent runners so they no longer force ENTIRE_TEST_TTY=0 during actual agent execution, helping E2E runs surface real-world TTY/env-dependent behaviors (e.g., inline commits, GEMINI_CLI=1, GIT_TERMINAL_PROMPT=0).

Changes:

  • Removed ENTIRE_TEST_TTY=0 from non-interactive agent executions (RunPrompt) for opencode, gemini, and droid.
  • Removed ENTIRE_TEST_TTY=0 from tmux-based interactive session launches (StartSession) for opencode, gemini, and droid.
  • Removed ENTIRE_TEST_TTY=0 from Claude’s cleaned env / env args for both prompt runs and tmux sessions.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
e2e/agents/opencode.go Stops forcing ENTIRE_TEST_TTY=0 for opencode prompt runs and tmux sessions.
e2e/agents/gemini.go Stops forcing ENTIRE_TEST_TTY=0 while retaining ACCESSIBLE=1 and headless-mode-related env handling.
e2e/agents/droid.go Stops forcing ENTIRE_TEST_TTY=0 for droid prompt runs and tmux sessions.
e2e/agents/claude.go Removes ENTIRE_TEST_TTY=0 from Claude’s cleaned env and tmux env args.
Comments suppressed due to low confidence (1)

e2e/agents/claude.go:132

  • This stops forcing ENTIRE_TEST_TTY=0, but cleanEnv() currently only strips CLAUDECODE=. If ENTIRE_TEST_TTY is set in the parent environment (local debugging, other test harnesses), it will still be passed through and can reintroduce the masking this PR is trying to avoid. Consider also stripping ENTIRE_TEST_TTY in cleanEnv() (and/or unsetting it for the tmux session).
	env := append(cleanEnv(),
		"ACCESSIBLE=1",

		// See https://code.claude.com/docs/en/settings - without this setting Claude was going off and
		// trying to Git-clone its plugin marketplace, which meant calling git commands that could fail
		// due to a user's exotic config (e.g. in paul's case, needing SSH-keychain access granted every
		// time).  That's no good, so for the E2E tests, we tell Claude not to make calls to auto-update
		// itself, clone its plugins, etc.
		"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1",
		"CLAUDE_CONFIG_DIR="+configDir,
	)

Entire-Checkpoint: 5c54c447aad1
@gtrrz-victor gtrrz-victor merged commit ff6998e into main Mar 3, 2026
5 of 7 checks passed
@gtrrz-victor gtrrz-victor deleted the soph/do-not-use-entire-test-tty-for-agent-execution branch March 3, 2026 00:02
alishakawaguchi added a commit that referenced this pull request Mar 3, 2026
Resolve merge conflict markers in e2e.yml and manual_commit_hooks.go
from merging main into the kiro-oneshot branch. Strip ENTIRE_TEST_TTY
from Kiro's E2E tmux sessions so agents exercise real TTY detection
paths, matching the pattern established in PR #579.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 838559434a74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants