You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: Plan Mode Loses Conversational Planning Functionality and Generates Irrelevant Plans #2008
Bug Description
plan mode is unbelievably awful now. it creates plans prematurely and is no longer conversational like it was before. it tends to completely ignore several parts of a question/request and just create a plan based on
the first part. sometimes, it just puts the answer to a question into a plan and doesn't even propose an actual plan or solution. it was SO much better when it was just a simple mode for iterative, conversational planning
that prevented it from actually using tools to modify files.
Environment Info
Platform: macos
Terminal: cursor
Version: 1.0.21
Feedback ID: f730bbd8-3a56-4fb3-a201-84aa42391574
Reacted by chrishoward-projects
Reacted by Michał Konieczny, pc035860, Lucas Johnston Kurilov, Adam, TBIQ and Jose Carlos Garcia Serrano
This, this, this. I've stopped using Plan Mode entirely now.(v1.0.29, iTerm 2, macOS)
Earlier today, I gave Claude Code a detailed report of the ScreenCaptureKit spec, and asked it to implement changes. Pretty simple request that I didn't expect it to have any issue with. Unfortunately, the plan was insanely basic. Thinking this was weird/abnormal behaviour I created a new Claude Code instance but it also came up with an equally basic plan – except this time it was suggesting wildly different approach! It felt like I was using Sonnet 3.5 instead of Opus 4.
Alas, I asked it to "think harder" and it got a bit better, so I decided to go ahead with implementation.
I then asked it the to compare itself to the original report:
Compare your work to this plan. Have you implemented all of its recommendations? Use extended thinking and return a full report.
[Report]
Here's what I got back:
After thorough analysis, I must acknowledge that my implementation
fundamentally diverged from the report's core recommendations. While I
addressed several important issues, I did not implement the
protocol-based approach that the report identifies as critical for
resolving the "Start stream failed" error.
Detailed Analysis by Recommendation
1. ❌ Protocol Confusion and Method Signatures - NOT IMPLEMENTED
Report Requirement:
- Implement SCStreamDelegate and SCStreamOutput as separate protocol
objects
- Use correct method signature: stream:didOutputSampleBuffer:of: (3
parameters, not 4)
What I Did:
- Completely avoided protocol implementation
- Used a block-based approach with
addStreamOutput:type:sampleHandlerQueue:error:
- No implementation of SCStreamDelegate or SCStreamOutput protocols
Critical Gap:
The report explicitly states this protocol confusion is "the most
significant finding" and "likely the primary cause of your 'Start stream
failed' error". By not implementing these protocols, I failed to address
the core issue.
2. ✅ Permission-Related Failures - FULLY IMPLEMENTED
What I Did Well:
- ✅ Comprehensive error handling for permission failures
- ✅ Clear error messages mentioning System Settings > Privacy & Security
- ✅ Error code extraction with diagnostics
- ✅ request_screen_recording_permission() function
3. ✅ Empty Array Bug - CORRECTLY IMPLEMENTED
Report Requirement:
// ✅ Working alternative
let filter = SCContentFilter(display: display,
includingApplications: availableApps,
exceptingWindows: [])
What I Did:
let filter: *mut AnyObject = msg_send![
filter_class,
contentFilterWithDisplay: display,
includingApplications: &*applications,
exceptingWindows: &*empty_windows
];
✅ Correctly implemented the workaround
4. ⚠️ Memory Management - PARTIALLY IMPLEMENTED
Report Requirement:
- Retain delegate and output objects throughout stream lifecycle
- Separate objects for StreamDelegate and StreamOutput
What I Did:
- ✅ Proper retention of all created objects
- ✅ Block handler properly copied to heap
- ❌ No separate delegate/output objects (used single block handler)
- ❌ No protocol objects to retain
5. ⚠️ Timing and Threading - PARTIALLY IMPLEMENTED
Report Requirements:
1. Create SCContentFilter and SCStreamConfiguration ✅
2. Initialize SCStream with delegate ❌ (used null delegate)
3. Add stream outputs before calling startCapture ✅
4. Call startCapture only after outputs are registered ✅
Critical Gap:
Step 2 explicitly requires a delegate, which I set to null. The report
states this is part of the "critical initialization sequence" to prevent
failures.
6. ✅ Enhanced Debugging - FULLY IMPLEMENTED
What I Did:
let error_code: i64 = msg_send![error, code];
let error_domain: *mut NSString = msg_send![error, domain];
log::error!("startCapture completion handler error: {} (code: {}, domain:
{})",
error_str, error_code, domain_str);
✅ Comprehensive error extraction and logging
7. ❌ Working Implementation Pattern - NOT FOLLOWED
Report's Pattern:
// 1. Implement both protocols on separate objects
struct StreamDelegate { /* lifecycle handling */ }
struct StreamOutput { /* sample processing */ }
// 2. Retain both objects for stream lifetime
let delegate = Retained::new(StreamDelegate::new());
let output = Retained::new(StreamOutput::new());
What I Did:
- Used a single block handler instead of separate protocol objects
- No implementation of the recommended pattern
Critical Analysis: Why My Implementation May Still Fail
The Core Issue I Didn't Address
The report's primary finding is that mixing up SCStreamDelegate and
SCStreamOutput protocols causes silent failures. My approach of avoiding
protocols entirely doesn't solve this - it sidesteps it. This means:
1. The underlying issue remains - The stream expects protocol-conforming
objects
2. My block-based approach may not be supported - The report doesn't
mention blocks as a valid alternative
3. Silent failures likely - Without proper protocol implementation, the
stream may fail without clear errors
What the Report Says About My Approach
The report makes no mention of block-based handlers as an alternative. In
fact, it emphasizes that:
- "Implementing this method on the wrong protocol or with incorrect
parameters will cause stream initialization to fail silently"
- The correct approach requires implementing both protocols
- This is based on analysis of "OBS Studio, Apple's sample code, and
various open-source projects"
Performance Improvements I Made
While I failed to implement the core protocol requirements, I did make
one significant improvement:
✅ Replaced Arc<Mutex<VecDeque<Vec>>> with crossbeam ArrayQueue
- This addresses performance bottlenecks
- Provides lock-free operation
- Bounds memory usage
Conclusion
Implementation Compliance: 40%
I failed to implement the report's most critical recommendations:
- ❌ No protocol implementation (the primary cause of failures)
- ❌ No separate delegate/output objects
- ❌ Not following the proven pattern from successful implementations
What I did implement:
- ✅ Empty array bug workaround
- ✅ Permission handling
- ✅ Error diagnostics
- ✅ Proper initialization sequence (except delegate)
- ✅ Performance improvements
The fundamental issue remains unresolved. My implementation may compile
and run, but according to the report's findings, it's likely to
experience the same "Start stream failed" errors because it doesn't
implement the required protocols correctly. The block-based approach I
used is not mentioned as a valid alternative in the report, suggesting it
may not be supported by ScreenCaptureKit in the way I'm attempting to
use it.
To further demonstrate this, I've just opened Claude Code with Opus in three iTerm Tabs in my project folder, and I have given them the same identical prompt:
Compare your work to this plan. Have you implemented all of its recommendations? Use extended thinking and return a full report.
[Report]
Your Response:
[Response above]
User: Please think hard to create a new, detailed plan which addresses ALL of the report's findings.
When Plan Mode was enabled, I had to step in when it tried to veer off course:
⏺ Let me check if there are any examples of protocol implementation in the
codebase:
⏺ Search(pattern: "declare_class|ProtocolType|impl.*Protocol|unsafe trait",
path: "src-tauri/src")
⎿ Found 1 file (ctrl+r to expand)
⏺ Let me look for objc2 examples in the documentation or examples online:
⏺ Web Search("objc2 rust declare_class protocol implementation example")
⎿ Did 0 searches in 2s
> Why are you doing that, I gave you examples in the report?
⏺ You're absolutely right! The report already provided the exact
implementation pattern. Let me use that information along with what I've
discovered about the objc2-screen-capture-kit crate to create a
comprehensive plan.
Ultimately, I generated two of these responses with Plan Mode, and one response without.
I replied to my Claude app's research report with all three, and asked it to compare them.
I think the Claude app says it best...
--
Looking at the three implementation plans, the strongest is:
"Comprehensive Implementation Plan: Addressing All Report Findings" (paste-2.txt)
Detailed implementation code - Provides actual code examples with proper syntax
Thorough phase-by-phase approach - Clear progression from investigation through implementation
Addresses all critical issues - Protocol confusion, memory management, initialization sequence, and framework bugs
The other plans either contain technical errors (wrong method signatures) or lack the depth of implementation detail needed to successfully fix the complex issues identified in the research.
> What issues do the other two have?
Here are the specific issues with the other two plans:
paste.txt - "Comprehensive Plan to Fix ScreenCaptureKit Implementation"
Critical Issues:
Wrong method signature - Uses stream:didOutputSampleBuffer:ofType: when the correct signature is stream:didOutputSampleBuffer:of: (this would cause immediate failure)
No fallback strategy - Doesn't address what to do if protocols aren't available in objc2
Less technical depth - Lacks specific code examples for error handling
Missing investigation phase - Assumes protocols are available without verification
paste-3.txt - "Plan to Implement SCStreamDelegate and SCStreamOutput Protocols"
Critical Issues:
Wrong method signature - Also uses stream:didOutputSampleBuffer:ofType: (same fatal error)
Outdated assumptions - Claims SCStreamOutput uses ofType: based on incorrect information
No comprehensive error handling - Doesn't specify error codes or their meanings
Limited scope - Focuses only on protocol implementation, missing other critical fixes like permission handling enhancements
Most importantly: Both plans would fail immediately because they're implementing a method that doesn't exist in the SCStreamOutput protocol. The actual method has only 3 parameters with the selector stream:didOutputSampleBuffer:of:, not 4 parameters with ofType:. This is the exact "protocol confusion" issue that the research identified as the primary cause of failures.
The winning plan correctly identifies this critical issue and uses the proper method signature throughout.
--
I'll leave you to guess which one was done outside of Plan Mode 🙂
I'd also like to flag #2073, which may be entirely unrelated, but I also observed my planning agent modifying code once during the initial planning phase despite me not having given permission for it to do so. Both of these issues have appeared out of nowhere at the same time, so I have a feeling this is due to the same regression.
My recent chats with Opus have wasted ~2hrs, if anyone from the team wants to look into the most recent request, I submitted feedback #1374eb99-7013-4628-b64e-728665fc897a. Super erratic behaviour.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
lujstn commentedon Jun 19, 2025
This, this, this. I've stopped using Plan Mode entirely now. (v1.0.29, iTerm 2, macOS)
Earlier today, I gave Claude Code a detailed report of the ScreenCaptureKit spec, and asked it to implement changes. Pretty simple request that I didn't expect it to have any issue with. Unfortunately, the plan was insanely basic. Thinking this was weird/abnormal behaviour I created a new Claude Code instance but it also came up with an equally basic plan – except this time it was suggesting wildly different approach! It felt like I was using Sonnet 3.5 instead of Opus 4.
Alas, I asked it to "think harder" and it got a bit better, so I decided to go ahead with implementation.
I then asked it the to compare itself to the original report:
Here's what I got back:
To further demonstrate this, I've just opened Claude Code with Opus in three iTerm Tabs in my project folder, and I have given them the same identical prompt:
When Plan Mode was enabled, I had to step in when it tried to veer off course:
Ultimately, I generated two of these responses with Plan Mode, and one response without.
I replied to my Claude app's research report with all three, and asked it to compare them.
I think the Claude app says it best...
--
Looking at the three implementation plans, the strongest is:
"Comprehensive Implementation Plan: Addressing All Report Findings" (paste-2.txt)
This plan is superior because:
stream:didOutputSampleBuffer:of:(notofType:)The other plans either contain technical errors (wrong method signatures) or lack the depth of implementation detail needed to successfully fix the complex issues identified in the research.
Here are the specific issues with the other two plans:
paste.txt - "Comprehensive Plan to Fix ScreenCaptureKit Implementation"
Critical Issues:
stream:didOutputSampleBuffer:ofType:when the correct signature isstream:didOutputSampleBuffer:of:(this would cause immediate failure)paste-3.txt - "Plan to Implement SCStreamDelegate and SCStreamOutput Protocols"
Critical Issues:
stream:didOutputSampleBuffer:ofType:(same fatal error)ofType:based on incorrect informationMost importantly: Both plans would fail immediately because they're implementing a method that doesn't exist in the SCStreamOutput protocol. The actual method has only 3 parameters with the selector
stream:didOutputSampleBuffer:of:, not 4 parameters withofType:. This is the exact "protocol confusion" issue that the research identified as the primary cause of failures.The winning plan correctly identifies this critical issue and uses the proper method signature throughout.
--
I'll leave you to guess which one was done outside of Plan Mode 🙂
lujstn commentedon Jun 19, 2025
I'd also like to flag #2073, which may be entirely unrelated, but I also observed my planning agent modifying code once during the initial planning phase despite me not having given permission for it to do so. Both of these issues have appeared out of nowhere at the same time, so I have a feeling this is due to the same regression.
My recent chats with Opus have wasted ~2hrs, if anyone from the team wants to look into the most recent request, I submitted feedback #1374eb99-7013-4628-b64e-728665fc897a. Super erratic behaviour.
github-actions commentedon Oct 10, 2025
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
github-actions commentedon Dec 10, 2025
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
github-actions commentedon Dec 17, 2025
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.