Skip to content

Self Wake Up Timer#685

Merged
arul28 merged 1 commit into
mainfrom
ade/able-set-self-wake-up-d0d317c6
Jul 2, 2026
Merged

Self Wake Up Timer#685
arul28 merged 1 commit into
mainfrom
ade/able-set-self-wake-up-d0d317c6

Conversation

@arul28

@arul28 arul28 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

Describe the change.

What Changed

Key files and behaviors.

Validation

How you tested.

Risks

Anything to watch.

ADE   Open in ADE  ·  ade/able-set-self-wake-up-d0d317c6 branch  ·  PR #685

Greptile Summary

This PR adds a unified way to start ADE Work chats and tracked CLI sessions. The main changes are:

  • Adds ade new chat --mode chat|cli with auto-lane creation and prompt kickoff support.
  • Threads fastMode through CLI session RPC and sync remote-command launch paths.
  • Updates iOS launch calls, CLI tests, README examples, and agent/sync documentation for the new flow.

Confidence Score: 4/5

Mostly safe to merge after fixing iOS CLI fast-mode forwarding.

The CLI and sync server changes are covered, but two iOS launch paths drop the newly added CLI fastMode argument because they use a chat-only support gate.

apps/ios/ADE/Views/Work/WorkNewChatScreen.swift; apps/ios/ADE/Views/Hub/HubComposerDrawer.swift

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex attempted to compile and run a focused Swift harness for the WorkNewChatScreen CLI fast mode gate, but swiftc and the Swift toolchain were unavailable in the container.
  • T-Rex executed a focused HubComposerDrawer CLI fast mode harness and observed that fastMode is nil for both codexFastMode true and false, confirming boundary behavior.
  • T-Rex compared the before and after new-chat CLI artifacts and confirmed no contract mismatch in the requested CLI/API command surface.
  • T-Rex ran focused tests to validate pre/post fastmode flag states, observing that enabling fast mode yields CLI args including -c and service_tier="default", with both fastMode:false and codexFastMode:false producing those args, and both runs exiting with status 0.
  • T-Rex inspected self-wakeup timer documentation, confirming no executable self-wake timer was added, with wakeup actions present in docs and a single registration remaining for cto.triggerAgentWakeup.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/ade-cli/src/cli.ts Introduces the ade new chat unified chat/CLI command, auto-lane creation, dry-run output, and shared fast-mode parsing.
apps/ade-cli/src/adeRpcServer.ts Adds fastMode and legacy alias parsing to start_cli_session and forwards it into tracked CLI launch construction.
apps/ade-cli/src/services/sync/syncRemoteCommandService.ts Accepts fastMode on remote work.startCliSession calls and forwards it to the CLI launch builder.
apps/desktop/src/shared/types/sync.ts Extends sync CLI session argument types with fastMode and a deprecated codexFastMode alias.
apps/ios/ADE/Services/SyncService.swift Adds optional fastMode serialization to iOS startCliSession remote command calls.
apps/ios/ADE/Views/Work/WorkNewChatScreen.swift Attempts to forward fast-mode settings for Work CLI launches, but the chat-only support gate means CLI launches always send nil.
apps/ios/ADE/Views/Hub/HubComposerDrawer.swift Attempts to forward fast-mode settings for Hub CLI launches, but the chat-only support gate means CLI launches always send nil.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User
participant AdeCLI as ade new chat
participant RPC as ADE RPC / Sync
participant Lane as Lane service
participant Chat as Work chat service
participant PTY as Tracked CLI launcher

User->>AdeCLI: "ade new chat --mode chat|cli --lane auto|id --prompt ..."
alt auto-create lane
    AdeCLI->>RPC: create_lane(name/base/etc.)
    RPC->>Lane: create lane
    Lane-->>RPC: lane id
    RPC-->>AdeCLI: lane result
end
alt mode chat
    AdeCLI->>RPC: run_ade_action(chat.createSession, launch args)
    RPC->>Chat: create session
    Chat-->>RPC: session id
    RPC-->>AdeCLI: session result
    opt prompt supplied
        AdeCLI->>RPC: run_ade_action(chat.sendMessage)
        RPC->>Chat: send first message
        Chat-->>RPC: accepted
    end
else mode cli
    AdeCLI->>RPC: start_cli_session(lane/provider/model/reasoning/fastMode)
    RPC->>PTY: buildTrackedCliLaunchCommand(...)
    PTY-->>RPC: terminal session
    RPC-->>AdeCLI: pty/session result
end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User
participant AdeCLI as ade new chat
participant RPC as ADE RPC / Sync
participant Lane as Lane service
participant Chat as Work chat service
participant PTY as Tracked CLI launcher

User->>AdeCLI: "ade new chat --mode chat|cli --lane auto|id --prompt ..."
alt auto-create lane
    AdeCLI->>RPC: create_lane(name/base/etc.)
    RPC->>Lane: create lane
    Lane-->>RPC: lane id
    RPC-->>AdeCLI: lane result
end
alt mode chat
    AdeCLI->>RPC: run_ade_action(chat.createSession, launch args)
    RPC->>Chat: create session
    Chat-->>RPC: session id
    RPC-->>AdeCLI: session result
    opt prompt supplied
        AdeCLI->>RPC: run_ade_action(chat.sendMessage)
        RPC->>Chat: send first message
        Chat-->>RPC: accepted
    end
else mode cli
    AdeCLI->>RPC: start_cli_session(lane/provider/model/reasoning/fastMode)
    RPC->>PTY: buildTrackedCliLaunchCommand(...)
    PTY-->>RPC: terminal session
    RPC-->>AdeCLI: pty/session result
