Skip to content

[merge] v0.115.3 and its hot fixes into v0.115.4 - #6730

Closed
mmabrouk wants to merge 2 commits into
release/v0.115.4from
merge/hotfix-v0.115.3-into-v0.115.4
Closed

[merge] v0.115.3 and its hot fixes into v0.115.4#6730
mmabrouk wants to merge 2 commits into
release/v0.115.4from
merge/hotfix-v0.115.3-into-v0.115.4

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Sep 9, 2026

Copy link
Copy Markdown
Member

What this merges

hotfix/v0.115.3 into release/v0.115.4, at 3807043. That branch is the tip of release/v0.115.3 and carries the whole v0.115.3 line plus its two hot fixes:

One correction to the premise this was opened on. hotfix/v0.115.3 is not main plus those two fixes: main at 204703f is not an ancestor of it. release/v0.115.3 and hotfix/v0.115.3 point at the same commit, so everything from v0.115.3 does arrive here. What does not arrive is one automated commit that landed on main directly, 7c49baa, an API-reference refresh touching three files under docs/. release/v0.115.4 does not have it either. It is out of the scope this PR was asked for and it regenerates on its own, so I left it alone rather than dragging a main merge into this diff.

The merge base with release/v0.115.4 is f676a77, from 2026-09-07. release/v0.115.4 carries 130 commits of its own since then, most of them Ashraf's: the classic-mode redirect loop (#6648), sending a Classic-mode user out of /m (#6645), per-user /m preferences keyed by auth user id, drive-file @-mentions in the composer, and the mobile-desktop parity pass.

Sixteen files conflicted. The rule I applied throughout: keep both behaviors, and where the two genuinely compete, keep the v0.115.4 structure and re-apply the v0.115.3 fix inside it. Every place where that was a real choice is listed under "Please check" at the bottom.

The sixteen conflicts

Markdown link hardening (#6659, #6666, #6675)

v0.115.4 unified both hosts' markdown renderers into a new shared ChatMarkdown. v0.115.3 hardened the anchor in each host separately. The hardening moved into the shared renderer, so /w and /m both keep it and cannot drift again.

File Resolution
web/oss/src/components/AgentChatSlice/assets/markdown.tsx v0.115.4. It re-exports MD_REHYPE_PLUGINS so the shipped link-gate test keeps its import path.
web/mobile/src/features/chat/AssistantMarkdown.tsx v0.115.4, plus the drive resolver so a relative href still opens the file on /m. Code spans stay plain there, as on v0.115.3.
web/packages/agenta-chat/src/components/ChatMarkdown.tsx Not conflicted, but edited: it now carries the host refusal, the pre-harden respelling, and the percent-decode before drive resolution.
web/mobile/src/features/chat/DriveLink.tsx Deleted. The shared renderer does exactly what it did.

The rename menu (#6686)

Both branches built onRenameRow on the card list independently. The one thing only v0.115.3 has is the deferred menu handoff, and it is the fix that matters: an editor opened while the menu still holds its focus trap is blurred straight back out, and a blur commits. That is kept everywhere.

File Resolution
web/packages/agenta-sessions-ui/src/SessionCardList.tsx v0.115.3's deferred select and its editor placement, over v0.115.4's phone layout. The editor replaces the open button rather than sitting inside it, because an input is not valid inside a button.
web/packages/agenta-sessions-ui/src/SessionTabRail.tsx v0.115.4, whose onRenameTab is a superset: pencil, double-click, the menu and Alt+R all reach one editor. The menu route was changed to the deferred form.
web/packages/agenta-sessions-ui/src/SessionListCard.tsx Doc comment only. Kept v0.115.3's, which names the bug: without the prop the entry is inert.
web/packages/agenta-sessions-ui/src/SessionListPanel.tsx Same.
web/packages/agenta-entity-ui/src/agent/AgentOverviewBody.tsx Identical on both sides; kept v0.115.4's doc comment.
web/packages/agenta-home-ui/src/HomeOverview.tsx Same feature, two names. Kept v0.115.4's onSessionRenameRow.
web/mobile/src/features/home/HomeScreen.tsx v0.115.4's prop name.
web/mobile/src/features/chat/SessionTabs.tsx v0.115.4, which also carries the tab-close verbs.
web/oss/src/components/AgentChatSlice/components/SessionTagBar.tsx Both imports. Only the import line conflicted.

web/oss/src/components/pages/agent-home/StripHome.tsx was not conflicted but follows the kept prop name.

Permissions simplification (#6641) and provider-key presence (#6691)

v0.115.3 removed the Claude, Pi and sandbox permission editors and promoted permissions out of Advanced into its own section. v0.115.4 rebuilt Advanced as a section rail. Both hold: the reduced group set, rendered through the rail.

File Resolution
.../agentTemplate/useModelHarness.tsx v0.115.4's rail over v0.115.3's group set. The Permissions panel is gone from Advanced, because permissions is its own section now and would otherwise render twice. Execution keeps v0.115.3's shortened caption. Custom secrets became a rail panel, see below.
.../agentTemplate/BuildKitSection.tsx v0.115.4's plain-panel markup, minus everything v0.115.3 deleted: the sandbox permission rows, formatPermissionValue and PermissionOverrideHint.
web/packages/agenta-entity-ui/src/agent/AgentConfigSummaryCard.tsx v0.115.4's model row, which states the model alone and is titled "Model". v0.115.3's Permissions row and its read-only copy.
web/storybook/stories/entity-ui/BuildKitSection.stories.tsx v0.115.4's markup for the antd half, minus the same deletions.

The composer

File Resolution
web/packages/agenta-chat/src/hooks/index.ts Union of both export lists. All five hook files exist.

Tests carried onto the new structure

A second commit fixes suites that pass on either branch alone and fail only once the two meet. None of these is a product change.

  • The mobile link test drove AssistantMarkdown's own component map, which moved into ChatMarkdown. It drives the shared one now, with the resolver the mobile surface supplies. Every assertion is unchanged.
  • The slash-command test sat beside a hook v0.115.4 moved into @agenta/chat, deleting the test with it. It moved to the package and dropped the host stubs the hook now takes as props.
  • Two Advanced-drawer suites navigated an accordion that is a rail now.
  • The config summary card row is "Model".
  • The admission suite replaced @agenta/entities/session wholesale, and the composer's file palette reads a real export of it.
  • Two Next versions resolve in this workspace, so a test that mounts a package component cannot satisfy its useRouter. Both apps' vitest configs pin one copy per run.

Checks

Check Result
Conflict markers None. git diff --check clean.
Typecheck, packages chat, sessions-ui, entity-ui, home-ui all clean
Typecheck, apps oss, ee, mobile all clean
Lint, per package chat, entity-ui, sessions-ui, home-ui, storybook all clean
Lint, apps oss clean. mobile has 5 warnings and no errors, all pre-existing and in files this merge does not touch.
Prettier Clean across every touched file
Unit tests, @agenta/chat 1012 passed
Unit tests, @agenta/entity-ui 729 passed
Unit tests, @agenta/sessions-ui 25 passed
Unit tests, @agenta/oss 517 passed, 1 skipped
Unit tests, @agenta/mobile 191 passed

Live QA

An EE dev stack built from this branch, at http://144.76.237.122:8480, compose project
agenta-ee-dev-merge1154. Image tags were renamed first so the build could not stage images
under any other stack on the box. Evidence, including eleven screenshots, is at
~/agenta-qa-evidence/2026-09-09-merge-1153-into-1154/.

# Check Result
1 /m home screen renders PASS
2 Provider credential drawn from value_status, never the write-only key (#6691) PASS
3 Classic mode sends the user out of /m (#6645) PASS
4 No /w to /m redirect loop (#6648), sampled 15 times across two navigations PASS
5 Agent overview config card on /m: a "Model" row stating the model alone, and a "Permissions" row PASS
6 The same card on /w PASS
7 Permissions is its own section; no Claude, Pi or sandbox permission editors remain (#6641) PASS
8 Advanced renders as a section rail, with Build kit and Custom secrets PASS
9 Build kit shows per-op tools with switches and Locked markers, and no sandbox permission rows PASS
10 The Custom secrets panel opens and renders PASS
11 The slash palette opens from the merged hooks index PASS
12 The custom OpenAI-compatible provider is offered via Pi only, never Claude (#6694) PASS
13 The session tab strip renders PASS
14 Rename from the tab menu opens the inline editor, focused and pre-filled (#6686) PASS
15 The rename commits and reaches the sidebar list PASS
16 A sent message shows its row at once (#6658) UNREACHED
17 A relative file link in a reply opens; a //host link is refused UNREACHED
18 Rename from the sessions list row menu UNREACHED
19 @-mention of a drive file UNREACHED

Cell 14 is the one worth reading: it is the #6686 deferred handoff, the fix that keeps the
editor alive past the menu's focus trap, working on the merged code.

The last four need a completed agent run and no run completes on this stack. The composer
refuses to send before issuing any request, and the API log shows no run call at all: the
client's runnable-route check does not pass for the curated model routes with a plain OpenAI
key. The stored key is fine, which cell 2 shows. That is the local provider-key gate, not
anything this merge changed. With no run there is no reply to render markdown into and no
session in the list, so cells 17 and 18 have nothing to act on.

Standing in for them: cell 17 is covered by 15 link-gate tests that render the merged shared
renderer end to end, including the whole #6666 host-refusal list; cells 14 and 15 exercise the
same rename machinery cell 18 would, on another surface; cells 16 and 19 sit on code that
merged without conflict.

Please check

Four places where the two branches genuinely competed and I had to choose.

  1. Custom secrets became a rail panel. On v0.115.3 the Advanced body always rendered a Custom secrets section. v0.115.4's rail has three panels and none of them is that section, so on release/v0.115.4 as it stands Custom secrets is unreachable outside a focus filter. Taking the rail unchanged would have taken that section away from v0.115.3 users, so I gave it a panel. If you would rather match release/v0.115.4 exactly, that panel is the thing to remove.

  2. The Permissions panel is gone from Advanced. [feat] Simplify agent permissions and allow routine work by default #6641 made permissions its own top-level section. Leaving v0.115.4's Advanced rail panel in place would render the same control twice. I dropped the panel.

  3. /m code spans stay plain. The shared renderer resolves both anchors and code spans against the drive. v0.115.3's /m resolved anchors only, so I added an inlineCodeLinks flag and turned it off there. Turning it on would give /m inline file links, which is parity, but neither branch shipped it.

  4. Prop names. HomeOverview gained the same rename callback on both sides under two names. I kept v0.115.4's onSessionRenameRow and updated the one v0.115.3 call site.

One smaller call: the mobile relative-href fallback. When a relative href does not resolve to a drive file, /m now renders an external anchor instead of plain text, which is what the desktop already did and what v0.115.4's /m did.

Mahmoud Mabrouk added 2 commits September 9, 2026 13:28
Merges hotfix/v0.115.3 (main 204703f plus #6722 and #6723) into
release/v0.115.4.

Sixteen files conflicted, in four groups. Where the two sides competed the
115.4 structure wins and the 115.3 fix is re-applied inside it.

- Markdown link hardening (#6659/#6666/#6675) moves into the shared
  ChatMarkdown renderer 115.4 introduced, so /w and /m both keep it.
- The rename menu (#6686) keeps its deferred menu handoff, which is the
  fix that makes the editor survive the menu's focus trap.
- Permissions simplification (#6641) keeps its reduced group set, rendered
  through 115.4's Advanced section rail.
- Provider-key presence (#6691) reads value_status, unchanged.
Every one of these suites passed on its own branch and fails only once
the two are merged, because a v0.115.3 test now meets the surface
v0.115.4 rebuilt under it.

- The mobile link test drove `AssistantMarkdown`'s own component map.
  The map moved into the shared `ChatMarkdown`, so the test drives that
  one, with the resolver the mobile surface supplies. `ChatMarkdown`
  exports the map and its resolver context for it.
- The slash-command test lived beside a hook v0.115.4 moved into
  `@agenta/chat` and deleted the test with. It moves to the package,
  and drops the host stubs the hook now takes as props.
- Two Advanced-drawer suites navigated an accordion that is a section
  rail now: shorter nav labels, one panel mounted at a time, and a real
  button where the rail label used to carry `role="button"`.
- The config summary card row is "Model", not "Model & harness".
- The admission suite replaced `@agenta/entities/session` wholesale, and
  the composer's file palette reads a real export of it.
- Two Next copies resolve in this workspace, so a test that mounts a
  package component cannot satisfy its `useRouter`. Both apps' vitest
  configs pin one copy for the run.
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agenta-documentation Ready Ready Preview Sep 9, 2026 1:00pm UTC

Request Review

@mmabrouk

mmabrouk commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 7f2cba29-0c85-4c39-ad3d-f0b13513568c

📥 Commits

Reviewing files that changed from the base of the PR and between a17ae79 and 880d17f.

⛔ Files ignored due to path filters (3)
  • docs/design/agent-permission-defaults/qa-desktop-overview.png is excluded by !**/*.png
  • docs/design/agent-permission-defaults/qa-mobile-ask-dark.png is excluded by !**/*.png
  • docs/design/agent-permission-defaults/qa-mobile-overview.png is excluded by !**/*.png
📒 Files selected for processing (244)
  • .agents/skills/agent-release-gate/SKILL.md
  • .agents/skills/agent-release-gate/resources/coverage.md
  • .agents/skills/agent-release-gate/resources/matrix_n1_session_context.py
  • .agents/skills/agent-release-gate/resources/matrix_t9_agent_tools.py
  • .agents/skills/agent-release-gate/resources/path_triggers.py
  • .agents/skills/agent-release-gate/resources/qa_matrix_lib.py
  • .agents/skills/agent-release-gate/resources/test_qa_matrix_lib_silent_turns.py
  • .agents/skills/write-template-playbooks/SKILL.md
  • .agents/skills/write-template-playbooks/references/worked-example.md
  • api/ee/src/core/starter_credits_bridge/client.py
  • api/ee/src/core/starter_credits_bridge/service.py
  • api/ee/tests/pytest/unit/__init__.py
  • api/ee/tests/pytest/unit/events/__init__.py
  • api/ee/tests/pytest/unit/services/__init__.py
  • api/ee/tests/pytest/unit/test_starter_credits_bridge_client.py
  • api/ee/tests/pytest/unit/test_starter_credits_bridge_seeding.py
  • api/entrypoints/routers.py
  • api/entrypoints/worker_queues.py
  • api/oss/src/apis/fastapi/sessions/router.py
  • api/oss/src/apis/fastapi/vault/router.py
  • api/oss/src/core/secrets/services.py
  • api/oss/src/core/sessions/context.py
  • api/oss/src/core/sessions/streams/dtos.py
  • api/oss/src/core/sessions/streams/interfaces.py
  • api/oss/src/core/sessions/streams/naming.py
  • api/oss/src/core/sessions/streams/service.py
  • api/oss/src/core/sessions/streams/types.py
  • api/oss/src/core/workflows/build_kit.py
  • api/oss/src/core/workflows/service.py
  • api/oss/src/core/workflows/static_catalog.py
  • api/oss/src/dbs/postgres/sessions/streams/dao.py
  • api/oss/src/dbs/postgres/sessions/streams/mappings.py
  • api/oss/tests/pytest/unit/applications/test_build_kit_overlay.py
  • api/oss/tests/pytest/unit/secrets/test_managed_secrets.py
  • api/oss/tests/pytest/unit/secrets/test_vault_router_reconcile.py
  • api/oss/tests/pytest/unit/sessions/test_session_context_resolver.py
  • api/oss/tests/pytest/unit/sessions/test_stream_fill_once.py
  • api/oss/tests/pytest/unit/sessions/test_stream_header_merge.py
  • api/oss/tests/pytest/unit/sessions/test_stream_rename_guard.py
  • api/oss/tests/pytest/unit/sessions/test_stream_rename_guard_integration.py
  • api/oss/tests/pytest/unit/sessions/test_worker_session_context_wiring.py
  • api/oss/tests/pytest/unit/workflows/test_session_context_stamp.py
  • api/oss/tests/pytest/unit/workflows/test_static_catalog.py
  • docs/design/agent-custom-secrets/contracts.md
  • docs/design/agent-custom-secrets/status.md
  • docs/design/agent-permission-defaults/README.md
  • docs/design/agent-permission-defaults/claude-spike.md
  • docs/design/agent-permission-defaults/codex-spike.md
  • docs/design/agent-permission-defaults/context.md
  • docs/design/agent-permission-defaults/plan.md
  • docs/design/agent-permission-defaults/qa.md
  • docs/design/agent-permission-defaults/research.md
  • docs/design/agent-permission-defaults/spikes.md
  • docs/design/agent-permission-defaults/status.md
  • docs/design/agent-permission-defaults/validation.md
  • docs/design/agent-platform-instructions/open-issues.md
  • docs/design/agent-platform-instructions/status.md
  • docs/design/agent-self-naming-tools/api-design.md
  • docs/design/agent-workflows/documentation/agent-configuration.md
  • docs/design/agent-workflows/documentation/protocol.md
  • docs/design/agent-workflows/documentation/tools.md
  • docs/design/agent-workflows/interfaces/README.md
  • docs/design/agent-workflows/interfaces/public-edge/README.md
  • docs/design/agent-workflows/interfaces/public-edge/agent-config-schema.md
  • docs/design/agent-workflows/projects/agent-templates/exemplar.md
  • docs/design/agent-workflows/projects/agent-templates/playbook-spec.md
  • docs/design/docs-agent-platform/product-facts.md
  • docs/docs/guides/02-control-what-an-agent-can-do.mdx
  • docs/docs/guides/04-add-an-mcp-server.mdx
  • docs/docs/guides/06-create-an-automation.mdx
  • docs/docs/learn/_01-build-your-first-agent.mdx
  • docs/docs/self-host/agents/04-customize-the-agent-runtime.mdx
  • sdks/python/agenta/sdk/agents/__init__.py
  • sdks/python/agenta/sdk/agents/adapters/agent_templates/engineering.py
  • sdks/python/agenta/sdk/agents/adapters/agent_templates/knowledge.py
  • sdks/python/agenta/sdk/agents/adapters/agent_templates/monitoring.py
  • sdks/python/agenta/sdk/agents/adapters/agent_templates/ops.py
  • sdks/python/agenta/sdk/agents/adapters/agent_templates/sales.py
  • sdks/python/agenta/sdk/agents/adapters/agent_templates/support.py
  • sdks/python/agenta/sdk/agents/adapters/agenta_builtins.py
  • sdks/python/agenta/sdk/agents/adapters/harnesses.py
  • sdks/python/agenta/sdk/agents/adapters/local.py
  • sdks/python/agenta/sdk/agents/adapters/sandbox_agent.py
  • sdks/python/agenta/sdk/agents/dtos.py
  • sdks/python/agenta/sdk/agents/handler.py
  • sdks/python/agenta/sdk/agents/interfaces.py
  • sdks/python/agenta/sdk/agents/platform/__init__.py
  • sdks/python/agenta/sdk/agents/platform/connections.py
  • sdks/python/agenta/sdk/agents/platform/op_catalog.py
  • sdks/python/agenta/sdk/agents/platform/session_context.py
  • sdks/python/agenta/sdk/agents/platform_instructions.py
  • sdks/python/agenta/sdk/agents/tools/compat.py
  • sdks/python/agenta/sdk/agents/tools/models.py
  • sdks/python/agenta/sdk/agents/tools/resolver.py
  • sdks/python/agenta/sdk/agents/utils/wire.py
  • sdks/python/agenta/sdk/agents/wire_models.py
  • sdks/python/agenta/sdk/utils/types.py
  • sdks/python/oss/tests/pytest/integration/agents/_fake_runner_backend.py
  • sdks/python/oss/tests/pytest/unit/agents/conftest.py
  • sdks/python/oss/tests/pytest/unit/agents/golden/run_request.gateway_connection.json
  • sdks/python/oss/tests/pytest/unit/agents/golden/run_request.pi_core.json
  • sdks/python/oss/tests/pytest/unit/agents/platform/test_connections_http.py
  • sdks/python/oss/tests/pytest/unit/agents/platform/test_op_catalog.py
  • sdks/python/oss/tests/pytest/unit/agents/platform/test_session_context_http.py
  • sdks/python/oss/tests/pytest/unit/agents/test_agent_composition_seam.py
  • sdks/python/oss/tests/pytest/unit/agents/test_agenta_builtins_reference_files.py
  • sdks/python/oss/tests/pytest/unit/agents/test_dtos_agent_template.py
  • sdks/python/oss/tests/pytest/unit/agents/test_harness_adapters.py
  • sdks/python/oss/tests/pytest/unit/agents/test_platform_instructions.py
  • sdks/python/oss/tests/pytest/unit/agents/test_redaction_scope.py
  • sdks/python/oss/tests/pytest/unit/agents/test_wire_contract.py
  • sdks/python/oss/tests/pytest/unit/agents/tools/test_gateway_connection_config.py
  • sdks/python/oss/tests/pytest/unit/agents/tools/test_resolver.py
  • sdks/python/oss/tests/pytest/unit/agents/tools/test_saved_entry_tolerance.py
  • sdks/python/oss/tests/pytest/unit/test_batch_fold_stream_contract_routing.py
  • sdks/python/oss/tests/pytest/unit/test_invoke_real_handlers_negotiation_routing.py
  • services/oss/tests/pytest/unit/agent/conftest.py
  • services/oss/tests/pytest/unit/agent/test_default_agent_template.py
  • services/oss/tests/pytest/unit/agent/test_session_context_resolution.py
  • services/runner/docker/Dockerfile.dev
  • services/runner/docker/Dockerfile.gh
  • services/runner/docker/README.md
  • services/runner/images/sandbox/agent-requirements.txt
  • services/runner/images/sandbox/daytona/README.md
  • services/runner/images/sandbox/daytona/build_snapshot.py
  • services/runner/images/sandbox/install-agent-tools.sh
  • services/runner/src/engines/sandbox_agent/agent-mount-guidance.ts
  • services/runner/src/engines/sandbox_agent/agent-mount.ts
  • services/runner/src/engines/sandbox_agent/agent-tools-setup.ts
  • services/runner/src/engines/sandbox_agent/environment.ts
  • services/runner/src/engines/sandbox_agent/platform-guidance.ts
  • services/runner/src/engines/sandbox_agent/run-plan.ts
  • services/runner/src/engines/sandbox_agent/run-turn.ts
  • services/runner/src/engines/sandbox_agent/session-identity.ts
  • services/runner/src/environment/mount-lifecycle.ts
  • services/runner/src/environment/timing.ts
  • services/runner/src/protocol.ts
  • services/runner/tests/unit/agent-mount-guidance.test.ts
  • services/runner/tests/unit/agent-tools-setup.test.ts
  • services/runner/tests/unit/lifecycle-desired-state.test.ts
  • services/runner/tests/unit/permission-plan.test.ts
  • services/runner/tests/unit/platform-guidance.test.ts
  • services/runner/tests/unit/sandbox-agent-orchestration.test.ts
  • services/runner/tests/unit/session-pool.test.ts
  • services/runner/tests/unit/tool-direct.test.ts
  • services/runner/tests/unit/wire-contract.test.ts
  • web/mobile/src/features/chat/AssistantMarkdown.tsx
  • web/mobile/src/features/chat/TurnRow.tsx
  • web/mobile/tests/stubs/nextRouter.ts
  • web/mobile/tests/unit/agentPermissions.render.test.tsx
  • web/mobile/tests/unit/assistantMarkdownLinks.test.tsx
  • web/mobile/tests/unit/assistantMarkdownPipeline.test.tsx
  • web/mobile/tests/unit/fileOnlyRefusal.render.test.tsx
  • web/mobile/vitest.config.ts
  • web/oss/src/components/AgentChatSlice/AgentConversation.tsx
  • web/oss/src/components/AgentChatSlice/assets/markdown.tsx
  • web/oss/src/components/AgentChatSlice/assets/markdownLinkGate.test.tsx
  • web/oss/src/components/AgentChatSlice/assets/refusedMessageRecovery.test.ts
  • web/oss/src/components/AgentChatSlice/assets/refusedMessageRecovery.ts
  • web/oss/src/components/AgentChatSlice/components/AgentMessage.fileOnlyRefusal.test.tsx
  • web/oss/src/components/AgentChatSlice/components/AgentMessage.tsx
  • web/oss/src/components/AgentChatSlice/components/SessionTagBar.tsx
  • web/oss/src/components/AgentChatSlice/hooks/useSessionHydration.ts
  • web/oss/src/components/AgentChatSlice/hooks/useSessionHydration.unmount.test.tsx
  • web/oss/src/components/AgentChatSlice/state/sessions.ts
  • web/oss/src/components/DeploymentsDashboard/assets/VariantUseApiContent.loop.test.tsx
  • web/oss/src/components/DeploymentsDashboard/assets/VariantUseApiContent.tsx
  • web/oss/src/components/Drives/DriveFileLinkProvider.tsx
  • web/oss/src/components/Playground/Components/PlaygroundVariantConfig/permissions.test.tsx
  • web/oss/src/components/pages/agent-home/StripHome.tsx
  • web/oss/src/components/pages/sessions/SessionsPage.tsx
  • web/oss/src/components/pages/sessions/components/SessionListCard.tsx
  • web/oss/src/components/pages/sessions/components/useSessionCardVerbs.ts
  • web/oss/tests/playwright/acceptance/use-api/index.ts
  • web/oss/vitest.config.ts
  • web/packages/agenta-chat/src/assets/index.ts
  • web/packages/agenta-chat/src/assets/pendingSendEchoes.ts
  • web/packages/agenta-chat/src/assets/transcriptToMessages.ts
  • web/packages/agenta-chat/src/components/ChatMarkdown.tsx
  • web/packages/agenta-chat/src/hooks/index.ts
  • web/packages/agenta-chat/src/hooks/useAgentChatQueue.ts
  • web/packages/agenta-chat/src/hooks/useAgentConversation.ts
  • web/packages/agenta-chat/src/hooks/useChatSlashCommands.tsx
  • web/packages/agenta-chat/src/hooks/useMountGeneration.ts
  • web/packages/agenta-chat/src/hooks/usePendingSendEchoes.ts
  • web/packages/agenta-chat/src/hooks/useServerSessionInputs.ts
  • web/packages/agenta-chat/src/model/userStop.ts
  • web/packages/agenta-chat/tests/unit/assets/pendingSendEchoes.test.ts
  • web/packages/agenta-chat/tests/unit/assets/transcriptToMessages.test.ts
  • web/packages/agenta-chat/tests/unit/hooks/readRunAdmission.test.ts
  • web/packages/agenta-chat/tests/unit/hooks/useAgentChatQueue.test.ts
  • web/packages/agenta-chat/tests/unit/hooks/useAgentConversation.unmount.test.tsx
  • web/packages/agenta-chat/tests/unit/hooks/useChatSlashCommands.test.tsx
  • web/packages/agenta-chat/tests/unit/hooks/useMountGeneration.test.tsx
  • web/packages/agenta-chat/tests/unit/hooks/usePendingSendEchoes.test.tsx
  • web/packages/agenta-chat/tests/unit/hooks/useServerSessionInputs.test.ts
  • web/packages/agenta-entities/src/secret/core/agentModelCandidates.ts
  • web/packages/agenta-entities/src/secret/core/connections.ts
  • web/packages/agenta-entities/src/secret/state/persistence.ts
  • web/packages/agenta-entities/src/session/api/api.ts
  • web/packages/agenta-entities/src/session/api/client.ts
  • web/packages/agenta-entities/tests/unit/agent-creation-prefs.test.ts
  • web/packages/agenta-entities/tests/unit/create-ephemeral-app-from-template.test.ts
  • web/packages/agenta-entities/tests/unit/provider-connections.test.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentConfigPatch.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/BuildKitSection.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/providerKeyPrompt.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/sectionChanges.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx
  • web/packages/agenta-entity-ui/src/agent/AgentConfigSummaryCard.tsx
  • web/packages/agenta-entity-ui/src/drive/BlockedChatLink.tsx
  • web/packages/agenta-entity-ui/src/drive/chatFileLinkGate.ts
  • web/packages/agenta-entity-ui/src/drive/chatFileRefs.tsx
  • web/packages/agenta-entity-ui/src/drive/index.ts
  • web/packages/agenta-entity-ui/tests/unit/agentConfigPatch.test.ts
  • web/packages/agenta-entity-ui/tests/unit/agentConfigSummaryCard.test.tsx
  • web/packages/agenta-entity-ui/tests/unit/agentSettings.test.tsx
  • web/packages/agenta-entity-ui/tests/unit/buildKitDescriptors.test.ts
  • web/packages/agenta-entity-ui/tests/unit/chatFileLinkGate.test.ts
  • web/packages/agenta-entity-ui/tests/unit/chatFileRefs.test.ts
  • web/packages/agenta-entity-ui/tests/unit/connectionPicker.test.ts
  • web/packages/agenta-entity-ui/tests/unit/providerKeyPrompt.test.ts
  • web/packages/agenta-entity-ui/tests/unit/sectionChanges.test.ts
  • web/packages/agenta-sessions-ui/src/SessionCardList.tsx
  • web/packages/agenta-sessions-ui/src/SessionListCard.tsx
  • web/packages/agenta-sessions-ui/src/SessionListPanel.tsx
  • web/packages/agenta-sessions-ui/src/SessionRow.tsx
  • web/packages/agenta-sessions-ui/src/SessionRowContextMenu.tsx
  • web/packages/agenta-sessions-ui/src/SessionTabRail.tsx
  • web/packages/agenta-sessions-ui/src/SessionsListView.tsx
  • web/packages/agenta-sessions-ui/src/index.ts
  • web/packages/agenta-sessions-ui/src/useDeferredMenuSelect.ts
  • web/packages/agenta-sessions-ui/src/useSessionActions.tsx
  • web/packages/agenta-sessions-ui/tests/unit/SessionCardListRename.test.tsx
  • web/packages/agenta-sessions-ui/tests/unit/sessionRenameMenu.test.tsx
  • web/packages/agenta-shared/src/utils/permissionPolicy.ts
  • web/packages/agenta-shared/tests/unit/permissionPolicy.test.ts
  • web/storybook/stories/entity-ui/AgentConfigSummaryCard.stories.tsx
  • web/storybook/stories/entity-ui/AgentSharedSettings.stories.tsx
  • web/storybook/stories/entity-ui/BuildKitSection.stories.tsx
  • web/storybook/stories/entity-ui/PermissionPolicySelect.stories.tsx

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Summary

Summary by CodeRabbit

  • New Features

    • New agents now default to Allow all permissions, with clearer permission controls.
    • Agents can access their name, session name, and first-turn context during conversations.
    • Added secure secret-request guidance and persistent agent tool restoration across sessions.
    • Improved session renaming with protection against conflicting automatic changes.
    • Added safer chat file links and clearer recovery for refused messages.
  • Bug Fixes

    • Starter-credit connections now recover automatically when funded models change.
    • Improved session hydration and variant selection reliability.

Walkthrough

This PR delivers many linked changes: a per-turn session-context feature (agent name, session name, first-turn flag) that flows from the API through the SDK to the runner prompt; a session-rename guard that protects person-chosen names; starter-credits model reconciliation; a new "allow" default runner permission with explicit build-kit op permissions; a request_secret tool; sandbox .tools restoration; a hotfix that makes the SDK tolerate saved gateway tool entries with missing policy or legacy provider_action fields; template playbook rewrites; and substantial frontend work on pending-send echoes, mount-generation guards, markdown link safety, and permissions UI.

Changes

Session Context and Naming

Layer / File(s) Summary
API session-context resolver and stamping
api/oss/src/core/sessions/context.py, api/oss/src/core/workflows/service.py, api/entrypoints/routers.py, api/entrypoints/worker_queues.py
Adds a resolver returning session name and first-turn flag, wired into WorkflowsService and stamped onto request.meta.session_context.
SDK SessionContext and platform text
sdks/python/agenta/sdk/agents/dtos.py, handler.py, platform/session_context.py, platform_instructions.py, wire_models.py, utils/wire.py, adapters/*
Adds SessionContext, a bounded resolver for the browser-posted path, and renders turnContext into harness prompts.
Runner prompt injection
services/runner/src/protocol.ts, run-turn.ts, run-plan.ts, platform-guidance.ts
Prepends turnContext to each new prompt, excluded from session identity/fingerprint.
Session rename guard
api/oss/src/core/sessions/streams/*, api/oss/src/dbs/postgres/sessions/streams/*, api/oss/src/apis/fastapi/sessions/router.py, sdks/python/agenta/sdk/agents/platform/op_catalog.py
Adds SessionNameSource, refuse_name_change, and SessionNameProtected (409) to stop automatic renames from overwriting person-chosen names.
Frontend rename UI
web/packages/agenta-sessions-ui/*, web/oss/src/components/AgentChatSlice/state/sessions.ts, SessionTagBar.tsx
Adds deferred menu-select rename UX and nameSource on write.

Permissions, Secrets, and Sandbox Tooling

Layer / File(s) Summary
Permission defaults
api/oss/src/core/workflows/build_kit.py, sdks/python/agenta/sdk/utils/types.py, docs
Changes the canonical new-agent runner default to allow and gives the build-kit overlay explicit per-op permissions.
request_secret tool
api/oss/src/core/workflows/static_catalog.py, sdks/python/agenta/sdk/agents/tools/resolver.py
Ships request_secret as a static embed with expanded usage guidance and de-duplicates reserved client tools.
Agent tools restore
services/runner/src/engines/sandbox_agent/agent-tools-setup.ts, services/runner/images/sandbox/install-agent-tools.sh, Docker images
Restores agent-files/.tools/ before each session and unifies image tool installation into one script.
Starter credits reconciliation
api/ee/src/core/starter_credits_bridge/*, api/oss/src/core/secrets/services.py, sdks/python/agenta/sdk/agents/platform/connections.py
Re-points managed starter-credits connections at the currently funded model on seed and on read.
Gateway tool tolerance hotfix
sdks/python/agenta/sdk/agents/dtos.py, tools/compat.py, tools/models.py
Tolerates saved entries with a missing policy or legacy provider_action, dropping only unrepairable entries.
Template playbooks rewrite
sdks/python/agenta/sdk/agents/adapters/agent_templates/*, agenta_builtins.py
Replaces ask-with-defaults context gathering with do-not-ask research and rewrites the build-an-agent skill.

Frontend Chat and Permissions UI

Layer / File(s) Summary
Pending send echoes and mount generation
web/packages/agenta-chat/src/hooks/*, web/oss/src/components/AgentChatSlice/hooks/*
Adds echo rows for in-flight sends and generation guards against stale async adoption.
Markdown link safety
web/packages/agenta-entity-ui/src/drive/*, web/packages/agenta-chat/src/components/ChatMarkdown.tsx
Blocks protocol-relative/host-escaping links and resolves in-chat file references.
Agent permissions UI
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/*, agent/AgentConfigSummaryCard.tsx
Moves permissions into a top-level section with atomic scoped saves.
Custom connection routing
web/packages/agenta-entities/src/secret/core/agentModelCandidates.ts
Routes custom connections to harnesses by model family instead of connection name.

Estimated code review effort: 5 (Critical) | ~180 minutes

Severity of issue fixed: High

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant AgentService as Agent Service (SDK)
  participant Backend as Agenta Backend
  participant Runner
  participant Harness

  Browser->>AgentService: POST /invoke (turn request)
  AgentService->>AgentService: build SessionConfig
  AgentService->>Backend: read workflow name, session name, latest turn
  Backend-->>AgentService: agent_name, session_name, first_turn
  AgentService->>AgentService: render turnContext (platform_instructions)
  AgentService->>Runner: /run request with turnContext
  Runner->>Runner: prepend turnContext to prompt blocks
  Runner->>Harness: run turn with fresh session facts
  Harness-->>Runner: turn result
  Runner-->>AgentService: response
  AgentService-->>Browser: turn response
Loading
sequenceDiagram
  participant Model as Model (rename_session tool)
  participant API as Sessions Router
  participant Service as SessionStreamsService
  participant DAO as SessionStreamsDAO

  Model->>API: PUT header rename (name_source=automatic)
  API->>Service: set_header(name_source)
  Service->>DAO: update_header(name_source) with row lock
  DAO->>DAO: refuse_name_change(current_source, edit)
  alt person-chosen name protected
    DAO-->>Service: raise SessionNameProtected
    Service-->>API: raise SessionNameProtected
    API-->>Model: 409 with envelope (code, next_step)
  else rename allowed
    DAO->>DAO: apply header edit, bump name_revision
    DAO-->>Service: updated row
    Service-->>API: success
    API-->>Model: 200 OK
  end
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch merge/hotfix-v0.115.3-into-v0.115.4

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mmabrouk

mmabrouk commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Superseded: Ashraf merged release/v0.115.3 into release/v0.115.4 directly (5e40dd7, 05b91e7, ca335f0). His tree carries every v0.115.3 fix and both hot fixes; the only behavioral difference, /m inline code spans resolving as file links, is the chosen direction. The resolution table and the QA evidence in this PR stay as the record. Branch left in place for reference.

@mmabrouk mmabrouk closed this Sep 9, 2026
@mmabrouk

mmabrouk commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Do not merge: superseded, and merging this would revert newer commits

release/v0.115.4 moved after this branch was cut, from 0c85a59 to a17ae79, and it already carries the merge this PR was opened to do. It contains 3807043, the hotfix/v0.115.3 tip, through 5e40dd7 and 05b91e7, plus a merge of main in ca335f0.

That merge resolved the same sixteen conflicts the same way this one did, independently. Checked on the target: the deferred menu handoff is present on the card list, the tab rail and the tag bar; the link hardening sits inside the shared ChatMarkdown; the Advanced rail carries execution, build-kit and secrets panels with no permissions panel; the mobile markdown keeps its drive resolver with inline code links off; and web/mobile/src/features/chat/DriveLink.tsx is deleted. Nothing in this branch is missing there.

Merging this now would be a revert. Its base predates a17ae79, so it would undo "reject non-http(s) schemes in the document URL preview link" in PromptDocumentUpload.tsx, and it would roll back the API reference files that arrived with the main merge.

Moved to draft so it cannot be merged by accident. It should be closed.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Pull request is closed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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