[codex] Add quiet terminal mode for agents#3213
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5f170c32d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| final TelnetClient telnet = telnetConsole.isQuiet() | ||
| ? new TelnetClient("arthas-agent") | ||
| : new TelnetClient(); |
There was a problem hiding this comment.
Handle prompts at column 0 for quiet batch sessions
When --quiet is combined with -c/-f, this terminal type suppresses the welcome banner, so the first server output can be the prompt itself at the start of the stream. batchModeRun only releases the command loop when line.indexOf(PROMPT) > 0, so a prompt at index 0 is ignored and the client hangs indefinitely with the default timeout before sending the first command. Either avoid quiet mode for batch runs or update the prompt detection to accept index 0.
Useful? React with 👍 / 👎.
Summary
arthas-client --quietsupport with thearthas-agentterminal typeCommandExecutor.createSession()path so session creation is explicitValidation
./mvnw -pl arthas-mcp-server -Dtest=ArthasCommandSessionManagerQuietTest,ArthasCommandContextAuthTest,DefaultCreateTaskContextAuthTest test./mvnw -pl core -am -Dtest=ShellImplQuietTest,TtyWebSocketFrameHandlerQuietTest,CommandExecutorImplQuietSessionTest -Dsurefire.failIfNoSpecifiedTests=false test./mvnw -pl client -DskipTests compile./mvnw -pl core -am -DskipITs testgit diff --check