Skip to content

Commit 6eaed8a

Browse files
committed
Print agent prompt if CLAUDECODE or CODEX_SANDBOX is present
1 parent 4d91679 commit 6eaed8a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plain/plain/cli/agent.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import shlex
23
import subprocess
34

@@ -20,6 +21,11 @@ def prompt_agent(
2021
True if the agent command succeeded (or no agent command was provided),
2122
False if the agent command failed.
2223
"""
24+
# Check if running inside an agent and just print the prompt if so
25+
if os.environ.get("CLAUDECODE") or os.environ.get("CODEX_SANDBOX"):
26+
click.echo(prompt)
27+
return True
28+
2329
if print_only or not agent_command:
2430
click.echo(prompt)
2531
if not print_only:

0 commit comments

Comments
 (0)