end
Loading

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
apps/ios/ADE/Views/Work/WorkNewChatScreen.swift:655
**CLI fast mode dropped**
`fastModeSupported` returns `false` whenever `sessionMode == .cli` (lines 367-380), so this new `startCliSession` argument is always `nil` for CLI launches. A user’s saved or selected fast/no-fast value is therefore not forwarded to the remote command, while the desktop/CLI path now expects `fastMode` to drive `service_tier` for tracked CLI sessions.

### Issue 2 of 2
apps/ios/ADE/Views/Hub/HubComposerDrawer.swift:721
**CLI fast mode dropped**
`fastModeSupported` is explicitly gated to chat mode in this view (lines 161-173), so the newly added CLI `fastMode` parameter is always sent as `nil`. Hub-started CLI sessions therefore ignore the fast/no-fast setting even though `work.startCliSession` now consumes it to build the provider launch command.

Reviews (1): Last reviewed commit: "feat: add unified ADE chat launch comman..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Jul 2, 2026 11:10am

@arul28

arul28 commented Jul 2, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3583fbf2-6188-43a1-a112-c7184e332ef5

📥 Commits

Reviewing files that changed from the base of the PR and between 49b5fa5 and 31f11c0.

⛔ Files ignored due to path filters (2)
  • docs/features/agents/README.md is excluded by !docs/**
  • docs/features/sync-and-multi-device/remote-commands.md is excluded by !docs/**
📒 Files selected for processing (12)
  • apps/ade-cli/README.md
  • apps/ade-cli/src/adeRpcServer.test.ts
  • apps/ade-cli/src/adeRpcServer.ts
  • apps/ade-cli/src/cli.test.ts
  • apps/ade-cli/src/cli.ts
  • apps/ade-cli/src/services/sync/syncRemoteCommandService.ts
  • apps/desktop/resources/agent-skills/ade-cli-control-plane/SKILL.md
  • apps/desktop/src/main/services/sync/syncRemoteCommandService.test.ts
  • apps/desktop/src/shared/types/sync.ts
  • apps/ios/ADE/Services/SyncService.swift
  • apps/ios/ADE/Views/Hub/HubComposerDrawer.swift
  • apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
👮 Files not reviewed due to content moderation or server errors (12)
  • apps/ade-cli/src/cli.ts
  • apps/ade-cli/src/services/sync/syncRemoteCommandService.ts
  • apps/ade-cli/src/adeRpcServer.ts
  • apps/ade-cli/src/cli.test.ts
  • apps/desktop/resources/agent-skills/ade-cli-control-plane/SKILL.md
  • apps/desktop/src/shared/types/sync.ts
  • apps/ios/ADE/Services/SyncService.swift
  • apps/ade-cli/README.md
  • apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
  • apps/desktop/src/main/services/sync/syncRemoteCommandService.test.ts
  • apps/ade-cli/src/adeRpcServer.test.ts
  • apps/ios/ADE/Views/Hub/HubComposerDrawer.swift

📝 Walkthrough

[!WARNING]

Walkthrough skipped

File diffs could not be summarized.

✨ 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 ade/able-set-self-wake-up-d0d317c6

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 SkillSpector (2.3.7)
apps/desktop/resources/agent-skills/ade-cli-control-plane/SKILL.md

SkillSpector returned invalid JSON output


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.

@mintlify

mintlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ade-ac1c6011 🟢 Ready View Preview Jul 2, 2026, 11:12 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

initialInput: opener,
modelId: modelId,
reasoningEffort: cliReasoningEffort,
fastMode: fastModeSupported ? codexFastMode : nil,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 CLI fast mode dropped
fastModeSupported returns false whenever sessionMode == .cli (lines 367-380), so this new startCliSession argument is always nil for CLI launches. A user’s saved or selected fast/no-fast value is therefore not forwarded to the remote command, while the desktop/CLI path now expects fastMode to drive service_tier for tracked CLI sessions.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
Line: 655

Comment:
**CLI fast mode dropped**
`fastModeSupported` returns `false` whenever `sessionMode == .cli` (lines 367-380), so this new `startCliSession` argument is always `nil` for CLI launches. A user’s saved or selected fast/no-fast value is therefore not forwarded to the remote command, while the desktop/CLI path now expects `fastMode` to drive `service_tier` for tracked CLI sessions.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

initialInput: opener,
modelId: modelId,
reasoningEffort: cliReasoning,
fastMode: fastModeSupported ? codexFastMode : nil,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 CLI fast mode dropped
fastModeSupported is explicitly gated to chat mode in this view (lines 161-173), so the newly added CLI fastMode parameter is always sent as nil. Hub-started CLI sessions therefore ignore the fast/no-fast setting even though work.startCliSession now consumes it to build the provider launch command.

Artifacts

Repro: focused HubComposerDrawer CLI fastMode payload harness

  • Contains supporting evidence from the run (text/x-python; charset=utf-8).

Repro: harness output showing CLI fastMode is nil for selected true and false

  • Keeps the command output available without making the summary code-heavy.

View artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/ios/ADE/Views/Hub/HubComposerDrawer.swift
Line: 721

Comment:
**CLI fast mode dropped**
`fastModeSupported` is explicitly gated to chat mode in this view (lines 161-173), so the newly added CLI `fastMode` parameter is always sent as `nil`. Hub-started CLI sessions therefore ignore the fast/no-fast setting even though `work.startCliSession` now consumes it to build the provider launch command.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

@arul28 arul28 merged commit 74e413f into main Jul 2, 2026
29 of 30 checks passed
@arul28 arul28 deleted the ade/able-set-self-wake-up-d0d317c6 branch July 2, 2026 11:24
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