Skip to content

Conversation

@zhao-oai
Copy link
Collaborator

@zhao-oai zhao-oai commented Nov 5, 2025

adding new user command event, logic in TUI to render user command events

@zhao-oai zhao-oai force-pushed the split/user-shell/part-1 branch from 47c999a to db43ab0 Compare November 5, 2025 07:18
@etraut-openai etraut-openai added the oai-pr PRs posted by Codex team members label Nov 5, 2025
@zhao-oai zhao-oai force-pushed the split/user-shell/part-1 branch 4 times, most recently from c042acf to db43ab0 Compare November 5, 2025 19:11
| EventMsg::ExitedReviewMode(_)
| EventMsg::UndoCompleted(_)
| EventMsg::TurnAborted(_) => true,
EventMsg::ExecCommandBegin(ev) => ev.is_user_shell_command,
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we want to persist the user ones?

Copy link
Collaborator Author

@zhao-oai zhao-oai Nov 6, 2025

Choose a reason for hiding this comment

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

since the model will now be able to see the outputs of user shell commands, it wouldn't make sense if they are lost after resuming conversation. we're also persisting the associated response items since user shell input / outputs are represented as User Messages.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should persist only the response item user message, the event message is just for the UI. We decided to ignore execitems to make it easy to keep things backward comp.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure! it's done

expression: rendered
---
Ran seq 1 10 1>&2 && false
Ran: seq 1 10 1>&2 && false
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like an unrelated change.

Copy link
Collaborator Author

@zhao-oai zhao-oai Nov 7, 2025

Choose a reason for hiding this comment

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

i thought adding a colon would make it clearer since user commands will render as

You Ran: ls instead of You Ran ls for example

this is somewhat adjacent though so i'll get this in another PR

/// True when this exec was initiated directly by the user (e.g. bang command),
/// not by the agent/model. Defaults to false for backwards compatibility.
#[serde(default)]
pub is_user_shell_command: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we actually need this on the delta itself of can it be on start ?

Copy link
Collaborator

@pakrym-oai pakrym-oai left a comment

Choose a reason for hiding this comment

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

is it enought to have is_user_shell_command only on the start?

let title = if self.is_active() {
"Running"
} else if call.is_user_shell_command {
"You Ran"
Copy link
Collaborator

Choose a reason for hiding this comment

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

You ran ??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Screenshot 2025-11-07 at 2 06 14 PM

yes i feel like this is a lot clearer vs. having it all be "Ran"

Copy link
Collaborator

@pakrym-oai pakrym-oai Nov 8, 2025

Choose a reason for hiding this comment

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

I mean You ran ... lowercase r.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@codex could you change "You Ran" to "You ran"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Summary

Testing

  • just fmt (warnings about imports_granularity = Item being nightly-only)

View task →

@zhao-oai zhao-oai force-pushed the split/user-shell/part-1 branch from e28905c to 3f81883 Compare November 7, 2025 22:21
@zhao-oai zhao-oai force-pushed the split/user-shell/part-1 branch from 3f81883 to 056d13f Compare November 7, 2025 22:27
emit new events from user shell tasks, disable sandboxing for user shell
commands, and present user shell commands to model
@zhao-oai zhao-oai enabled auto-merge (squash) November 10, 2025 18:54
@zhao-oai zhao-oai merged commit 9808864 into main Nov 10, 2025
25 checks passed
@zhao-oai zhao-oai deleted the split/user-shell/part-1 branch November 10, 2025 19:18
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai-pr PRs posted by Codex team members

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants