Skip to content

feat(agents): add repo sessions to agents shell - #14347

Merged
gregkonush merged 7 commits into
mainfrom
codex/agents-shell-repo-session
Sep 6, 2026
Merged

feat(agents): add repo sessions to agents shell#14347
gregkonush merged 7 commits into
mainfrom
codex/agents-shell-repo-session

Conversation

@gregkonush

@gregkonush gregkonush commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Add repo_session_open, repo_session_status, and repo_session_close to create and manage isolated ChatGPT worktrees from a freshly fetched base branch.
  • Let shell, git, kubectl cwd handling, search, read_file, and apply_patch accept a sessionId so agents no longer manage worktree paths manually.
  • Keep dirty sessions and sessions with running shell jobs from being closed accidentally; forced close terminates session jobs and retains the branch.
  • Update the built-in agent guide to use repo sessions as the default direct ChatGPT workflow.

Related Issues

None.

Testing

  • bun ../../node_modules/.bun/node_modules/vitest/vitest.mjs run --config vitest.config.ts src/server/agents-shell-mcp.test.ts from services/agents: 24 tests passed.
  • node ../../node_modules/typescript/bin/tsc --noEmit -p tsconfig.json from services/agents: passed.
  • node ../../node_modules/oxlint/bin/oxlint --config ../../.oxlintrc.json src/server/agents-shell-mcp.test.ts src/server/agents-shell/*.ts src/server/agents-shell/tools/*.ts: 0 warnings, 0 errors.
  • node node_modules/oxfmt/bin/oxfmt --check services/agents/src/server/agents-shell-mcp.test.ts services/agents/src/server/agents-shell/*.ts services/agents/src/server/agents-shell/tools/*.ts: passed.
  • git diff --cached --check and post-rebase git diff --check: passed.

Breaking Changes

None. Existing cwd callers remain supported; sessionId is additive and becomes the preferred direct ChatGPT workflow.

Checklist

  • Testing section documents the exact validation performed (or N/A with justification).
  • Screenshots and Breaking Changes sections are handled appropriately (removed or filled in).
  • Documentation, release notes, and follow-ups are updated or tracked.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T04:02:19.366886Z 4d52f8d New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c99b17983d

ℹ️ 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".

Comment thread services/agents/src/server/agents-shell/repo-sessions.ts Outdated
Comment thread services/agents/src/server/agents-shell/runner.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dfc717ea2f

ℹ️ 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".

Comment thread services/agents/src/server/agents-shell/runner.ts Outdated
Comment thread services/agents/src/server/agents-shell/runner.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5f105c14b

ℹ️ 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".

Comment thread services/agents/src/server/agents-shell/runner.ts Outdated
Comment thread services/agents/src/server/agents-shell/runner.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d52f8d41d

ℹ️ 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".

Comment thread services/agents/src/server/agents-shell/runner.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@gregkonush
gregkonush merged commit 4f7620e into main Sep 6, 2026
17 checks passed
@gregkonush
gregkonush deleted the codex/agents-shell-repo-session branch September 6, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant